]> git.sesse.net Git - vlc/commitdiff
* add "fake:" input
authorAntoine Cellerier <dionoea@videolan.org>
Mon, 20 Mar 2006 01:32:11 +0000 (01:32 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Mon, 20 Mar 2006 01:32:11 +0000 (01:32 +0000)
* vlm fix. change "input :foo=bar :foo2=bar2" into vlm compatible option handling
* mosaic fix. always enable transcode when using an sout chain

share/http/dialogs/input
share/http/dialogs/mosaic
share/http/dialogs/sout
share/http/js/functions.js
share/http/js/mosaic.js
share/http/js/vlm.js
share/http/style.css

index 09b5ccb157ace22c62f85ab599a50b177a7f2269..814086e186b2ff077e5b369b30da4fe68e1f3663 100644 (file)
@@ -56,6 +56,9 @@ This dialog needs the following dialogs to be fully functional: browse
     <button id="btn_network" onclick="hide_input();show('input_network');update_input_net();">
       Network
     </button>
+    <button id="btn_fake" onclick="hide_input();show('input_fake');update_input_fake();">
+      Fixed image
+    </button>
   </div>
   <div id="input_helper" class="helper" >
     <div id="input_file" style="display: block">
@@ -203,5 +206,19 @@ This dialog needs the following dialogs to be fully functional: browse
         </tr>
       </table>
     </div>
+    <div id="input_fake" style="display: none">
+      Fixed image stream (fake)
+      <hr/>
+      <label for="input_fake_filename">Image file name</label>
+      <input type="text" id="input_fake_filename" size="60" onchange="update_input_fake();" onfocus="update_input_fake();"/>
+      <input type="button" id="input_fake_browse" value="Browse" onclick="browse( 'input_fake_filename' );" />
+      <hr/>
+      <label for="input_fake_width">Width</label>
+      <input type="text" id="input_fake_width" size="8" onchange="update_input_fake();" />
+      <label for="input_fake_height">Height</label>
+      <input type="text" id="input_fake_height" size="8" onchange="update_input_fake();" />
+      <label for"input_fake_ar">Aspect ratio</label>
+      <input type="text" id="input_fake_ar" size="8" onchange="update_input_fake();" />
+    </div>
   </div>
 </div>
index 70c263ae579d9e7d3ae1e0a99d6140aee1c07718..215e2a0e0a5fad40c435cccf7d43bdd14ec10766 100644 (file)
@@ -90,7 +90,7 @@ sout.
     <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> (leave this empty to display locally)<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' );" /><br/>
+    <label for="mosaic_output">Output:</label> <input type="text" id="mosaic_output" value="" size="60" onblur="mosaic_code_update();" /> <input type="button" value="Edit" onclick="vlm_output_edit( 'mosaic_output' );" /><br/>
     <div id="mosaic_feedback"></div>
   </div>
   <div  id="mosaic_list" class="popup">[<a href="javascript:hide('mosaic_list');">hide</a>] - Select a stream:<br/><div id="mosaic_list_content"></div></div>
index a19091f0c9ac4c74e02d24c1cd19d4db56767a2d..99541d60789aeec10e50969157e5e47b960c4fb0 100644 (file)
@@ -157,6 +157,7 @@ Note that the sout chain is used and sent to VLC by the input dialog
     </div>
     <hr/>
     <div id="sout_transcode">
+      <input type="hidden" id="sout_transcode_extra" value="" />
       <table>
         <tr>
           <td>
@@ -289,6 +290,5 @@ 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="hidden" id="sout_extra" value="" />
   </div>
 </div>
index 895a7ee2ef17816b10b6ffd4796e0b9f0d328fd4..fe767914753a2c8dffcc3152572eb7da7d1d797f 100644 (file)
@@ -688,6 +688,7 @@ function hide_input( )
     document.getElementById( 'input_file' ).style.display = 'none';
     document.getElementById( 'input_disc' ).style.display = 'none';
     document.getElementById( 'input_network' ).style.display = 'none';
+    document.getElementById( 'input_fake' ).style.display = 'none';
 }
 
 /* update the input MRL using data from the input file helper */
@@ -797,6 +798,22 @@ function update_input_net()
         mrl.value += " :access-filter=timeshift";
 }
 
+/* update the input MRL using data from the input fake helper */
+function update_input_fake()
+{
+    var mrl = document.getElementById( 'input_mrl' );
+
+    mrl.value = "fake:";
+    mrl.value += " :fake-file=" + value( "input_fake_filename" );
+
+    if( value( "input_fake_width" ) )
+        mrl.value += " :fake-width=" + value( "input_fake_width" );
+    if( value( "input_fake_height" ) )
+        mrl.value += " :fake-height=" + value( "input_fake_height" );
+    if( value( "input_fake_ar" ) )
+        mrl.value += " :fake-ar=" + value( "input_fake_ar" );
+}
+
 /**********************************************************************
  * Sout dialog functions
  *********************************************************************/
@@ -871,7 +888,7 @@ function update_sout()
             mrl.value += "scodec="+value( 'sout_scodec' );
             alot = true;
         }
-        mrl.value += value( 'sout_extra' );
+        mrl.value += value( 'sout_transcode_extra' );
             
         mrl.value += "}";
     }
index 56460504a57b854fdb9c4cc02b894ad94529ffd2..1b77f15a534646e1cf398c67a5e6b3d07a8d1d16 100644 (file)
@@ -41,13 +41,18 @@ var mosaic_delay    = 0;
 var cell_width  = 0;
 var cell_height = 0;
 
-var streams = Object;
-var cells   = Object;
+var streams = Object();
+var cells   = Object();
 
 function mosaic_init()
 {
-    document.getElementById( 'sout_extra' ).value = ",sfilter=mosaic";
+    document.getElementById( 'sout_transcode_extra' ).value = ",sfilter=mosaic";
     mosaic_size_change();
+
+    /* Force usage of transcode in sout */
+    document.getElementById( 'sout_vcodec_s' ).checked = 'checked';
+    disable( 'sout_vcodec_s' );
+    update_sout();
 }
 
 function mosaic_size_change()
index c9c177776e7b8ca1093f13272e7b498d334c3240..25da245c99d1073f291a57596f8f07acbe8a439f 100644 (file)
@@ -36,7 +36,7 @@ function vlm_input_edit( dest )
 
 function vlm_input_change()
 {
-    document.getElementById( value( 'input_dest' ) ).value = value( 'input_mrl' );
+    document.getElementById( value( 'input_dest' ) ).value = value( 'input_mrl' ).replace( /\ :/g, " option " );
     hide( 'input' );
     document.getElementById( value( 'input_dest' ) ).focus();
 }
index e5e8779ca5dec7c3c8a7f6eba946dbe7b54f40cf..85b7242ed97ec28a36f608af17e13e5c856cd4e0 100644 (file)
@@ -67,10 +67,11 @@ input, textarea {
 
 div.helper {
        margin: 10px;
-       border: solid #ccc 2px;
+       padding: 10px 0px;
+       border: solid 1px #000;
 }
 div.helper hr {
-       border: solid #ccc 1px;
+       border: solid 1px #000;
 }
 
 div.title {