MythTV  master
replex.h
Go to the documentation of this file.
1 /*
2  * replex.h
3  *
4  *
5  * Copyright (C) 2003 Marcus Metzler <mocm@metzlerbros.de>
6  * Metzler Brothers Systementwicklung GbR
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * General Public License for more details.
18  *
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
24  *
25  */
26 
27 #ifndef _REPLEX_H_
28 #define _REPLEX_H_
29 
30 #include <cstdint>
31 #include "mpg_common.h"
32 #include "ts.h"
33 #include "element.h"
34 #include "ringbuffer.h"
35 #include "avi.h"
36 #include "multiplex.h"
37 
39 
40 struct replex {
41 #define REPLEX_TS 0
42 #define REPLEX_PS 1
43 #define REPLEX_AVI 2
44  int itype;
45  int otype;
46  int ignore_pts;
47  int keep_pts;
48  int fix_sync;
49  uint64_t inflength;
50  uint64_t finread;
51  int lastper;
52  int avi_rest;
54  int fd_in;
55  int fd_out;
56  int finish;
57  int demux;
59  int analyze;
61  int vdr;
62 
63  uint64_t video_delay;
64  uint64_t audio_delay;
65 
66 #define VIDEO_BUF (6*1024*1024)
67 #define AUDIO_BUF (VIDEO_BUF/10)
68 #define AC3_BUF (VIDEO_BUF/10)
69 #define INDEX_BUF (32000*32)
70  int audiobuf;
71  int ac3buf;
72  int videobuf;
73 
74  int ext_count;
80 
81  //ac3
82  int ac3n;
89  uint64_t ac3frame_count[N_AC3];
91  uint64_t first_ac3pts[N_AC3];
93  uint64_t last_ac3pts[N_AC3];
94 
95 // mpeg audio
96  int apidn;
105  uint64_t first_apts[N_AUDIO];
107  uint64_t last_apts[N_AUDIO];
108 
109 //mpeg video
117  uint64_t vframe_count;
118  uint64_t vgroup_count;
120  uint64_t first_vpts;
122  uint64_t last_vpts;
123 
124  void *priv;
126 };
127 
128 void init_index(index_unit *iu);
129 #endif
replex::inflength
uint64_t inflength
Definition: replex.h:49
S_SEARCH
@ S_SEARCH
Definition: replex.h:38
replex::audio_state
int audio_state[N_AUDIO]
Definition: replex.h:106
ringbuffer.h
replex::extframe
audio_frame_t extframe[N_AUDIO]
Definition: replex.h:77
replex::current_vindex
index_unit current_vindex
Definition: replex.h:113
replex::vdr
int vdr
Definition: replex.h:61
replex::demux
int demux
Definition: replex.h:57
ringbuffer
Definition: ringbuffer.h:39
replex::ignore_pts
int ignore_pts
Definition: replex.h:46
sequence_t
Definition: element.h:87
replex::extrbuffer
ringbuffer extrbuffer[N_AUDIO]
Definition: replex.h:78
replex::audiobuf
int audiobuf
Definition: replex.h:70
S_ERROR
@ S_ERROR
Definition: replex.h:38
replex::ac
avi_context ac
Definition: replex.h:60
replex::exttype
int exttype[N_AUDIO]
Definition: replex.h:75
replex::ext_count
int ext_count
Definition: replex.h:74
replex::first_iframe
int first_iframe
Definition: replex.h:111
replex::aframe_count
uint64_t aframe_count[N_AUDIO]
Definition: replex.h:103
replex::fd_in
int fd_in
Definition: replex.h:54
replex::last_ac3pts
uint64_t last_ac3pts[N_AC3]
Definition: replex.h:93
replex::ac3_id
uint16_t ac3_id[N_AC3]
Definition: replex.h:83
replex::vframe_count
uint64_t vframe_count
Definition: replex.h:117
replex::video_state
int video_state
Definition: replex.h:121
replex::current_ac3index
index_unit current_ac3index[N_AC3]
Definition: replex.h:85
replex::vpes_abort
int vpes_abort
Definition: replex.h:114
replex::index_vrbuffer
ringbuffer index_vrbuffer
Definition: replex.h:116
replex::keep_pts
int keep_pts
Definition: replex.h:47
replex::avi_rest
int avi_rest
Definition: replex.h:52
replex::lastper
int lastper
Definition: replex.h:51
replex::current_aindex
index_unit current_aindex[N_AUDIO]
Definition: replex.h:99
replex::ac3_state
int ac3_state[N_AUDIO]
Definition: replex.h:92
replex::last_vpts
uint64_t last_vpts
Definition: replex.h:122
S_FOUND
@ S_FOUND
Definition: replex.h:38
replex::ac3frame
audio_frame_t ac3frame[N_AC3]
Definition: replex.h:90
replex::vrbuffer
ringbuffer vrbuffer
Definition: replex.h:115
replex::fix_sync
int fix_sync
Definition: replex.h:48
replex::scan_found
int scan_found
Definition: replex.h:125
replex::finish
int finish
Definition: replex.h:56
replex::index_arbuffer
ringbuffer index_arbuffer[N_AUDIO]
Definition: replex.h:102
N_AUDIO
#define N_AUDIO
Definition: multiplex.h:35
replex::itype
int itype
Definition: replex.h:44
replex::first_vpts
uint64_t first_vpts
Definition: replex.h:120
replex::last_apts
uint64_t last_apts[N_AUDIO]
Definition: replex.h:107
replex::index_ac3rbuffer
ringbuffer index_ac3rbuffer[N_AC3]
Definition: replex.h:88
replex::vpid
uint16_t vpid
Definition: replex.h:110
replex::ac3buf
int ac3buf
Definition: replex.h:71
mpg_common.h
avi.h
element.h
replex::otype
int otype
Definition: replex.h:45
replex::pac3
pes_in_t pac3[N_AC3]
Definition: replex.h:84
replex::priv
void * priv
Definition: replex.h:124
replex::exttypcnt
int exttypcnt[N_AUDIO]
Definition: replex.h:76
replex::avi_vcount
int avi_vcount
Definition: replex.h:53
replex::finread
uint64_t finread
Definition: replex.h:50
N_AC3
#define N_AC3
Definition: multiplex.h:36
replex::ac3rbuffer
ringbuffer ac3rbuffer[N_AC3]
Definition: replex.h:87
replex::ac3n
int ac3n
Definition: replex.h:82
replex::index_extrbuffer
ringbuffer index_extrbuffer[N_AUDIO]
Definition: replex.h:79
replex::video_delay
uint64_t video_delay
Definition: replex.h:63
replex::videobuf
int videobuf
Definition: replex.h:72
multiplex.h
replex::arbuffer
ringbuffer arbuffer[N_AUDIO]
Definition: replex.h:101
replex::apid
uint16_t apid[N_AUDIO]
Definition: replex.h:97
avi_context
Definition: avi.h:70
replex::fd_out
int fd_out
Definition: replex.h:55
replex
Definition: replex.h:40
replex::analyze
int analyze
Definition: replex.h:59
replex::apes_abort
int apes_abort[N_AUDIO]
Definition: replex.h:100
replex::seq_head
sequence_t seq_head
Definition: replex.h:119
replex::audio_delay
uint64_t audio_delay
Definition: replex.h:64
replex::apidn
int apidn
Definition: replex.h:96
uint16_t
unsigned short uint16_t
Definition: iso6937tables.h:3
audio_frame_t
Definition: element.h:109
replex::aframe
audio_frame_t aframe[N_AUDIO]
Definition: replex.h:104
init_index
void init_index(index_unit *iu)
Definition: replex.cpp:1845
replex::dmx_out
int dmx_out[N_AC3+N_AUDIO+1]
Definition: replex.h:58
replex::ac3pes_abort
int ac3pes_abort[N_AC3]
Definition: replex.h:86
pes_in_t
Definition: pes.h:70
index_unit
Definition: mpg_common.h:35
replex::first_apts
uint64_t first_apts[N_AUDIO]
Definition: replex.h:105
replex::vgroup_count
uint64_t vgroup_count
Definition: replex.h:118
replex::first_ac3pts
uint64_t first_ac3pts[N_AC3]
Definition: replex.h:91
ts.h
replex::paudio
pes_in_t paudio[N_AUDIO]
Definition: replex.h:98
replex::pvideo
pes_in_t pvideo
Definition: replex.h:112
replex::ac3frame_count
uint64_t ac3frame_count[N_AC3]
Definition: replex.h:89