summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-22 05:12:10 +0000
committerreynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-22 05:12:10 +0000
commitc03b175452acfab485de9ad8aaf78f44cfdf3c91 (patch)
tree62d5b9fc960a9fbc2f01c11971d471bf8d1265a5 /libmpdemux
parent19935f69bd53ab35008d0a7359410609f882b9f7 (diff)
downloadmpv-c03b175452acfab485de9ad8aaf78f44cfdf3c91.tar.bz2
mpv-c03b175452acfab485de9ad8aaf78f44cfdf3c91.tar.xz
Part3 of Otvos Attila's oattila AT chello-hu mp_msg changes, with lots of modifications as usual
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18177 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/cache2.c4
-rw-r--r--libmpdemux/cddb.c4
-rw-r--r--libmpdemux/demux_audio.c3
-rw-r--r--libmpdemux/demux_demuxers.c4
-rw-r--r--libmpdemux/demux_film.c6
-rw-r--r--libmpdemux/demux_mov.c2
-rw-r--r--libmpdemux/demux_nuv.c2
-rw-r--r--libmpdemux/demux_real.c4
-rw-r--r--libmpdemux/demux_xmms.c7
-rw-r--r--libmpdemux/stream.c2
-rw-r--r--libmpdemux/tvi_v4l2.c2
11 files changed, 23 insertions, 17 deletions
diff --git a/libmpdemux/cache2.c b/libmpdemux/cache2.c
index 6fbf19c5f9..116bd2e9ff 100644
--- a/libmpdemux/cache2.c
+++ b/libmpdemux/cache2.c
@@ -64,8 +64,8 @@ int cache_fill_status=0;
void cache_stats(cache_vars_t* s){
int newb=s->max_filepos-s->read_filepos; // new bytes in the buffer
- printf("0x%06X [0x%06X] 0x%06X ",(int)s->min_filepos,(int)s->read_filepos,(int)s->max_filepos);
- printf("%3d %% (%3d%%)\n",100*newb/s->buffer_size,100*min_fill/s->buffer_size);
+ mp_msg(MSGT_CACHE,MSGL_INFO,"0x%06X [0x%06X] 0x%06X ",(int)s->min_filepos,(int)s->read_filepos,(int)s->max_filepos);
+ mp_msg(MSGT_CACHE,MSGL_INFO,"%3d %% (%3d%%)\n",100*newb/s->buffer_size,100*min_fill/s->buffer_size);
}
int cache_read(cache_vars_t* s,unsigned char* buf,int size){
diff --git a/libmpdemux/cddb.c b/libmpdemux/cddb.c
index dbeaba8b9d..01b3b2c22e 100644
--- a/libmpdemux/cddb.c
+++ b/libmpdemux/cddb.c
@@ -282,7 +282,7 @@ cddb_http_request(char *command, int (*reply_parser)(HTTP_header_t*,cddb_data_t*
if( reply_parser==NULL || command==NULL || cddb_data==NULL ) return -1;
sprintf( request, "http://%s/~cddb/cddb.cgi?cmd=%s%s&proto=%d", cddb_data->freedb_server, command, cddb_data->cddb_hello, cddb_data->freedb_proto_level );
- printf("Request[%s]\n", request );
+ mp_msg(MSGT_OPEN, MSGL_INFO,"Request[%s]\n", request );
url = url_new(request);
if( url==NULL ) {
@@ -303,7 +303,7 @@ cddb_http_request(char *command, int (*reply_parser)(HTTP_header_t*,cddb_data_t*
}
http_debug_hdr(http_hdr);
- printf("body=[%s]\n", http_hdr->body );
+ mp_msg(MSGT_OPEN, MSGL_INFO,"body=[%s]\n", http_hdr->body );
switch(http_hdr->status_code) {
case 200:
diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c
index 7e5ff7d986..393e485555 100644
--- a/libmpdemux/demux_audio.c
+++ b/libmpdemux/demux_audio.c
@@ -1,6 +1,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include <stdlib.h>
#include <stdio.h>
@@ -615,7 +616,7 @@ static int demux_audio_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) {
break;
}
default:
- printf("Audio demuxer : unknown format %d\n",priv->frmt);
+ mp_msg(MSGT_DEMUXER,MSGL_WARN,MSGTR_MPDEMUX_AUDIO_UnknownFormat,priv->frmt);
return 0;
}
diff --git a/libmpdemux/demux_demuxers.c b/libmpdemux/demux_demuxers.c
index 092be8d505..d38c5290d7 100644
--- a/libmpdemux/demux_demuxers.c
+++ b/libmpdemux/demux_demuxers.c
@@ -1,5 +1,7 @@
#include "config.h"
+#include "mp_msg.h"
+#include "help_mp.h"
#include <stdlib.h>
#include <stdio.h>
@@ -53,7 +55,7 @@ static int demux_demuxers_fill_buffer(demuxer_t *demux,demux_stream_t *ds) {
else if(ds->demuxer == priv->sd)
return demux_fill_buffer(priv->sd,ds);
- printf("Demux demuxers fill_buffer error : bad demuxer : not vd, ad nor sd\n");
+ mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_MPDEMUX_DEMUXERS_FillBufferError);
return 0;
}
diff --git a/libmpdemux/demux_film.c b/libmpdemux/demux_film.c
index b4f60c3a78..e37cfb6cee 100644
--- a/libmpdemux/demux_film.c
+++ b/libmpdemux/demux_film.c
@@ -57,7 +57,7 @@ static void demux_seek_film(demuxer_t *demuxer, float rel_seek_secs, float audio
new_current_chunk += rel_seek_secs * film_data->chunks_per_second; // secs
-printf ("current, total chunks = %d, %d; seek %5.3f sec, new chunk guess = %d\n",
+mp_msg(MSGT_DECVIDEO, MSGL_INFO,"current, total chunks = %d, %d; seek %5.3f sec, new chunk guess = %d\n",
film_data->current_chunk, film_data->total_chunks,
rel_seek_secs, new_current_chunk);
@@ -74,7 +74,7 @@ printf ("current, total chunks = %d, %d; seek %5.3f sec, new chunk guess = %d\n"
film_data->current_chunk = new_current_chunk;
-printf (" (flags = %X) actual new chunk = %d (syncinfo1 = %08X)\n",
+mp_msg(MSGT_DECVIDEO, MSGL_INFO," (flags = %X) actual new chunk = %d (syncinfo1 = %08X)\n",
flags, film_data->current_chunk, film_data->chunks[film_data->current_chunk].syncinfo1);
demuxer->video->pts=film_data->chunks[film_data->current_chunk].pts;
@@ -289,7 +289,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
stream_skip(demuxer->stream, 8);
if(demuxer->audio->id<-1){
- printf("chunk size = 0x%X \n",chunk_size);
+ mp_msg(MSGT_DECVIDEO, MSGL_INFO,"chunk size = 0x%X \n",chunk_size);
stream_skip(demuxer->stream, chunk_size-12-8);
break; // audio disabled (or no soundcard)
}
diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c
index 5465d19d94..d7b1663ad2 100644
--- a/libmpdemux/demux_mov.c
+++ b/libmpdemux/demux_mov.c
@@ -1047,7 +1047,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
sh->aspect/=trak->tkdata[81]|(trak->tkdata[80]<<8);
}
- if(depth>32+8) printf("*** depth = 0x%X\n",depth);
+ if(depth>32+8) mp_msg(MSGT_DEMUX, MSGL_INFO,"*** depth = 0x%X\n",depth);
// palettized?
gray = 0;
diff --git a/libmpdemux/demux_nuv.c b/libmpdemux/demux_nuv.c
index 4263c0ef25..05ae937a5a 100644
--- a/libmpdemux/demux_nuv.c
+++ b/libmpdemux/demux_nuv.c
@@ -331,7 +331,7 @@ static demuxer_t* demux_open_nuv ( demuxer_t* demuxer )
/* no video */
if (rtjpeg_fileheader.videoblocks == 0)
{
- printf("No video blocks in file\n");
+ mp_msg(MSGT_DEMUXER, MSGL_INFO, MSGTR_MPDEMUX_NUV_NoVideoBlocksInFile);
return NULL;
}
diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c
index d65122feba..dc5697e70a 100644
--- a/libmpdemux/demux_real.c
+++ b/libmpdemux/demux_real.c
@@ -1225,7 +1225,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
descr = malloc(len+1);
stream_read(demuxer->stream, descr, len);
descr[len] = 0;
- printf("Stream description: %s\n", descr);
+ mp_msg(MSGT_DEMUX, MSGL_INFO,"Stream description: %s\n", descr);
free(descr);
}
// skip_str(1, demuxer); /* mimetype */
@@ -1233,7 +1233,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
mimet = malloc(len+1);
stream_read(demuxer->stream, mimet, len);
mimet[len] = 0;
- printf("Stream mimetype: %s\n", mimet);
+ mp_msg(MSGT_DEMUX, MSGL_INFO,"Stream mimetype: %s\n", mimet);
}
/* Type specific header */
diff --git a/libmpdemux/demux_xmms.c b/libmpdemux/demux_xmms.c
index fbaaf840ff..6066203793 100644
--- a/libmpdemux/demux_xmms.c
+++ b/libmpdemux/demux_xmms.c
@@ -18,6 +18,9 @@
#include "demuxer.h"
#include "stheader.h"
+#include "mp_msg.h"
+#include "help_mp.h"
+
#define XMMS_PACKETSIZE 65536 // some plugins won't play if this is too small
#include "demux_xmms_plugin.h"
@@ -171,7 +174,7 @@ static void init_plugins(){
gpi=dlsym(handle, "get_iplugin_info");
if(gpi){
InputPlugin *p=gpi();
- printf("XMMS: found plugin: %s (%s)\n",ent->d_name,p->description);
+ mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_XMMS_FoundPlugin,ent->d_name,p->description);
p->handle = handle;
p->filename = strdup(filename);
p->get_vis_type = input_get_vis_type;
@@ -190,7 +193,7 @@ static void init_plugins(){
static void cleanup_plugins(){
while(no_plugins>0){
--no_plugins;
- printf("XMMS: Closing plugin %s\n",input_plugins[no_plugins]->filename);
+ mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_MPDEMUX_XMMS_ClosingPlugin,input_plugins[no_plugins]->filename);
if(input_plugins[no_plugins]->cleanup)
input_plugins[no_plugins]->cleanup();
dlclose(input_plugins[no_plugins]->handle);
diff --git a/libmpdemux/stream.c b/libmpdemux/stream.c
index 0ea628a008..052212bfe7 100644
--- a/libmpdemux/stream.c
+++ b/libmpdemux/stream.c
@@ -271,7 +271,7 @@ off_t newpos=0;
}
if( mp_msg_test(MSGT_STREAM,MSGL_DBG3) ){
- printf("s->pos=%"PRIX64" newpos=%"PRIX64" new_bufpos=%"PRIX64" buflen=%X \n",
+ mp_msg(MSGT_STREAM,MSGL_DBG3, "s->pos=%"PRIX64" newpos=%"PRIX64" new_bufpos=%"PRIX64" buflen=%X \n",
(int64_t)s->pos,(int64_t)newpos,(int64_t)pos,s->buf_len);
}
pos-=newpos;
diff --git a/libmpdemux/tvi_v4l2.c b/libmpdemux/tvi_v4l2.c
index f9ed7ab95f..63e6641fd2 100644
--- a/libmpdemux/tvi_v4l2.c
+++ b/libmpdemux/tvi_v4l2.c
@@ -1031,7 +1031,7 @@ static int init(priv_t *priv)
standard.index = i;
if (-1 == ioctl(priv->video_fd, VIDIOC_ENUMSTD, &standard))
break;
- printf(" %d = %s;", i, standard.name);
+ mp_msg(MSGT_TV, MSGL_INFO, " %d = %s;", i, standard.name);
}
mp_msg(MSGT_TV, MSGL_INFO, "\n inputs:");
for (i = 0; 1; i++) {