1 /* 2 * magic.h 3 * 4 * Copyright (C) Thomas Oestreich - June 2001 5 * 6 * This file is part of transcode, a video stream processing tool 7 * 8 * transcode is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2, or (at your option) 11 * any later version. 12 * 13 * transcode is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with GNU Make; see the file COPYING. If not, write to 20 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 21 * 22 */ 23 24 #ifndef _MAGIC_H 25 #define _MAGIC_H 26 27 #include "libtc/tccodecs.h" 28 29 // file/device magic: 30 #define TC_MAGIC_ERROR 0xFFFFFFFF 31 #define TC_MAGIC_UNKNOWN 0x00000000 32 #define TC_MAGIC_MPLAYER 0x00FFFFFF 33 #define TC_MAGIC_PIPE 0x0000FFFF 34 #define TC_MAGIC_DIR 0x000000FF 35 #define TC_MAGIC_RAW 0x00000001 36 37 #define TC_MAGIC_WAV 0x00000016 38 #define TC_MAGIC_AVI 0x00000017 39 #define TC_MAGIC_ASF 0x00000018 40 #define TC_MAGIC_MOV 0x00000019 41 #define TC_MAGIC_CDXA 0x00000020 42 #define TC_MAGIC_VDR 0x00000021 43 #define TC_MAGIC_XML 0x00000022 44 #define TC_MAGIC_OGG 0x00000024 45 #define TC_MAGIC_VNC 0x00000026 46 #define TC_MAGIC_MXF 0x00000027 47 48 #define TC_MAGIC_VOB 0x000001ba 49 #define TC_MAGIC_DVD 0xF0F0F0F0 50 #define TC_MAGIC_DVD_PAL 0xF0F0F0F1 51 #define TC_MAGIC_DVD_NTSC 0xF0F0F0F2 52 53 #define TC_MAGIC_V4L_VIDEO 0xF0F0F0F3 54 #define TC_MAGIC_V4L_AUDIO 0xF0F0F0F4 55 #define TC_MAGIC_V4L2_VIDEO 0xF0F0F0F5 56 #define TC_MAGIC_V4L2_AUDIO 0xF0F0F0F6 57 58 #define TC_MAGIC_OSS_AUDIO 0xF0F0F0F7 59 60 #define TC_MAGIC_BKTR_VIDEO 0xB5D00001 61 #define TC_MAGIC_SUNAU_AUDIO 0xB5D00002 62 63 #define TC_MAGIC_BSDAV 0xB5D00003 64 65 #define TC_MAGIC_X11 0x1100FEED 66 67 //MPEG streams 68 #define TC_MAGIC_MPEG_ES 0x1EEE00F0 69 #define TC_MAGIC_MPEG_PS 0x1EEE00F1 70 #define TC_MAGIC_MPEG_PES 0x1EEE00F2 71 72 //raw streams concatenated frames: 73 #define TC_MAGIC_M2V 0x000001b3 74 #define TC_MAGIC_PICEXT 0x000001b5 75 #define TC_MAGIC_MPEG 0x000001e0 76 #define TC_MAGIC_TS 0x00000047 77 #define TC_MAGIC_YUV4MPEG 0x00000300 78 #define TC_MAGIC_DV_PAL 0x1f0700bf 79 #define TC_MAGIC_DV_NTSC 0x1f07003f 80 #define TC_MAGIC_AC3 0x00000b77 81 #define TC_MAGIC_DTS 0x7ffe8001 82 #define TC_MAGIC_LPCM 0x00000180 83 #define TC_MAGIC_MP3 0x0000FFFB 84 #define TC_MAGIC_MP2_FC 0x0000FFFC 85 #define TC_MAGIC_MP2 0x0000FFFD 86 #define TC_MAGIC_MP3_2_5 0x0000FFE3 87 #define TC_MAGIC_MP3_2 0x0000FFF3 88 #define TC_MAGIC_NUV 0x4e757070 89 #define TC_MAGIC_TIFF1 0x00004D4D 90 #define TC_MAGIC_TIFF2 0x00004949 91 #define TC_MAGIC_JPEG 0xFFD8FFE0 92 #define TC_MAGIC_BMP 0x0000424D 93 #define TC_MAGIC_SGI 0x000001DA 94 #define TC_MAGIC_PNG 0x89504e47 95 #define TC_MAGIC_GIF 0x00474946 96 #define TC_MAGIC_PPM 0x00005036 97 #define TC_MAGIC_PGM 0x00005035 98 #define TC_MAGIC_ID3 0x49443303 99 #define TC_MAGIC_PV3 0x50563301 100 #define TC_MAGIC_PVN 0x50563460 // PV[456][abdf] & FFFFFCF8 101 102 //movie types: 103 #define TC_MAGIC_PAL 0x000000F1 104 #define TC_MAGIC_NTSC 0x000000F2 105 #define TC_MAGIC_RMF 0x000000F4 106 107 #define MPEG_PACK_START_CODE 0x000001ba 108 #define MPEG_SEQUENCE_START_CODE 0x000001b3 109 #define MPEG_SEQUENCE_END_CODE 0x000001b7 110 #define MPEG_SYSTEM_START_CODE 0x000001bb 111 #define MPEG_PADDING_START_CODE 0x000001be 112 #define MPEG_GOP_START_CODE 0x000001b8 113 #define MPEG_PROGRAM_END_CODE 0x000001b9 114 #define MPEG_PICTURE_START_CODE 0x00000100 115 #define MPEG_EXT_START_CODE 0x000001b5 116 #define MPEG_USER_START_CODE 0x000001b2 117 #define MPEG_VIDEO 0x000001e0 118 #define MPEG_AUDIO 0x000001c0 119 #define MPEG_AC3 0x000001d0 120 121 #endif 122