[FFmpeg-devel] [PATCH] Ogg/Speex muxer
Aurelien Jacobs
aurel
Sat Feb 14 15:14:58 CET 2009
Peter Ross wrote:
> On Fri, Feb 06, 2009 at 12:03:41PM -0800, Baptiste Coudurier wrote:
> > Hi Peter,
> >
> > On 2/6/2009 8:00 AM, Peter Ross wrote:
> > > $subject.
> > >
>
> > Can the vorbis/speex comment code be applied separately and used with
> > vorbis ? If so please do that so vorbis can benefit of metadata too.
>
> It has been designed with vorbis integration in mind. Alas I am not going
> to tackle this immediately, as it requires reworking of the
> ff_xiph_split_headers() function.
>
> [...]
>
> +/**
> + * Vorbis comment keys
> + * http://www.xiph.org/vorbis/doc/v-comment.html
> + * http://wiki.xiph.org/index.php/VorbisComment
> + */
> +static const char *ogg_keys[] = {
> + "ARTIST",
> + [...]
> + "VERSION",
> + };
> +
> +/**
> + * Build Vorbis/Speex comment packet
> + * @param[out] size Size of buffer
> + * @return buffer; callee must free
> + */
> +static uint8_t* build_vorbis_comment_packet(const AVFormatContext *s, int *size)
> +{
> + int count,i;
> + uint8_t *buf, *p;
> +
> + /* calculate size of packet */
> + count = 0;
> + *size = 8 + strlen(LIBAVCODEC_IDENT);
> + for(i=0; ogg_keys[i]; i++) {
ogg_keys would have to be a NULL terminated list for this to work.
Except that, usage of the metadata API looks OK.
I haven't reviewed other parts of the patch.
Aurel
More information about the ffmpeg-devel
mailing list