1 2 /* 3 * interact.hpp: Simple command-line front-end 4 * 5 * Copyright (C) 2001 Andrew Stevens <andrew.stevens@philips.com> 6 * 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of version 2 of the GNU General Public License 10 * as published by the Free Software Foundation. 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 */ 21 22 #ifndef __INTERACT_HH__ 23 #define __INTERACT_HH__ 24 25 #ifndef _WIN32 26 #include <unistd.h> 27 #endif 28 #include <vector> 29 #include "mjpeg_types.h" 30 #include "stream_params.hpp" 31 #include "systems.hpp" 32 33 // MEANX 34 #include "streamType.h" 35 // /MEANX 36 class IBitStream; 37 38 using std::vector; 39 40 /************************************************************************* 41 * 42 * The Multiplexor job Parameters: 43 * The various parametes of a multiplexing job: muxing options 44 * 45 *************************************************************************/ 46 47 struct Workarounds 48 { 49 Workarounds(); 50 }; 51 52 class MultiplexParams 53 { 54 public: 55 unsigned int data_rate; 56 unsigned int packets_per_pack; 57 int video_offset; // A/V sync offset. Always one 0 and the 58 // other positive. Specified in 59 int audio_offset; // MPEG-2 CLOCKS: 1/(90000*300)-th sec 60 unsigned int sector_size; 61 bool VBR; 62 int mpeg; 63 int mux_format; 64 bool multifile_segment; 65 bool always_system_headers; 66 unsigned int max_PTS; 67 bool stills; 68 int verbose; 69 int max_timeouts; 70 char *outfile_pattern; 71 int max_segment_size; 72 int min_pes_header_len; 73 Workarounds workarounds; // Special work-around flags that 74 // constrain the syntax to suit 75 // the foibles of particular MPEG 76 // parsers that are (guessed) to be 77 // actually slightly broken. Always 78 // off by default... 79 80 }; 81 82 /*********************************************************************** 83 * 84 * Multiplexor job - paramters plus the streams to mux. 85 * 86 * 87 **********************************************************************/ 88 // MEANX MOVED TO STREAMTYPE.H 89 #if 0 90 enum StreamKind 91 { 92 MPEG_AUDIO, 93 AC3_AUDIO, 94 LPCM_AUDIO, 95 DTS_AUDIO, 96 MPEG_VIDEO 97 #ifdef ZALPHA 98 , 99 Z_ALPHA 100 #endif 101 }; 102 #endif 103 // MEANX MOVED TO STREAMTYPE.H 104 105 class JobStream 106 { 107 public: 108 JobStream(IBitStream * _bs,StreamKind _kind)109 JobStream( IBitStream *_bs, StreamKind _kind ) : 110 bs(_bs), 111 kind(_kind) 112 { 113 } 114 115 const char *NameOfKind(); 116 IBitStream *bs; 117 StreamKind kind; 118 }; 119 120 class MultiplexJob : public MultiplexParams 121 { 122 public: 123 MultiplexJob(); 124 virtual ~MultiplexJob(); 125 unsigned int NumberOfTracks( StreamKind kind ); 126 void GetInputStreams( vector<JobStream *> &streams, StreamKind kind ); 127 128 void SetupInputStreams( vector<IBitStream *> &inputs ); 129 protected: 130 131 public: 132 vector<JobStream *> streams; 133 vector<LpcmParams *> lpcm_param; 134 vector<VideoParams *> video_param; 135 unsigned int audio_tracks; 136 unsigned int video_tracks; 137 unsigned int lpcm_tracks; 138 #ifdef ZALPHA 139 unsigned int z_alpha_tracks; 140 #endif 141 }; 142 143 144 /************************************************************************* 145 Program ID 146 *************************************************************************/ 147 148 #define MPLEX_VER "2.2.4" 149 #define MPLEX_DATE "$Date$" 150 151 #endif // __INTERACT_H__ 152 153 154 /* 155 * Local variables: 156 * c-file-style: "gnu" 157 * tab-width: 8 158 * indent-tabs-mode: nil 159 * End: 160 */ 161