annotate libmpdemux/matroska.h @ 30795:1001c606f94c

Make emulated Win32 critical sections thread safe. Earlier, cs->locked was accessed outside the mutex to get around the problem that default pthread mutexes are not recursive (ie., you cannot do a double-lock from the same thread), causing a thread-safety problem, as both detected by Helgrind and showing up in some multithreaded codecs. The ideal solution here would be to simply use recursive pthread mutexes, but there were concerns about reduced debuggability and possibly portability. Thus, instead, rewrite the critical sections to be a simple lock count (with owner) protected by a regular mutex. Whenever a thread wants to enter the critical section and lock_count is not 0, it sleeps on a special event that tells it when the critical section is available.
author sesse
date Thu, 04 Mar 2010 15:57:08 +0000
parents 7dd86fa7fcad
children 6428a4b38763
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10024
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
1 /*
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
2 * CodecID definitions for Matroska files
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
3 *
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
4 * see http://cvs.corecodec.org/cgi-bin/cvsweb.cgi/~checkout~/matroska/doc/website/specs/codex.html?rev=HEAD&content-type=text/html
29238
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
5 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
6 * This file is part of MPlayer.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
7 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
8 * MPlayer is free software; you can redistribute it and/or modify
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
9 * it under the terms of the GNU General Public License as published by
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
11 * (at your option) any later version.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
12 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
13 * MPlayer is distributed in the hope that it will be useful,
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
16 * GNU General Public License for more details.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
17 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
18 * You should have received a copy of the GNU General Public License along
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
19 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 26281
diff changeset
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
10024
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
21 */
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
22
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 24805
diff changeset
23 #ifndef MPLAYER_MATROSKA_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 24805
diff changeset
24 #define MPLAYER_MATROSKA_H
10024
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
25
10133
d9c9422887ca Endian fixes and proper support for headerless AAC streams.
mosu
parents: 10125
diff changeset
26 #define MKV_A_AAC_2MAIN "A_AAC/MPEG2/MAIN"
10125
252428ac7978 Added support for AAC.
mosu
parents: 10105
diff changeset
27 #define MKV_A_AAC_2LC "A_AAC/MPEG2/LC"
11557
32411c15cebc Support for HE-AAC in Matroska. Also only set ds->pts to the first pts of a laced block, and set dp->pts to the current pts taking default_duration into account.
mosu
parents: 11486
diff changeset
28 #define MKV_A_AAC_2SBR "A_AAC/MPEG2/LC/SBR"
10133
d9c9422887ca Endian fixes and proper support for headerless AAC streams.
mosu
parents: 10125
diff changeset
29 #define MKV_A_AAC_2SSR "A_AAC/MPEG2/SSR"
d9c9422887ca Endian fixes and proper support for headerless AAC streams.
mosu
parents: 10125
diff changeset
30 #define MKV_A_AAC_4MAIN "A_AAC/MPEG4/MAIN"
10125
252428ac7978 Added support for AAC.
mosu
parents: 10105
diff changeset
31 #define MKV_A_AAC_4LC "A_AAC/MPEG4/LC"
11557
32411c15cebc Support for HE-AAC in Matroska. Also only set ds->pts to the first pts of a laced block, and set dp->pts to the current pts taking default_duration into account.
mosu
parents: 11486
diff changeset
32 #define MKV_A_AAC_4SBR "A_AAC/MPEG4/LC/SBR"
10133
d9c9422887ca Endian fixes and proper support for headerless AAC streams.
mosu
parents: 10125
diff changeset
33 #define MKV_A_AAC_4SSR "A_AAC/MPEG4/SSR"
d9c9422887ca Endian fixes and proper support for headerless AAC streams.
mosu
parents: 10125
diff changeset
34 #define MKV_A_AAC_4LTP "A_AAC/MPEG4/LTP"
16824
ab1eb8054890 Added support for A_AAC.
mosu
parents: 14561
diff changeset
35 #define MKV_A_AAC "A_AAC"
10024
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
36 #define MKV_A_AC3 "A_AC3"
10105
dc4f1b768062 Support for DTS tracks (only with -hwac3 of course).
mosu
parents: 10024
diff changeset
37 #define MKV_A_DTS "A_DTS"
11155
4a21e1672c91 Support for MP2 audio.
mosu
parents: 11153
diff changeset
38 #define MKV_A_MP2 "A_MPEG/L2"
10125
252428ac7978 Added support for AAC.
mosu
parents: 10105
diff changeset
39 #define MKV_A_MP3 "A_MPEG/L3"
10024
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
40 #define MKV_A_PCM "A_PCM/INT/LIT"
10844
98681fdabf79 Support for Quicktime stuff in Matroska (e.g. Sorenson, QDesign Music codecs etc.).
mosu
parents: 10410
diff changeset
41 #define MKV_A_PCM_BE "A_PCM/INT/BIG"
10024
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
42 #define MKV_A_VORBIS "A_VORBIS"
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
43 #define MKV_A_ACM "A_MS/ACM"
10410
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
44 #define MKV_A_REAL28 "A_REAL/28_8"
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
45 #define MKV_A_REALATRC "A_REAL/ATRC"
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
46 #define MKV_A_REALCOOK "A_REAL/COOK"
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
47 #define MKV_A_REALDNET "A_REAL/DNET"
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
48 #define MKV_A_REALSIPR "A_REAL/SIPR"
10845
71db96cf88d4 Support for SSA text subs in Matroska. Patch partially by Tristan <z80@oceanfree.net>.
mosu
parents: 10844
diff changeset
49 #define MKV_A_QDMC "A_QUICKTIME/QDMC"
71db96cf88d4 Support for SSA text subs in Matroska. Patch partially by Tristan <z80@oceanfree.net>.
mosu
parents: 10844
diff changeset
50 #define MKV_A_QDMC2 "A_QUICKTIME/QDM2"
11486
e6662a93da28 Added the FLAC CodecId.
mosu
parents: 11155
diff changeset
51 #define MKV_A_FLAC "A_FLAC"
24805
ee9619105e90 add support for wavpack into matroska
aurel
parents: 23689
diff changeset
52 #define MKV_A_WAVPACK "A_WAVPACK4"
29471
7dd86fa7fcad Add Dolby TrueHD support for mkv demuxer.
cehoyos
parents: 29238
diff changeset
53 #define MKV_A_TRUEHD "A_TRUEHD"
10024
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
54
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
55 #define MKV_V_MSCOMP "V_MS/VFW/FOURCC"
10410
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
56 #define MKV_V_REALV10 "V_REAL/RV10"
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
57 #define MKV_V_REALV20 "V_REAL/RV20"
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
58 #define MKV_V_REALV30 "V_REAL/RV30"
c2fc1c310699 Necessary changes for the upcoming libebml/libmatroska 0.5.0. Implemented support for RealAudio and RealVideo inside Matroska.
mosu
parents: 10133
diff changeset
59 #define MKV_V_REALV40 "V_REAL/RV40"
10844
98681fdabf79 Support for Quicktime stuff in Matroska (e.g. Sorenson, QDesign Music codecs etc.).
mosu
parents: 10410
diff changeset
60 #define MKV_V_SORENSONV1 "V_SORENSON/V1"
98681fdabf79 Support for Quicktime stuff in Matroska (e.g. Sorenson, QDesign Music codecs etc.).
mosu
parents: 10410
diff changeset
61 #define MKV_V_SORENSONV2 "V_SORENSON/V2"
98681fdabf79 Support for Quicktime stuff in Matroska (e.g. Sorenson, QDesign Music codecs etc.).
mosu
parents: 10410
diff changeset
62 #define MKV_V_SORENSONV3 "V_SORENSON/V3"
98681fdabf79 Support for Quicktime stuff in Matroska (e.g. Sorenson, QDesign Music codecs etc.).
mosu
parents: 10410
diff changeset
63 #define MKV_V_CINEPAK "V_CINEPAK"
98681fdabf79 Support for Quicktime stuff in Matroska (e.g. Sorenson, QDesign Music codecs etc.).
mosu
parents: 10410
diff changeset
64 #define MKV_V_QUICKTIME "V_QUICKTIME"
14054
53ea955d19fa Added support for MPEG-1 and MPEG-2 in Matroska.
mosu
parents: 13129
diff changeset
65 #define MKV_V_MPEG1 "V_MPEG1"
53ea955d19fa Added support for MPEG-1 and MPEG-2 in Matroska.
mosu
parents: 13129
diff changeset
66 #define MKV_V_MPEG2 "V_MPEG2"
19154
2895b9807ff3 Native MPEG4 SP/ASP/AP support in Matroska.
rathann
parents: 18934
diff changeset
67 #define MKV_V_MPEG4_SP "V_MPEG4/ISO/SP"
2895b9807ff3 Native MPEG4 SP/ASP/AP support in Matroska.
rathann
parents: 18934
diff changeset
68 #define MKV_V_MPEG4_ASP "V_MPEG4/ISO/ASP"
2895b9807ff3 Native MPEG4 SP/ASP/AP support in Matroska.
rathann
parents: 18934
diff changeset
69 #define MKV_V_MPEG4_AP "V_MPEG4/ISO/AP"
14458
6e5956958746 Support for AVC in Matroska.
mosu
parents: 14054
diff changeset
70 #define MKV_V_MPEG4_AVC "V_MPEG4/ISO/AVC"
23271
85ad4dd0e439 Support theora in mkv. Sample: http://samples.mplayerhq.hu/Matroska/theora.mkv
reimar
parents: 21038
diff changeset
71 #define MKV_V_THEORA "V_THEORA"
10024
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
72
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
73 #define MKV_S_TEXTASCII "S_TEXT/ASCII"
c6fab860ab18 Added Matroska demuxing support.
mosu
parents:
diff changeset
74 #define MKV_S_TEXTUTF8 "S_TEXT/UTF8"
10845
71db96cf88d4 Support for SSA text subs in Matroska. Patch partially by Tristan <z80@oceanfree.net>.
mosu
parents: 10844
diff changeset
75 #define MKV_S_TEXTSSA "S_TEXT/SSA"
11807
9a81d7b4c0b6 Added the new C based Matroska demuxer by Aurelien Jacobs.
mosu
parents: 11557
diff changeset
76 #define MKV_S_TEXTASS "S_TEXT/ASS"
11153
cb82b062188f Support for VobSub-in-Matroska; parts outside of demux_mkv.cpp.
mosu
parents: 10845
diff changeset
77 #define MKV_S_VOBSUB "S_VOBSUB"
11807
9a81d7b4c0b6 Added the new C based Matroska demuxer by Aurelien Jacobs.
mosu
parents: 11557
diff changeset
78 #define MKV_S_SSA "S_SSA" // Deprecated
9a81d7b4c0b6 Added the new C based Matroska demuxer by Aurelien Jacobs.
mosu
parents: 11557
diff changeset
79 #define MKV_S_ASS "S_ASS" // Deprecated
11153
cb82b062188f Support for VobSub-in-Matroska; parts outside of demux_mkv.cpp.
mosu
parents: 10845
diff changeset
80
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 24805
diff changeset
81 #endif /* MPLAYER_MATROSKA_H */