annotate stream/frequencies.h @ 27518:e54c9b7eb0d8

Revert bad changes to SSA/ASS subtitle packet format The following commits are reverted partially or completely: "a valid ASS line contains 9 ',' before actual text" "demux_mkv: output correctly formated ASS packets" "libass: add a new ass_process_data() to process demuxed subtitle packets" These commits converted the internal representation of SSA/ASS subtitle packets from the format used by Matroska to a custom format where each packet has contents exactly matching one line in complete SSA script files. AFAIK no files natively use such a format for muxed subtitles. The stated reason for this change was to use a format that could in principle be muxed into a maximal number of containers. SSA subtitles do not have an implicit duration so both start time and duration or end time need to be specified explicitly; the new format moved timing information inside the codec packet data so it could be muxed without modification into containers that can represent only start time at the container level. However such a change is wrong from the viewpoint of program architecture. Timing information belongs to the demuxer level, but these commits moved not only the duration but also the authoritative value of the start time to inside the codec data. Additionally the new format lost the value of the Matroska ReadOrder field which is used by MPlayer. This commit changes the internal packet format back to that used by Matroska and makes the internal Matroska demuxer output that format again. Libavformat still outputs the "new" format; it could be converted back to the Matroska format in demux_lavf.c, but I'm not adding that code at least yet. The current lavf code has similar problems as the reverted code in MPlayer, and it also currently fails to provide any way to access the value of the ReadOrder field. I hope that the lavf side will be improved; if it isn't conversion can be added later. For now I'll make MPlayer default to the internal Matroska demuxer instead of the lavf one in a separate commit.
author uau
date Mon, 08 Sep 2008 21:26:22 +0000
parents 4129c8cfa742
children 0f1b5b68af32
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2933
17651509aced tv frequencies
alex
parents:
diff changeset
1 /*
17651509aced tv frequencies
alex
parents:
diff changeset
2 * Worldwide channel/frequency list
17651509aced tv frequencies
alex
parents:
diff changeset
3 *
17651509aced tv frequencies
alex
parents:
diff changeset
4 * Nathan Laredo (laredo@broked.net)
17651509aced tv frequencies
alex
parents:
diff changeset
5 *
17651509aced tv frequencies
alex
parents:
diff changeset
6 * Frequencies are given in kHz
17651509aced tv frequencies
alex
parents:
diff changeset
7 */
25553
6ac1ece1f9fe Add multiple inclusion guards to all header files that lack them.
diego
parents: 19271
diff changeset
8
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
9 #ifndef MPLAYER_FREQUENCIES_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
10 #define MPLAYER_FREQUENCIES_H
25553
6ac1ece1f9fe Add multiple inclusion guards to all header files that lack them.
diego
parents: 19271
diff changeset
11
2933
17651509aced tv frequencies
alex
parents:
diff changeset
12 #define NTSC_AUDIO_CARRIER 4500
17651509aced tv frequencies
alex
parents:
diff changeset
13 #define PAL_AUDIO_CARRIER_I 6000
17651509aced tv frequencies
alex
parents:
diff changeset
14 #define PAL_AUDIO_CARRIER_BGHN 5500
17651509aced tv frequencies
alex
parents:
diff changeset
15 #define PAL_AUDIO_CARRIER_MN 4500
17651509aced tv frequencies
alex
parents:
diff changeset
16 #define PAL_AUDIO_CARRIER_D 6500
17651509aced tv frequencies
alex
parents:
diff changeset
17 #define SEACAM_AUDIO_DKK1L 6500
17651509aced tv frequencies
alex
parents:
diff changeset
18 #define SEACAM_AUDIO_BG 5500
17651509aced tv frequencies
alex
parents:
diff changeset
19 /* NICAM 728 32-kHz, 14-bit digital stereo audio is transmitted in 1ms frames
17651509aced tv frequencies
alex
parents:
diff changeset
20 containing 8 bits frame sync, 5 bits control, 11 bits additional data, and
17651509aced tv frequencies
alex
parents:
diff changeset
21 704 bits audio data. The bit rate is reduced by transmitting only 10 bits
17651509aced tv frequencies
alex
parents:
diff changeset
22 plus parity of each 14 bit sample, the largest sample in a frame determines
17651509aced tv frequencies
alex
parents:
diff changeset
23 which 10 bits are transmitted. The parity bits for audio samples also
17651509aced tv frequencies
alex
parents:
diff changeset
24 specify the scaling factor used for that channel during that frame. The
17651509aced tv frequencies
alex
parents:
diff changeset
25 companeded audio data is interleaved to reduce the influence of dropouts
17651509aced tv frequencies
alex
parents:
diff changeset
26 and the whole frame except for sync bits is scrambled for spectrum shaping.
17651509aced tv frequencies
alex
parents:
diff changeset
27 Data is modulated using QPSK, at below following subcarrier freqs */
17651509aced tv frequencies
alex
parents:
diff changeset
28 #define NICAM728_PAL_BGH 5850
17651509aced tv frequencies
alex
parents:
diff changeset
29 #define NICAM728_PAL_I 6552
17651509aced tv frequencies
alex
parents:
diff changeset
30
17651509aced tv frequencies
alex
parents:
diff changeset
31 /* COMPREHENSIVE LIST OF FORMAT BY COUNTRY
17651509aced tv frequencies
alex
parents:
diff changeset
32 (M) NTSC used in:
17651509aced tv frequencies
alex
parents:
diff changeset
33 Antigua, Aruba, Bahamas, Barbados, Belize, Bermuda, Bolivia, Burma,
17651509aced tv frequencies
alex
parents:
diff changeset
34 Canada, Chile, Colombia, Costa Rica, Cuba, Curacao, Dominican Republic,
17651509aced tv frequencies
alex
parents:
diff changeset
35 Ecuador, El Salvador, Guam Guatemala, Honduras, Jamaica, Japan,
17651509aced tv frequencies
alex
parents:
diff changeset
36 South Korea, Mexico, Montserrat, Myanmar, Nicaragua, Panama, Peru,
17651509aced tv frequencies
alex
parents:
diff changeset
37 Philippines, Puerto Rico, St Christopher and Nevis, Samoa, Suriname,
17651509aced tv frequencies
alex
parents:
diff changeset
38 Taiwan, Trinidad/Tobago, United States, Venezuela, Virgin Islands
17651509aced tv frequencies
alex
parents:
diff changeset
39 (B) PAL used in:
17651509aced tv frequencies
alex
parents:
diff changeset
40 Albania, Algeria, Australia, Austria, Bahrain, Bangladesh, Belgium,
17651509aced tv frequencies
alex
parents:
diff changeset
41 Bosnia-Herzegovinia, Brunei Darussalam, Cambodia, Cameroon, Croatia,
17651509aced tv frequencies
alex
parents:
diff changeset
42 Cyprus, Denmark, Egypt, Ethiopia, Equatorial Guinea, Finland, Germany,
17651509aced tv frequencies
alex
parents:
diff changeset
43 Ghana, Gibraltar, Greenland, Iceland, India, Indonesia, Israel, Italy,
17651509aced tv frequencies
alex
parents:
diff changeset
44 Jordan, Kenya, Kuwait, Liberia, Libya, Luxembourg, Malaysa, Maldives,
17651509aced tv frequencies
alex
parents:
diff changeset
45 Malta, Nepal, Netherlands, New Zeland, Nigeria, Norway, Oman, Pakistan,
17651509aced tv frequencies
alex
parents:
diff changeset
46 Papua New Guinea, Portugal, Qatar, Sao Tome and Principe, Saudi Arabia,
17651509aced tv frequencies
alex
parents:
diff changeset
47 Seychelles, Sierra Leone, Singapore, Slovenia, Somali, Spain,
17651509aced tv frequencies
alex
parents:
diff changeset
48 Sri Lanka, Sudan, Swaziland, Sweden, Switzeland, Syria, Thailand,
17651509aced tv frequencies
alex
parents:
diff changeset
49 Tunisia, Turkey, Uganda, United Arab Emirates, Yemen
17651509aced tv frequencies
alex
parents:
diff changeset
50 (N) PAL used in: (Combination N = 4.5MHz audio carrier, 3.58MHz burst)
17651509aced tv frequencies
alex
parents:
diff changeset
51 Argentina (Combination N), Paraguay, Uruguay
17651509aced tv frequencies
alex
parents:
diff changeset
52 (M) PAL (525/60, 3.57MHz burst) used in:
17651509aced tv frequencies
alex
parents:
diff changeset
53 Brazil
17651509aced tv frequencies
alex
parents:
diff changeset
54 (G) PAL used in:
17651509aced tv frequencies
alex
parents:
diff changeset
55 Albania, Algeria, Austria, Bahrain, Bosnia/Herzegovinia, Cambodia,
17651509aced tv frequencies
alex
parents:
diff changeset
56 Cameroon, Croatia, Cyprus, Denmark, Egypt, Ethiopia, Equatorial Guinea,
17651509aced tv frequencies
alex
parents:
diff changeset
57 Finland, Germany, Gibraltar, Greenland, Iceland, Israel, Italy, Jordan,
17651509aced tv frequencies
alex
parents:
diff changeset
58 Kenya, Kuwait, Liberia, Libya, Luxembourg, Malaysia, Monaco,
17651509aced tv frequencies
alex
parents:
diff changeset
59 Mozambique, Netherlands, New Zealand, Norway, Oman, Pakistan,
17651509aced tv frequencies
alex
parents:
diff changeset
60 Papa New Guinea, Portugal, Qatar, Romania, Sierra Leone, Singapore,
17651509aced tv frequencies
alex
parents:
diff changeset
61 Slovenia, Somalia, Spain, Sri Lanka, Sudan, Swaziland, Sweeden,
17651509aced tv frequencies
alex
parents:
diff changeset
62 Switzerland, Syria, Thailand, Tunisia, Turkey, United Arab Emirates,
17651509aced tv frequencies
alex
parents:
diff changeset
63 Yemen, Zambia, Zimbabwe
17651509aced tv frequencies
alex
parents:
diff changeset
64 (D) PAL used in:
17651509aced tv frequencies
alex
parents:
diff changeset
65 China, North Korea, Romania, Czech Republic
17651509aced tv frequencies
alex
parents:
diff changeset
66 (H) PAL used in:
17651509aced tv frequencies
alex
parents:
diff changeset
67 Belgium
17651509aced tv frequencies
alex
parents:
diff changeset
68 (I) PAL used in:
17651509aced tv frequencies
alex
parents:
diff changeset
69 Angola, Botswana, Gambia, Guinea-Bissau, Hong Kong, Ireland, Lesotho,
17651509aced tv frequencies
alex
parents:
diff changeset
70 Malawi, Nambia, Nigeria, South Africa, Tanzania, United Kingdom,
17651509aced tv frequencies
alex
parents:
diff changeset
71 Zanzibar
17651509aced tv frequencies
alex
parents:
diff changeset
72 (B) SECAM used in:
17651509aced tv frequencies
alex
parents:
diff changeset
73 Djibouti, Greece, Iran, Iraq, Lebanon, Mali, Mauritania, Mauritus,
17651509aced tv frequencies
alex
parents:
diff changeset
74 Morocco
17651509aced tv frequencies
alex
parents:
diff changeset
75 (D) SECAM used in:
17651509aced tv frequencies
alex
parents:
diff changeset
76 Afghanistan, Armenia, Azerbaijan, Belarus, Bulgaria,
17651509aced tv frequencies
alex
parents:
diff changeset
77 Estonia, Georgia, Hungary, Zazakhstan, Lithuania, Mongolia, Moldova,
17651509aced tv frequencies
alex
parents:
diff changeset
78 Russia, Slovak Republic, Ukraine, Vietnam
17651509aced tv frequencies
alex
parents:
diff changeset
79 (G) SECAM used in:
17651509aced tv frequencies
alex
parents:
diff changeset
80 Greecem Iran, Iraq, Mali, Mauritus, Morocco, Saudi Arabia
17651509aced tv frequencies
alex
parents:
diff changeset
81 (K) SECAM used in:
17651509aced tv frequencies
alex
parents:
diff changeset
82 Armenia, Azerbaijan, Bulgaria, Estonia, Georgia,
17651509aced tv frequencies
alex
parents:
diff changeset
83 Hungary, Kazakhstan, Lithuania, Madagascar, Moldova, Poland, Russia,
17651509aced tv frequencies
alex
parents:
diff changeset
84 Slovak Republic, Ukraine, Vietnam
17651509aced tv frequencies
alex
parents:
diff changeset
85 (K1) SECAM used in:
17651509aced tv frequencies
alex
parents:
diff changeset
86 Benin, Burkina Faso, Burundi, Chad, Cape Verde, Central African
17651509aced tv frequencies
alex
parents:
diff changeset
87 Republic, Comoros, Congo, Gabon, Madagascar, Niger, Rwanda, Senegal,
17651509aced tv frequencies
alex
parents:
diff changeset
88 Togo, Zaire
17651509aced tv frequencies
alex
parents:
diff changeset
89 (L) SECAM used in:
17651509aced tv frequencies
alex
parents:
diff changeset
90 France
17651509aced tv frequencies
alex
parents:
diff changeset
91 */
17651509aced tv frequencies
alex
parents:
diff changeset
92
17651509aced tv frequencies
alex
parents:
diff changeset
93 /* --------------------------------------------------------------------- */
17651509aced tv frequencies
alex
parents:
diff changeset
94
17651509aced tv frequencies
alex
parents:
diff changeset
95 struct CHANLIST {
18032
de6740c3ab2a 10l: huge amount of constant crap in data segment
rfelker
parents: 15472
diff changeset
96 char name[8];
2933
17651509aced tv frequencies
alex
parents:
diff changeset
97 int freq;
17651509aced tv frequencies
alex
parents:
diff changeset
98 };
17651509aced tv frequencies
alex
parents:
diff changeset
99
17651509aced tv frequencies
alex
parents:
diff changeset
100 struct CHANLISTS {
19110
08888397444e marks several strings inside structs as const when they hold just
reynaldo
parents: 18513
diff changeset
101 const char *name;
18032
de6740c3ab2a 10l: huge amount of constant crap in data segment
rfelker
parents: 15472
diff changeset
102 const struct CHANLIST *list;
de6740c3ab2a 10l: huge amount of constant crap in data segment
rfelker
parents: 15472
diff changeset
103 int count;
2933
17651509aced tv frequencies
alex
parents:
diff changeset
104 };
17651509aced tv frequencies
alex
parents:
diff changeset
105
17651509aced tv frequencies
alex
parents:
diff changeset
106 #define CHAN_COUNT(x) (sizeof(x)/sizeof(struct CHANLIST))
17651509aced tv frequencies
alex
parents:
diff changeset
107
17651509aced tv frequencies
alex
parents:
diff changeset
108 /* --------------------------------------------------------------------- */
17651509aced tv frequencies
alex
parents:
diff changeset
109
18032
de6740c3ab2a 10l: huge amount of constant crap in data segment
rfelker
parents: 15472
diff changeset
110 extern const struct CHANLISTS chanlists[];
15472
b40d7c9a6ace comment out useless/nonexistent variable breaking compile on gcc4
rfelker
parents: 2933
diff changeset
111 //extern struct STRTAB chanlist_names[];
2933
17651509aced tv frequencies
alex
parents:
diff changeset
112
17651509aced tv frequencies
alex
parents:
diff changeset
113 extern int chantab;
18513
rathann
parents: 18032
diff changeset
114 extern const struct CHANLIST *chanlist;
2933
17651509aced tv frequencies
alex
parents:
diff changeset
115 extern int chancount;
25553
6ac1ece1f9fe Add multiple inclusion guards to all header files that lack them.
diego
parents: 19271
diff changeset
116
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25553
diff changeset
117 #endif /* MPLAYER_FREQUENCIES_H */