-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracks.h
151 lines (124 loc) · 2.44 KB
/
tracks.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
* See the files COPYING and README for copyright information and how to reach
* the author.
*
* $Id: tracks.h,v 1.7 2006/09/16 18:33:37 lordjaxom Exp $
*/
#ifndef VDR_BURN_TRACKS_H
#define VDR_BURN_TRACKS_H
#include "common.h"
#include <string>
#include <list>
#include <memory>
#include <vdr/epg.h>
namespace vdr_burn
{
// --- track_info ---------------------------------------------------------
struct track_info
{
enum streamtype
{
streamtype_video = 1,
streamtype_audio,
streamtype_subtitle
};
enum aspectratio
{
aspectratio_quadric = 1,
aspectratio_4_3,
aspectratio_16_9,
aspectratio_21_9
};
enum framerate
{
framerate_23_967 = 1,
framerate_24,
framerate_25,
framerate_29_97,
framerate_30_97
};
enum audiotype
{
audiotype_mpeg_2_5 = 1,
audiotype_mpeg_2,
audiotype_mpeg_1,
audiotype_ac3
};
enum audiolayer
{
audiolayer_1 = 1,
audiolayer_2,
audiolayer_3
};
enum audiomode
{
audiomode_stereo = 1,
audiomode_joint_stereo,
audiomode_dual_channel,
audiomode_mono
};
enum ac3mode
{
};
enum subtitletype
{
subtitletype_dvb = 1,
subtitletype_teletext
};
int cid;
std::string filename;
int language;
std::string description;
streamtype type;
int bitrate;
size_pair size;
bool used;
union
{ // XXX polymorphic
struct
{
aspectratio aspect;
framerate frameRate;
} video;
struct
{
audiotype type;
union
{
struct
{
audiolayer layer;
audiomode mode;
} mpeg;
struct
{
ac3mode mode;
} ac3;
};
} audio;
struct
{
subtitletype type;
int teletextpage;
} subtitle;
};
track_info(int cid, streamtype type);
static const string_list& get_language_codes();
void set_language(const std::string& language);
bool get_is_video() const { return type == streamtype_video; }
bool get_is_audio() const { return type == streamtype_audio; }
const int get_pesid() const { return (cid & 0xFFFF); }
const int get_pid() const { return (cid >> 16); }
std::string get_type_description() const;
};
// --- track_info_list ----------------------------------------------------
class track_info_list: public std::list<track_info>
{
public:
const track_info& operator[](int index) const;
track_info& operator[](int index);
const_iterator find_cid(int cid) const;
iterator find_cid(int cid);
};
}
#endif // VDR_BURN_TRACKS_H