Commit aa66ede8 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/dmo/*: flag sync-points in the video encoder.

parent c2e7b762
......@@ -755,7 +755,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_in = CMediaBufferCreate( p_block, p_block->i_buffer, VLC_TRUE );
i_result = p_sys->p_dmo->vt->ProcessInput( p_sys->p_dmo, 0,
(IMediaBuffer *)p_in, DMO_INPUT_DATA_BUFFER_SYNCPOINT,
(IMediaBuffer *)p_in, DMO_INPUT_DATA_BUFFERF_SYNCPOINT,
0, 0 );
p_in->vt->Release( (IUnknown *)p_in );
......@@ -1506,6 +1506,14 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data )
#endif
}
if( p_enc->fmt_out.i_cat == VIDEO_ES )
{
if( db.dwStatus & DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT )
p_block_out->i_flags |= BLOCK_FLAG_TYPE_I;
else
p_block_out->i_flags |= BLOCK_FLAG_TYPE_P;
}
p_block_out->i_dts = p_block_out->i_pts = i_pts;
block_ChainAppend( &p_chain, p_block_out );
}
......
......@@ -50,10 +50,10 @@ typedef struct _IMediaObject IMediaObject;
#define STDCALL __stdcall
#endif
#define DMO_INPUT_DATA_BUFFER_SYNCPOINT 1
#define DMO_INPUT_DATA_BUFFERF_SYNCPOINT 1
#define DMO_INPUT_DATA_BUFFERF_TIME 2
#define DMO_INPUT_DATA_BUFFERF_TIMELENGTH 4
#define DMO_OUTPUT_DATA_BUFFER_SYNCPOINT 1
#define DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT 1
#define DMO_OUTPUT_DATA_BUFFERF_TIME 2
#define DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH 4
#define DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment