Mercurial > mplayer.hg
comparison mplayer.c @ 7058:2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
- multithreaded audio/video buffering (I know mplayer crew hates threads
but it seems to me as the only way of doing reliable a/v capture)
- a/v timebase synchronization (sample count vs. gettimeofday)
- "immediate" mode support for mplayer
- fixed colorspace stuff - RGB?? and YUY2 modes now work as expected
- native ALSA audio capture
- separated audio input layer
author | arpi |
---|---|
date | Wed, 21 Aug 2002 21:31:20 +0000 |
parents | 5a6616a088f2 |
children | 6c2d746b17bf |
comparison
equal
deleted
inserted
replaced
7057:9a69417e2e0f | 7058:2e5c07262861 |
---|---|
266 extern char *vo_subdevice; | 266 extern char *vo_subdevice; |
267 extern char *ao_subdevice; | 267 extern char *ao_subdevice; |
268 | 268 |
269 static stream_t* stream=NULL; | 269 static stream_t* stream=NULL; |
270 | 270 |
271 static demuxer_t *demuxer=NULL; | |
272 | |
271 char* current_module=NULL; // for debugging | 273 char* current_module=NULL; // for debugging |
272 | 274 |
273 int vo_gamma_brightness = 1000; | 275 int vo_gamma_brightness = 1000; |
274 int vo_gamma_contrast = 1000; | 276 int vo_gamma_contrast = 1000; |
275 int vo_gamma_saturation = 1000; | 277 int vo_gamma_saturation = 1000; |
289 #define INITED_LIRC 16 | 291 #define INITED_LIRC 16 |
290 #define INITED_SPUDEC 32 | 292 #define INITED_SPUDEC 32 |
291 #define INITED_STREAM 64 | 293 #define INITED_STREAM 64 |
292 #define INITED_INPUT 128 | 294 #define INITED_INPUT 128 |
293 #define INITED_VOBSUB 256 | 295 #define INITED_VOBSUB 256 |
296 #define INITED_DEMUXER 512 | |
294 #define INITED_ALL 0xFFFF | 297 #define INITED_ALL 0xFFFF |
295 | 298 |
296 void uninit_player(unsigned int mask){ | 299 void uninit_player(unsigned int mask){ |
297 mask=inited_flags&mask; | 300 mask=inited_flags&mask; |
298 | 301 |
302 if(mask&INITED_STREAM){ | 305 if(mask&INITED_STREAM){ |
303 inited_flags&=~INITED_STREAM; | 306 inited_flags&=~INITED_STREAM; |
304 current_module="uninit_stream"; | 307 current_module="uninit_stream"; |
305 if(stream) free_stream(stream); | 308 if(stream) free_stream(stream); |
306 stream=NULL; | 309 stream=NULL; |
310 } | |
311 | |
312 if(mask&INITED_DEMUXER){ | |
313 current_module="uninit_demuxer"; | |
314 if(demuxer) free_demuxer(demuxer); | |
315 demuxer=NULL; | |
307 } | 316 } |
308 | 317 |
309 if(mask&INITED_VO){ | 318 if(mask&INITED_VO){ |
310 inited_flags&=~INITED_VO; | 319 inited_flags&=~INITED_VO; |
311 current_module="uninit_vo"; | 320 current_module="uninit_vo"; |
487 #ifdef USE_SUB | 496 #ifdef USE_SUB |
488 static subtitle* subtitles=NULL; | 497 static subtitle* subtitles=NULL; |
489 float sub_last_pts = -303; | 498 float sub_last_pts = -303; |
490 #endif | 499 #endif |
491 | 500 |
492 static demuxer_t *demuxer=NULL; | |
493 | |
494 static demux_stream_t *d_audio=NULL; | 501 static demux_stream_t *d_audio=NULL; |
495 static demux_stream_t *d_video=NULL; | 502 static demux_stream_t *d_video=NULL; |
496 static demux_stream_t *d_dvdsub=NULL; | 503 static demux_stream_t *d_dvdsub=NULL; |
497 | 504 |
498 static sh_audio_t *sh_audio=NULL; | 505 static sh_audio_t *sh_audio=NULL; |
563 mp_msg(MSGT_CPLAYER,MSGL_INFO,"\n\n"); | 570 mp_msg(MSGT_CPLAYER,MSGL_INFO,"\n\n"); |
564 #endif | 571 #endif |
565 | 572 |
566 #endif | 573 #endif |
567 | 574 |
568 #ifdef HAVE_TV_BSDBT848 | |
569 tv_param_immediate = 1; | 575 tv_param_immediate = 1; |
570 #endif | |
571 | 576 |
572 if ( argv[0] ) | 577 if ( argv[0] ) |
573 if(!strcmp(argv[0],"gmplayer") || | 578 if(!strcmp(argv[0],"gmplayer") || |
574 (strrchr(argv[0],'/') && !strcmp(strrchr(argv[0],'/'),"/gmplayer") ) ) | 579 (strrchr(argv[0],'/') && !strcmp(strrchr(argv[0],'/'),"/gmplayer") ) ) |
575 use_gui=1; | 580 use_gui=1; |
1074 | 1079 |
1075 current_module="demux_open"; | 1080 current_module="demux_open"; |
1076 | 1081 |
1077 demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id); | 1082 demuxer=demux_open(stream,file_format,audio_id,video_id,dvdsub_id); |
1078 if(!demuxer) goto goto_next_file; // exit_player(MSGTR_Exit_error); // ERROR | 1083 if(!demuxer) goto goto_next_file; // exit_player(MSGTR_Exit_error); // ERROR |
1084 | |
1085 inited_flags|=INITED_DEMUXER; | |
1079 | 1086 |
1080 current_module="demux_open2"; | 1087 current_module="demux_open2"; |
1081 | 1088 |
1082 //file_format=demuxer->file_format; | 1089 //file_format=demuxer->file_format; |
1083 | 1090 |