From 9ad71b062b647f667e6a279bf9e8672c312b47c8 Mon Sep 17 00:00:00 2001 From: Steinar Gunderson Date: Fri, 24 Sep 2010 23:41:43 +0200 Subject: [PATCH] Set field dominance correctly. --- modules/access/sdi.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/access/sdi.cpp b/modules/access/sdi.cpp index 7146608b8d..fa286ca89d 100644 --- a/modules/access/sdi.cpp +++ b/modules/access/sdi.cpp @@ -82,7 +82,7 @@ struct demux_sys_t bool b_first_frame; int i_width, i_height, i_fps_num, i_fps_den; - // FIXME: field dominance + uint32_t i_dominance_flags; int i_rate, i_channels; @@ -152,7 +152,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame BMDTimeValue stream_time, frame_duration; videoFrame->GetStreamTime( &stream_time, &frame_duration, CLOCK_FREQ ); - p_video_frame->i_flags = BLOCK_FLAG_TYPE_I; + p_video_frame->i_flags = BLOCK_FLAG_TYPE_I | p_sys->i_dominance_flags; if( p_sys->b_first_frame ) { p_video_frame->i_flags |= BLOCK_FLAG_DISCONTINUITY; @@ -297,6 +297,7 @@ static int Open( vlc_object_t *p_this ) } const char *field_dominance; + uint32_t i_dominance_flags = 0; switch( p_display_mode->GetFieldDominance() ) { case bmdProgressiveFrame: @@ -307,9 +308,11 @@ static int Open( vlc_object_t *p_this ) break; case bmdLowerFieldFirst: field_dominance = ", interlaced [BFF]"; + i_dominance_flags = BLOCK_FLAG_BOTTOM_FIELD_FIRST; break; case bmdUpperFieldFirst: field_dominance = ", interlaced [TFF]"; + i_dominance_flags = BLOCK_FLAG_TOP_FIELD_FIRST; break; case bmdUnknownFieldDominance: default: @@ -331,6 +334,7 @@ static int Open( vlc_object_t *p_this ) p_sys->i_height = p_display_mode->GetHeight(); p_sys->i_fps_num = time_scale; p_sys->i_fps_den = frame_duration; + p_sys->i_dominance_flags = i_dominance_flags; } } -- 2.39.5