~ubuntu-branches/ubuntu/precise/mplayer2/precise-proposed

« back to all changes in this revision

Viewing changes to libvo/aspecttest.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:59:30 UTC
  • mfrom: (5.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120112225930-jsg10o7na7nk73w5
Tags: 2.0-426-gc32b3ed-2
* Upload to unstable
* don't build-depend on libcdparanoia-dev on the hurd

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * test app for aspect.[ch] by Atmos
3
 
 *
4
 
 * This file is part of MPlayer.
5
 
 *
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.
10
 
 *
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.
15
 
 *
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.
19
 
 */
20
 
 
21
 
#include <stdint.h>
22
 
#include <stdio.h>
23
 
#include <stdlib.h>
24
 
 
25
 
#include "aspect.h"
26
 
 
27
 
/* default zoom state 0 off, 1 on */
28
 
#define DEF_ZOOM 1
29
 
 
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;
36
 
 
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;
60
 
  }
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;
65
 
}