Skip to content

Commit 4a92178

Browse files
committed
Data transfer module for DemuxerData added and more rustlike syntax to ctorust.rs
1 parent 4f2590a commit 4a92178

File tree

13 files changed

+1561
-908
lines changed

13 files changed

+1561
-908
lines changed

src/lib_ccx/ccx_gxf.c

Lines changed: 0 additions & 249 deletions
Original file line numberDiff line numberDiff line change
@@ -28,255 +28,6 @@
2828

2929
#undef CCX_GXF_ENABLE_AD_VBI
3030

31-
typedef enum
32-
{
33-
PKT_MAP = 0xbc,
34-
PKT_MEDIA = 0xbf,
35-
PKT_EOS = 0xfb,
36-
PKT_FLT = 0xfc,
37-
PKT_UMF = 0xfd,
38-
} GXFPktType;
39-
40-
typedef enum
41-
{
42-
MAT_NAME = 0x40,
43-
MAT_FIRST_FIELD = 0x41,
44-
MAT_LAST_FIELD = 0x42,
45-
MAT_MARK_IN = 0x43,
46-
MAT_MARK_OUT = 0x44,
47-
MAT_SIZE = 0x45,
48-
} GXFMatTag;
49-
50-
typedef enum
51-
{
52-
/* Media file name */
53-
TRACK_NAME = 0x4c,
54-
55-
/*Auxiliary Information. The exact meaning depends on the track type. */
56-
TRACK_AUX = 0x4d,
57-
58-
/* Media file system version */
59-
TRACK_VER = 0x4e,
60-
61-
/* MPEG auxiliary information */
62-
TRACK_MPG_AUX = 0x4f,
63-
64-
/**
65-
* Frame rate
66-
* 1 = 60 frames/sec
67-
* 2 = 59.94 frames/sec
68-
* 3 = 50 frames/sec
69-
* 4 = 30 frames/sec
70-
* 5 = 29.97 frames/sec
71-
* 6 = 25 frames/sec
72-
* 7 = 24 frames/sec
73-
* 8 = 23.98 frames/sec
74-
* -1 = Not applicable for this track type
75-
* -2 = Not available
76-
*/
77-
TRACK_FPS = 0x50,
78-
79-
/**
80-
* Lines per frame
81-
* 1 = 525
82-
* 2 = 625
83-
* 4 = 1080
84-
* 5 = Reserved
85-
* 6 = 720
86-
* -1 = Not applicable
87-
* -2 = Not available
88-
*/
89-
TRACK_LINES = 0x51,
90-
91-
/**
92-
* Fields per frame
93-
* 1 = Progressive
94-
* 2 = Interlaced
95-
* -1 = Not applicable
96-
* -2 = Not available
97-
*/
98-
TRACK_FPF = 0x52,
99-
100-
} GXFTrackTag;
101-
102-
typedef enum
103-
{
104-
/**
105-
* A video track encoded using JPEG (ITU-R T.81 or ISO/IEC
106-
* 10918-1) for 525 line material.
107-
*/
108-
TRACK_TYPE_MOTION_JPEG_525 = 3,
109-
110-
/* A video track encoded using JPEG (ITU-R T.81 or ISO/IEC 10918-1) for 625 line material */
111-
TRACK_TYPE_MOTION_JPEG_625 = 4,
112-
113-
/* SMPTE 12M time code tracks */
114-
TRACK_TYPE_TIME_CODE_525 = 7,
115-
116-
/* SMPTE 12M time code tracks */
117-
TRACK_TYPE_TIME_CODE_625 = 8,
118-
119-
/* A mono 24-bit PCM audio track */
120-
TRACK_TYPE_AUDIO_PCM_24 = 9,
121-
122-
/* A mono 16-bit PCM audio track. */
123-
TRACK_TYPE_AUDIO_PCM_16 = 10,
124-
125-
/* A video track encoded using ISO/IEC 13818-2 (MPEG-2). */
126-
TRACK_TYPE_MPEG2_525 = 11,
127-
128-
/* A video track encoded using ISO/IEC 13818-2 (MPEG-2). */
129-
TRACK_TYPE_MPEG2_625 = 12,
130-
131-
/**
132-
* A video track encoded using SMPTE 314M or ISO/IEC 61834-2 DV
133-
* encoded at 25 Mb/s for 525/60i
134-
*/
135-
TRACK_TYPE_DV_BASED_25MB_525 = 13,
136-
137-
/**
138-
* A video track encoded using SMPTE 314M or ISO/IEC 61834-2 DV encoding at 25 Mb/s
139-
* for 625/50i.
140-
*/
141-
TRACK_TYPE_DV_BASED_25MB_625 = 14,
142-
143-
/**
144-
* A video track encoded using SMPTE 314M DV encoding at 50Mb/s
145-
* for 525/50i.
146-
*/
147-
TRACK_TYPE_DV_BASED_50MB_525 = 15,
148-
149-
/**
150-
* A video track encoded using SMPTE 314M DV encoding at 50Mb/s for 625/50i
151-
*/
152-
TRACK_TYPE_DV_BASED_50_MB_625 = 16,
153-
154-
/* An AC-3 audio track */
155-
TRACK_TYPE_AC_3_16b_audio = 17,
156-
157-
/* A non-PCM AES data track */
158-
TRACK_TYPE_COMPRESSED_24B_AUDIO = 18,
159-
160-
/* Ignore it as nice decoder */
161-
TRACK_TYPE_RESERVED = 19,
162-
163-
/**
164-
* A video track encoded using ISO/IEC 13818-2 (MPEG-2) main profile at main
165-
* level or high level, or 4:2:2 profile at main level or high level.
166-
*/
167-
TRACK_TYPE_MPEG2_HD = 20,
168-
169-
/* SMPTE 291M 10-bit type 2 component ancillary data. */
170-
TRACK_TYPE_ANCILLARY_DATA = 21,
171-
172-
/* A video track encoded using ISO/IEC 11172-2 (MPEG-1) */
173-
TRACK_TYPE_MPEG1_525 = 22,
174-
175-
/* A video track encoded using ISO/IEC 11172-2 (MPEG-1). */
176-
TRACK_TYPE_MPEG1_625 = 23,
177-
178-
/* SMPTE 12M time codes For HD material. */
179-
TRACK_TYPE_TIME_CODE_HD = 24,
180-
181-
} GXFTrackType;
182-
183-
typedef enum ccx_ad_pres_format
184-
{
185-
PRES_FORMAT_SD = 1,
186-
PRES_FORMAT_HD = 2,
187-
188-
} GXFAncDataPresFormat;
189-
190-
enum mpeg_picture_coding
191-
{
192-
CCX_MPC_NONE = 0,
193-
CCX_MPC_I_FRAME = 1,
194-
CCX_MPC_P_FRAME = 2,
195-
CCX_MPC_B_FRAME = 3,
196-
};
197-
198-
enum mpeg_picture_struct
199-
{
200-
CCX_MPS_NONE = 0,
201-
CCX_MPS_TOP_FIELD = 1,
202-
CCX_MPS_BOTTOM_FIELD = 2,
203-
CCX_MPS_FRAME = 3,
204-
};
205-
206-
struct ccx_gxf_video_track
207-
{
208-
/* Name of Media File */
209-
char track_name[STR_LEN];
210-
211-
/* Media File system Version */
212-
uint32_t fs_version;
213-
214-
/**
215-
* Frame Rate Calculate time stamp on basis of this
216-
*/
217-
struct ccx_rational frame_rate;
218-
219-
/**
220-
* Lines per frame (valid value for AD tracks)
221-
* May be used while parsing vbi
222-
*/
223-
uint32_t line_per_frame;
224-
225-
/**
226-
* Field per frame (Need when parsing vbi)
227-
* 1 = Progressive
228-
* 2 = Interlaced
229-
* -1 = Not applicable
230-
* -2 = Not available
231-
*/
232-
uint32_t field_per_frame;
233-
234-
enum mpeg_picture_coding p_code;
235-
enum mpeg_picture_struct p_struct;
236-
};
237-
238-
struct ccx_gxf_ancillary_data_track
239-
{
240-
/* Name of Media File */
241-
char track_name[STR_LEN];
242-
243-
/* ID of track */
244-
unsigned char id;
245-
246-
/* Presentation Format */
247-
enum ccx_ad_pres_format ad_format;
248-
249-
/* Number of ancillary data fields per ancillary data media packet */
250-
int nb_field;
251-
252-
/* Byte size of each ancillary data field */
253-
int field_size;
254-
255-
/**
256-
* Byte size of the ancillary data media packet in 256 byte units:
257-
* This value shall be 256, indicating an ancillary data media packet size
258-
* of 65536 bytes
259-
*/
260-
int packet_size;
261-
262-
/* Media File system Version */
263-
uint32_t fs_version;
264-
265-
/**
266-
* Frame Rate XXX AD track do have vaild but this field may
267-
* be ignored since related to only video
268-
*/
269-
uint32_t frame_rate;
270-
271-
/**
272-
* Lines per frame (valid value for AD tracks)
273-
* XXX may be ignored since related to raw video frame
274-
*/
275-
uint32_t line_per_frame;
276-
277-
/* Field per frame Might need if parsed vbi*/
278-
uint32_t field_per_frame;
279-
};
28031

28132
/**
28233
* @brief parses a packet header, extracting type and length

0 commit comments

Comments
 (0)