viewtopic.php?f=13&t=98531
I have now patched the code to add an input-slave option to the target.
Is this the right way to do it, or is there a cleaner way?
If 'input-slave' is seen as an OK option, I will go on and submit a patch.
Code: Select all
diff --git a/npapi/vlcplugin_base.cpp b/npapi/vlcplugin_base.cpp
index 1d9db49..bc6d0c1 100644
--- a/npapi/vlcplugin_base.cpp
+++ b/npapi/vlcplugin_base.cpp
@@ -464,6 +464,12 @@ NPError VlcPluginBase::init(int argc, char* const argn[], char* const argv[])
{
set_enable_fs( boolValue(argv[i]) );
}
+ else if( !strcmp( argn[i], "input-slave" ) )
+ {
+ char psz_input_slave_opts[80] = "--input-slave=";
+ strcat(psz_input_slave_opts, argv[i]);
+ ppsz_argv[ppsz_argc++] = psz_input_slave_opts;
+ }
else if( !strcmp( argn[i], "mute" ) )
{
if( boolValue(argv[i]) )
Code: Select all
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset=utf-8>
<title>VLC video capture test with Chromium browser</title>
</head>
<body>
<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2"
width="720"
height="576"
id="vlc"
input-slave="alsa://hw:2,0"
mute="false"
allowfullscreen="false"
toolbar="false"
target="v4l2:///dev/video0:width=720:height=576">
</embed>
<script language="Javascript">
<!--
var vlc = document.getElementById("vlc");
vlc.video.deinterlace.enable("blend"):
//!-->
</script>
</body>
</html>
PS. It seems that recent versions of VLC (2.0+) have problems with ALSA capture. However, the new 2.0-based npapi plugin with ALSA seems to work OK with at least VLC 1.1.12. I guess that this has already been noted? DS