[vlc-devel] [PATCH 11/13] encoder: provide a video context to match the input format
Steve Lhomme
robux4 at ycbcr.xyz
Mon Dec 23 16:49:35 CET 2019
---
include/vlc_codec.h | 1 +
modules/stream_out/transcode/encoder/encoder.c | 5 +++++
modules/stream_out/transcode/encoder/encoder.h | 1 +
3 files changed, 7 insertions(+)
diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index d8503a25318..6a91d4379d0 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -250,6 +250,7 @@ struct encoder_t
/* Properties of the input data fed to the encoder */
es_format_t fmt_in;
+ vlc_video_context *vctx_in; /* for video */
/* Properties of the output of the encoder */
es_format_t fmt_out;
diff --git a/modules/stream_out/transcode/encoder/encoder.c b/modules/stream_out/transcode/encoder/encoder.c
index e8ffb346ac1..2fe826736e6 100644
--- a/modules/stream_out/transcode/encoder/encoder.c
+++ b/modules/stream_out/transcode/encoder/encoder.c
@@ -120,6 +120,11 @@ const es_format_t *transcode_encoder_format_in( const transcode_encoder_t *p_enc
return &p_enc->p_encoder->fmt_in;
}
+vlc_video_context *transcode_encoder_video_context_in( transcode_encoder_t *p_enc )
+{
+ return p_enc->p_encoder->vctx_in;
+}
+
const es_format_t *transcode_encoder_format_out( const transcode_encoder_t *p_enc )
{
return &p_enc->p_encoder->fmt_out;
diff --git a/modules/stream_out/transcode/encoder/encoder.h b/modules/stream_out/transcode/encoder/encoder.h
index 6f82f3afaad..46d1e3c69bd 100644
--- a/modules/stream_out/transcode/encoder/encoder.h
+++ b/modules/stream_out/transcode/encoder/encoder.h
@@ -64,6 +64,7 @@ void transcode_encoder_config_init( transcode_encoder_config_t * );
void transcode_encoder_config_clean( transcode_encoder_config_t * );
const es_format_t *transcode_encoder_format_in( const transcode_encoder_t * );
+vlc_video_context *transcode_encoder_video_context_in( transcode_encoder_t * );
const es_format_t *transcode_encoder_format_out( const transcode_encoder_t * );
void transcode_encoder_update_format_in( transcode_encoder_t *, const es_format_t * );
void transcode_encoder_update_format_out( transcode_encoder_t *, const es_format_t * );
--
2.17.1
More information about the vlc-devel
mailing list