~ubuntu-branches/ubuntu/precise/mythexport/precise

« back to all changes in this revision

Viewing changes to usr/share/mythtv/mythexport/setup_details.cgi

  • Committer: Bazaar Package Importer
  • Author(s): John Baab
  • Date: 2010-08-13 01:53:54 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20100813015354-h2w1q6caq1mlv5vo
Tags: 2.2.0-0ubuntu1
* FFe (LP: #617570).
* Added HTML5 streaming page to web interface.
* New device config method. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl
2
 
 
3
 
use strict;
4
 
use CGI qw(:standard);
5
 
use HTML::Template;
6
 
#use Config::Simple; 
7
 
 
8
 
require includes;
9
 
 
10
 
my $device = param("device");
11
 
 
12
 
my $content = "<div id=\"corner\">
13
 
If you don't know what values to use, the following are a good starting point for most devices:<br /><br />
14
 
codec=mpeg4<br />
15
 
sizeY=240<br />
16
 
sizeX=320<br />
17
 
aspect=4:3<br />
18
 
audioBR=192kb<br />
19
 
videoBR=600kb
20
 
</div> 
21
 
<form action=\"save_setup.cgi\" method=\"post\"><p>
22
 
<input type=\"hidden\" id=\"device\" name=\"device\" value=\"$device\" />
23
 
Title: <input type=\"text\" id=\"title\" name=\"title\" value=\"\" />&nbsp;<span class=\"red\">*</span><br />";
24
 
 
25
 
my $template = HTML::Template->new(filename => 'template/template.tmpl');
26
 
 
27
 
if($device eq "custom"){
28
 
        $content .= "FFmpeg Arguments: ffmpeg -i &lt;input file&gt;&nbsp;<input type=\"text\" id=\"args\" name=\"args\" value=\"\" />&nbsp;<span class=\"red\">*</span>&nbsp;&lt;output file&gt;<br />
29
 
        File Extension: <input type=\"text\" id=\"extension\" name=\"extension\" value=\"\" /><br />";
30
 
}
31
 
elsif($device eq "mp3"){
32
 
        $content .= "Audio Bitrate: <input type=\"text\" id=\"audioBR\" name=\"audioBR\" value=\"\" />&nbsp;<span class=\"red\">*</span><br />";
33
 
}
34
 
elsif($device eq "symlink"){
35
 
        $content .= "Symlinks will be created and linked to your original recordings.";
36
 
}
37
 
else{
38
 
        $content .= "Codec: <select id=\"codec\" name=\"codec\">
39
 
        <option value=\"mpeg4\">mpeg4</option>
40
 
        <option value=\"xvid\">xvid</option>
41
 
        <option value=\"h264\">h.264</option>
42
 
        </select>&nbsp;<span class=\"red\">*</span><br />
43
 
        Size: <input type=\"text\" id=\"sizeX\" name=\"sizeX\" value=\"\" />&nbsp;<span class=\"red\">*</span>&nbsp;X&nbsp;
44
 
        <input type=\"text\" id=\"sizeY\" name=\"sizeY\" value=\"\" />&nbsp;<span class=\"red\">*</span><br />
45
 
        Aspect: <input type=\"text\" id=\"aspect\" name=\"aspect\" value=\"\" />&nbsp;<span class=\"red\">*</span><br />
46
 
        Audio Bitrate: <input type=\"text\" id=\"audioBR\" name=\"audioBR\" value=\"\" />&nbsp;<span class=\"red\">*</span><br />
47
 
        Video Bitrate: <input type=\"text\" id=\"videoBR\" name=\"videoBR\" value=\"\" />&nbsp;<span class=\"red\">*</span><br />
48
 
        Delete Period: <input type=\"text\" id=\"deletePeriod\" name=\"deletePeriod\" value=\"\" /><br />
49
 
        Podcast Name: <input type=\"text\" id=\"podcastName\" name=\"podcastName\" value=\"\" /><br />
50
 
        Deinterlace: <input type=\"checkbox\" id=\"deinterlace\" name=\"deinterlace\" value=\"1\" /><br />
51
 
        Remove Commercials: <input type=\"checkbox\" id=\"removeCommercials\" name=\"removeCommercials\" value=\"1\" /><br />
52
 
        <br /><br />
53
 
        - Addition Tweaks -<br /><br />
54
 
        Audio Channels: <input type=\"text\" id=\"audioChannels\" name=\"audioChannels\" value=\"\" />&nbsp;* May help with dvb recordings<br />
55
 
        Muti-threading: <input type=\"checkbox\" id=\"threads\" name=\"threads\" value=\"1\" /><br />";
56
 
}
57
 
 
58
 
$content .= "<br />&nbsp;<span class=\"red\">* Are required</span>
59
 
<br /><input type=\"submit\" id=\"submit\" name=\"submit\" value=\"Submit\" /></p></form>";
60
 
 
61
 
$template->param(CONTENT => $content);
62
 
$template->param(LOCATION => "setup");
63
 
 
64
 
print generateContentType(), $template->output;
65
 
exit(0);