codecs.h 3.27 KB
Newer Older
gbazin's avatar
 
gbazin committed
1 2 3 4
/*****************************************************************************
 * codecs.h: codec related structures needed by the demuxers and decoders
 *****************************************************************************
 * Copyright (C) 1999-2001 VideoLAN
gbazin's avatar
 
gbazin committed
5
 * $Id: codecs.h,v 1.2 2002/11/07 19:31:07 gbazin Exp $
gbazin's avatar
 
gbazin committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
 *
 * Authors: Gildas Bazin <gbazin@netcourrier.com>
 *
 * 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
 * (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.
 *
 * 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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 *****************************************************************************/

#ifndef _VLC_CODECS_H
#define _VLC_CODECS_H 1

/* Structures exported to the demuxers and decoders */

#ifndef _WAVEFORMATEX_
#define _WAVEFORMATEX_
typedef struct __attribute__((__packed__)) _WAVEFORMATEX {
    uint16_t   wFormatTag;
    uint16_t   nChannels;
    uint32_t   nSamplesPerSec;
    uint32_t   nAvgBytesPerSec;
    uint16_t   nBlockAlign;
    uint16_t   wBitsPerSample;
    uint16_t   cbSize;
} WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
#endif /* _WAVEFORMATEX_ */

gbazin's avatar
 
gbazin committed
42
#if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
gbazin's avatar
 
gbazin committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
#define _BITMAPINFOHEADER_
typedef struct __attribute__((__packed__))
{
    uint32_t   biSize;
    uint32_t   biWidth;
    uint32_t   biHeight;
    uint16_t   biPlanes;
    uint16_t   biBitCount;
    uint32_t   biCompression;
    uint32_t   biSizeImage;
    uint32_t   biXPelsPerMeter;
    uint32_t   biYPelsPerMeter;
    uint32_t   biClrUsed;
    uint32_t   biClrImportant;
} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
typedef struct {
    BITMAPINFOHEADER bmiHeader;
    int        bmiColors[1];
} BITMAPINFO, *LPBITMAPINFO;
#endif

/* WAVE form wFormatTag IDs */

#define  WAVE_FORMAT_UNKNOWN            0x0000 /* Microsoft Corporation */
#define  WAVE_FORMAT_PCM                0x0001 /* Microsoft Corporation */
#define  WAVE_FORMAT_ADPCM              0x0002 /* Microsoft Corporation */
#define  WAVE_FORMAT_IEEE_FLOAT         0x0003 /* Microsoft Corporation */
#define  WAVE_FORMAT_ALAW               0x0006 /* Microsoft Corporation */
#define  WAVE_FORMAT_MULAW              0x0007 /* Microsoft Corporation */
#define  WAVE_FORMAT_DTS                0x0008 /* Microsoft Corporation */
#define  WAVE_FORMAT_MPEG               0x0050 /* Microsoft Corporation */
#define  WAVE_FORMAT_MPEGLAYER3         0x0055 /* ISO/MPEG Layer3 Format Tag */
#define  WAVE_FORMAT_DOLBY_AC3_SPDIF    0x0092 /* Sonic Foundry */

/* Need to check these */
#define WAVE_FORMAT_A52             0x2000
#define WAVE_FORMAT_WMA1            0x0160
#define WAVE_FORMAT_WMA2            0x0161

#if !defined(WAVE_FORMAT_EXTENSIBLE)
#define  WAVE_FORMAT_EXTENSIBLE                 0xFFFE /* Microsoft */
#endif

#endif /* "codecs.h" */