| 1 |
/* |
| 2 |
* Copyright (C) 2025 Biswapriyo Nath |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2.1 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifndef _MPEG2BITS_H_ |
| 20 |
#define _MPEG2BITS_H_ |
| 21 |
|
| 22 |
#pragma pack(push) |
| 23 |
#pragma pack(1) |
| 24 |
|
| 25 |
#if defined(__midl) || defined(__WIDL__) |
| 26 |
typedef struct |
| 27 |
{ |
| 28 |
WORD Bits; |
| 29 |
} PID_BITS_MIDL; |
| 30 |
#else |
| 31 |
typedef struct |
| 32 |
{ |
| 33 |
WORD Reserved : 3; |
| 34 |
WORD ProgramId : 13; |
| 35 |
} PID_BITS, *PPID_BITS; |
| 36 |
#endif |
| 37 |
|
| 38 |
#if defined(__midl) || defined(__WIDL__) |
| 39 |
typedef struct |
| 40 |
{ |
| 41 |
WORD Bits; |
| 42 |
} MPEG_HEADER_BITS_MIDL; |
| 43 |
#else |
| 44 |
typedef struct |
| 45 |
{ |
| 46 |
WORD SectionLength : 12; |
| 47 |
WORD Reserved : 2; |
| 48 |
WORD PrivateIndicator : 1; |
| 49 |
WORD SectionSyntaxIndicator : 1; |
| 50 |
} MPEG_HEADER_BITS, *PMPEG_HEADER_BITS; |
| 51 |
#endif |
| 52 |
|
| 53 |
#if defined(__midl) || defined(__WIDL__) |
| 54 |
typedef struct |
| 55 |
{ |
| 56 |
BYTE Bits; |
| 57 |
} MPEG_HEADER_VERSION_BITS_MIDL; |
| 58 |
#else |
| 59 |
typedef struct |
| 60 |
{ |
| 61 |
BYTE CurrentNextIndicator : 1; |
| 62 |
BYTE VersionNumber : 5; |
| 63 |
BYTE Reserved : 2; |
| 64 |
} MPEG_HEADER_VERSION_BITS, *PMPEG_HEADER_VERSION_BITS; |
| 65 |
#endif |
| 66 |
|
| 67 |
#pragma pack(pop) |
| 68 |
|
| 69 |
#endif /* _MPEG2BITS_H_ */ |