On Tue, Dec 30, 2014 at 07:39:38PM +0530, Anshul wrote: > On 12/30/2014 03:56 PM, Clément Bœsch wrote: > > They are also probably useless since you can use av_asprintf() directly. > > > Thanks I didn't knew about that function. > > > Attached new patch with removing those function. [...] > --- a/libavcodec/allcodecs.c > +++ b/libavcodec/allcodecs.c > @@ -536,6 +536,8 @@ void avcodec_register_all(void) > REGISTER_ENCODER(LIBAACPLUS, libaacplus); > > /* text */ > + REGISTER_DECODER(SCTE_35, scte_35) > + REGISTER_ENCODER(CUE_XML, cue_xml);
you are missing a ; here > REGISTER_DECODER(BINTEXT, bintext); > REGISTER_DECODER(XBIN, xbin); > REGISTER_DECODER(IDF, idf); > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index 99467bb..bd966d5 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -523,6 +523,8 @@ enum AVCodecID { > /* other specific kind of codecs (generally used for attachments) */ > AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing > at the start of various fake codecs. > AV_CODEC_ID_TTF = 0x18000, > + AV_CODEC_ID_SCTE_35 = MKBETAG('C','U','E','I'), > + AV_CODEC_ID_CUE_XML = MKBETAG('C','U','E','X'), > AV_CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'), > AV_CODEC_ID_XBIN = MKBETAG('X','B','I','N'), > AV_CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'), > @@ -3157,6 +3159,13 @@ typedef struct AVCodecDefault AVCodecDefault; > > struct AVSubtitle; > > +typedef struct AVData { > + void *data; > + int len; > + int ref_count; > + int valid; > +} AVData; missing documentation > + > /** > * AVCodec. > */ > @@ -3233,6 +3242,8 @@ typedef struct AVCodec { > int (*init)(AVCodecContext *); > int (*encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size, > const struct AVSubtitle *sub); > + int (*encode_data)(AVCodecContext *avctx, const AVData *input, AVData > *output, > + enum AVCodecID in_codec_id); > /** > * Encode data to an AVPacket. > * > @@ -3246,6 +3257,7 @@ typedef struct AVCodec { > int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame > *frame, > int *got_packet_ptr); > int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, > AVPacket *avpkt); > + int (*decode_data)(AVCodecContext *,AVData *output, const AVPacket > *avpkt); > int (*close)(AVCodecContext *); > /** > * Flush buffers. this breaks ABI > @@ -4195,6 +4207,9 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, > AVSubtitle *sub, > int *got_sub_ptr, > AVPacket *avpkt); > > +int avcodec_decode_data(AVCodecContext *avctx, > + AVData *output, > + const AVPacket *avpkt); > /** > * @defgroup lavc_parsing Frame parsing > * @{ > @@ -4585,6 +4600,8 @@ int avcodec_encode_video2(AVCodecContext *avctx, > AVPacket *avpkt, > > int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int > buf_size, > const AVSubtitle *sub); > +int avcodec_encode_data(AVCodecContext *avctx,const AVData *input, AVData > *output, > + enum AVCodecID in_codec_id); > > this is missing documentation [...] > diff --git a/libavcodec/scte_35.c b/libavcodec/scte_35.c > new file mode 100644 > index 0000000..2723225 > --- /dev/null > +++ b/libavcodec/scte_35.c > @@ -0,0 +1,294 @@ > +/* > + * SCTE 35 decoder > + * Copyright (c) 2014 Anshul Maheshwaari > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > + */ please add a reference to the spezification & exact revission used to implement this [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The educated differ from the uneducated as much as the living from the dead. -- Aristotle
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel