summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorEejya Singh <singh.eejya@gmail.com>2014-10-21 01:55:39 +0530
committerClément Bœsch <u@pkh.me>2014-10-22 23:12:38 +0200
commit6dc99fdf0e4328ca2992b7bfcd139f7b1b636bf8 (patch)
tree85e41b861fcb0fb4b0b32411fe383e99173c7326 /libavcodec
parent27c61c32cee4d4944da15226b56901926136214f (diff)
Added STL demuxer and decoder
Signed-off-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/Makefile1
-rw-r--r--libavcodec/allcodecs.c1
-rw-r--r--libavcodec/avcodec.h1
-rw-r--r--libavcodec/codec_desc.c7
-rw-r--r--libavcodec/textdec.c18
-rw-r--r--libavcodec/version.h4
6 files changed, 29 insertions, 3 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 3d70313325..1a0072a00a 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -429,6 +429,7 @@ OBJS-$(CONFIG_SONIC_LS_ENCODER) += sonic.o
OBJS-$(CONFIG_SP5X_DECODER) += sp5xdec.o
OBJS-$(CONFIG_SRT_DECODER) += srtdec.o ass.o
OBJS-$(CONFIG_SRT_ENCODER) += srtenc.o ass_split.o
+OBJS-$(CONFIG_STL_DECODER) += textdec.o ass.o
OBJS-$(CONFIG_SUBRIP_DECODER) += srtdec.o ass.o
OBJS-$(CONFIG_SUBRIP_ENCODER) += srtenc.o ass_split.o
OBJS-$(CONFIG_SUBVIEWER1_DECODER) += textdec.o ass.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 7650543ac4..d08abd8b8f 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -490,6 +490,7 @@ void avcodec_register_all(void)
REGISTER_DECODER(REALTEXT, realtext);
REGISTER_DECODER(SAMI, sami);
REGISTER_ENCDEC (SRT, srt);
+ REGISTER_DECODER(STL, stl);
REGISTER_ENCDEC (SUBRIP, subrip);
REGISTER_DECODER(SUBVIEWER, subviewer);
REGISTER_DECODER(SUBVIEWER1, subviewer1);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 42eb57b76a..eac3fc7757 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -509,6 +509,7 @@ enum AVCodecID {
AV_CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'),
AV_CODEC_ID_SAMI = MKBETAG('S','A','M','I'),
AV_CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'),
+ AV_CODEC_ID_STL = MKBETAG('S','p','T','L'),
AV_CODEC_ID_SUBVIEWER1 = MKBETAG('S','b','V','1'),
AV_CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'),
AV_CODEC_ID_SUBRIP = MKBETAG('S','R','i','p'),
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 9e9728b7bc..eeb45054c5 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -2635,6 +2635,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
.props = AV_CODEC_PROP_TEXT_SUB,
},
{
+ .id = AV_CODEC_ID_STL,
+ .type = AVMEDIA_TYPE_SUBTITLE,
+ .name = "stl",
+ .long_name = NULL_IF_CONFIG_SMALL("Spruce subtitle format"),
+ .props = AV_CODEC_PROP_TEXT_SUB,
+ },
+ {
.id = AV_CODEC_ID_SUBVIEWER1,
.type = AVMEDIA_TYPE_SUBTITLE,
.name = "subviewer1",
diff --git a/libavcodec/textdec.c b/libavcodec/textdec.c
index 611fcc8bf2..c9f02a2a4c 100644
--- a/libavcodec/textdec.c
+++ b/libavcodec/textdec.c
@@ -88,7 +88,7 @@ AVCodec ff_text_decoder = {
};
#endif
-#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER
+#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER || CONFIG_STL_DECODER
static int linebreak_init(AVCodecContext *avctx)
{
@@ -113,6 +113,22 @@ AVCodec ff_vplayer_decoder = {
};
#endif
+#if CONFIG_STL_DECODER
+#define stl_options options
+DECLARE_CLASS(stl);
+
+AVCodec ff_stl_decoder = {
+ .name = "stl",
+ .long_name = NULL_IF_CONFIG_SMALL("Spruce subtitle format"),
+ .priv_data_size = sizeof(TextContext),
+ .type = AVMEDIA_TYPE_SUBTITLE,
+ .id = AV_CODEC_ID_STL,
+ .decode = text_decode_frame,
+ .init = linebreak_init,
+ .priv_class = &stl_decoder_class,
+};
+#endif
+
#if CONFIG_PJS_DECODER
#define pjs_options options
DECLARE_CLASS(pjs);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index ca8a2c6b85..744f7ec6a5 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,8 +29,8 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 56
-#define LIBAVCODEC_VERSION_MINOR 8
-#define LIBAVCODEC_VERSION_MICRO 102
+#define LIBAVCODEC_VERSION_MINOR 9
+#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \