diff mbox series

[FFmpeg-devel,v19,03/10] avformat/evc_muxer: Added muxer to handle writing EVC encoded data into file or output bytestream

Message ID 20230405070125.685-1-d.kozinski@samsung.com
State New
Headers show
Series [FFmpeg-devel,v19,01/10] avcodec/evc: MPEG-5 EVC codec registration | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Dawid Kozinski April 5, 2023, 7:01 a.m. UTC
- Provided AVOutputFormat structure describing EVC output format (ff_evc_muxer)
- Added documentation for EVC muxer

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
---
 doc/muxers.texi          |  6 ++++++
 libavformat/Makefile     |  1 +
 libavformat/allformats.c |  1 +
 libavformat/rawenc.c     | 13 +++++++++++++
 4 files changed, 21 insertions(+)
diff mbox series

Patch

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 79dd864182..eee3e7c526 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -2120,6 +2120,12 @@  DTS Coherent Acoustics (DCA) audio.
 
 Dolby Digital Plus, also known as Enhanced AC-3, audio.
 
+@subsection evc
+
+MPEG-5 Essential Video Coding (EVC) / EVC / MPEG-5 Part 1 EVC video.
+
+Extensions: evc
+
 @subsection g722
 
 ITU-T G.722 audio.
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 048649689b..fafed6d129 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -251,6 +251,7 @@  OBJS-$(CONFIG_HCOM_DEMUXER)              += hcom.o pcm.o
 OBJS-$(CONFIG_HDS_MUXER)                 += hdsenc.o
 OBJS-$(CONFIG_HEVC_DEMUXER)              += hevcdec.o rawdec.o
 OBJS-$(CONFIG_HEVC_MUXER)                += rawenc.o
+OBJS-$(CONFIG_EVC_MUXER)                 += rawenc.o
 OBJS-$(CONFIG_HLS_DEMUXER)               += hls.o hls_sample_encryption.o
 OBJS-$(CONFIG_HLS_MUXER)                 += hlsenc.o hlsplaylist.o avc.o
 OBJS-$(CONFIG_HNM_DEMUXER)               += hnm.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index cb5b69e9cd..203188cb27 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -154,6 +154,7 @@  extern const AVInputFormat  ff_ea_cdata_demuxer;
 extern const AVInputFormat  ff_eac3_demuxer;
 extern const FFOutputFormat ff_eac3_muxer;
 extern const AVInputFormat  ff_epaf_demuxer;
+extern const FFOutputFormat ff_evc_muxer;
 extern const FFOutputFormat ff_f4v_muxer;
 extern const AVInputFormat  ff_ffmetadata_demuxer;
 extern const FFOutputFormat ff_ffmetadata_muxer;
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 78fadda967..70d6322c53 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -401,6 +401,19 @@  const FFOutputFormat ff_hevc_muxer = {
 };
 #endif
 
+#if CONFIG_EVC_MUXER
+const FFOutputFormat ff_evc_muxer = {
+    .p.name            = "evc",
+    .p.long_name       = NULL_IF_CONFIG_SMALL("raw EVC video"),
+    .p.extensions      = "evc",
+    .p.audio_codec     = AV_CODEC_ID_NONE,
+    .p.video_codec     = AV_CODEC_ID_EVC,
+    .init              = force_one_stream,
+    .write_packet      = ff_raw_write_packet,
+    .p.flags           = AVFMT_NOTIMESTAMPS,
+};
+#endif
+
 #if CONFIG_M4V_MUXER
 const FFOutputFormat ff_m4v_muxer = {
     .p.name            = "m4v",