[vlc-devel] [PATCH 00/26] Use the specialized encoder abstraction only with video
Steve Lhomme
robux4 at ycbcr.xyz
Mon Jan 18 08:32:39 UTC 2021
This patchset contains 2 main parts:
- moving the encoder module callbacks instead setters (like decoder device)
- only use the "generic" encoder code video, since the rest doesn't need any
abstraction.
There are also new sout_EncoderDelete() and sout_EncoderOpen() helpers to
destroy or open an encoder module in a consistent way (which allows using
special activate/deactivate callbacks with the proper type).
The "encoder" capability is split between "video encoder", "audio encoder" and
"spu encoder". This allows different activate signature for each (not used yet).
The encode callbacks are turned into a union in encoder_t since a module can
only have one at a time.
In the transcode, the video and SPU encoders are no longer using transcode_t
which is only use for video. They use a plain encoder_t which a dedicated name
for each to avoid mismatch.
These patches (and more upcoming ones) can be found at
https://code.videolan.org/robUx4/vlc/-/tree/sout_fixes/13
Steve Lhomme (26):
sout:encoder: make provision for different encoder capability types
sout:encoder: separate audio/video/spu encoder capabilities
dmo: use different callbacks for the audio/video encoders
sout:encoder: use a union for the encoder callback
sout:encoder: add a function to open the given encoder
image: use sout_EncoderOpen instead of locally opening the module
transcode: use sout_EncoderOpen instead of locally opening the module
sout:encoder: use separate signatures for the Open callback of
encoders
sout:encoder: set callbacks of video encoders with
set_callback_video_encoder
sout:encoder: set callbacks of audio encoders with
set_callback_audio_encoder
sout:encoder: set callbacks of spu encoders with
set_callback_spu_encoder
sout:encoder: factorize the encoder input chroma fix
sout:encoder: factorize the output i_codec fix
sout:encoder: add a function to delete the given encoder
transcode: use sout_EncoderDelete instead of custom calls
image: use sout_EncoderDelete instead of custom DeleteEncoder
sout:encoder: pass the input ES format to sout_EncoderCreate
transcode: simplify encoder test opening
sout:encoder: pass the config_chain_t to sout_EncoderOpen
transcode: don't use a generic API for the audio/video encoder test
transcode: don't use the generic transcode structure for SPU
transcode: don't use the generic transcode structure for Audio
transcode: don't check for VIDEO_ES on the encoder helper
transcode: rename the video encoder to video_encoder
transcode: get rid of intermediate transcode_encoder_encode function
transcode: get rid of intermediate transcode_encoder_open function
include/vlc_codec.h | 44 +++++-
include/vlc_sout.h | 8 +-
modules/codec/aom.c | 35 ++---
modules/codec/araw.c | 8 +-
modules/codec/avcodec/avcodec.c | 6 +-
modules/codec/avcodec/avcodec.h | 7 +-
modules/codec/avcodec/encoder.c | 40 +++--
modules/codec/daala.c | 15 +-
modules/codec/dmo/dmo.c | 140 +++++++++--------
modules/codec/dvbsub.c | 21 ++-
modules/codec/edummy.c | 45 +++---
modules/codec/fdkaac.c | 16 +-
modules/codec/flac.c | 13 +-
modules/codec/g711.c | 9 +-
modules/codec/jpeg.c | 16 +-
modules/codec/lpcm.c | 13 +-
modules/codec/omxil/omxil.c | 16 +-
modules/codec/opus.c | 14 +-
modules/codec/png.c | 13 +-
modules/codec/qsv.c | 20 +--
modules/codec/rav1e.c | 9 +-
modules/codec/rtpvideo.c | 8 +-
modules/codec/schroedinger.c | 17 +--
modules/codec/shine.c | 14 +-
modules/codec/speex.c | 13 +-
modules/codec/substx3g.c | 9 +-
modules/codec/t140.c | 12 +-
modules/codec/theora.c | 13 +-
modules/codec/twolame.c | 13 +-
modules/codec/vorbis.c | 13 +-
modules/codec/vpx.c | 19 +--
modules/codec/webvtt/encvtt.c | 4 +-
modules/codec/webvtt/webvtt.c | 4 +-
modules/codec/webvtt/webvtt.h | 2 +-
modules/codec/x264.c | 26 ++--
modules/codec/x265.c | 18 +--
.../gui/qt/dialogs/sout/profile_selector.cpp | 4 +-
modules/misc/stats.c | 20 ++-
modules/stream_out/Makefile.am | 1 -
modules/stream_out/transcode/audio.c | 46 +++---
modules/stream_out/transcode/encoder/audio.c | 73 ++-------
.../stream_out/transcode/encoder/encoder.c | 142 ++----------------
.../stream_out/transcode/encoder/encoder.h | 14 +-
.../transcode/encoder/encoder_priv.h | 24 ---
modules/stream_out/transcode/encoder/spu.c | 53 -------
modules/stream_out/transcode/encoder/video.c | 41 ++---
modules/stream_out/transcode/spu.c | 28 ++--
modules/stream_out/transcode/transcode.c | 6 +-
modules/stream_out/transcode/transcode.h | 6 +-
modules/stream_out/transcode/video.c | 59 ++++----
src/libvlccore.sym | 2 +
src/misc/image.c | 34 ++---
src/missing.c | 17 ++-
src/stream_output/stream_output.c | 110 +++++++++++++-
54 files changed, 620 insertions(+), 753 deletions(-)
delete mode 100644 modules/stream_out/transcode/encoder/spu.c
--
2.29.2
More information about the vlc-devel
mailing list