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
46 0, //input, used in v4l and bttv
54 #if defined(HAVE_TV_V4L)
66 #if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X)
80 #define ST_OFF(f) M_ST_OFF(tv_param_t,f)
81 static m_option_t stream_opts_fields
[] = {
82 {"hostname", ST_OFF(channel
), CONF_TYPE_STRING
, 0, 0 ,0, NULL
},
83 {"filename", ST_OFF(input
), CONF_TYPE_INT
, 0, 0 ,0, NULL
},
84 { NULL
, NULL
, 0, 0, 0, 0, NULL
}
87 static struct m_struct_st stream_opts
= {
95 tv_stream_close (stream_t
*stream
)
98 m_struct_free(&stream_opts
,stream
->priv
);
102 tv_stream_open (stream_t
*stream
, int mode
, void *opts
, int *file_format
)
105 stream
->type
= STREAMTYPE_TV
;
107 stream
->close
=tv_stream_close
;
108 *file_format
= DEMUXER_TYPE_TV
;
113 stream_info_t stream_info_tv
= {
116 "Benjamin Zores, Albeu",