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_subpic.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-07  |  2.0 KB  |  81 lines

  1.  
  2. /*
  3.  * SUBPICTURE TABLE
  4.  *
  5.  * Copyright (C) 1998,1999  Thomas Mirlacher
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; either version 2 of the License, or
  10.  * (at your option) any later version.
  11.  * 
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  * 
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; if not, write to the Free Software
  19.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  * 
  21.  * The author may be reached as dent@cosy.sbg.ac.at, or
  22.  * Thomas Mirlacher, Jakob-Haringerstr. 2, A-5020 Salzburg,
  23.  * Austria
  24.  *
  25.  *------------------------------------------------------------
  26.  *
  27.  */
  28.  
  29. #include "IFOparser.h"
  30. extern CIFOParser *IFOGlobal;
  31.  
  32. #ifdef PARSER
  33. #include <stdio.h>
  34. #endif
  35. #include <stdlib.h>
  36. #include <sys/types.h>
  37. //#include <unistd.h>
  38. #include "ifo.h"
  39. #include <string.h>
  40.  
  41. #include "misc.h"
  42. #include "decode.h"
  43.  
  44.  
  45. /**
  46.  *
  47.  */
  48.  
  49. void ifoPrintSPU (ifo_spu_t *spu, u_int num)
  50. {
  51.     int i;
  52.  
  53.     if (!spu) 
  54.         return;
  55.  
  56.     printf ("\nSUBPICTURE\n");
  57.     printf ("---\n");
  58.  
  59.     printf ("number of streams:\t%d\n", num);
  60.     IFOGlobal->SubpicCount = num;
  61.     if(IFOGlobal->SubpicCount>32)
  62.         IFOGlobal->fatal_error_flag = 1;
  63.  
  64.     for (i=0; i<num; i++) {
  65.         char *caption;
  66.  
  67.         printf ("\tlang_code:\t%s\n",   ifoDecodeLang (spu->lang_code));
  68.         strcpy(  IFOGlobal->SubpidID[i], ifoDecodeLang (spu->lang_code));
  69.         if ((caption = decode_caption (spu->caption))){
  70.             printf ("\tcaption:\t%s\n", caption);
  71.             strcat(IFOGlobal->SubpidID[i], " (");
  72.             strcat(IFOGlobal->SubpidID[i], decode_caption (spu->caption));
  73.             strcat(IFOGlobal->SubpidID[i], ")");
  74.         }
  75.  
  76.         printf ("\n");
  77.  
  78.         spu++;
  79.     }
  80. }
  81.