1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:42:17 +00:00
mpv/libvo/aspecttest.c
diego 434a2063ed Remove wrong compilation instructions.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27538 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-09-07 13:57:00 +00:00

45 lines
1.2 KiB
C

/* test app for aspect.[ch] by Atmos */
#include <stdio.h>
#include <stdlib.h>
#include "aspect.h"
/* default zoom state 0 off, 1 on */
#define DEF_ZOOM 1
extern float monitor_aspect;
int vo_fs;
float vo_panscan;
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;
}