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