[FFmpeg-devel] [RFC] AST subtitles
Michael Niedermayer
michaelni at gmx.at
Sun Nov 25 19:28:35 CET 2012
On Sat, Nov 24, 2012 at 10:08:33PM +0100, Clément Bœsch wrote:
> Hi there,
>
> I wrote a new prototype for storing text subtitles instead of a custom ASS
> line like we currently do. It's trying to be flexible enough to be able to
> deal with any kind of text subtitles markups, while being as simple as
> possible for our users, but also for decoders and encoders.
>
> Of course, we will have to deal with retro compat. The simpler I found
> here was to introduce a new AVSubtitleType (SUBTITLE_AST), and we would
> use a new field AVSubtitleRect->ast instead of AVSubtitleRect->ass.
>
> I used "AST" initially, but it's actually not an AST, so far it's just
> kind of a list, feel free to propose a better random name; I took this
> name because it expresses the fact that it's an arbitrary structure
> layout, and not a data buffer like currently.
>
> Anyway, here are the basic structures:
>
> typedef struct AVSubtitleASTChunk {
> int type; ///< one of the AVSUBTITLE_AST_SETTING_TYPE_*
enum
> int reset; /**< this chunk restores the setting to the default
> value (or disable the previous one in nested
> mode) */
what does "previous" refer to here ?
it could be previous in the list, previous as in from the last packet
or possibly something else
> union {
> char *s; ///< must be a av_malloc'ed string if string type
> double d;
> int i;
> int64_t i64;
> uint32_t u32;
isnt double or double+int64 enough for these ?
also i was wondering if having a pointer to the string that was
parsed could be usefull or allow some simplifications.
What i had in mind here would be along the lines of parsing a
marked up string and point back into the string where text is needed
from it.
If for nothing else such a additional field could help debuging
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121125/52bc2a9e/attachment.asc>
More information about the ffmpeg-devel
mailing list