Commit f64579e7 authored by Xavier de Blas's avatar Xavier de Blas

webcam encoder capture has no delayed end. Not needed and problematic.

parent cf612580
......@@ -2508,21 +2508,20 @@ public partial class ChronoJumpWindow
//copy video
if(preferences.videoOn) {
if(Util.CopyTempVideo(currentSession.UniqueID,
Constants.TestTypes.ENCODER,
Convert.ToInt32(encoderSignalUniqueID))) {
eSQL.videoURL = Util.GetVideoFileName(currentSession.UniqueID,
Constants.TestTypes.ENCODER,
if(Util.CopyTempVideo(currentSession.UniqueID,
Constants.TestTypes.ENCODER,
Convert.ToInt32(encoderSignalUniqueID)))
{
eSQL.videoURL = Util.GetVideoFileName(currentSession.UniqueID,
Constants.TestTypes.ENCODER,
Convert.ToInt32(encoderSignalUniqueID));
//need assign uniqueID to update and add the URL of video
eSQL.uniqueID = encoderSignalUniqueID;
SqliteEncoder.Update(dbconOpened, eSQL);
button_video_play_this_test_encoder.Sensitive = true;
} else {
new DialogMessage(Constants.MessageTypes.WARNING,
new DialogMessage(Constants.MessageTypes.WARNING,
Catalog.GetString("Sorry, video cannot be stored."));
}
}
......@@ -6326,7 +6325,8 @@ public partial class ChronoJumpWindow
notebook_encoder_signal_comment_rhythm_and_triggers.Page = 0;
if(encoderProcessCancel) {
//stop video
//stop video and will NOT be stored
LogB.Information("call to webcamEnd");
webcamEnd (Constants.TestTypes.ENCODER, -1);
}
......
......@@ -259,8 +259,16 @@ public partial class ChronoJumpWindow
webcamEndParams = new WebcamEndParams(1, currentSession.UniqueID, testType, uniqueID, guiContactsEncoder);
LogB.Information("Preparing to call webcamEndDo() in 2s");
GLib.Timeout.Add(2000, new GLib.TimeoutHandler(webcamEndDo)); //call it later to be able to have some video on a short test like a jump.
//on encoder do not have a delayed call to not have problems with CopyTempVideo on src/gui/encoder.cs
//also on encoder exercise ends when movement has really finished
if(testType == Constants.TestTypes.ENCODER)
{
LogB.Information("Encoder, immediate call to webcamEndDo()");
webcamEndDo();
} else {
LogB.Information("Preparing to call webcamEndDo() in 2s");
GLib.Timeout.Add(2000, new GLib.TimeoutHandler(webcamEndDo)); //call it later to be able to have some video on a short test like a jump.
}
}
private bool webcamEndDo()
......
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