Mercurial > mplayer.hg
comparison mplayer.c @ 41:0d76b2b962ad
added mpeg 1/2 postprocessing
author | arpi_esp |
---|---|
date | Mon, 05 Mar 2001 23:02:30 +0000 |
parents | 846535ace7a2 |
children | 8ff005e84a97 |
comparison
equal
deleted
inserted
replaced
40:2fed43f60181 | 41:0d76b2b962ad |
---|---|
335 | 335 |
336 printf("%s",banner_text); | 336 printf("%s",banner_text); |
337 | 337 |
338 for(i=1;i<argc;i++){ | 338 for(i=1;i<argc;i++){ |
339 if(strcmp(argv[i],"-o")==0){ | 339 if(strcmp(argv[i],"-o")==0){ |
340 printf("Option -o has been changed to -vo (video-out), use -vo !\n"); | 340 printf("Option -o has been renamed to -vo (video-out), use -vo !\n"); |
341 exit(1); | |
342 } else | |
343 if(strcmp(argv[i],"-divxq")==0){ | |
344 printf("Option -divxq has been renamed to -pp (postprocessing), use -pp !\n"); | |
341 exit(1); | 345 exit(1); |
342 } else | 346 } else |
343 if(strcmp(argv[i],"-vo")==0) video_driver=argv[++i]; else | 347 if(strcmp(argv[i],"-vo")==0) video_driver=argv[++i]; else |
344 if(strcmp(argv[i],"-dsp")==0) dsp=argv[++i]; else | 348 if(strcmp(argv[i],"-dsp")==0) dsp=argv[++i]; else |
345 if(strcmp(argv[i],"-encode")==0) encode_name=argv[++i]; else | 349 if(strcmp(argv[i],"-encode")==0) encode_name=argv[++i]; else |
366 if(strcmp(argv[i],"-vids")==0) avi_header.video_codec=argv[++i]; else | 370 if(strcmp(argv[i],"-vids")==0) avi_header.video_codec=argv[++i]; else |
367 if(strcmp(argv[i],"-mc")==0) default_max_pts_correction=strtod(argv[++i],NULL); else | 371 if(strcmp(argv[i],"-mc")==0) default_max_pts_correction=strtod(argv[++i],NULL); else |
368 if(strcmp(argv[i],"-fps")==0) force_fps=strtod(argv[++i],NULL); else | 372 if(strcmp(argv[i],"-fps")==0) force_fps=strtod(argv[++i],NULL); else |
369 if(strcmp(argv[i],"-afm")==0) audio_format=strtol(argv[++i],NULL,0); else | 373 if(strcmp(argv[i],"-afm")==0) audio_format=strtol(argv[++i],NULL,0); else |
370 if(strcmp(argv[i],"-vcd")==0) vcd_track=strtol(argv[++i],NULL,0); else | 374 if(strcmp(argv[i],"-vcd")==0) vcd_track=strtol(argv[++i],NULL,0); else |
371 if(strcmp(argv[i],"-divxq")==0) divx_quality=strtol(argv[++i],NULL,0); else | 375 if(strcmp(argv[i],"-pp")==0) divx_quality=strtol(argv[++i],NULL,0); else |
372 if(strcmp(argv[i],"-br")==0) encode_bitrate=strtol(argv[++i],NULL,0); else | 376 if(strcmp(argv[i],"-br")==0) encode_bitrate=strtol(argv[++i],NULL,0); else |
373 if(strcmp(argv[i],"-x")==0) screen_size_x=strtol(argv[++i],NULL,0); else | 377 if(strcmp(argv[i],"-x")==0) screen_size_x=strtol(argv[++i],NULL,0); else |
374 if(strcmp(argv[i],"-y")==0) screen_size_y=strtol(argv[++i],NULL,0); else | 378 if(strcmp(argv[i],"-y")==0) screen_size_y=strtol(argv[++i],NULL,0); else |
375 if(strcmp(argv[i],"-xy")==0) screen_size_xy=strtol(argv[++i],NULL,0); else | 379 if(strcmp(argv[i],"-xy")==0) screen_size_xy=strtol(argv[++i],NULL,0); else |
376 if(strcmp(argv[i],"-fs")==0) fullscreen=1; else | 380 if(strcmp(argv[i],"-fs")==0) fullscreen=1; else |
845 // allocate some shared memory for the video packet buffer: | 849 // allocate some shared memory for the video packet buffer: |
846 videobuffer=shmem_alloc(VIDEOBUFFER_SIZE); | 850 videobuffer=shmem_alloc(VIDEOBUFFER_SIZE); |
847 if(!videobuffer){ printf("Cannot allocate shared memory\n");exit(0);} | 851 if(!videobuffer){ printf("Cannot allocate shared memory\n");exit(0);} |
848 // init libmpeg2: | 852 // init libmpeg2: |
849 mpeg2_init(); | 853 mpeg2_init(); |
854 #ifdef MPEG12_POSTPROC | |
850 picture->pp_options=divx_quality; | 855 picture->pp_options=divx_quality; |
856 #else | |
857 if(divx_quality){ | |
858 printf("WARNING! You requested image postprocessing for an MPEG 1/2 video,\n"); | |
859 printf(" but compiled MPlayer without MPEG 1/2 postprocessing support!\n"); | |
860 printf(" #define MPEG12_POSTPROC in config.h, and recompile libmpeg2!\n"); | |
861 } | |
862 #endif | |
851 if(verbose) printf("mpeg2_init() ok\n"); | 863 if(verbose) printf("mpeg2_init() ok\n"); |
852 // ========= Read & process sequence header & extension ============ | 864 // ========= Read & process sequence header & extension ============ |
853 videobuf_len=0; | 865 videobuf_len=0; |
854 if(!read_video_packet(d_video)){ printf("FATAL: Cannot read sequence header!\n");return 1;} | 866 if(!read_video_packet(d_video)){ printf("FATAL: Cannot read sequence header!\n");return 1;} |
855 if(header_process_sequence_header (picture, &videobuffer[4])) { | 867 if(header_process_sequence_header (picture, &videobuffer[4])) { |