/*
- * DVB subtitle encoding for ffmpeg
+ * DVB subtitle encoding
* Copyright (c) 2005 Fabrice Bellard
*
* This file is part of Libav.
}
static int encode_dvb_subtitles(DVBSubtitleContext *s,
- uint8_t *outbuf, AVSubtitle *h)
+ uint8_t *outbuf, const AVSubtitle *h)
{
uint8_t *q, *pseg_len;
int page_id, region_id, clut_id, object_id, i, bpp_index, page_state;
}
static int dvbsub_encode(AVCodecContext *avctx,
- unsigned char *buf, int buf_size, void *data)
+ unsigned char *buf, int buf_size,
+ const AVSubtitle *sub)
{
DVBSubtitleContext *s = avctx->priv_data;
- AVSubtitle *sub = data;
int ret;
ret = encode_dvb_subtitles(s, buf, sub);
}
AVCodec ff_dvbsub_encoder = {
- "dvbsub",
- AVMEDIA_TYPE_SUBTITLE,
- CODEC_ID_DVB_SUBTITLE,
- sizeof(DVBSubtitleContext),
- NULL,
- dvbsub_encode,
- .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
+ .name = "dvbsub",
+ .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
+ .type = AVMEDIA_TYPE_SUBTITLE,
+ .id = AV_CODEC_ID_DVB_SUBTITLE,
+ .priv_data_size = sizeof(DVBSubtitleContext),
+ .encode_sub = dvbsub_encode,
};