Commit f612f30e authored by Antoine Cellerier's avatar Antoine Cellerier

Code the mosaic wizard

parent a7f15996
......@@ -29,6 +29,7 @@ This dialog needs the following dialogs to be fully functional: <none>
<div id="footer" class="dialog" >
<a href="/">main VLC interface</a> -
<a href="/vlm.html">VLM interface</a> -
<a href="/mosaic.html">Mosaic wizard</a> -
<a href="http://www.videolan.org">VideoLAN website</a>
<br />
<vlc id="value" param1="copyright" />
......
......@@ -36,12 +36,65 @@ sout.
</button>
</div>
<div class="controls">
<label for="mosaic_rows">Rows:</label> <input type="text" id="mosaic_rows" value="" onchange="mosaic_size_change();" />
<label for="mosaic_cols">Columns:</label> <input type="text" id="mosaic_cols" value="" onchange="mosaic_size_change();" />
<br/>
<label for="mosaic_input_name">Name:</label> <input type="text" id="mosaic_input_name" value="" />
<label for="mosaic_input">Input:</label> <input type="text" id="mosaic_input" value="" /> <input type="button" value="Add to input list" onclick="mosaic_add_input();" />
<b>Mosaic dimensions:</b><br/>
<table style="text-align: right;">
<tr>
<td>
<label for="bg_width">Background width*:</label> <input class="mosaic_bg" type="text" id="bg_width" value="400" size="8" onchange="mosaic_size_change();" />
</td>
<td>
<label for="bg_height">Background height*:</label> <input class="mosaic_bg" type="text" id="bg_height" value="300" size="8" onchange="mosaic_size_change();" />
</td>
</tr>
<tr>
<td>
<label for="mosaic_width">Width:</label> <input class="mosaic_tbl" type="text" id="mosaic_width" value="200" size="8" onchange="mosaic_size_change();" />
</td>
<td>
<label for="mosaic_height">Height:</label> <input class="mosaic_tbl" type="text" id="mosaic_height" value="200" size="8" onchange="mosaic_size_change();" />
</td>
</tr>
<tr>
<td>
<label for="mosaic_xoffset">X offset (left):</label> <input class="mosaic_tbl" type="text" id="mosaic_xoffset" value="10" size="8" onchange="mosaic_size_change();" />
</td>
<td>
<label for="mosaic_yoffset">Y offset (top):</label> <input class="mosaic_tbl" type="text" id="mosaic_yoffset" value="10" size="8" onchange="mosaic_size_change();" />
</td>
</tr>
<tr>
<td>
<label for="mosaic_cols">Columns:</label> <input class="mosaic_itm" type="text" id="mosaic_cols" value="2" size="8" onchange="mosaic_size_change();" />
</td>
<td>
<label for="mosaic_rows">Rows:</label> <input class="mosaic_itm" type="text" id="mosaic_rows" value="2" size="8" onchange="mosaic_size_change();" />
</td>
</tr>
<tr>
<td>
<label for="mosaic_hborder">Horizontal border:</label> <input class="mosaic_itm" type="text" id="mosaic_hborder" value="10" size="8" onchange="mosaic_size_change();" />
</td>
<td>
<label for="mosaic_vborder">Vertical border:</label> <input class="mosaic_itm" type="text" id="mosaic_vborder" value="5" size="8" onchange="mosaic_size_change();" />
</td>
</tr>
<tr>
<td colspan="2">
*: these values aren't used by the mosaic code.<br/> They're only here to adapt the preview's size.
</td>
</tr>
</table>
<b>Background:</b><br/>
<label for="mosaic_bg_input">Input:<label> <input type="text" id="mosaic_bg_input" class="mosaic_bg" value="" size="60" onblur="mosaic_code_update();" /> <input type="button" value="Edit" onclick="vlm_input_edit( 'mosaic_bg_input' );" /><br/>
<b>Item:</b><br/>
<label for="mosaic_input_name">Name:</label> <input type="text" id="mosaic_input_name" value="" class="mosaic_itm" />
<label for="mosaic_input">Input:</label> <input type="text" id="mosaic_input" value="" class="mosaic_itm" /> <input type="button" value="Edit" onclick="vlm_input_edit( 'mosaic_input' );" /> <input type="button" value="Add to input list" onclick="mosaic_add_input();" /><br/>
<b>Stream:</b><br/>
<label for="mosaic_output">Output:</label> <input type="text" id="mosaic_output" value="" size="60" onvlur="mosaic_code_update();" /> <input type="button" value="Edit" onclick="vlm_output_edit( 'mosaic_output' );" />
</div>
<div id="mosaic_list" class="popup" style="display: none">Select a stream:<br/></div>
<div id="mosaic_layout"></div>
<div id="mosaic_list" class="popup" style="display: none; background: url('images/white.png') repeat;">[<a href="javascript:hide('mosaic_list');">hide</a>] - Select a stream:<br/><div id="mosaic_list_content"></div></div>
<div id="mosaic_layout" class="mosaic_bg"></div>
<textarea id="mosaic_code" cols="80" rows="30"></textarea>
<input type="button" value="Let's go!" onclick="mosaic_batch(document.getElementById('mosaic_code').value);" />
<input type="button" value="Stop" onclick="mosaic_stop()" />
</div>
......@@ -288,5 +288,6 @@ Note that the sout chain is used and sent to VLC by the input dialog
<label for="sout_ttl">Time-To-Live (TTL)</label>
<input type="text" id="sout_ttl" onchange="update_sout()"/>
</div>
<input type="hiden" id="sout_extra" value="" />
</div>
</div>
......@@ -215,7 +215,8 @@ function check_and_replace_int( id, val )
if( value( id ) != ''
&& ( !objRegExp.test( value( id ) )
|| parseInt( value( id ) ) < 1 ) )
document.getElementById( id ).value = val;
return document.getElementById( id ).value = val;
return document.getElementById( id ).value;
}
function addslashes( str ){ return str.replace(/\'/g, '\\\''); }
......@@ -679,19 +680,14 @@ function update_input_file()
/* update the input MRL using data from the input disc helper */
function update_input_disc()
{
var mrl = document.getElementById( 'input_mrl' );
var type = radio_value( "input_disc_type" );
var device = value( "input_disc_dev" );
check_and_replace_int( 'input_disc_title', 0 );
check_and_replace_int( 'input_disc_chapter', 0 );
check_and_replace_int( 'input_disc_subtrack', '' );
check_and_replace_int( 'input_disc_audiotrack', 0 );
var mrl = document.getElementById( 'input_mrl' );
var type = radio_value( "input_disc_type" );
var device = value( "input_disc_dev" );
var title = value( 'input_disc_title' );
var chapter = value( 'input_disc_chapter' );
var subs = value( 'input_disc_subtrack' );
var audio = value( 'input_disc_audiotrack' );
var title = check_and_replace_int( 'input_disc_title', 0 );
var chapter = check_and_replace_int( 'input_disc_chapter', 0 );
var subs = check_and_replace_int( 'input_disc_subtrack', '' );
var audio = check_and_replace_int( 'input_disc_audiotrack', 0 );
mrl.value = "";
......@@ -853,6 +849,8 @@ function update_sout()
mrl.value += "scodec="+value( 'sout_scodec' );
alot = true;
}
mrl.value += value( 'sout_extra' );
mrl.value += "}";
}
......
This diff is collapsed.
......@@ -31,25 +31,26 @@
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript" src="js/vlm.js"></script>
<script type="text/javascript" src="js/mosaic.js"></script>
</head>
<body onload="mosaic_size_change();">
<body onload="mosaic_init();">
<h1>TODO : code</h1>
<h1>Mosaic wizard</h1>
<vlc id="rpn" param1="page vlm store" />
<!-- do we need to browse in order to setup a mosaic ? for the background image maybe ... -->
<vlc id="include" param1="dialogs/browse" />
<!-- the actual mosaic stuff -->
<vlc id="include" param1="dialogs/mosaic" />
<!-- used to select background and sub streams -->
<vlc id="include" param1="dialogs/input" />
<!-- select final output -->
<vlc id="include" param1="dialogs/sout" />
<!-- the actual mosaic stuff -->
<vlc id="include" param1="dialogs/mosaic" />
<vlc id="include" param1="dialogs/footer" />
......
......@@ -60,7 +60,7 @@ form {
display: inline;
}
input {
input, textarea {
border: solid #000 1px;
background-color: #fff;
}
......@@ -167,24 +167,50 @@ div#mosaic_list {
left: 25%;
}
div#mosaic_layout {
border: 1px solid #000;
background-color: #ddf;
display: block;
margin: 1em;
padding: 0.3em 0.6em;
.mosaic_bg {
background-color: #aaf;
}
.mosaic_tbl {
background-color: #faa;
}
div.mosaic_row {
padding: 0.6em 0em;
.mosaic_itm {
background-color: #afa;
}
div#mosaic_layout {
border: 0px solid #000;
padding: 0px;
margin: 10px auto;
}
.mosaic_element {
display: inline;
border: 1px solid #000;
margin: 0em 0.3em;
padding: 0.3em 0.3em;
background-color: #dfd;
div#mosaic_dt {
border: 0px solid #000;
position: relative;
}
table#mosaic_table {
border-spacing: 0px 0px;
position: relative;
}
table#mosaic_table tr {
padding: 0px;
margin: 0px;
}
table#mosaic_table td {
border: 0px solid #000;
text-align: center;
padding: 0px;
margin: 0px;
}
table#mosaic_table input {
border: 0px;
background: transparent;
text-align: center;
}
textarea#mosaic_code {
padding: 0px;
display: block;
margin: 10px auto;
}
div.controls button.on {
background-color: #aaa;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment