]> git.sesse.net Git - vlc/blob - modules/gui/wxwindows/streamdata.h
OSX:
[vlc] / modules / gui / wxwindows / streamdata.h
1 /*****************************************************************************
2  * streamdata.h: streaming/transcoding data
3  *****************************************************************************
4  * Copyright (C) 2000-2004 the VideoLAN team
5  * $Id: wizard.cpp 7826 2004-05-30 14:43:12Z zorglub $
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24
25 #define MUXERS_NUMBER 9
26
27 // Do not count dummy here !
28 #define VCODECS_NUMBER 12
29 #define ACODECS_NUMBER 9
30
31 #define MUX_PS          0
32 #define MUX_TS          1
33 #define MUX_MPEG        2
34 #define MUX_OGG         3
35 #define MUX_RAW         4
36 #define MUX_ASF         5
37 #define MUX_AVI         6
38 #define MUX_MP4         7
39 #define MUX_MOV         8
40 #define MUX_WAV         9
41
42 /* Muxer / Codecs / Access_out compatibility tables */
43
44
45 struct codec {
46     char *psz_display;
47     char *psz_codec;
48     char *psz_descr;
49     int muxers[MUXERS_NUMBER];
50 };
51
52 static struct codec vcodecs_array[] =
53 {
54     { "MPEG-1 Video" , "mp1v" , N_("MPEG-1 Video codec"),
55 //       {MUX_PS, MUX_TS, MUX_MPEG, MUX_OGG, MUX_AVI, MUX_RAW, -1,-1,-1 } },
56        {MUX_PS, MUX_TS, MUX_MPEG, MUX_OGG, MUX_RAW, -1,-1,-1,-1 } },
57     { "MPEG-2 Video" , "mp2v" , N_("MPEG-2 Video codec"),
58 //       {MUX_PS, MUX_TS, MUX_MPEG, MUX_OGG, MUX_AVI, MUX_RAW, -1,-1,-1 } },
59        {MUX_PS, MUX_TS, MUX_MPEG, MUX_OGG, MUX_RAW, -1,-1,-1,-1 } },
60     { "MPEG-4 Video" , "mp4v" , N_("MPEG-4 Video codec"),
61 //       {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_MP4,MUX_OGG,MUX_AVI,MUX_RAW, -1} },
62        {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_MP4,MUX_OGG,MUX_RAW, -1,-1} },
63     { "DIVX 1" ,"DIV1",N_("DivX first version") ,
64 //       {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , MUX_AVI , -1,-1,-1,-1 } },
65        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , -1 , -1,-1,-1,-1 } },
66     { "DIVX 2" ,"DIV2",N_("DivX second version") ,
67        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , -1 , -1,-1,-1,-1 } },
68     { "DIVX 3" ,"DIV3",N_("DivX third version") ,
69        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , -1 , -1,-1,-1,-1 } },
70     { "H 263" , "H263" , N_("H263 is a video codec optimized for videoconference (low rates)") ,
71        { MUX_TS, MUX_AVI, -1,-1,-1,-1,-1,-1,-1 } },
72     { "H 264" , "H264" , N_("H264 is a new video codec") ,
73        { MUX_TS, MUX_AVI, -1,-1,-1,-1,-1,-1,-1 } },
74     { "WMV 1" , "WMV1", N_("WMV (Windows Media Video) 1") ,
75        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , -1 , -1,-1,-1,-1 } },
76     { "WMV 2" , "WMV2", N_("WMV (Windows Media Video) 2") ,
77        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , -1 , -1,-1,-1,-1 } },
78     { "MJPEG" , "MJPG", N_("MJPEG consists of a series of JPEG pictures") ,
79        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , -1 , -1,-1,-1,-1 } },
80     { "Theora" , "theo", N_("Theora is a free general-purpose codec"),
81        {MUX_TS, -1,-1,-1,-1,-1,-1,-1,-1} },
82     { "Dummy", "dummy", N_("Dummy codec (do not transcode)") ,
83       {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_MP4,MUX_OGG,MUX_WAV,MUX_RAW,MUX_MOV}},
84     { NULL,NULL,NULL , {-1,-1,-1,-1,-1,-1,-1,-1,-1}} /* Do not remove me */
85 };
86
87 static struct codec acodecs_array[] =
88 {
89     { "MPEG Audio" , "mpga" , N_("The standard MPEG audio (1/2) format") ,
90 //       {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_AVI,MUX_RAW, -1,-1} },
91        {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_RAW, -1,-1,-1} },
92     { "MP3" , "mp3" , N_("MPEG Audio Layer 3") ,
93 //       {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_AVI,MUX_RAW, -1,-1} },
94        {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_RAW, -1,-1, -1} },
95     { "MPEG 4 Audio" , "mp4a" , N_("Audio format for MPEG4") ,
96        {MUX_TS, MUX_MP4, -1,-1,-1,-1,-1,-1,-1 } },
97     { "A/52" , "a52" , N_("DVD audio format") ,
98 //       {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_AVI,MUX_RAW, -1,-1} },
99        {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_RAW, -1,-1,-1} },
100     { "Vorbis" , "vorb" , N_("Vorbis is a free audio codec") ,
101        {MUX_OGG, -1,-1,-1,-1,-1,-1,-1,-1} },
102     { "FLAC" , "flac" , N_("FLAC is a lossless audio codec") ,
103        {MUX_OGG , MUX_RAW, -1,-1,-1,-1,-1,-1,-1} },
104     { "Speex" , "spx" , N_("A free audio codec dedicated to compression of voice") ,
105        {MUX_OGG, -1,-1,-1,-1,-1,-1,-1,-1} },
106     { "Uncompressed, integer" , "s16l" , N_("Uncompressed audio samples"),
107        {MUX_WAV, -1,-1,-1,-1,-1,-1,-1,-1} },
108     { "Uncompressed, floating" , "fl32" , N_("Uncompressed audio samples"),
109        {MUX_WAV, -1,-1,-1,-1,-1,-1,-1,-1} },
110     { "Dummy", "dummy", N_("Dummy codec (do not transcode)") ,
111 //     {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_MP4,MUX_OGG,MUX_AVI,MUX_RAW,MUX_MOV}},
112      {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_MP4,MUX_OGG,MUX_RAW,MUX_MOV,MUX_WAV}},
113     { NULL,NULL,NULL , {-1,-1,-1,-1,-1,-1,-1,-1,-1}} /* Do not remove me */
114 };
115
116 struct method {
117     char *psz_access;
118     char *psz_method;
119     char *psz_descr;
120     char *psz_address;
121     int   muxers[MUXERS_NUMBER];
122 };
123
124 static struct method methods_array[] =
125 {
126     {"udp:",N_("UDP Unicast"), N_("Use this to stream to a single computer."),
127      N_("Enter the address of the computer to stream to."),
128      { MUX_TS, -1,-1,-1,-1,-1,-1,-1,-1 } },
129     {"udp:",N_("UDP Multicast"),
130      N_("Use this to stream to a dynamic group of computers on a "
131      "multicast-enabled network. This is the most efficient method "
132      "to stream to several computers, but it does not work over Internet."),
133      N_("Enter the multicast address to stream to in this field. "
134      "This must be an IP address between 224.0.0.0 an 239.255.255.255. "
135      "For a private use, enter an address beginning with 239.255."),
136      { MUX_TS, -1,-1,-1,-1,-1,-1,-1,-1 } },
137     {"http://","HTTP",
138      N_("Use this to stream to several computers. This method is "
139      "less efficient, as the server needs to send the "
140      "stream several times."),
141      N_("Enter the local addresses you want to listen to. Do not enter "
142      "anything if you want to listen to all adresses or if you don't "
143      "understand. This is generally the best thing to do. Other computers "
144      "can then access the stream at http://yourip:8080 by default."),
145      { MUX_TS, MUX_PS, MUX_MPEG, MUX_OGG, MUX_RAW, MUX_ASF, -1,-1,-1} },
146     { NULL, NULL,NULL,NULL , {-1,-1,-1,-1,-1,-1,-1,-1,-1}} /* Do not remove me */
147 };
148
149 struct encap {
150     int   id;
151     char *psz_mux;
152     char *psz_encap;
153     char *psz_descr;
154 };
155
156 static struct encap encaps_array[] =
157 {
158     { MUX_PS, "ps","MPEG PS", N_("MPEG Program Stream") },
159     { MUX_TS, "ts","MPEG TS", N_("MPEG Transport Stream") },
160     { MUX_MPEG, "ps", "MPEG 1", N_("MPEG 1 Format") },
161     { MUX_OGG, "ogg", "OGG", "OGG" },
162     { MUX_RAW, "raw", "RAW", "RAW" },
163     { MUX_ASF, "asf","ASF", "ASF" },
164 //    { MUX_AVI, "avi","AVI", "AVI" },
165     { MUX_MP4, "mp4","MP4", "MPEG4" },
166     { MUX_MOV, "mov","MOV", "MOV" },
167     { MUX_WAV, "wav","WAV", "WAV" },
168     { -1 , NULL,NULL , NULL } /* Do not remove me */
169 };
170
171
172 /* Bitrates arrays */
173     static const wxString vbitrates_array[] =
174     {
175         wxT("3072"),
176         wxT("2048"),
177         wxT("1024"),
178         wxT("768"),
179         wxT("512"),
180         wxT("384"),
181         wxT("256"),
182         wxT("192"),
183         wxT("128"),
184         wxT("96"),
185         wxT("64"),
186         wxT("32"),
187         wxT("16")
188     };
189     static const wxString abitrates_array[] =
190     {
191         wxT("512"),
192         wxT("256"),
193         wxT("192"),
194         wxT("128"),
195         wxT("96"),
196         wxT("64"),
197         wxT("32"),
198         wxT("16")
199     };
200