Mercurial > mplayer.hg
changeset 18554:ebf5efd78cb6
metadata support
author | michael |
---|---|
date | Tue, 30 May 2006 23:23:28 +0000 |
parents | f85b5c5d5d18 |
children | 119a27126ef4 |
files | libmpdemux/muxer_lavf.c |
diffstat | 1 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c Tue May 30 23:18:05 2006 +0000 +++ b/libmpdemux/muxer_lavf.c Tue May 30 23:23:28 2006 +0000 @@ -28,6 +28,16 @@ extern enum CodecID codec_get_bmp_id(unsigned int tag); extern enum CodecID codec_get_wav_id(unsigned int tag); +extern char *info_name; +extern char *info_artist; +extern char *info_genre; +extern char *info_subject; +extern char *info_copyright; +extern char *info_sourceform; +extern char *info_comment; + +void pstrcpy(char *buf, int buf_size, const char *str); + typedef struct { //AVInputFormat *avif; AVFormatContext *oc; @@ -372,7 +382,16 @@ priv->oc->mux_rate= mux_rate; priv->oc->preload= (int)(mux_preload*AV_TIME_BASE); priv->oc->max_delay= (int)(mux_max_delay*AV_TIME_BASE); - + if (info_name) + pstrcpy(priv->oc->title , sizeof(priv->oc->title ), info_name ); + if (info_artist) + pstrcpy(priv->oc->author , sizeof(priv->oc->author ), info_artist ); + if (info_genre) + pstrcpy(priv->oc->genre , sizeof(priv->oc->genre ), info_genre ); + if (info_copyright) + pstrcpy(priv->oc->copyright, sizeof(priv->oc->copyright), info_copyright); + if (info_comment) + pstrcpy(priv->oc->comment , sizeof(priv->oc->comment ), info_comment ); register_protocol(&mp_protocol); if(url_fopen(&priv->oc->pb, mp_filename, URL_WRONLY))