mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
Subtitle support. (untested)
Originally committed as revision 12330 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
73e2261318
commit
1326621c1a
@ -22,6 +22,14 @@
|
|||||||
#include "nut.h"
|
#include "nut.h"
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
|
|
||||||
|
const AVCodecTag ff_nut_subtitle_tags[] = {
|
||||||
|
{ CODEC_ID_TEXT , MKTAG('U', 'T', 'F', '8') },
|
||||||
|
{ CODEC_ID_SSA , MKTAG('S', 'S', 'A', 0 ) },
|
||||||
|
{ CODEC_ID_DVD_SUBTITLE, MKTAG('D', 'V', 'D', 'S') },
|
||||||
|
{ CODEC_ID_DVB_SUBTITLE, MKTAG('D', 'V', 'B', 'S') },
|
||||||
|
{ CODEC_ID_NONE , 0 }
|
||||||
|
};
|
||||||
|
|
||||||
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
|
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
|
||||||
int i;
|
int i;
|
||||||
for(i=0; i<nut->avf->nb_streams; i++){
|
for(i=0; i<nut->avf->nb_streams; i++){
|
||||||
|
@ -97,6 +97,8 @@ typedef struct {
|
|||||||
struct AVTreeNode *syncpoints;
|
struct AVTreeNode *syncpoints;
|
||||||
} NUTContext;
|
} NUTContext;
|
||||||
|
|
||||||
|
extern const AVCodecTag ff_nut_subtitle_tags[];
|
||||||
|
|
||||||
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val);
|
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val);
|
||||||
int64_t ff_lsb2full(StreamContext *stream, int64_t lsb);
|
int64_t ff_lsb2full(StreamContext *stream, int64_t lsb);
|
||||||
int ff_nut_sp_pos_cmp(syncpoint_t *a, syncpoint_t *b);
|
int ff_nut_sp_pos_cmp(syncpoint_t *a, syncpoint_t *b);
|
||||||
|
@ -322,7 +322,7 @@ static int decode_stream_header(NUTContext *nut){
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
st->codec->codec_type = CODEC_TYPE_SUBTITLE;
|
st->codec->codec_type = CODEC_TYPE_SUBTITLE;
|
||||||
// st->codec->codec_id = codec_get_id(codec_wav_tags, tmp); FIXME
|
st->codec->codec_id = codec_get_id(ff_nut_subtitle_tags, tmp);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
st->codec->codec_type = CODEC_TYPE_DATA;
|
st->codec->codec_type = CODEC_TYPE_DATA;
|
||||||
|
@ -771,5 +771,5 @@ AVOutputFormat nut_muxer = {
|
|||||||
write_packet,
|
write_packet,
|
||||||
write_trailer,
|
write_trailer,
|
||||||
.flags = AVFMT_GLOBALHEADER,
|
.flags = AVFMT_GLOBALHEADER,
|
||||||
.codec_tag= (const AVCodecTag*[]){codec_bmp_tags, codec_wav_tags, 0},
|
.codec_tag= (const AVCodecTag*[]){codec_bmp_tags, codec_wav_tags, ff_nut_subtitle_tags, 0},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user