mirror of
https://github.com/mpv-player/mpv
synced 2024-09-09 01:16:56 +02:00
less, and more informal printfs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@341 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
bfa6c4f83a
commit
b8c86c7b34
10
asfheader.c
10
asfheader.c
@ -105,7 +105,7 @@ int read_asf_header(){
|
||||
unsigned char buffer[512];
|
||||
|
||||
#if 1
|
||||
printf("ASF file! (subchunks: %d)\n",asfh.cno);
|
||||
//printf("ASF file! (subchunks: %d)\n",asfh.cno);
|
||||
while(!stream_eof(demuxer->stream)){
|
||||
int pos,endpos;
|
||||
pos=stream_tell(demuxer->stream);
|
||||
@ -113,15 +113,17 @@ while(!stream_eof(demuxer->stream)){
|
||||
if(stream_eof(demuxer->stream)) break; // EOF
|
||||
endpos=pos+objh.size;
|
||||
// for(i=0;i<16;i++) printf("%02X ",objh.guid[i]);
|
||||
printf("0x%08X [%s] %d\n",pos, asf_chunk_type(objh.guid),(int) objh.size);
|
||||
//printf("0x%08X [%s] %d\n",pos, asf_chunk_type(objh.guid),(int) objh.size);
|
||||
switch(*((unsigned int*)&objh.guid)){
|
||||
case 0xB7DC0791: // guid_stream_header
|
||||
stream_read(demuxer->stream,(char*) &streamh,sizeof(streamh));
|
||||
if(verbose){
|
||||
printf("stream type: %s\n",asf_chunk_type(streamh.type));
|
||||
printf("stream concealment: %s\n",asf_chunk_type(streamh.concealment));
|
||||
printf("type: %d bytes, stream: %d bytes ID: %d\n",(int)streamh.type_size,(int)streamh.stream_size,(int)streamh.stream_no);
|
||||
printf("unk1: %lX unk2: %X\n",streamh.unk1,streamh.unk2);
|
||||
printf("FILEPOS=0x%X\n",stream_tell(demuxer->stream));
|
||||
}
|
||||
// type-specific data:
|
||||
stream_read(demuxer->stream,(char*) buffer,streamh.type_size);
|
||||
switch(*((unsigned int*)&streamh.type)){
|
||||
@ -138,7 +140,7 @@ while(!stream_eof(demuxer->stream)){
|
||||
} else {
|
||||
asf_scrambling_b=asf_scrambling_h=asf_scrambling_w=1;
|
||||
}
|
||||
printf("ASF audio scrambling: %d x %d x %d\n",asf_scrambling_h,asf_scrambling_w,asf_scrambling_b);
|
||||
printf("ASF: audio scrambling: %d x %d x %d\n",asf_scrambling_h,asf_scrambling_w,asf_scrambling_b);
|
||||
if(demuxer->audio->id==-1) demuxer->audio->id=streamh.stream_no & 0x7F;
|
||||
break;
|
||||
}
|
||||
@ -159,7 +161,7 @@ while(!stream_eof(demuxer->stream)){
|
||||
// case 0xD6E229D1: return "guid_header_2_0";
|
||||
case 0x8CABDCA1: // guid_file_header
|
||||
stream_read(demuxer->stream,(char*) &fileh,sizeof(fileh));
|
||||
printf("packets: %d flags: %d pack_size: %d frame_size: %d\n",(int)fileh.packets,(int)fileh.flags,(int)fileh.packetsize,(int)fileh.frame_size);
|
||||
if(verbose) printf("ASF: packets: %d flags: %d pack_size: %d frame_size: %d\n",(int)fileh.packets,(int)fileh.flags,(int)fileh.packetsize,(int)fileh.frame_size);
|
||||
asf_packet=malloc(fileh.packetsize); // !!!
|
||||
break;
|
||||
case 0x75b22636: // guid_data_chunk
|
||||
|
@ -29,7 +29,7 @@ if(driver==7){
|
||||
driver=0;
|
||||
#else
|
||||
// Win32 DShow audio codec:
|
||||
printf("DShow_audio: channs=%d rate=%d\n",sh_audio->channels,sh_audio->samplerate);
|
||||
// printf("DShow_audio: channs=%d rate=%d\n",sh_audio->channels,sh_audio->samplerate);
|
||||
|
||||
if(DS_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,&sh_audio->wf)){
|
||||
printf("ERROR: Could not load/initialize Win32/DirctShow AUDIO codec: %s\n",sh_audio->codec->dll);
|
||||
|
@ -1,5 +1,5 @@
|
||||
static char* banner_text=
|
||||
"\n"
|
||||
"\n\n"
|
||||
"MPlayer v0.10 [AVI parser] (C) 2000. Arpad Gereoffy <arpi@esp-team.scene.hu>\n"
|
||||
"\n";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
static char* banner_text=
|
||||
"\n"
|
||||
"\n\n"
|
||||
"MPlayer " VERSION " (C) 2000-2001 Arpad Gereoffy <arpi@esp-team.scene.hu>\n"
|
||||
"\n";
|
||||
|
||||
|
@ -242,7 +242,7 @@ for(i=0;i<512;i++)
|
||||
desc->font[' ']=-1;
|
||||
desc->width[' ']=desc->spacewidth;
|
||||
|
||||
printf("font: Font %s loaded successfully! (%d chars)\n",fname,chardb);
|
||||
printf("Font %s loaded successfully! (%d chars)\n",fname,chardb);
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ static void set_window(){
|
||||
XGetGeometry( mDisplay,mWindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
|
||||
drwX=0; drwY=0; // drwWidth=wndWidth; drwHeight=wndHeight;
|
||||
XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
|
||||
fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
|
||||
//fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
|
||||
|
||||
if ( mFullscreen )
|
||||
{
|
||||
@ -113,7 +113,7 @@ static void set_window(){
|
||||
drwcY+=drwY;
|
||||
drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth);
|
||||
drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
|
||||
fprintf( stderr,"[xmga-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
|
||||
//fprintf( stderr,"[xmga-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
|
||||
}
|
||||
|
||||
mDrawColorKey();
|
||||
@ -133,7 +133,7 @@ static void check_events(void)
|
||||
set_window();
|
||||
if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) )
|
||||
{
|
||||
fprintf( stderr,"Error in mga_vid_config ioctl" );
|
||||
fprintf( stderr,"Error in mga_vid_config ioctl (wrong mga_vid.o version?)" );
|
||||
// exit( 0 );
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_
|
||||
mDisplay=XOpenDisplay(name);
|
||||
if ( mDisplay == NULL )
|
||||
{
|
||||
fprintf( stderr,"Can not open display\n" );
|
||||
fprintf( stderr,"Can not open X11 display\n" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ DrvOpen(LPARAM lParam2)
|
||||
GUID* id=&CLSID_Voxware;
|
||||
|
||||
result=func(id, &IID_IClassFactory, (void**)&factory);
|
||||
if(result || (!factory)) printf("No such class object\n");
|
||||
if(result || (!factory)) printf("No such class object (wrong/missing GUID?)\n");
|
||||
|
||||
printf("Calling factory->vt->CreateInstance()\n");
|
||||
printf("addr = %X\n",(unsigned int)factory->vt->CreateInstance);
|
||||
@ -221,7 +221,7 @@ DrvOpen(LPARAM lParam2)
|
||||
hDriver = (HDRVR) 0;
|
||||
}
|
||||
|
||||
printf("Successfully loaded codec %s\n",win32_codec_name);
|
||||
// printf("Successfully loaded codec %s\n",win32_codec_name);
|
||||
|
||||
return (hDriver);
|
||||
}
|
||||
|
@ -54,13 +54,13 @@ void DS_Filter::Create(string dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM
|
||||
|
||||
setup_FS_Segment();
|
||||
|
||||
printf("Calling factory->vt->CreateInstance()\n");
|
||||
// printf("Calling factory->vt->CreateInstance()\n");
|
||||
result=factory->vt->CreateInstance(factory, 0, &IID_IUnknown, (void**)&object);
|
||||
printf("Calling factory->vt->Release()\n");
|
||||
// printf("Calling factory->vt->Release()\n");
|
||||
|
||||
// result=factory->vt->CreateInstance(factory, 0, &IID_IUnknown, (void**)&object);
|
||||
|
||||
printf("CreateInstance ok %x\n",result);
|
||||
// printf("CreateInstance ok %x\n",result);
|
||||
|
||||
factory->vt->Release((IUnknown*)factory);
|
||||
if(result || (!object)) throw FATAL("Class factory failure");
|
||||
@ -77,7 +77,7 @@ void DS_Filter::Create(string dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM
|
||||
ULONG fetched;
|
||||
enum_pins->vt->Reset(enum_pins);
|
||||
result=enum_pins->vt->Next(enum_pins, (ULONG)256, (IPin**)array, &fetched);
|
||||
printf("Pins enumeration returned %d pins, error is %x\n", fetched, result);
|
||||
// printf("Pins enumeration returned %d pins, error is %x\n", fetched, result);
|
||||
|
||||
for(int i=0; i<fetched; i++)
|
||||
{
|
||||
|
@ -265,7 +265,9 @@ struct reg_value* insert_reg_value(int handle, const char* name, int type, const
|
||||
|
||||
static void init_registry()
|
||||
{
|
||||
#ifdef DETAILED_OUT
|
||||
printf("Initializing registry\n");
|
||||
#endif
|
||||
open_registry();
|
||||
insert_handle(HKEY_LOCAL_MACHINE, "HKLM");
|
||||
insert_handle(HKEY_CURRENT_USER, "HKCU");
|
||||
|
@ -56,11 +56,15 @@ struct modify_ldt_ldt_s {
|
||||
|
||||
void setup_FS_Segment()
|
||||
{
|
||||
#ifdef DETAILED_OUT
|
||||
printf("Setup FS...");fflush(stdout);
|
||||
#endif
|
||||
__asm__ __volatile__(
|
||||
"movl %0,%%eax; movw %%ax, %%fs" : : "i" (TEB_SEL)
|
||||
);
|
||||
#ifdef DETAILED_OUT
|
||||
printf("OK!\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1577,7 +1577,6 @@ int WINAPI expLoadLibraryA(char* name)
|
||||
{
|
||||
char qq[256];
|
||||
int result;
|
||||
printf("They want library [%s] %s\n", def_path, name);
|
||||
if(strncmp(name, "c:\\windows\\", 11)==0)name+=11;
|
||||
if(name[0]!='/')
|
||||
{
|
||||
@ -1588,9 +1587,10 @@ int WINAPI expLoadLibraryA(char* name)
|
||||
else
|
||||
strcat(qq, name);
|
||||
}
|
||||
printf("Entering LoadLibraryA(%s)\n", name);
|
||||
printf("Loading DLL: %s\n", qq);
|
||||
// printf("Entering LoadLibraryA(%s)\n", name);
|
||||
result=LoadLibraryA(qq);
|
||||
printf("Returned LoadLibraryA(0x%x='%s'), def_path=%s => 0x%x\n", name, name, def_path, result);
|
||||
// printf("Returned LoadLibraryA(0x%x='%s'), def_path=%s => 0x%x\n", name, name, def_path, result);
|
||||
return result;
|
||||
}
|
||||
int WINAPI expFreeLibrary(int module)
|
||||
@ -2345,8 +2345,8 @@ WIN_BOOL
|
||||
LPDWORD reserved, LPDWORD type, LPBYTE data, LPDWORD count )
|
||||
{
|
||||
|
||||
printf("RegEnumValueA(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
|
||||
hkey, index, value, val_count, reserved, type, data, count );
|
||||
// printf("RegEnumValueA(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
|
||||
// hkey, index, value, val_count, reserved, type, data, count );
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
44
mplayer.c
44
mplayer.c
@ -323,7 +323,7 @@ static int play_in_bg=0;
|
||||
|
||||
void exit_player(char* how){
|
||||
if(how) printf("\nExiting... (%s)\n",how);
|
||||
printf("max framesize was %d bytes\n",max_framesize);
|
||||
if(verbose) printf("max framesize was %d bytes\n",max_framesize);
|
||||
// restore terminal:
|
||||
getch2_disable();
|
||||
#ifdef HAVE_CODECCTRL
|
||||
@ -789,7 +789,7 @@ if(has_audio){
|
||||
printf("Can't find codec for audio format 0x%X !\n",sh_audio->format);
|
||||
has_audio=0;
|
||||
} else {
|
||||
printf("Found audio codec: %s drv=%d (%s)\n",sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info);
|
||||
printf("Found audio codec: [%s] drv:%d (%s)\n",sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info);
|
||||
has_audio=sh_audio->codec->driver;
|
||||
}
|
||||
}
|
||||
@ -800,7 +800,7 @@ if(has_audio){
|
||||
if(!has_audio){
|
||||
printf("Couldn't initialize audio codec! -> nosound\n");
|
||||
} else {
|
||||
printf("AUDIO: samplerate=%d channels=%d bps=%d\n",has_audio,sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize);
|
||||
printf("AUDIO: samplerate=%d channels=%d bps=%d\n",sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize);
|
||||
}
|
||||
}
|
||||
|
||||
@ -814,7 +814,7 @@ if(!sh_video->codec){
|
||||
}
|
||||
has_video=sh_video->codec->driver;
|
||||
|
||||
printf("Found video codec: %s drv=%d (%s)\n",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info);
|
||||
printf("Found video codec: [%s] drv:%d (%s)\n",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info);
|
||||
|
||||
for(i=0;i<CODECS_MAX_OUTFMT;i++){
|
||||
out_fmt=sh_video->codec->outfmt[i];
|
||||
@ -1036,8 +1036,25 @@ make_pipe(&keyb_fifo_get,&keyb_fifo_put);
|
||||
if(screen_size_y<=8) screen_size_y*=movie_size_y;
|
||||
}
|
||||
|
||||
if(verbose) printf("Destination size: %d x %d out_fmt=%0X\n",
|
||||
screen_size_x,screen_size_y,out_fmt);
|
||||
{ const vo_info_t *info = video_out->get_info();
|
||||
printf("VO: [%s] %dx%d => %dx%d %s%s%s ",info->short_name,
|
||||
movie_size_x,movie_size_y,
|
||||
screen_size_x,screen_size_y,
|
||||
fullscreen?"fs ":"",
|
||||
vidmode?"vm ":"",
|
||||
softzoom?"zoom ":""
|
||||
// fullscreen|(vidmode<<1)|(softzoom<<2)
|
||||
);
|
||||
if((out_fmt&IMGFMT_BGR_MASK)==IMGFMT_BGR)
|
||||
printf("BGR%d\n",out_fmt&255); else
|
||||
if((out_fmt&IMGFMT_BGR_MASK)==IMGFMT_RGB)
|
||||
printf("RGB%d\n",out_fmt&255); else
|
||||
if(out_fmt==IMGFMT_YUY2) printf("YUY2\n"); else
|
||||
if(out_fmt==IMGFMT_YV12) printf("YV12\n");
|
||||
}
|
||||
|
||||
// if(verbose) printf("Destination size: %d x %d out_fmt=%0X\n",
|
||||
// screen_size_x,screen_size_y,out_fmt);
|
||||
|
||||
if(verbose) printf("video_out->init(%dx%d->%dx%d,flags=%d,'%s',0x%X)\n",
|
||||
movie_size_x,movie_size_y,
|
||||
@ -1193,9 +1210,7 @@ if(has_audio){
|
||||
}
|
||||
|
||||
|
||||
if(has_audio){
|
||||
printf("Audio: type: %d samplerate: %d channels: %d bps: %d\n",has_audio,sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize);
|
||||
} else {
|
||||
if(!has_audio){
|
||||
printf("Audio: no sound\n");
|
||||
if(verbose) printf("Freeing %d unused audio chunks\n",d_audio->packs);
|
||||
ds_free_packs(d_audio); // free buffered chunks
|
||||
@ -1216,10 +1231,12 @@ if(file_format==DEMUXER_TYPE_AVI){
|
||||
a_pts=d_audio->pts-(buffer_delay+audio_delay);
|
||||
audio_delay-=(float)(sh_audio->audio.dwInitialFrames-sh_video->video.dwInitialFrames)/default_fps;
|
||||
// audio_delay-=(float)(sh_audio->audio.dwInitialFrames-sh_video->video.dwInitialFrames)/default_fps;
|
||||
printf("AVI Initial frame delay: %5.3f\n",(float)(sh_audio->audio.dwInitialFrames-sh_video->video.dwInitialFrames)/default_fps);
|
||||
printf("v: audio_delay=%5.3f buffer_delay=%5.3f a_pts=%5.3f a_frame=%5.3f\n",
|
||||
audio_delay,buffer_delay,a_pts,a_frame);
|
||||
printf("START: a_pts=%5.3f v_pts=%5.3f \n",d_audio->pts,d_video->pts);
|
||||
if(verbose){
|
||||
printf("AVI Initial frame delay: %5.3f\n",(float)(sh_audio->audio.dwInitialFrames-sh_video->video.dwInitialFrames)/default_fps);
|
||||
printf("v: audio_delay=%5.3f buffer_delay=%5.3f a_pts=%5.3f a_frame=%5.3f\n",
|
||||
audio_delay,buffer_delay,a_pts,a_frame);
|
||||
printf("START: a_pts=%5.3f v_pts=%5.3f \n",d_audio->pts,d_video->pts);
|
||||
}
|
||||
delay_corrected=0; // has to correct PTS diffs
|
||||
d_video->pts=0;d_audio->pts=0; // PTS is outdated now!
|
||||
}
|
||||
@ -1616,6 +1633,7 @@ switch(has_video){
|
||||
audio_delay+=x;
|
||||
//a_pts-=x;
|
||||
delay_corrected=1;
|
||||
if(verbose)
|
||||
printf("v: audio_delay=%5.3f buffer_delay=%5.3f a.pts=%5.3f v.pts=%5.3f\n",
|
||||
audio_delay,buffer_delay,d_audio->pts,d_video->pts);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user