[MPlayer-cvslog] CVS: main/libmpdemux muxer.c, 1.11, 1.12 muxer_avi.c, 1.32, 1.33 muxer_lavf.c, 1.13, 1.14 muxer_mpeg.c, 1.23, 1.24

Reynaldo H. Verdejo CVS syncmail at mplayerhq.hu
Tue Nov 29 23:04:59 CET 2005


CVS change done by Reynaldo H. Verdejo CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv1395/libmpdemux

Modified Files:
	muxer.c muxer_avi.c muxer_lavf.c muxer_mpeg.c 
Log Message:
Clean up some muxer messages, patch by Corey Hickey bugfood-ml AT -fatooh/org- , small fixes by me

Index: muxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- muxer.c	21 Nov 2005 22:53:14 -0000	1.11
+++ muxer.c	29 Nov 2005 22:04:57 -0000	1.12
@@ -62,7 +62,7 @@
       
       tmp = realloc(s->muxer->muxbuf, (num+1) * sizeof(muxbuf_t));
       if(!tmp) {
-        mp_msg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot reallocate memory!\n");
+        mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufReallocErr);
         return;
       }
       s->muxer->muxbuf = tmp;
@@ -75,7 +75,7 @@
       buf->flags = flags;
       buf->buffer = malloc(len * sizeof (unsigned char));
       if (!buf->buffer) {
-        mp_msg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot allocate memory!\n");
+        mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufMallocErr);
         return;
       }
       memcpy(buf->buffer, s->buffer, buf->len);
@@ -91,11 +91,10 @@
       if (s->muxer->muxbuf_skip_buffer) {
         muxbuf_t *tmp_buf = malloc(sizeof(muxbuf_t));
         if (!tmp_buf) {
-          mp_msg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot allocate memory!\n");
+          mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufMallocErr);
           return;
         }
-        mp_msg(MSGT_MUXER, MSGL_V, "Muxer frame buffer sending %d frame(s) to muxer.\n",
-                        s->muxer->muxbuf_num);
+        mp_msg(MSGT_MUXER, MSGL_V, MSGTR_MuxbufSending, s->muxer->muxbuf_num);
         
         /* fix parameters for all streams */
         for (num = 0; s->muxer->streams[num]; ++num) {
@@ -105,7 +104,6 @@
         }
         
         /* write header */
-        mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingAVIHeader);
         if (s->muxer->cont_write_header)
           muxer_write_header(s->muxer);
         
@@ -139,7 +137,7 @@
     if(s->h.dwSampleSize){
       // CBR
       s->h.dwLength+=len/s->h.dwSampleSize;
-      if(len%s->h.dwSampleSize) mp_msg(MSGT_MUXER, MSGL_WARN, "Warning! len isn't divisable by samplesize!\n");
+      if(len%s->h.dwSampleSize) mp_msg(MSGT_MUXER, MSGL_WARN, MSGTR_WarningLenIsntDivisible);
     } else {
       // VBR
       s->h.dwLength++;

Index: muxer_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_avi.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- muxer_avi.c	21 Nov 2005 22:53:14 -0000	1.32
+++ muxer_avi.c	29 Nov 2005 22:04:57 -0000	1.33
@@ -18,6 +18,7 @@
 #include "aviheader.h"
 #include "ms_hdr.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 extern char *info_name;
 extern char *info_artist;
@@ -277,6 +278,7 @@
   struct avi_stream_info *vsi = muxer->def_v->priv;
   int isodml = vsi->riffofspos > 0;
 
+  mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader);
   if (aspect == 0) {
     mp_msg(MSGT_MUXER, MSGL_INFO, "ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.\n");
   } else {
@@ -642,6 +644,7 @@
 static void avifile_write_index(muxer_t *muxer){
   struct avi_stream_info *vsi = muxer->def_v->priv;
 
+  mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer);
   if (vsi->riffofspos > 0){
     avifile_odml_write_index(muxer);
   } else {

Index: muxer_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_lavf.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- muxer_lavf.c	21 Nov 2005 22:53:14 -0000	1.13
+++ muxer_lavf.c	29 Nov 2005 22:04:57 -0000	1.14
@@ -6,6 +6,7 @@
 #include "config.h"
 #include "version.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "bswap.h"
 #include "aviheader.h"
@@ -266,9 +267,9 @@
 {
 	muxer_priv_t *priv = (muxer_priv_t *) muxer->priv;
 	
+	mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader);
 	av_write_header(priv->oc);
 	muxer->cont_write_header = NULL;
-	mp_msg(MSGT_MUXER, MSGL_INFO, "WRITTEN HEADER\n");
 }
 
 
@@ -277,8 +278,8 @@
 	int i;
 	muxer_priv_t *priv = (muxer_priv_t *) muxer->priv;
 	
+	mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer);
 	av_write_trailer(priv->oc);
-	mp_msg(MSGT_MUXER, MSGL_INFO, "WRITTEN TRAILER\n");
 	for(i = 0; i < priv->oc->nb_streams; i++) 
 	{
 		av_freep(&(priv->oc->streams[i]));

Index: muxer_mpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_mpeg.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- muxer_mpeg.c	21 Nov 2005 22:53:14 -0000	1.23
+++ muxer_mpeg.c	29 Nov 2005 22:04:57 -0000	1.24
@@ -7,6 +7,7 @@
 #include "config.h"
 #include "version.h"
 #include "mp_msg.h"
+#include "help_mp.h"
 
 #include "bswap.h"
 
@@ -2555,6 +2556,8 @@
 	double fake_timer;
 	muxer_priv_t *priv = (muxer_priv_t *) muxer->priv;
 
+	mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer);
+
 	for(i = 0; i < muxer->avih.dwStreams; i++)
 	{
 		if(muxer->streams[i]->type == MUXER_TYPE_AUDIO)
@@ -2572,6 +2575,8 @@
 {
 	muxer_priv_t *priv = (muxer_priv_t*) muxer->priv;
 	
+	mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader);
+	
 	priv->headers_cnt++;
 	
 	if((priv->is_genmpeg1 || priv->is_genmpeg2) && (priv->headers_cnt == muxer->avih.dwStreams))




More information about the MPlayer-cvslog mailing list