ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/StableTV/bin/stabletvd
Revision: 1.2
Committed: Tue Nov 1 17:58:57 2005 UTC (20 years, 11 months ago) by root
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +35 -0 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/opt/bin/perl
2
3 use Fcntl ();
4 use Event;
5 use PApp::SQL;
6
7 use StableTV;
8
9 use StableTV::Source::V4L2;
10 use StableTV::Source::IVTV;
11 use StableTV::Source::DVB;
12
13 our $CFG;
14
15 use YAML;
16
17 $StableTV::CFG = YAML::LoadFile "/etc/stabletv.cfg";
18
19 $StableTV::CFG->{ivtvctl} ||= "ivtvctl";
20
21 $DATABASE = "DBI:mysql:mythconverg;mysql_read_default_file=/root/.my.cnf";
22
23 $PApp::SQL::DBH = PApp::SQL::connect_cached undef, $DATABASE
24 or die "$DATABASE: $DBI::ERRSTR\n";
25
26 for (values %{ $StableTV::CFG->{source} }) {
27 my $class = "StableTV::Source::$_->{type}";
28
29 eval "require $class" or die "$class: $@";
30 push @sources, $class->new (%$_);
31 }
32
33 for (@sources) {
34 $_->start ("scan");
35 }
36
37 Event::loop;
38