From: Carl Eugen Hoyos <[email protected]>
Signed-off-by: Vittorio Giovara <[email protected]>
---
doc/muxers.texi | 2 +-
libavformat/allformats.c | 1 +
libavformat/oggenc.c | 41 ++++++++++++++++++++++++++++++++++-------
libavformat/version.h | 2 +-
4 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/doc/muxers.texi b/doc/muxers.texi
index 143e595..10e276a 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -441,7 +441,7 @@ Alternatively you can write the command as:
avconv -benchmark -i INPUT -f null -
@end example
-@section ogg
+@section ogg/oga
Ogg container muxer.
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 4f3acf5..e5fab3c 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -174,6 +174,7 @@ void av_register_all(void)
REGISTER_MUXER (NULL, null);
REGISTER_MUXDEMUX(NUT, nut);
REGISTER_DEMUXER (NUV, nuv);
+ REGISTER_MUXER (OGA, oga);
REGISTER_MUXDEMUX(OGG, ogg);
REGISTER_MUXDEMUX(OMA, oma);
REGISTER_DEMUXER (PAF, paf);
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index fd102c8..b98244c 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -84,13 +84,6 @@ static const AVOption options[] = {
{ NULL },
};
-static const AVClass ogg_muxer_class = {
- .class_name = "Ogg muxer",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
static void ogg_update_checksum(AVFormatContext *s, AVIOContext *pb, int64_t
crc_offset)
{
@@ -610,6 +603,14 @@ static int ogg_write_trailer(AVFormatContext *s)
return 0;
}
+#if CONFIG_OGG_MUXER
+static const AVClass ogg_muxer_class = {
+ .class_name = "Ogg muxer",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
AVOutputFormat ff_ogg_muxer = {
.name = "ogg",
.long_name = NULL_IF_CONFIG_SMALL("Ogg"),
@@ -625,3 +626,29 @@ AVOutputFormat ff_ogg_muxer = {
.flags = AVFMT_TS_NEGATIVE,
.priv_class = &ogg_muxer_class,
};
+#endif /* CONFIG_OGG_MUXER */
+
+#if CONFIG_OGA_MUXER
+static const AVClass oga_muxer_class = {
+ .class_name = "Ogg audio muxer",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVOutputFormat ff_oga_muxer = {
+ .name = "oga",
+ .long_name = NULL_IF_CONFIG_SMALL("Ogg audio"),
+ .mime_type = "audio/ogg",
+ .extensions = "oga",
+ .priv_data_size = sizeof(OGGContext),
+ .audio_codec = CONFIG_LIBVORBIS_ENCODER ? AV_CODEC_ID_VORBIS
+ : AV_CODEC_ID_FLAC,
+ .video_codec = AV_CODEC_ID_NONE,
+ .write_header = ogg_write_header,
+ .write_packet = ogg_write_packet,
+ .write_trailer = ogg_write_trailer,
+ .flags = AVFMT_TS_NEGATIVE,
+ .priv_class = &oga_muxer_class,
+};
+#endif /* CONFIG_OGA_MUXER */
diff --git a/libavformat/version.h b/libavformat/version.h
index ba53120..b09d49c 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 55
-#define LIBAVFORMAT_VERSION_MINOR 15
+#define LIBAVFORMAT_VERSION_MINOR 16
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
--
1.8.3.4 (Apple Git-47)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel