Mercurial > mplayer.hg
annotate stream/stream_tv.c @ 22255:5f1bf0a7ed42
Remove remnants of the nonfunctional "grab_frames" command.
The command has been a no-op for years.
author | uau |
---|---|
date | Mon, 19 Feb 2007 06:20:47 +0000 |
parents | ab8d6b6deb63 |
children | 568e9190f631 |
rev | line source |
---|---|
19273
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
1 /* |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
2 * Copyright (C) 2006 Benjamin Zores |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
3 * Stream layer for TV Input, based on previous work from Albeu |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
4 * |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
6 * it under the terms of the GNU General Public License as published by |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
7 * the Free Software Foundation; either version 2 of the License, or |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
8 * (at your option) any later version. |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
9 * |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
10 * This program is distributed in the hope that it will be useful, |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
13 * GNU General Public License for more details. |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
14 * |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
16 * along with this program; if not, write to the Free Software Foundation, |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
18 */ |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
19 |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
20 #include "config.h" |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
21 |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
22 #include <stdlib.h> |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
23 #include <string.h> |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
24 |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
25 #include "stream.h" |
19312
ab8d6b6deb63
proper inclusion of demuxer.h (including libmpdemux in Makefile only was to make previous split easier)
ben
parents:
19295
diff
changeset
|
26 #include "libmpdemux/demuxer.h" |
19273
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
27 |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
28 static int |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
29 tv_stream_open (stream_t *stream, int mode, void *opts, int *file_format) |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
30 { |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
31 extern char* tv_param_channel; |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
32 |
19295
f6316aa3a7f2
conversion from stream_null to stream_tv was missing stream type
ben
parents:
19273
diff
changeset
|
33 stream->type = STREAMTYPE_TV; |
19273
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
34 *file_format = DEMUXER_TYPE_TV; |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
35 if (strlen (stream->url) > 5 && stream->url[5] != '\0') |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
36 tv_param_channel = strdup (stream->url + 5); |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
37 |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
38 return STREAM_OK; |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
39 } |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
40 |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
41 stream_info_t stream_info_tv = { |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
42 "TV Input", |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
43 "tv", |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
44 "Benjamin Zores, Albeu", |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
45 "", |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
46 tv_stream_open, |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
47 { "tv", NULL }, |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
48 NULL, |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
49 1 |
11ec1cb3a7ea
add an explicit tv stream input instead of the previous hack in stream_null
ben
parents:
diff
changeset
|
50 }; |