2 * Copyright (C) 2006 Benjamin Zores
3 * Stream layer for TV Input, based on previous work from Albeu
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.
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.
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
26 #include "libmpdemux/demuxer.h"
33 tv_param_t stream_tv_defaults
= {
36 "europe-east", //chanlist
44 0, //input, used in v4l and bttv
77 0, //hidden_video_renderer;
78 0, //hidden_vp_renderer;
80 0 //normalize_audio_chunks;
83 #define ST_OFF(f) M_ST_OFF(tv_param_t,f)
84 static const m_option_t stream_opts_fields
[] = {
85 {"hostname", ST_OFF(channel
), CONF_TYPE_STRING
, 0, 0 ,0, NULL
},
86 {"filename", ST_OFF(input
), CONF_TYPE_INT
, 0, 0 ,0, NULL
},
87 { NULL
, NULL
, 0, 0, 0, 0, NULL
}
90 static struct m_struct_st stream_opts
= {
98 tv_stream_close (stream_t
*stream
)
101 m_struct_free(&stream_opts
,stream
->priv
);
105 tv_stream_open (stream_t
*stream
, int mode
, void *opts
, int *file_format
)
108 stream
->type
= STREAMTYPE_TV
;
110 stream
->close
=tv_stream_close
;
111 *file_format
= DEMUXER_TYPE_TV
;
116 const stream_info_t stream_info_tv
= {
119 "Benjamin Zores, Albeu",