1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

printf to mp_msg

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5934 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
albeu 2002-05-02 10:40:35 +00:00
parent ae15bf12fd
commit 4189e06396
3 changed files with 11 additions and 10 deletions

View File

@ -39,7 +39,7 @@ int init_audio(sh_audio_t *sh_audio)
return 0; // no such driver
}
printf("Selecting Audio Decoder: [%s] %s\n",mpadec->info->short_name,mpadec->info->name);
mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Selecting Audio Decoder: [%s] %s\n",mpadec->info->short_name,mpadec->info->name);
// reset in/out buffer size/pointer:
sh_audio->a_buffer_size=0;
@ -64,7 +64,7 @@ int init_audio(sh_audio_t *sh_audio)
if(!mpadec->preinit(sh_audio))
{
printf("ADecoder preinit failed :(\n");
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"ADecoder preinit failed :(\n");
return 0;
}

View File

@ -50,7 +50,7 @@ while(1){
id=stream_read_dword_le(demuxer->stream); // list type
mp_msg(MSGT_HEADER,MSGL_DBG2,"LIST %.4s len=%d\n",(char *) &id,len);
list_end=stream_tell(demuxer->stream)+((len+1)&(~1));
printf("list_end=0x%X\n",(int)list_end);
mp_msg(MSGT_HEADER,MSGL_V,"list_end=0x%X\n",(int)list_end);
if(id==listtypeAVIMOVIE){
// found MOVI header
if(!demuxer->movi_start) demuxer->movi_start=stream_tell(demuxer->stream);
@ -247,7 +247,7 @@ while(1){
}
}
if(hdr){
printf("hdr=%s size=%d\n",hdr,size2);
mp_msg(MSGT_HEADER,MSGL_V,"hdr=%s size=%d\n",hdr,size2);
if(size2==3)
chunksize=1; // empty
else {

View File

@ -12,6 +12,7 @@
#include <stdio.h>
#include "url.h"
#include "mp_msg.h"
URL_t*
url_new(char* url) {
@ -24,7 +25,7 @@ url_new(char* url) {
// Create the URL container
Curl = (URL_t*)malloc(sizeof(URL_t));
if( Curl==NULL ) {
printf("Memory allocation failed!\n");
mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
// Initialisation of the URL container members
@ -33,14 +34,14 @@ url_new(char* url) {
// Copy the url in the URL container
Curl->url = strdup(url);
if( Curl->url==NULL ) {
printf("Memory allocation failed!\n");
mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
// extract the protocol
ptr1 = strstr(url, "://");
if( ptr1==NULL ) {
printf("Not an URL!\n");
mp_msg(MSGT_NETWORK,MSGL_V,"Not an URL!\n");
return NULL;
}
pos1 = ptr1-url;
@ -74,7 +75,7 @@ url_new(char* url) {
// copy the hostname in the URL container
Curl->hostname = (char*)malloc(pos2-pos1-3+1);
if( Curl->hostname==NULL ) {
printf("Memory allocation failed!\n");
mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
strncpy(Curl->hostname, ptr1+3, pos2-pos1-3);
@ -89,7 +90,7 @@ url_new(char* url) {
// copy the path/filename in the URL container
Curl->file = strdup(ptr2);
if( Curl->file==NULL ) {
printf("Memory allocation failed!\n");
mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
}
@ -98,7 +99,7 @@ url_new(char* url) {
if( Curl->file==NULL ) {
Curl->file = (char*)malloc(2);
if( Curl->file==NULL ) {
printf("Memory allocation failed!\n");
mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
strcpy(Curl->file, "/");