commands: Allow cycling subtitles backwards with 'J'
[mplayer/glamo.git] / libvo / aspecttest.c
blobb73e8c589cbb67cf8dfc61d947a118bc08130ca2
1 /*
2 * test app for aspect.[ch] by Atmos
4 * This file is part of MPlayer.
6 * MPlayer is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * MPlayer is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include <stdint.h>
22 #include <stdio.h>
23 #include <stdlib.h>
25 #include "aspect.h"
27 /* default zoom state 0 off, 1 on */
28 #define DEF_ZOOM 1
30 extern float monitor_aspect;
31 int vo_dheight;
32 int vo_dwidth;
33 int vo_fs;
34 float vo_panscan;
35 int64_t WinID = -1;
37 int main(int argc, char *argv[]) {
38 int w,h,z=DEF_ZOOM;
39 //printf("argc: %d\n",argc);
40 switch(argc) {
41 case 10:
42 z = atoi(argv[9]);
43 case 9:
44 monitor_aspect = (float)atoi(argv[7])/(float)atoi(argv[8]);
45 case 7:
46 aspect_save_prescale(atoi(argv[5]),atoi(argv[6]));
47 printf("prescale size: %sx%s\n",argv[5],argv[6]);
48 case 5:
49 aspect_save_screenres(atoi(argv[1]),atoi(argv[2]));
50 printf("screenres: %sx%s\n",argv[1],argv[2]);
51 aspect_save_orig(atoi(argv[3]),atoi(argv[4]));
52 printf("original size: %sx%s\n",argv[3],argv[4]);
53 w=atoi(argv[3]); h=atoi(argv[4]);
54 break;
55 default:
56 printf("USAGE: %s <screenw> <screenh> <origw> <origh>\n[<prescalew> "
57 "<prescaleh>] [<screenaspectw> <screenaspecth>] [<zoom 0/1>]\n",
58 argv[0]);
59 return 1;
61 printf("monitor_aspect: %f\n",monitor_aspect);
62 aspect(&w,&h,z);
63 printf("new size: %dx%d\n",w,h);
64 return 0;