[vlc-commits] sout display: reorder to avoid forward declarations
Rémi Denis-Courmont
git at videolan.org
Sat Oct 10 11:45:58 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 10 12:37:18 2020 +0300| [b4399bbbc056357c67066cf96dfbefab94862a97] | committer: Rémi Denis-Courmont
sout display: reorder to avoid forward declarations
No functional changes.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b4399bbbc056357c67066cf96dfbefab94862a97
---
modules/stream_out/display.c | 101 ++++++++++++++++++++-----------------------
1 file changed, 48 insertions(+), 53 deletions(-)
diff --git a/modules/stream_out/display.c b/modules/stream_out/display.c
index 4f9abe980c..ed774293c1 100644
--- a/modules/stream_out/display.c
+++ b/modules/stream_out/display.c
@@ -74,11 +74,6 @@ static const char *const ppsz_sout_options[] = {
"audio", "video", "delay", NULL
};
-static void *Add( sout_stream_t *, const es_format_t * );
-static void Del( sout_stream_t *, void * );
-static int Send( sout_stream_t *, void *, block_t * );
-static int Control( sout_stream_t *, int, va_list );
-
typedef struct
{
bool b_audio;
@@ -88,54 +83,6 @@ typedef struct
input_resource_t *p_resource;
} sout_stream_sys_t;
-/*****************************************************************************
- * Open:
- *****************************************************************************/
-static int Open( vlc_object_t *p_this )
-{
- sout_stream_t *p_stream = (sout_stream_t*)p_this;
- sout_stream_sys_t *p_sys;
-
- p_sys = malloc( sizeof( sout_stream_sys_t ) );
- if( p_sys == NULL )
- return VLC_ENOMEM;
-
- p_sys->p_resource = input_resource_New( p_this );
- if( unlikely(p_sys->p_resource == NULL) )
- {
- free( p_sys );
- return VLC_ENOMEM;
- }
-
- config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
- p_stream->p_cfg );
-
- p_sys->b_audio = var_GetBool( p_stream, SOUT_CFG_PREFIX"audio" );
- p_sys->b_video = var_GetBool( p_stream, SOUT_CFG_PREFIX "video" );
- p_sys->i_delay = VLC_TICK_FROM_MS( var_GetInteger( p_stream, SOUT_CFG_PREFIX "delay" ) );
-
- p_stream->pf_add = Add;
- p_stream->pf_del = Del;
- p_stream->pf_send = Send;
- p_stream->pf_control = Control;
- p_stream->p_sys = p_sys;
- p_stream->pace_nocontrol = true;
-
- return VLC_SUCCESS;
-}
-
-/*****************************************************************************
- * Close:
- *****************************************************************************/
-static void Close( vlc_object_t * p_this )
-{
- sout_stream_t *p_stream = (sout_stream_t*)p_this;
- sout_stream_sys_t *p_sys = p_stream->p_sys;
-
- input_resource_Release( p_sys->p_resource );
- free( p_sys );
-}
-
static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
@@ -206,3 +153,51 @@ static int Control( sout_stream_t *p_stream, int i_query, va_list args )
(void) p_stream;
return VLC_EGENERIC;
}
+
+/*****************************************************************************
+ * Open:
+ *****************************************************************************/
+static int Open( vlc_object_t *p_this )
+{
+ sout_stream_t *p_stream = (sout_stream_t*)p_this;
+ sout_stream_sys_t *p_sys;
+
+ p_sys = malloc( sizeof( sout_stream_sys_t ) );
+ if( p_sys == NULL )
+ return VLC_ENOMEM;
+
+ p_sys->p_resource = input_resource_New( p_this );
+ if( unlikely(p_sys->p_resource == NULL) )
+ {
+ free( p_sys );
+ return VLC_ENOMEM;
+ }
+
+ config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
+ p_stream->p_cfg );
+
+ p_sys->b_audio = var_GetBool( p_stream, SOUT_CFG_PREFIX"audio" );
+ p_sys->b_video = var_GetBool( p_stream, SOUT_CFG_PREFIX "video" );
+ p_sys->i_delay = VLC_TICK_FROM_MS( var_GetInteger( p_stream, SOUT_CFG_PREFIX "delay" ) );
+
+ p_stream->pf_add = Add;
+ p_stream->pf_del = Del;
+ p_stream->pf_send = Send;
+ p_stream->pf_control = Control;
+ p_stream->p_sys = p_sys;
+ p_stream->pace_nocontrol = true;
+
+ return VLC_SUCCESS;
+}
+
+/*****************************************************************************
+ * Close:
+ *****************************************************************************/
+static void Close( vlc_object_t * p_this )
+{
+ sout_stream_t *p_stream = (sout_stream_t*)p_this;
+ sout_stream_sys_t *p_sys = p_stream->p_sys;
+
+ input_resource_Release( p_sys->p_resource );
+ free( p_sys );
+}
More information about the vlc-commits
mailing list