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 <stdint.h>
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
int itype
Definition: replex.h:44
void init_index(index_unit *iu)
Definition: replex.c:1831
int demux
Definition: replex.h:57
#define N_AC3
Definition: multiplex.h:34
int ac3buf
Definition: replex.h:71
index_unit current_ac3index[N_AC3]
Definition: replex.h:85
ringbuffer index_vrbuffer
Definition: replex.h:116
uint16_t ac3_id[N_AC3]
Definition: replex.h:83
int apes_abort[N_AUDIO]
Definition: replex.h:100
int ac3pes_abort[N_AC3]
Definition: replex.h:86
uint64_t first_apts[N_AUDIO]
Definition: replex.h:105
int ac3_state[N_AUDIO]
Definition: replex.h:92
uint64_t video_delay
Definition: replex.h:63
int ignore_pts
Definition: replex.h:46
uint64_t first_ac3pts[N_AC3]
Definition: replex.h:91
int fd_in
Definition: replex.h:54
int ac3n
Definition: replex.h:82
int scan_found
Definition: replex.h:125
ringbuffer ac3rbuffer[N_AC3]
Definition: replex.h:87
int vpes_abort
Definition: replex.h:114
ringbuffer arbuffer[N_AUDIO]
Definition: replex.h:101
uint64_t vgroup_count
Definition: replex.h:118
ringbuffer index_ac3rbuffer[N_AC3]
Definition: replex.h:88
uint64_t inflength
Definition: replex.h:49
int fix_sync
Definition: replex.h:48
int otype
Definition: replex.h:45
int apidn
Definition: replex.h:96
uint64_t aframe_count[N_AUDIO]
Definition: replex.h:103
int audio_state[N_AUDIO]
Definition: replex.h:106
uint64_t first_vpts
Definition: replex.h:120
ringbuffer index_arbuffer[N_AUDIO]
Definition: replex.h:102
int videobuf
Definition: replex.h:72
Definition: replex.h:38
int fd_out
Definition: replex.h:55
uint64_t last_ac3pts[N_AC3]
Definition: replex.h:93
Definition: replex.h:38
uint16_t apid[N_AUDIO]
Definition: replex.h:97
int ext_count
Definition: replex.h:74
unsigned short uint16_t
Definition: iso6937tables.h:1
pes_in_t pac3[N_AC3]
Definition: replex.h:84
int vdr
Definition: replex.h:61
uint64_t last_vpts
Definition: replex.h:122
int avi_vcount
Definition: replex.h:53
ringbuffer extrbuffer[N_AUDIO]
Definition: replex.h:78
void * priv
Definition: replex.h:124
avi_context ac
Definition: replex.h:60
ringbuffer index_extrbuffer[N_AUDIO]
Definition: replex.h:79
Definition: pes.h:71
int video_state
Definition: replex.h:121
pes_in_t paudio[N_AUDIO]
Definition: replex.h:98
int exttype[N_AUDIO]
Definition: replex.h:75
uint64_t ac3frame_count[N_AC3]
Definition: replex.h:89
uint64_t vframe_count
Definition: replex.h:117
int first_iframe
Definition: replex.h:111
int keep_pts
Definition: replex.h:47
uint16_t vpid
Definition: replex.h:110
audio_frame_t aframe[N_AUDIO]
Definition: replex.h:104
uint64_t finread
Definition: replex.h:50
int exttypcnt[N_AUDIO]
Definition: replex.h:76
int finish
Definition: replex.h:56
sequence_t seq_head
Definition: replex.h:119
audio_frame_t extframe[N_AUDIO]
Definition: replex.h:77
index_unit current_aindex[N_AUDIO]
Definition: replex.h:99
index_unit current_vindex
Definition: replex.h:113
uint64_t last_apts[N_AUDIO]
Definition: replex.h:107
int avi_rest
Definition: replex.h:52
uint64_t audio_delay
Definition: replex.h:64
int dmx_out[N_AC3+N_AUDIO+1]
Definition: replex.h:58
Definition: replex.h:40
ringbuffer vrbuffer
Definition: replex.h:115
#define N_AUDIO
Definition: multiplex.h:33
audio_frame_t ac3frame[N_AC3]
Definition: replex.h:90
pes_in_t pvideo
Definition: replex.h:112
int analyze
Definition: replex.h:59
int audiobuf
Definition: replex.h:70
int lastper
Definition: replex.h:51