X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_codecs.h;h=6daa57cf903cb8d564d5a7b9e9f1a387598e6b42;hb=dc814eb35c3943bb361cb89ece3694ac4744c6cc;hp=9fafdd4a3e6d7a7b0f24beeff855d15d44ba3f91;hpb=d896f8e8767aef75303de2c873440b5938ae6438;p=vlc diff --git a/include/vlc_codecs.h b/include/vlc_codecs.h index 9fafdd4a3e..6daa57cf90 100644 --- a/include/vlc_codecs.h +++ b/include/vlc_codecs.h @@ -1,24 +1,24 @@ /***************************************************************************** - * codecs.h: codec related structures needed by the demuxers and decoders + * vlc_codecs.h: codec related structures needed by the demuxers and decoders ***************************************************************************** - * Copyright (C) 1999-2001 the VideoLAN team + * Copyright (C) 1999-2001 VLC authors and VideoLAN * $Id$ * * Author: Gildas Bazin * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifndef VLC_CODECS_H @@ -50,6 +50,9 @@ typedef GUID guid_t; #elif defined(__SUNPRO_C) # pragma pack(1) # define ATTR_PACKED +#elif defined(__APPLE__) +# pragma pack(push, 1) +# define ATTR_PACKED #else # error FIXME #endif @@ -106,8 +109,9 @@ _WAVEHEADER { } WAVEHEADER; #endif /* _WAVEHEADER_ */ -#if !defined(_BITMAPINFOHEADER_) && !defined(WIN32) -#define _BITMAPINFOHEADER_ +#ifndef _VLC_BITMAPINFOHEADER_ +#define _VLC_BITMAPINFOHEADER_ + typedef struct ATTR_PACKED { @@ -122,14 +126,14 @@ ATTR_PACKED uint32_t biYPelsPerMeter; uint32_t biClrUsed; uint32_t biClrImportant; -} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER; +} VLC_BITMAPINFOHEADER, *VLC_PBITMAPINFOHEADER, *VLC_LPBITMAPINFOHEADER; typedef struct ATTR_PACKED { - BITMAPINFOHEADER bmiHeader; - int bmiColors[1]; -} BITMAPINFO, *LPBITMAPINFO; + VLC_BITMAPINFOHEADER bmiHeader; + int bmiColors[1]; +} VLC_BITMAPINFO, *VLC_LPBITMAPINFO; #endif #ifndef _RECT32_ @@ -151,12 +155,12 @@ typedef int64_t REFERENCE_TIME; typedef struct ATTR_PACKED { - RECT32 rcSource; - RECT32 rcTarget; - uint32_t dwBitRate; - uint32_t dwBitErrorRate; - REFERENCE_TIME AvgTimePerFrame; - BITMAPINFOHEADER bmiHeader; + RECT32 rcSource; + RECT32 rcTarget; + uint32_t dwBitRate; + uint32_t dwBitErrorRate; + REFERENCE_TIME AvgTimePerFrame; + VLC_BITMAPINFOHEADER bmiHeader; } VIDEOINFOHEADER; #endif @@ -187,12 +191,12 @@ ATTR_PACKED typedef struct ATTR_PACKED { - RECT32 rcSource; - RECT32 rcTarget; - uint32_t dwBitRate; - uint32_t dwBitErrorRate; - REFERENCE_TIME AvgTimePerFrame; - BITMAPINFOHEADER bmiHeader; + RECT32 rcSource; + RECT32 rcTarget; + uint32_t dwBitRate; + uint32_t dwBitErrorRate; + REFERENCE_TIME AvgTimePerFrame; + VLC_BITMAPINFOHEADER bmiHeader; union { @@ -206,6 +210,8 @@ ATTR_PACKED #if defined(__SUNPRO_C) # pragma pack() +#elif defined(__APPLE__) && !HAVE_ATTRIBUTE_PACKED +# pragma pack(pop) #endif /* WAVE format wFormatTag IDs */ @@ -219,6 +225,7 @@ ATTR_PACKED #define WAVE_FORMAT_DTS_MS 0x0008 /* Microsoft Corporation */ #define WAVE_FORMAT_WMAS 0x000a /* WMA 9 Speech */ #define WAVE_FORMAT_IMA_ADPCM 0x0011 /* Intel Corporation */ +#define WAVE_FORMAT_YAMAHA_ADPCM 0x0020 /* Yamaha */ #define WAVE_FORMAT_TRUESPEECH 0x0022 /* TrueSpeech */ #define WAVE_FORMAT_GSM610 0x0031 /* Microsoft Corporation */ #define WAVE_FORMAT_MSNAUDIO 0x0032 /* Microsoft Corporation */ @@ -237,6 +244,9 @@ ATTR_PACKED #define WAVE_FORMAT_WMAP 0x0162 /* WMA 9 Professional */ #define WAVE_FORMAT_WMAL 0x0163 /* WMA 9 Lossless */ +#define WAVE_FORMAT_ATRAC3 0x0270 /* Atrac3, != from MSDN doc */ +#define WAVE_FORMAT_SONY_ATRAC3 0x0272 /* Atrac3, != from MSDN doc */ + #define WAVE_FORMAT_AAC_2 0x1601 /* Other AAC */ #define WAVE_FORMAT_AAC_LATM 0x1602 /* AAC/LATM */ @@ -268,6 +278,7 @@ ATTR_PACKED #define WAVE_FORMAT_VORB_3PLUS 0x6771 #define WAVE_FORMAT_SPEEX 0xa109 /* Speex audio */ +#define WAVE_FORMAT_FLAC 0xf1ac /* Xiph Flac */ #if !defined(WAVE_FORMAT_EXTENSIBLE) #define WAVE_FORMAT_EXTENSIBLE 0xFFFE /* Microsoft */ @@ -330,6 +341,7 @@ wave_format_tag_to_fourcc[] = { WAVE_FORMAT_ALAW, VLC_CODEC_ALAW, "A-Law" }, { WAVE_FORMAT_MULAW, VLC_CODEC_MULAW, "Mu-Law" }, { WAVE_FORMAT_IMA_ADPCM, VLC_CODEC_ADPCM_IMA_WAV, "Ima-ADPCM" }, + { WAVE_FORMAT_YAMAHA_ADPCM, VLC_CODEC_ADPCM_YAMAHA, "Yamaha ADPCM" }, { WAVE_FORMAT_TRUESPEECH, VLC_FOURCC(0x22, 0x0, 0x0, 0x0 ), "Truespeech" }, { WAVE_FORMAT_GSM610, VLC_CODEC_GSM_MS, "Microsoft WAV GSM" }, { WAVE_FORMAT_G726, VLC_CODEC_ADPCM_G726, "G.726 ADPCM" }, @@ -344,6 +356,8 @@ wave_format_tag_to_fourcc[] = { WAVE_FORMAT_WMAP, VLC_CODEC_WMAP, "Window Media Audio 9 Professional" }, { WAVE_FORMAT_WMAL, VLC_CODEC_WMAL, "Window Media Audio 9 Lossless" }, { WAVE_FORMAT_WMAS, VLC_CODEC_WMAS, "Window Media Audio 9 Speech" }, + { WAVE_FORMAT_ATRAC3, VLC_CODEC_ATRAC3, "Sony Atrac3" }, + { WAVE_FORMAT_SONY_ATRAC3,VLC_CODEC_ATRAC3, "Sony Atrac3" }, { WAVE_FORMAT_DK3, VLC_FOURCC( 'm', 's', 0x00,0x61), "Duck DK3" }, { WAVE_FORMAT_DK4, VLC_FOURCC( 'm', 's', 0x00,0x62), "Duck DK4" }, { WAVE_FORMAT_DTS, VLC_CODEC_DTS, "DTS Coherent Acoustics" }, @@ -361,6 +375,7 @@ wave_format_tag_to_fourcc[] = { WAVE_FORMAT_VORB_3, VLC_FOURCC( 'v', 'o', 'r', '3' ), "Vorbis 3 Audio" }, { WAVE_FORMAT_VORB_3PLUS, VLC_FOURCC( 'v', 'o', '3', '+' ), "Vorbis 3+ Audio" }, { WAVE_FORMAT_SPEEX, VLC_CODEC_SPEEX, "Speex Audio" }, + { WAVE_FORMAT_FLAC, VLC_CODEC_FLAC, "FLAC Audio" }, { WAVE_FORMAT_UNKNOWN, VLC_FOURCC( 'u', 'n', 'd', 'f' ), "Unknown" } };