Mercurial > mplayer.hg
view libvo/aspecttest.c @ 7663:eb3afb162aa4
* Fix for the broken MultiDec files I had originally posted with the
first version of the demuxer. They play ok now. Fix can be disabled
through conditional compiling, so just comment out the #define directive
if it breaks anything (see source).
* Demuxer now honours audio/video ids. Since PVAs only contain one audio
track and one video track by specification, they are vid 0 and aid 0.
This also fixes the "too many audio/video packets in buffer" with
-dump[audio|video].
* substituted longs with off_t's for offsets, so that it should work on
large files.
patch by Matteo Giani <matgiani@ctonet.it>
author | arpi |
---|---|
date | Mon, 07 Oct 2002 22:13:34 +0000 (2002-10-07) |
parents | 8be92a9b30a4 |
children | dd86735178a6 |
line wrap: on
line source
/* testapp for aspect.[ch] by Atmos * gcc aspecttest.c aspect.c -o aspecttest -DASPECT_TEST [-DASPECT_DEBUG] */ #include <stdio.h> #include "aspect.h" /* default zoom state 0 off, 1 on */ #define DEF_ZOOM 1 extern float monitor_aspect; int main(int argc, char *argv[]) { int w,h,z=DEF_ZOOM; //printf("argc: %d\n",argc); switch(argc) { case 10: z = atoi(argv[9]); case 9: monitor_aspect = (float)atoi(argv[7])/(float)atoi(argv[8]); case 7: aspect_save_prescale(atoi(argv[5]),atoi(argv[6])); printf("prescale size: %sx%s\n",argv[5],argv[6]); case 5: aspect_save_screenres(atoi(argv[1]),atoi(argv[2])); printf("screenres: %sx%s\n",argv[1],argv[2]); aspect_save_orig(atoi(argv[3]),atoi(argv[4])); printf("original size: %sx%s\n",argv[3],argv[4]); w=atoi(argv[3]); h=atoi(argv[4]); break; default: printf("USAGE: %s <screenw> <screenh> <origw> <origh>\n[<prescalew> " "<prescaleh>] [<screenaspectw> <screenaspecth>] [<zoom 0/1>]\n", argv[0]); return 1; } printf("monitor_aspect: %f\n",monitor_aspect); aspect(&w,&h,z); printf("new size: %dx%d\n",w,h); return 0; }