home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2001 September / PC-WELT 9-2001.ISO / software / hw / brennen / flask_src.exe / Input / StreamDetector.h < prev   
Encoding:
C/C++ Source or Header  |  2000-05-06  |  2.3 KB  |  91 lines

  1. /* 
  2.  *  StreamDetector.h: implementation of the CStreamDetector class.
  3.  *
  4.  *    Copyright (C) Alberto Vigata - January 2000 - ultraflask@yahoo.com
  5.  *
  6.  *  This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
  7.  *    
  8.  *  FlasKMPEG is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2, or (at your option)
  11.  *  any later version.
  12.  *   
  13.  *  FlasKMPEG is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *   
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with GNU Make; see the file COPYING.  If not, write to
  20.  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  21.  *
  22.  */
  23. #if !defined(AFX_STREAMDETECTOR_H__A14A6D0E_CDF4_11D3_94E2_00000100CF13__INCLUDED_)
  24. #define AFX_STREAMDETECTOR_H__A14A6D0E_CDF4_11D3_94E2_00000100CF13__INCLUDED_
  25.  
  26. #if _MSC_VER > 1000
  27. #pragma once
  28. #endif // _MSC_VER > 1000
  29.  
  30. #include "inputstream.h"
  31. #include "..\Demux\demux.h"
  32.  
  33. struct TStreamIdentifier
  34. {
  35.     int        streamID;              //Stream ID
  36.     int        subStreamID;        //SubStream ID
  37.     int        aux;                //auxiliary data
  38.     char    id[256];            //MobId
  39.  
  40. };
  41. #define MAX_AUDIO_STREAMS 8
  42.  
  43. class TStreamDetector
  44. {
  45.     public:
  46.         int AddST( TStreamIdentifier *si );
  47.         TStreamDetector();
  48.         ~TStreamDetector();
  49.         TStreamIdentifier *video;
  50.         TStreamIdentifier *audio;
  51.         TStreamIdentifier *subpic;
  52.         int                  n_video_streams;
  53.         int                  n_audio_streams;
  54.         int                  n_subpic_streams;
  55.         
  56.         int                  n_audio_selected;
  57.         int                  audio_selected[MAX_AUDIO_STREAMS];
  58.     
  59.         int                  video_selected;
  60.         int                  subpic_selected;
  61. };
  62.  
  63.  
  64. class CStreamDetector  
  65. {
  66.     public:
  67.      CStreamDetector();
  68.     ~CStreamDetector();
  69.     int RecognizeType();
  70.     int GetStreams(TStreamDetector *st, int lurk_size);
  71.     int SetFile(char *inputfile);
  72.  
  73.  
  74.  
  75. private:
  76.     //  FindStream variables
  77.     bool        FSstreamFound;
  78.     int            FSstreamID;
  79.     int            FSsubstreamID;
  80.     int            FStype;       // 0: video , 1:audio
  81.     char         FSszReport[256];
  82.  
  83.  
  84.     CinputStream    *inp;
  85.  
  86.  
  87.  
  88. };
  89.  
  90. #endif // !defined(AFX_STREAMDETECTOR_H__A14A6D0E_CDF4_11D3_94E2_00000100CF13__INCLUDED_)
  91.