[vlc-commits] [Git][videolan/vlc][master] demux: pass a vlc_object_t to create a custom packetizer
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Wed May 18 10:29:53 UTC 2022
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
b54048c1 by Steve Lhomme at 2022-05-18T10:14:50+00:00
demux: pass a vlc_object_t to create a custom packetizer
- - - - -
7 changed files:
- include/vlc_demux.h
- modules/demux/flac.c
- modules/demux/mpeg/es.c
- modules/demux/mpeg/h26x.c
- modules/demux/mpeg/mpgv.c
- modules/demux/vc1.c
- src/input/demux.c
Changes:
=====================================
include/vlc_demux.h
=====================================
@@ -410,7 +410,7 @@ static inline int demux_SetTime( demux_t *p_demux, vlc_tick_t time, bool precise
* The provided es_format_t will be cleaned on error or by
* demux_PacketizerDestroy.
*/
-VLC_API decoder_t * demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char *psz_msg ) VLC_USED;
+VLC_API decoder_t * demux_PacketizerNew( vlc_object_t *p_demux, es_format_t *p_fmt, const char *psz_msg ) VLC_USED;
/**
* This function will destroy a packetizer create by demux_PacketizerNew..
=====================================
modules/demux/flac.c
=====================================
@@ -161,7 +161,7 @@ static int Open( vlc_object_t * p_this )
goto error;
/* Load the FLAC packetizer */
- p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, "flac" );
+ p_sys->p_packetizer = demux_PacketizerNew( VLC_OBJECT(p_demux), &fmt, "flac" );
if( !p_sys->p_packetizer )
goto error;
=====================================
modules/demux/mpeg/es.c
=====================================
@@ -257,7 +257,7 @@ static int OpenCommon( demux_t *p_demux,
/* Load the audio packetizer */
es_format_Init( &fmt, i_cat, p_sys->codec.i_codec );
fmt.i_original_fourcc = p_sys->i_original;
- p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, p_sys->codec.psz_name );
+ p_sys->p_packetizer = demux_PacketizerNew( VLC_OBJECT(p_demux), &fmt, p_sys->codec.psz_name );
if( !p_sys->p_packetizer )
{
free( p_sys );
=====================================
modules/demux/mpeg/h26x.c
=====================================
@@ -360,7 +360,7 @@ static int GenericOpen( demux_t *p_demux, const char *psz_module,
fmt.video.i_frame_rate = p_sys->feed_dts.i_divider_num;
fmt.video.i_frame_rate_base = p_sys->feed_dts.i_divider_den;
}
- p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, psz_module );
+ p_sys->p_packetizer = demux_PacketizerNew( VLC_OBJECT(p_demux), &fmt, psz_module );
if( !p_sys->p_packetizer )
{
free( p_sys );
=====================================
modules/demux/mpeg/mpgv.c
=====================================
@@ -135,7 +135,7 @@ static int Open( vlc_object_t * p_this )
/* Load the mpegvideo packetizer */
es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_MPGV );
- p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, "mpeg video" );
+ p_sys->p_packetizer = demux_PacketizerNew( VLC_OBJECT(p_demux), &fmt, "mpeg video" );
if( !p_sys->p_packetizer )
{
free( p_sys );
=====================================
modules/demux/vc1.c
=====================================
@@ -109,7 +109,7 @@ static int Open( vlc_object_t * p_this )
/* Load the packetizer */
es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_VC1 );
- p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, "VC-1" );
+ p_sys->p_packetizer = demux_PacketizerNew( VLC_OBJECT(p_demux), &fmt, "VC-1" );
if( !p_sys->p_packetizer )
{
free( p_sys );
=====================================
src/input/demux.c
=====================================
@@ -377,7 +377,7 @@ int demux_vaControlHelper( stream_t *s,
/****************************************************************************
* Utility functions
****************************************************************************/
-decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char *psz_msg )
+decoder_t *demux_PacketizerNew( vlc_object_t *p_demux, es_format_t *p_fmt, const char *psz_msg )
{
decoder_t *p_packetizer;
p_packetizer = vlc_custom_create( p_demux, sizeof( *p_packetizer ),
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b54048c1007a16a861624c15e056fb803d984327
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b54048c1007a16a861624c15e056fb803d984327
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list