[vlc-devel] [PATCH 26/26] transcode: get rid of intermediate transcode_encoder_open function
Steve Lhomme
robux4 at ycbcr.xyz
Mon Jan 18 08:33:05 UTC 2021
Call transcode_encoder_video_open directly, since it has the same signature
and doesn't do anything more.
---
modules/stream_out/transcode/encoder/encoder.c | 6 ------
modules/stream_out/transcode/encoder/encoder.h | 2 +-
modules/stream_out/transcode/encoder/encoder_priv.h | 2 --
modules/stream_out/transcode/video.c | 2 +-
4 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/modules/stream_out/transcode/encoder/encoder.c b/modules/stream_out/transcode/encoder/encoder.c
index df00486c528..37520f41edd 100644
--- a/modules/stream_out/transcode/encoder/encoder.c
+++ b/modules/stream_out/transcode/encoder/encoder.c
@@ -132,12 +132,6 @@ void transcode_encoder_close( transcode_encoder_t *p_enc )
p_enc->p_encoder->p_module = NULL;
}
-int transcode_encoder_open( transcode_encoder_t *p_enc,
- const transcode_encoder_config_t *p_cfg )
-{
- return transcode_encoder_video_open( p_enc, p_cfg );
-}
-
int transcode_encoder_drain( transcode_encoder_t *p_enc, block_t **out )
{
if( !transcode_encoder_opened( p_enc ) )
diff --git a/modules/stream_out/transcode/encoder/encoder.h b/modules/stream_out/transcode/encoder/encoder.h
index 77b35747955..182a522d0e5 100644
--- a/modules/stream_out/transcode/encoder/encoder.h
+++ b/modules/stream_out/transcode/encoder/encoder.h
@@ -76,7 +76,7 @@ transcode_encoder_t * transcode_encoder_new( encoder_t *, const es_format_t * );
void transcode_encoder_close( transcode_encoder_t * );
bool transcode_encoder_opened( const transcode_encoder_t * );
-int transcode_encoder_open( transcode_encoder_t *, const transcode_encoder_config_t * );
+int transcode_encoder_video_open( transcode_encoder_t *, const transcode_encoder_config_t * );
int transcode_encoder_drain( transcode_encoder_t *, block_t ** );
int transcode_encoder_video_test( encoder_t *p_encoder,
diff --git a/modules/stream_out/transcode/encoder/encoder_priv.h b/modules/stream_out/transcode/encoder/encoder_priv.h
index 1196ca1dcf2..90f8a4609e1 100644
--- a/modules/stream_out/transcode/encoder/encoder_priv.h
+++ b/modules/stream_out/transcode/encoder/encoder_priv.h
@@ -33,8 +33,6 @@ struct transcode_encoder_t
bool b_threaded;
};
-int transcode_encoder_video_open( transcode_encoder_t *p_enc,
- const transcode_encoder_config_t *p_cfg );
void transcode_encoder_video_close( transcode_encoder_t *p_enc );
int transcode_encoder_video_drain( transcode_encoder_t *p_enc, block_t **out );
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index c1715e9cf29..5f4ab8fd751 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -515,7 +515,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
/* Start missing encoder */
if( !is_encoder_open &&
- transcode_encoder_open( id->video_encoder, id->p_enccfg ) != VLC_SUCCESS )
+ transcode_encoder_video_open( id->video_encoder, id->p_enccfg ) != VLC_SUCCESS )
{
msg_Err( p_stream, "cannot find video encoder (module:%s fourcc:%4.4s). "
"Take a look few lines earlier to see possible reason.",
--
2.29.2
More information about the vlc-devel
mailing list