Commit 1142a1ed authored by Jean-Paul Saman's avatar Jean-Paul Saman

davinci video: avc1 -> h264 packetizer is done by h264 packetizing

parent 1c93dc90
......@@ -58,8 +58,6 @@ struct decoder_sys_t
XDM_BufDesc in;
XDM_BufDesc out;
decoder_t *p_packetizer; /* for avc1 -> h264 */
};
/*****************************************************************************
......@@ -81,6 +79,11 @@ int OpenVideoDecoder( vlc_object_t *p_this )
&psz_codec, &psz_namecodec ) )
return VLC_EGENERIC;
msg_Dbg( p_dec, "found davinci decoder %s for %s (codec=%4.4s, cat=%s)",
psz_codec, (char*)&p_dec->fmt_out.i_codec, psz_namecodec,
(i_cat == VIDEO_ES) ? "video" :
(i_cat == AUDIO_ES) ? "audio" : "other" );
/* Allocate our private structure */
p_dec->p_sys = (decoder_sys_t *)calloc( 1, sizeof( decoder_sys_t ) );
if( !p_dec->p_sys )
......@@ -182,14 +185,6 @@ void CloseVideoDecoder( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t *)p_this;
decoder_sys_t *p_sys = p_dec->p_sys;
if( p_sys->p_packetizer->p_module )
module_unneed( p_sys->p_packetizer, p_sys->p_packetizer->p_module );
if( p_sys->p_packetizer )
{
vlc_object_detach( p_sys->p_packetizer );
vlc_object_release( p_sys->p_packetizer );
}
/* Close our codec handle */
VIDDEC_delete( p_sys->d );
......@@ -237,30 +232,6 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
VIDDEC_DynamicParams dparams;
VIDDEC_Status status;
if( !p_sys->p_packetizer &&
p_dec->fmt_in.i_codec == VLC_FOURCC( 'a', 'v', 'c', '1' ) )
{
p_sys->p_packetizer = vlc_object_create( p_dec, sizeof( decoder_t ) );
vlc_object_attach( p_sys->p_packetizer, p_dec );
if( p_sys->p_packetizer )
{
p_sys->p_packetizer->pf_decode_audio = NULL;
p_sys->p_packetizer->pf_decode_video = NULL;
p_sys->p_packetizer->pf_decode_sub = NULL;
p_sys->p_packetizer->pf_packetize = NULL;
es_format_Copy( &p_sys->p_packetizer->fmt_in, &p_dec->fmt_in );
p_sys->p_packetizer->p_module = module_need( p_sys->p_packetizer,
"packetizer", NULL, false );
if( !p_sys->p_packetizer->p_module )
{
vlc_object_detach( p_sys->p_packetizer );
vlc_object_release( p_sys->p_packetizer );
p_sys->p_packetizer = NULL;
}
es_format_Copy( &p_dec->fmt_in, &p_sys->p_packetizer->fmt_out );
}
}
if( !pp_block || !*pp_block ) return NULL;
p_block = *pp_block;
......@@ -270,15 +241,6 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
return NULL;
}
if( p_sys->p_packetizer && !i_extra )
{
block_t *p_new_block = p_sys->p_packetizer->pf_packetize( p_sys->p_packetizer, &p_block );
*pp_block = p_block = p_new_block; /* keep reference to packetized blk */
if( !p_block )
return NULL;
}
memset( &in_args, 0, sizeof( in_args ) );
memset( &out_args, 0, sizeof( out_args ) );
......
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