typefindfunctions: differentiate h265 from h264

in some cases, the algo gives the same probability
to h264 and h265 for h26x stream resulting in a h265
stream detected as a h264.
if sps/pps/vps detected, increase the probabilty.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/957>
This commit is contained in:
Stéphane Cerveau 2021-09-16 15:18:24 +02:00 committed by GStreamer Marge Bot
parent 5e08ede8f6
commit 84b357dd5f

View file

@ -2887,7 +2887,12 @@ h264_video_type_find (GstTypeFind * tf, gpointer unused)
seen_pps, seen_sps, seen_idr, seen_ssps);
if (good >= 2 && bad == 0) {
gst_type_find_suggest (tf, GST_TYPE_FIND_POSSIBLE, H264_VIDEO_CAPS);
GstTypeFindProbability probability = GST_TYPE_FIND_POSSIBLE;
if (seen_pps && seen_sps)
probability = GST_TYPE_FIND_LIKELY;
gst_type_find_suggest (tf, probability, H264_VIDEO_CAPS);
}
}
@ -2980,7 +2985,12 @@ h265_video_type_find (GstTypeFind * tf, gpointer unused)
seen_pps, seen_sps, seen_vps, seen_irap);
if (good >= 2 && bad == 0) {
gst_type_find_suggest (tf, GST_TYPE_FIND_POSSIBLE, H265_VIDEO_CAPS);
GstTypeFindProbability probability = GST_TYPE_FIND_POSSIBLE;
if (seen_pps && seen_sps && seen_vps)
probability = GST_TYPE_FIND_LIKELY;
gst_type_find_suggest (tf, probability, H265_VIDEO_CAPS);
}
}