home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2001 September / PC-WELT 9-2001.ISO / software / hw / brennen / flask_src.exe / Input / IFOParser / print_ifo_video.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-06  |  2.4 KB  |  94 lines

  1.  
  2. /*
  3.  *
  4.  * Copyright (C) 1998,1999  Thomas Mirlacher
  5.  *
  6.  * This program 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.  * This program 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
  17.  * along with this program; if not, write to the Free Software
  18.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  * 
  20.  * The author may be reached as dent@cosy.sbg.ac.at, or
  21.  * Thomas Mirlacher, Jakob-Haringerstr. 2, A-5020 Salzburg,
  22.  * Austria
  23.  *
  24.  *------------------------------------------------------------
  25.  *
  26.  */
  27.  
  28.  
  29. #ifdef PARSER
  30. #include <stdio.h>
  31. #endif
  32. #include <sys/types.h>
  33. //#include <unistd.h>
  34. #include "ifo.h"
  35.  
  36. #include "misc.h"
  37. #include "decode.h"
  38.  
  39. #ifdef PARSER
  40. /**
  41.  *
  42.  */
  43.  
  44. void ifoPrintVideo (u_char *ptr)
  45. {
  46.     ifo_video_info_t *video = (ifo_video_info_t *) ptr;
  47.  
  48.     printf ("\nVIDEO\n");
  49.     printf ("---\n");
  50.  
  51.     printf ("\tcompression : MPEG-%d\n", video->compression+1);
  52.     printf ("\tTV system   : %s Hz\n", video->system ? "PAL 625/50" : "NTSC 525/60");
  53.  
  54.     printf ("\tAspect ratio: ");
  55.     switch (video->ratio) {
  56.         case 0:
  57.             printf ("4:3\n");
  58.             break;
  59.         case 3:
  60.             printf ("16:9\n");
  61.             break;
  62.         default:
  63.             printf ("undefined\n");
  64.     }
  65.  
  66. {
  67.     char perm_displ[][23] = {
  68.         "pan-scan & letterboxed",
  69.         "pan-scan",
  70.         "letterboxed",
  71.         "not specified"
  72.     };
  73.  
  74.     printf ("\tDisplay Mode: %s\n", perm_displ[video->perm_displ]);
  75. }
  76.  
  77.     printf ("\tLine21-1    : %s\n", video->line21_1 ? "data present in GOP" : "");
  78.     printf ("\tLine21-2    : %s\n", video->line21_2 ? "data present in GOP" : "");
  79.  
  80. {
  81.     char source_res[][28] = {
  82.         "720x480 NTSC or 720x576 PAL",
  83.         "704x480 NTSC or 704x576 PAL",
  84.         "352x480 NTSC or 352x576 PAL",
  85.         "352x240 NTSC or 352x288 PAL"
  86.     };
  87.  
  88.     printf ("\tSource Res  : %s\n", source_res[video->source_res]);
  89. }
  90.     printf ("\tLetterboxed : %s\n", video->letterboxed ? "yes" : "no");
  91.     printf ("\tMode        : %s\n", video->mode ? "Film (625/50 only)" : "Camera");
  92. }
  93. #endif
  94.