cleanup: remove unused tagutils code, and switch to standard int types

This commit is contained in:
Justin Maggard
2014-03-06 17:08:21 -08:00
parent cb95ca6e06
commit b9404d1847
9 changed files with 271 additions and 648 deletions

View File

@ -30,9 +30,9 @@
#endif
typedef struct _GUID {
__u32 l;
__u16 w[2];
__u8 b[8];
uint32_t l;
uint16_t w[2];
uint8_t b[8];
} __PACKED__ GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
@ -117,166 +117,166 @@ DEFINE_GUID(ASF_StreamBufferStream, SWAP32(0x3AFB65E2), SWAP16(0x47EF), SWAP16(0
0xAC, 0x2C, 0x70, 0xA9, 0x0D, 0x71, 0xD3, 0x43);
typedef struct _BITMAPINFOHEADER {
__u32 biSize;
__s32 biWidth;
__s32 biHeight;
__u16 biPlanes;
__u16 biBitCount;
__u32 biCompression;
__u32 biSizeImage;
__s32 biXPelsPerMeter;
__s32 biYPelsPerMeter;
__u32 biClrUsed;
__u32 biClrImportant;
uint32_t biSize;
int32_t biWidth;
int32_t biHeight;
uint16_t biPlanes;
uint16_t biBitCount;
uint32_t biCompression;
uint32_t biSizeImage;
int32_t biXPelsPerMeter;
int32_t biYPelsPerMeter;
uint32_t biClrUsed;
uint32_t biClrImportant;
} __PACKED__ BITMAPINFOHEADER;
typedef struct _WAVEFORMATEX {
__u16 wFormatTag;
__u16 nChannels;
__u32 nSamplesPerSec;
__u32 nAvgBytesPerSec;
__u16 nBlockAlign;
__u16 wBitsPerSample;
__u16 cbSize;
uint16_t wFormatTag;
uint16_t nChannels;
uint32_t nSamplesPerSec;
uint32_t nAvgBytesPerSec;
uint16_t nBlockAlign;
uint16_t wBitsPerSample;
uint16_t cbSize;
} __PACKED__ WAVEFORMATEX;
typedef struct _asf_stream_object_t {
GUID ID;
__u64 Size;
uint64_t Size;
GUID StreamType;
GUID ErrorCorrectionType;
__u64 TimeOffset;
__u32 TypeSpecificSize;
__u32 ErrorCorrectionSize;
__u16 StreamNumber;
__u32 Reserved;
uint64_t TimeOffset;
uint32_t TypeSpecificSize;
uint32_t ErrorCorrectionSize;
uint16_t StreamNumber;
uint32_t Reserved;
} __PACKED__ asf_stream_object_t;
typedef struct _asf_media_stream_t {
asf_stream_object_t Hdr;
GUID MajorType;
GUID SubType;
__u32 FixedSizeSamples;
__u32 TemporalCompression;
__u32 SampleSize;
uint32_t FixedSizeSamples;
uint32_t TemporalCompression;
uint32_t SampleSize;
GUID FormatType;
__u32 FormatSize;
uint32_t FormatSize;
} __PACKED__ asf_media_stream_t;
typedef struct _avi_audio_format_t {
__u16 wFormatTag;
__u16 nChannels;
__u32 nSamplesPerSec;
__u32 nAvgBytesPerSec;
__u16 nBlockAlign;
__u16 wBitsPerSample;
__u16 cbSize;
uint16_t wFormatTag;
uint16_t nChannels;
uint32_t nSamplesPerSec;
uint32_t nAvgBytesPerSec;
uint16_t nBlockAlign;
uint16_t wBitsPerSample;
uint16_t cbSize;
} __PACKED__ avi_audio_format_t;
typedef struct _asf_extended_stream_object_t {
GUID ID;
__u64 Size;
__u64 StartTime;
__u64 EndTime;
__u32 DataBitrate;
__u32 BufferSize;
__u32 InitialBufferFullness;
__u32 AltDataBitrate;
__u32 AltBufferSize;
__u32 AltInitialBufferFullness;
__u32 MaximumObjectSize;
__u32 Flags;
__u16 StreamNumber;
__u16 LanguageIDIndex;
__u64 AvgTimePerFrame;
__u16 StreamNameCount;
__u16 PayloadExtensionSystemCount;
uint64_t Size;
uint64_t StartTime;
uint64_t EndTime;
uint32_t DataBitrate;
uint32_t BufferSize;
uint32_t InitialBufferFullness;
uint32_t AltDataBitrate;
uint32_t AltBufferSize;
uint32_t AltInitialBufferFullness;
uint32_t MaximumObjectSize;
uint32_t Flags;
uint16_t StreamNumber;
uint16_t LanguageIDIndex;
uint64_t AvgTimePerFrame;
uint16_t StreamNameCount;
uint16_t PayloadExtensionSystemCount;
} __PACKED__ asf_extended_stream_object_t;
typedef struct _asf_stream_name_t {
__u16 ID;
__u16 Length;
uint16_t ID;
uint16_t Length;
} __PACKED__ asf_stream_name_t;
typedef struct _asf_payload_extension_t {
GUID ID;
__u16 Size;
__u32 InfoLength;
uint16_t Size;
uint32_t InfoLength;
} __PACKED__ asf_payload_extension_t;
typedef struct _asf_object_t {
GUID ID;
__u64 Size;
uint64_t Size;
} __PACKED__ asf_object_t;
typedef struct _asf_codec_entry_t {
__u16 Type;
__u16 NameLen;
__u32 Name;
__u16 DescLen;
__u32 Desc;
__u16 InfoLen;
__u32 Info;
uint16_t Type;
uint16_t NameLen;
uint32_t Name;
uint16_t DescLen;
uint32_t Desc;
uint16_t InfoLen;
uint32_t Info;
} __PACKED__ asf_codec_entry_t;
typedef struct _asf_codec_list_t {
GUID ID;
__u64 Size;
uint64_t Size;
GUID Reserved;
__u64 NumEntries;
uint64_t NumEntries;
asf_codec_entry_t Entries[2];
asf_codec_entry_t VideoCodec;
} __PACKED__ asf_codec_list_t;
typedef struct _asf_content_description_t {
GUID ID;
__u64 Size;
__u16 TitleLength;
__u16 AuthorLength;
__u16 CopyrightLength;
__u16 DescriptionLength;
__u16 RatingLength;
__u32 Title;
__u32 Author;
__u32 Copyright;
__u32 Description;
__u32 Rating;
uint64_t Size;
uint16_t TitleLength;
uint16_t AuthorLength;
uint16_t CopyrightLength;
uint16_t DescriptionLength;
uint16_t RatingLength;
uint32_t Title;
uint32_t Author;
uint32_t Copyright;
uint32_t Description;
uint32_t Rating;
} __PACKED__ asf_content_description_t;
typedef struct _asf_file_properties_t {
GUID ID;
__u64 Size;
uint64_t Size;
GUID FileID;
__u64 FileSize;
__u64 CreationTime;
__u64 TotalPackets;
__u64 PlayDuration;
__u64 SendDuration;
__u64 Preroll;
__u32 Flags;
__u32 MinPacketSize;
__u32 MaxPacketSize;
__u32 MaxBitrate;
uint64_t FileSize;
uint64_t CreationTime;
uint64_t TotalPackets;
uint64_t PlayDuration;
uint64_t SendDuration;
uint64_t Preroll;
uint32_t Flags;
uint32_t MinPacketSize;
uint32_t MaxPacketSize;
uint32_t MaxBitrate;
} __PACKED__ asf_file_properties_t;
typedef struct _asf_header_extension_t {
GUID ID;
__u64 Size;
uint64_t Size;
GUID Reserved1;
__u16 Reserved2;
__u32 DataSize;
uint16_t Reserved2;
uint32_t DataSize;
} __PACKED__ asf_header_extension_t;
typedef struct _asf_video_stream_t {
asf_stream_object_t Hdr;
__u32 Width;
__u32 Height;
__u8 ReservedFlags;
__u16 FormatSize;
uint32_t Width;
uint32_t Height;
uint8_t ReservedFlags;
uint16_t FormatSize;
BITMAPINFOHEADER bmi;
__u8 ebih[1];
uint8_t ebih[1];
} __PACKED__ asf_video_stream_t;
typedef struct _asf_audio_stream_t {
@ -285,56 +285,56 @@ typedef struct _asf_audio_stream_t {
} __PACKED__ asf_audio_stream_t;
typedef struct _asf_payload_t {
__u8 StreamNumber;
__u8 MediaObjectNumber;
__u32 MediaObjectOffset;
__u8 ReplicatedDataLength;
__u32 ReplicatedData[2];
__u32 PayloadLength;
uint8_t StreamNumber;
uint8_t MediaObjectNumber;
uint32_t MediaObjectOffset;
uint8_t ReplicatedDataLength;
uint32_t ReplicatedData[2];
uint32_t PayloadLength;
} __PACKED__ asf_payload_t;
typedef struct _asf_packet_t {
__u8 TypeFlags;
__u8 ECFlags;
__u8 ECType;
__u8 ECCycle;
__u8 PropertyFlags;
__u32 PacketLength;
__u32 Sequence;
__u32 PaddingLength;
__u32 SendTime;
__u16 Duration;
__u8 PayloadFlags;
uint8_t TypeFlags;
uint8_t ECFlags;
uint8_t ECType;
uint8_t ECCycle;
uint8_t PropertyFlags;
uint32_t PacketLength;
uint32_t Sequence;
uint32_t PaddingLength;
uint32_t SendTime;
uint16_t Duration;
uint8_t PayloadFlags;
asf_payload_t Payload;
} __PACKED__ asf_packet_t;
typedef struct _asf_data_object_t {
GUID ID;
__u64 Size;
uint64_t Size;
GUID FileID;
__u64 TotalPackets;
uint64_t TotalPackets;
unsigned short Reserved;
} __PACKED__ asf_data_object_t;
typedef struct _asf_padding_object_t {
GUID ID;
__u64 Size;
uint64_t Size;
} __PACKED__ asf_padding_object_t;
typedef struct _asf_simple_index_object_t {
GUID ID;
__u64 Size;
uint64_t Size;
GUID FileID;
__u32 IndexEntryTimeInterval;
__u32 MaximumPacketCount;
__u32 IndexEntriesCount;
uint32_t IndexEntryTimeInterval;
uint32_t MaximumPacketCount;
uint32_t IndexEntriesCount;
} __PACKED__ asf_simple_index_object_t;
typedef struct _asf_header_object_t {
GUID ID;
__u64 Size;
__u32 NumObjects;
__u16 Reserved;
uint64_t Size;
uint32_t NumObjects;
uint16_t Reserved;
asf_header_extension_t HeaderExtension;
asf_content_description_t ContentDescription;
asf_file_properties_t FileProperties;