]> git.sesse.net Git - vlc/blob - modules/gui/wxwindows/streamdata.h
Move streaming data to a separate file (will have to be moved to /include)
[vlc] / modules / gui / wxwindows / streamdata.h
1 /*****************************************************************************
2  * streamdata.h: streaming/transcoding data
3  *****************************************************************************
4  * Copyright (C) 2000-2004 VideoLAN
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 MUX_PS          0
26 #define MUX_TS          1
27 #define MUX_MPEG        2
28 #define MUX_OGG         3
29 #define MUX_RAW         4
30 #define MUX_ASF         5
31 #define MUX_AVI         6
32 #define MUX_MP4         7
33 #define MUX_MOV         8
34
35 /* Muxer / Codecs / Access_out compatibility tables */
36
37
38 struct codec {
39     char *psz_display;
40     char *psz_codec;
41     char *psz_descr;
42     int muxers[9];
43 };
44
45 static struct codec vcodecs_array[] =
46 {
47     { "MPEG-1 Video" , "mp1v" , "MPEG-1 Video codec",
48        {MUX_PS, MUX_TS, MUX_MPEG, MUX_OGG, MUX_AVI, MUX_RAW, -1,-1,-1 } },
49     { "MPEG-2 Video" , "mp2v" , "MPEG-2 Video codec",
50        {MUX_PS, MUX_TS, MUX_MPEG, MUX_OGG, MUX_AVI, MUX_RAW, -1,-1,-1 } },
51     { "MPEG-4 Video" , "mp4v" , "MPEG-4 Video codec",
52        {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_MP4,MUX_OGG,MUX_AVI,MUX_RAW, -1} },
53     { "DIVX 1" ,"DIV1","Divx first version" ,
54        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , MUX_AVI , -1,-1,-1,-1 } },
55     { "DIVX 2" ,"DIV2","Divx second version" ,
56        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , MUX_AVI , -1,-1,-1,-1 } },
57     { "DIVX 3" ,"DIV3","Divx third version" ,
58        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , MUX_AVI , -1,-1,-1,-1 } },
59     { "H 263" , "H263" , "H263 is ..." ,
60        { MUX_TS, MUX_AVI, -1,-1,-1,-1,-1,-1,-1 } },
61     { "I 263", "I263", "I263 is ..." ,
62        { MUX_TS, MUX_AVI, -1,-1,-1,-1,-1,-1,-1 } },
63     { "WMV 1" , "WMV1", "First version of WMV" ,
64        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , MUX_AVI , -1,-1,-1,-1 } },
65     { "WMV 2" , "WMV2", "2 version of WMV" ,
66        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , MUX_AVI , -1,-1,-1,-1 } },
67     { "MJPEG" , "MJPG", "MJPEG consists of a series of JPEG pictures" ,
68        {MUX_TS , MUX_MPEG , MUX_ASF , MUX_OGG , MUX_AVI , -1,-1,-1,-1 } },
69     { "Theora" , "theo", "Experimental free codec",
70        {MUX_TS, -1,-1,-1,-1,-1,-1,-1,-1} },
71     { "Dummy", "dummy", "Dummy codec (do not transcode)" ,
72       {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_MP4,MUX_OGG,MUX_AVI,MUX_RAW,MUX_MOV}},
73     { NULL,NULL,NULL , {-1,-1,-1,-1,-1,-1,-1,-1,-1}} /* Do not remove me */
74 };
75
76 static struct codec acodecs_array[] =
77 {
78     { "MPEG Audio" , "mpga" , "The standard MPEG audio (1/2) format" ,
79        {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_AVI,MUX_RAW, -1,-1} },
80     { "MP3" , "mp3" , "MPEG Audio Layer 3" ,
81        {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_AVI,MUX_RAW, -1,-1} },
82     { "MPEG 4 Audio" , "mp4a" , "Audio format for MPEG4" ,
83        {MUX_TS, MUX_MP4, -1,-1,-1,-1,-1,-1,-1 } },
84     { "A/52" , "a52" , "DVD audio format" ,
85        {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_OGG,MUX_AVI,MUX_RAW, -1,-1} },
86     { "Vorbis" , "vorb" , "This is a free audio codec" ,
87        {MUX_OGG, -1,-1,-1,-1,-1,-1,-1,-1} },
88     { "FLAC" , "flac" , "This is an audio codec" ,
89        {MUX_OGG , MUX_RAW, -1,-1,-1,-1,-1,-1,-1} },
90     { "Speex" , "spx" , "An audio codec dedicated to compression of voice" ,
91        {MUX_OGG, -1,-1,-1,-1,-1,-1,-1,-1} },
92     { "Dummy", "dummy", "Dummy codec (do not transcode)" ,
93      {MUX_PS,MUX_TS,MUX_MPEG,MUX_ASF,MUX_MP4,MUX_OGG,MUX_AVI,MUX_RAW,MUX_MOV}},
94     { NULL,NULL,NULL , {-1,-1,-1,-1,-1,-1,-1,-1,-1}} /* Do not remove me */
95 };
96
97 struct method {
98     char *psz_access;
99     char *psz_method;
100     char *psz_descr;
101     char *psz_address;
102     int   muxers[9];
103 };
104
105 static struct method methods_array[] =
106 {
107     {"udp:","UDP Unicast", "Use this to stream to a single computer",
108      "Enter the address of the computer to stream to",
109      { MUX_TS, -1,-1,-1,-1,-1,-1,-1,-1 } },
110     {"udp:","UDP Multicast",
111      "Use this to stream to a dynamic group of computers on a "
112      "multicast-enabled network. This is the most efficient method "
113      "to stream to several computers, but it does not work over Internet.",
114      "Enter the multicast address to stream to in this field. "
115      "This must be an IP address between 224.0.0.0 an 239.255.255.255 "
116      "For a private use, enter an address beginning with 239.255.",
117      { MUX_TS, -1,-1,-1,-1,-1,-1,-1,-1 } },
118     {"http://","HTTP",
119             "Use this to stream to several computers. This method is "
120      "less efficient, as the server needs to send several times the "
121      "stream.",
122      "Enter the local addresses you want to listen to. Do not enter "
123      "anything if you want to listen to all adresses or if you don't "
124      "understand. This is generally the best thing to do. Other computers "
125      "can then access the stream at http://yourip:8080 by default",
126      { MUX_TS, MUX_PS, MUX_MPEG, MUX_OGG, MUX_RAW, MUX_ASF, -1,-1,-1} },
127     { NULL, NULL,NULL,NULL , {-1,-1,-1,-1,-1,-1,-1,-1,-1}} /* Do not remove me */
128 };
129
130 struct encap {
131     int   id;
132     char *psz_mux;
133     char *psz_encap;
134     char *psz_descr;
135 };
136
137 static struct encap encaps_array[] =
138 {
139     { MUX_PS, "ps","MPEG PS", "MPEG Program Stream" },
140     { MUX_TS, "ts","MPEG TS", "MPEG Transport Stream" },
141     { MUX_MPEG, "ps", "MPEG 1", "MPEG 1 Format" },
142     { MUX_OGG, "ogg", "OGG", "OGG" },
143     { MUX_RAW, "raw", "RAW", "RAW" },
144     { MUX_ASF, "asf","ASF", "ASF" },
145     { MUX_AVI, "avi","AVI", "AVI" },
146     { MUX_MP4, "mp4","MP4", "MPEG4" },
147     { MUX_MOV, "mov","MOV", "MOV" },
148     { -1 , NULL,NULL , NULL } /* Do not remove me */
149 };
150
151
152 /* Bitrates arrays */
153     static const wxString vbitrates_array[] =
154     {
155         wxT("3072"),
156         wxT("2048"),
157         wxT("1024"),
158         wxT("768"),
159         wxT("512"),
160         wxT("384"),
161         wxT("256"),
162         wxT("192"),
163         wxT("128"),
164         wxT("96"),
165         wxT("64"),
166         wxT("32"),
167         wxT("16")
168     };
169     static const wxString abitrates_array[] =
170     {
171         wxT("512"),
172         wxT("256"),
173         wxT("192"),
174         wxT("128"),
175         wxT("96"),
176         wxT("64"),
177         wxT("32"),
178         wxT("16")
179     };
180