[chronojump] webcam encoder capture has no delayed end. Not needed and problematic.
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] webcam encoder capture has no delayed end. Not needed and problematic.
- Date: Mon, 29 Apr 2019 14:29:57 +0000 (UTC)
commit f64579e7306a5c8e417e1f254f8cd572d241f4b5
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Apr 29 16:26:47 2019 +0200
webcam encoder capture has no delayed end. Not needed and problematic.
src/gui/encoder.cs | 18 +++++++++---------
src/gui/webcam.cs | 12 ++++++++++--
2 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 69d0386c..e8164505 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -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);
}
diff --git a/src/gui/webcam.cs b/src/gui/webcam.cs
index 8da151f5..abb71ff0 100644
--- a/src/gui/webcam.cs
+++ b/src/gui/webcam.cs
@@ -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()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]