Revision 2f5ae7bb chunker_player/chunker_player.c

View differences:

chunker_player/chunker_player.c
30 30
#include <windows.h>
31 31
#endif
32 32

  
33
static char *audio_codec = "mp2";
34
static char *video_codec = "mpeg4";
35

  
33 36
int ReadALine(FILE* fp, char* Output, int MaxOutputSize)
34 37
{
35 38
    int i=0;
......
96 99
    "\t[-c ChannelName]: channel name (from channels.conf)\n"
97 100
    "\t[-p port]: player http port\n\n"
98 101
    "Other options:\n"
102
    "\t[-A audiocodec]\n"
103
    "\t[-V videocodec]\n"
99 104
    "\t[-t]: log traces (WARNING: old traces will be deleted).\n"
100 105
    "\t[-s mode]: silent mode (no GUI) (mode=1 audio ON, mode=2 audio OFF, mode=3 audio OFF; P2P OFF).\n\n"
101 106
    "=======================================================\n", argv[0]
......
149 154
	int mandatories = 0;
150 155
	
151 156
	char c;
152
	while ((c = getopt (argc, argv, "q:c:p:s:t")) != -1)
157
	while ((c = getopt (argc, argv, "q:c:p:A:V:s:t")) != -1)
153 158
	{
154 159
		switch (c) {
155 160
			case 0: //for long options
......
171 176
#endif
172 177
				mandatories++;
173 178
				break;
179
			case 'A':
180
				audio_codec = strdup(optarg);
181
				break;
182
			case 'V':
183
				video_codec = strdup(optarg);
184
				break;
174 185
			case 's':
175 186
				sscanf(optarg, "%d", &SilentMode);
176 187
				break;
......
583 594
	ChunkerPlayerCore_SetupOverlay(w, h);
584 595
	//ChunkerPlayerGUI_SetupOverlayRect(channel);
585 596
	
586
	if(ChunkerPlayerCore_InitCodecs(channel->Width, channel->Height, channel->SampleRate, channel->AudioChannels) < 0)
597
	if(ChunkerPlayerCore_InitCodecs(video_codec, channel->Width, channel->Height, audio_codec, channel->SampleRate, channel->AudioChannels) < 0)
587 598
	{
588 599
		printf("ERROR, COULD NOT INITIALIZE CODECS\n");
589 600
		exit(2);

Also available in: Unified diff