summaryrefslogtreecommitdiff
path: root/src/iso11172-1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/iso11172-1.h')
-rw-r--r--src/iso11172-1.h90
1 files changed, 51 insertions, 39 deletions
diff --git a/src/iso11172-1.h b/src/iso11172-1.h
index ee8f408..a011383 100644
--- a/src/iso11172-1.h
+++ b/src/iso11172-1.h
@@ -41,51 +41,63 @@ namespace ISO11172_1 {
// Types
////////////////////////////////////////////////////
// 64 bits (8 bytes)
- typedef struct {
- unsigned long long int marker_bit3:1;
- unsigned long long int system_clock_reference3:15;
- unsigned long long int marker_bit2:1;
- unsigned long long int system_clock_reference2:15;
- unsigned long long int marker_bit1:1;
- unsigned long long int system_clock_reference1:3;
- unsigned long long int padding:4;
- unsigned long long int stuffing_byte:8;
- unsigned long long int packet_length:16;
+ typedef union {
+ struct {
+ unsigned long long int marker_bit3:1;
+ unsigned long long int system_clock_reference3:15;
+ unsigned long long int marker_bit2:1;
+ unsigned long long int system_clock_reference2:15;
+ unsigned long long int marker_bit1:1;
+ unsigned long long int system_clock_reference1:3;
+ unsigned long long int padding:4;
+ unsigned long long int stuffing_byte:8;
+ unsigned long long int packet_length:16;
+ } bits;
+ unsigned long long int ulli;
} packet_header;
- typedef struct {
- unsigned long long int marker_bit5:1;
- unsigned long long int mux_rate:22;
- unsigned long long int marker_bit4:1;
- unsigned long long int marker_bit3:1;
- unsigned long long int system_clock_reference3:15;
- unsigned long long int marker_bit2:1;
- unsigned long long int system_clock_reference2:15;
- unsigned long long int marker_bit1:1;
- unsigned long long int system_clock_reference1:3;
- unsigned long long int padding:4;
+ typedef union {
+ struct {
+ unsigned long long int marker_bit5:1;
+ unsigned long long int mux_rate:22;
+ unsigned long long int marker_bit4:1;
+ unsigned long long int marker_bit3:1;
+ unsigned long long int system_clock_reference3:15;
+ unsigned long long int marker_bit2:1;
+ unsigned long long int system_clock_reference2:15;
+ unsigned long long int marker_bit1:1;
+ unsigned long long int system_clock_reference1:3;
+ unsigned long long int padding:4;
+ } bits;
+ unsigned long long int ulli;
} pack_header;
- typedef struct {
- unsigned long long int reserved_byte:8;
- unsigned long long int video_bound:5;
- unsigned long long int marker_bit3:1;
- unsigned long long int system_video_clock_flag:1;
- unsigned long long int system_audio_clock_flag:1;
- unsigned long long int CSPS_flag:1;
- unsigned long long int fixed_flag:1;
- unsigned long long int audio_bound:6;
- unsigned long long int marker_bit2:1;
- unsigned long long int rate_bound:22;
- unsigned long long int marker_bit1:1;
- unsigned long long int header_length:16;
+ typedef union {
+ struct {
+ unsigned long long int reserved_byte:8;
+ unsigned long long int video_bound:5;
+ unsigned long long int marker_bit3:1;
+ unsigned long long int system_video_clock_flag:1;
+ unsigned long long int system_audio_clock_flag:1;
+ unsigned long long int CSPS_flag:1;
+ unsigned long long int fixed_flag:1;
+ unsigned long long int audio_bound:6;
+ unsigned long long int marker_bit2:1;
+ unsigned long long int rate_bound:22;
+ unsigned long long int marker_bit1:1;
+ unsigned long long int header_length:16;
+ } bits;
+ unsigned long long int ulli;
} system_header;
- typedef struct {
- unsigned long int STD_buffer_size_bound:13;
- unsigned long int STD_buffer_bound_scale:1;
- unsigned long int market_bits:2;
- unsigned long int stream_id:8;
+ typedef union {
+ struct {
+ unsigned long int STD_buffer_size_bound:13;
+ unsigned long int STD_buffer_bound_scale:1;
+ unsigned long int market_bits:2;
+ unsigned long int stream_id:8;
+ } bits;
+ unsigned long int uli;
} stream_description;
////////////////////////////////////////////////////