summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-30 23:23:28 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-30 23:23:28 +0000
commit4729952a40dd0c3c1af2d32b0a11f86e17036360 (patch)
treefb90f5a6922784a823e4e53bd987b3814b512d7e
parentada990369334b770f323d84a0a13ccf7369f9fef (diff)
downloadmpv-4729952a40dd0c3c1af2d32b0a11f86e17036360.tar.bz2
mpv-4729952a40dd0c3c1af2d32b0a11f86e17036360.tar.xz
metadata support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18555 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/muxer_lavf.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c
index a7f23598e4..46d292e829 100644
--- a/libmpdemux/muxer_lavf.c
+++ b/libmpdemux/muxer_lavf.c
@@ -28,6 +28,16 @@ extern unsigned int codec_get_wav_tag(int id);
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 @@ int muxer_init_muxer_lavf(muxer_t *muxer)
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))