summaryrefslogtreecommitdiff
path: root/libavformat/subtitles.h
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-06-17 11:43:09 +0200
committerClément Bœsch <ubitux@gmail.com>2012-06-29 20:20:02 +0200
commitd948893dbd963a268e2fc093b3d09b5037560974 (patch)
tree3cfd72744f9c1e92493a0740e47f36590e5e8817 /libavformat/subtitles.h
parente301f2f8c6f59485cb22fc468bafcfaa419c5267 (diff)
downloadffmpeg-d948893dbd963a268e2fc093b3d09b5037560974.tar.gz
lavf/subtitles: add some SMIL helpers.
This is needed for SAMI and RealText demuxers.
Diffstat (limited to 'libavformat/subtitles.h')
-rw-r--r--libavformat/subtitles.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavformat/subtitles.h b/libavformat/subtitles.h
index 8a75161d5e..b089bb2a87 100644
--- a/libavformat/subtitles.h
+++ b/libavformat/subtitles.h
@@ -23,6 +23,7 @@
#include <stdint.h>
#include "avformat.h"
+#include "libavutil/bprint.h"
typedef struct {
AVPacket *subs; ///< array of subtitles packets
@@ -58,4 +59,19 @@ int ff_subtitles_queue_read_packet(FFDemuxSubtitlesQueue *q, AVPacket *pkt);
*/
void ff_subtitles_queue_clean(FFDemuxSubtitlesQueue *q);
+/**
+ * SMIL helper to load next chunk ("<...>" or untagged content) in buf.
+ *
+ * @param c cached character, to avoid a backward seek
+ */
+int ff_smil_extract_next_chunk(AVIOContext *pb, AVBPrint *buf, char *c);
+
+/**
+ * SMIL helper to point on the value of an attribute in the given tag.
+ *
+ * @param s SMIL tag ("<...>")
+ * @param attr the attribute to look for
+ */
+const char *ff_smil_get_attr_ptr(const char *s, const char *attr);
+
#endif /* AVFORMAT_SUBTITLES_H */