changeset 3068:572a94255d1e

added support for demux_info
author alex
date Thu, 22 Nov 2001 15:08:39 +0000
parents 1207bd5de2b2
children e6bbc5e6a054
files libmpdemux/demux_viv.c
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_viv.c	Thu Nov 22 14:24:17 2001 +0000
+++ b/libmpdemux/demux_viv.c	Thu Nov 22 15:08:39 2001 +0000
@@ -129,24 +129,28 @@
 	if (!strcmp(opt, "Title"))
 	{
 	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Title: %s\n", param);
+	    demux_info_add(demux, "name", param);
 	    priv->title = malloc(strlen(param));
 	    strcpy(priv->title, param);
 	}
 	if (!strcmp(opt, "Author"))
 	{
 	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Author: %s\n", param);
+	    demux_info_add(demux, "author", param);
 	    priv->author = malloc(strlen(param));
 	    strcpy(priv->author, param);
 	}
 	if (!strcmp(opt, "Copyright"))
 	{
 	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Copyright: %s\n", param);
+	    demux_info_add(demux, "copyright", param);
 	    priv->copyright = malloc(strlen(param));
 	    strcpy(priv->copyright, param);
 	}
 	if (!strcmp(opt, "Producer"))
 	{
 	    mp_msg(MSGT_DEMUX, MSGL_INFO, " Producer: %s\n", param);
+	    demux_info_add(demux, "software", param);
 	    priv->producer = malloc(strlen(param));
 	    strcpy(priv->producer, param);
 	}
@@ -267,12 +271,12 @@
       len=stream_read_char(demux->stream);
       ds=demux->video;
       break;
-  case 0x30:  // audio ?
-      len=0x28;
+  case 0x30:  // audio packet
+      len=40;	/* 40kbps */
       ds=demux->audio;
       break;
   case 0x40:  // audio packet
-      len=24;
+      len=24;	/* 24kbps */
       ds=demux->audio;
       break;
   default:
@@ -522,6 +526,9 @@
 {		sh_audio_t* sh=new_sh_audio(demuxer,1);
 
 		sh->format=0x111; // 0x112
+//		if (sh->format == 0x111) /* G.723 */
+//		sh->samplesize = demuxer->audio->buffer_size;
+//		printf("samplesize: %d\n", sh->samplesize);
 		// Emulate WAVEFORMATEX struct:
 		sh->wf=malloc(sizeof(WAVEFORMATEX));
 		memset(sh->wf,0,sizeof(WAVEFORMATEX));