Commit 38de27b2 authored by Xavier de Blas's avatar Xavier de Blas

webcam get supported modes for Linux (done!)

parent 50aa563c
......@@ -791,15 +791,34 @@ public class PreferencesWindow
if(cameraCode == "")
string modesStr = "";
if(UtilAll.GetOSEnum() == UtilAll.OperatingSystems.LINUX)
List<string> parameters = new List<string>();
ExecuteProcess.Result execute_result = ("v4l2-ctl", parameters, true, true);
if(! execute_result.success) {
new DialogMessage("Chronojump - Modes of this webcam",
Constants.MessageTypes.WARNING, "Need to install v4l2-ctl (on v4l-utils) to know modes");
modesStr = execute_result.stdout;
else if(UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX)
Webcam webcamPlay = new WebcamFfmpeg (Webcam.Action.PLAYPREVIEW, UtilAll.GetOSEnum(),
cameraCode, "8000x8000", "8000"); //select and impossible mode just to get an error on mac, this error will give us the "Supported modes"
Webcam.Result result = webcamPlay.PlayPreviewNoBackgroundWantStdoutAndStderr();
modesStr = result.output;
//display the result (if any)
if(result.output != "")
if(modesStr != "")
new DialogMessage("Chronojump - Modes of this webcam",
Constants.MessageTypes.INFO, result.output);
Constants.MessageTypes.INFO, modesStr, true); //showScrolledWinBar
private void on_button_video_preview_clicked (object o, EventArgs args)
......@@ -104,7 +104,7 @@ public class WebcamFfmpeg : Webcam
return new Result (true, "");
//used to know "Supported modes" on mac and maybe on windows
//used to know "Supported modes" on mac
public override Result PlayPreviewNoBackgroundWantStdoutAndStderr() //experimental
List<string> parameters = createParametersPlayPreview();
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