comparison stream/stream_tv.c @ 19273:11ec1cb3a7ea

add an explicit tv stream input instead of the previous hack in stream_null
author ben
date Mon, 31 Jul 2006 18:36:29 +0000
parents
children f6316aa3a7f2
comparison
equal deleted inserted replaced
19272:e53b30cd047f 19273:11ec1cb3a7ea
1 /*
2 * Copyright (C) 2006 Benjamin Zores
3 * Stream layer for TV Input, based on previous work from Albeu
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #include "config.h"
21
22 #include <stdlib.h>
23 #include <string.h>
24
25 #include "stream.h"
26 #include "demuxer.h"
27
28 static int
29 tv_stream_open (stream_t *stream, int mode, void *opts, int *file_format)
30 {
31 extern char* tv_param_channel;
32
33 *file_format = DEMUXER_TYPE_TV;
34 if (strlen (stream->url) > 5 && stream->url[5] != '\0')
35 tv_param_channel = strdup (stream->url + 5);
36
37 return STREAM_OK;
38 }
39
40 stream_info_t stream_info_tv = {
41 "TV Input",
42 "tv",
43 "Benjamin Zores, Albeu",
44 "",
45 tv_stream_open,
46 { "tv", NULL },
47 NULL,
48 1
49 };