decklink: Ignore some driver-set timecode flags

The "fields" flag is ignored because currently GStreamer doesn't support
having only top or only bottom fields inside a frame. The "drop frame"
flag is ignored because some occurrences have been spotted where it
wasn't set while it should have been. In practice, when we have 29.97 or
59.94 FPS, it's always drop-frame.

https://bugzilla.gnome.org/show_bug.cgi?id=790112
This commit is contained in:
Vivia Nikolaidou 2017-11-09 11:44:17 +02:00
parent bae9427dc1
commit 5ab660c4e2

View file

@ -738,16 +738,11 @@ gst_decklink_video_src_got_frame (GstElement * element,
GST_DEBUG_OBJECT (self, "Got timecode %02d:%02d:%02d:%02d",
hours, minutes, seconds, frames);
bmode = gst_decklink_get_mode (mode);
if (bmode->interlaced) {
if (bmode->interlaced)
flags =
(GstVideoTimeCodeFlags) (flags |
GST_VIDEO_TIME_CODE_FLAGS_INTERLACED);
if (bflags & bmdTimecodeFieldMark)
field_count = 2;
else
field_count = 1;
}
if (bflags & bmdTimecodeIsDropFrame)
if (bmode->fps_d == 1001 && (bmode->fps_n == 30000 || bmode->fps_n == 60000))
flags =
(GstVideoTimeCodeFlags) (flags |
GST_VIDEO_TIME_CODE_FLAGS_DROP_FRAME);