[vlc-devel] [PATCH 25/26] transcode: get rid of intermediate transcode_encoder_encode function
Steve Lhomme
robux4 at ycbcr.xyz
Mon Jan 18 08:33:04 UTC 2021
Call transcode_encoder_video_encode 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/encoder/video.c | 2 +-
modules/stream_out/transcode/video.c | 2 +-
5 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/modules/stream_out/transcode/encoder/encoder.c b/modules/stream_out/transcode/encoder/encoder.c
index 08666493bd9..df00486c528 100644
--- a/modules/stream_out/transcode/encoder/encoder.c
+++ b/modules/stream_out/transcode/encoder/encoder.c
@@ -113,11 +113,6 @@ bool transcode_encoder_opened( const transcode_encoder_t *p_enc )
return p_enc->p_encoder && p_enc->p_encoder->p_module;
}
-block_t * transcode_encoder_encode( transcode_encoder_t *p_enc, void *in )
-{
- return transcode_encoder_video_encode( p_enc, in );
-}
-
block_t * transcode_encoder_get_output_async( transcode_encoder_t *p_enc )
{
vlc_mutex_lock( &p_enc->lock_out );
@@ -137,7 +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 )
{
diff --git a/modules/stream_out/transcode/encoder/encoder.h b/modules/stream_out/transcode/encoder/encoder.h
index 0fea22e2456..77b35747955 100644
--- a/modules/stream_out/transcode/encoder/encoder.h
+++ b/modules/stream_out/transcode/encoder/encoder.h
@@ -69,7 +69,7 @@ void transcode_encoder_update_format_in( transcode_encoder_t *, const es_format_
const transcode_encoder_config_t * );
void transcode_encoder_update_format_out( transcode_encoder_t *, const es_format_t * );
-block_t * transcode_encoder_encode( transcode_encoder_t *, void * );
+block_t * transcode_encoder_video_encode( transcode_encoder_t *, picture_t * );
block_t * transcode_encoder_get_output_async( transcode_encoder_t * );
void transcode_encoder_delete( transcode_encoder_t * );
transcode_encoder_t * transcode_encoder_new( encoder_t *, const es_format_t * );
diff --git a/modules/stream_out/transcode/encoder/encoder_priv.h b/modules/stream_out/transcode/encoder/encoder_priv.h
index adab51b59c8..1196ca1dcf2 100644
--- a/modules/stream_out/transcode/encoder/encoder_priv.h
+++ b/modules/stream_out/transcode/encoder/encoder_priv.h
@@ -37,6 +37,4 @@ 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 );
-block_t * transcode_encoder_video_encode( transcode_encoder_t *p_enc, picture_t *p_pic );
-
int transcode_encoder_video_drain( transcode_encoder_t *p_enc, block_t **out );
diff --git a/modules/stream_out/transcode/encoder/video.c b/modules/stream_out/transcode/encoder/video.c
index 4f79d867e3f..26e4d3344a4 100644
--- a/modules/stream_out/transcode/encoder/video.c
+++ b/modules/stream_out/transcode/encoder/video.c
@@ -400,7 +400,7 @@ int transcode_encoder_video_drain( transcode_encoder_t *p_enc, block_t **out )
{
block_t *p_block;
do {
- p_block = transcode_encoder_encode( p_enc, NULL );
+ p_block = transcode_encoder_video_encode( p_enc, NULL );
block_ChainAppend( out, p_block );
} while( p_block );
}
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index b62d9528c47..c1715e9cf29 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -606,7 +606,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
if( p_in )
{
- block_t *p_encoded = transcode_encoder_encode( id->video_encoder, p_in );
+ block_t *p_encoded = transcode_encoder_video_encode( id->video_encoder, p_in );
if( p_encoded )
block_ChainAppend( out, p_encoded );
picture_Release( p_in );
--
2.29.2
More information about the vlc-devel
mailing list