[Mplayer-cvslog] CVS: main/libmpdemux aviheader.c,1.32,1.33 demuxer.h,1.20,1.21 demuxer.c,1.48,1.49

Alex Beregszaszi alex at mplayer.dev.hu
Thu Nov 22 16:39:55 CET 2001


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv30799

Modified Files:
	aviheader.c demuxer.h demuxer.c 
Log Message:
added demux_info

Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviheader.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- aviheader.c	7 Nov 2001 18:52:50 -0000	1.32
+++ aviheader.c	22 Nov 2001 15:39:53 -0000	1.33
@@ -170,6 +170,7 @@
       chunksize-=len;
       buf[len]=0;
       mp_msg(MSGT_HEADER,MSGL_V,"%-10s: %s\n",hdr,buf);
+      demux_info_add(demuxer, hdr, buf);
   }
   if(chunksize>0) stream_skip(demuxer->stream,chunksize); else
   if(chunksize<0) mp_msg(MSGT_HEADER,MSGL_WARN,"chunksize=%d  (id=%.4s)\n",chunksize,(char *) &id);

Index: demuxer.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- demuxer.h	21 Nov 2001 16:14:14 -0000	1.20
+++ demuxer.h	22 Nov 2001 15:39:53 -0000	1.21
@@ -61,6 +61,7 @@
   char *author;
   char *encoder;
   char *comments;
+  char *copyright;
 } demuxer_info_t;
 
 typedef struct demuxer_st {
@@ -166,6 +167,5 @@
 extern int force_ni;
 extern int pts_from_bps;
 
-
-
-
+int demux_info_add(demuxer_t *demuxer, char *opt, char *param);
+int demux_info_print(demuxer_t *demuxer);

Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- demuxer.c	22 Nov 2001 14:24:17 -0000	1.48
+++ demuxer.c	22 Nov 2001 15:39:53 -0000	1.49
@@ -652,7 +652,7 @@
 	return(1);
     }
 
-    if (!strcasecmp(opt, "encoder"))
+    if (!strcasecmp(opt, "encoder") || !strcasecmp(opt, "software"))
     {
 	if (info->encoder)
 	{
@@ -664,7 +664,7 @@
 	return(1);
     }
 
-    if (!strcasecmp(opt, "comments"))
+    if (!strcasecmp(opt, "comment") || !strcasecmp(opt, "comments"))
     {
 	if (info->comments)
 	{
@@ -676,7 +676,19 @@
 	return(1);
     }
 
-    mp_msg(MSGT_DEMUX, MSGL_WARN, "Unknown demuxer info->%s (=%s)!\n",
+    if (!strcasecmp(opt, "copyright"))
+    {
+	if (info->copyright)
+	{
+	    mp_msg(MSGT_DEMUX, MSGL_WARN, "Demuxer info->copyright already present\n!");
+	    return(0);
+	}
+	info->copyright = malloc(strlen(param));
+	strcpy(info->copyright, param);
+	return(1);
+    }
+
+    mp_msg(MSGT_DEMUX, MSGL_DBG2, "Unknown demuxer info->%s (=%s)!\n",
 	opt, param);
     return(1);
 }
@@ -685,16 +697,18 @@
 {
     demuxer_info_t *info = &demuxer->info;
 
-    if (info->name || info->author || info->encoder || info->comments)
+    if (info->name || info->author || info->encoder || info->comments || info->copyright)
     {
 	mp_msg(MSGT_DEMUX, MSGL_INFO, "Clip info: \n");
 	if (info->name)
 	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Name: %s\n", info->name);
 	if (info->author)
 	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Author: %s\n", info->author);
-	if (info->encoder)
-	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Encoder: %s\n", info->encoder);
+	if (info->comments)
+	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Copyright: %s\n", info->comments);
 	if (info->comments)
 	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Comments: %s\n", info->comments);
+	if (info->encoder)
+	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Encoder: %s\n", info->encoder);
     }
 }




More information about the MPlayer-cvslog mailing list