[chronojump] Encoder video gets stored
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder video gets stored
- Date: Fri, 19 Apr 2013 15:47:44 +0000 (UTC)
commit 4cafc7093689da7dbb89ad2e03aef52b71652ac0
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Apr 19 16:36:29 2013 +0200
Encoder video gets stored
src/constants.cs | 2 +-
src/gui/chronojump.cs | 3 ++-
src/gui/encoder.cs | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 2 deletions(-)
---
diff --git a/src/constants.cs b/src/constants.cs
index b9432ef..1f04351 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -64,7 +64,7 @@ public class Constants
public const string SubtractionBetweenTests = "Subtraction between tests";
//tests types (dont' use character '-' will be used multimedia file names)
- public enum TestTypes { JUMP, JUMP_RJ, RUN, RUN_I, RT, PULSE, MULTICHRONOPIC }
+ public enum TestTypes { JUMP, JUMP_RJ, RUN, RUN_I, RT, PULSE, MULTICHRONOPIC, ENCODER }
public static string JumpSimpleName = "Jump simple";
public static string JumpReactiveName = "Jump reactive";
public static string RunSimpleName = "Run simple";
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index aeffb14..af73d02 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3357,7 +3357,8 @@ Log.WriteLine("DDD 1");
//move video file if exists
if(videoOn)
if (! Util.MoveTempVideo(currentSession.UniqueID, Constants.TestTypes.JUMP,
currentJump.UniqueID))
- new DialogMessage(Constants.MessageTypes.WARNING,
Catalog.GetString("Sorry, video cannot be stored."));
+ new DialogMessage(Constants.MessageTypes.WARNING,
+ Catalog.GetString("Sorry, video cannot be stored."));
if(weightPercentPreferred)
myTreeViewJumps.Add(currentPerson.Name, currentJump);
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index ebb2e1a..c734756 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1274,6 +1274,22 @@ public partial class ChronoJumpWindow
if(mode == "signal") {
encoderSignalUniqueID = myID;
feedback = Catalog.GetString("Signal saved");
+
+ //move video
+ if(videoOn) {
+ if(Util.MoveTempVideo(currentSession.UniqueID,
+ Constants.TestTypes.ENCODER,
+ Convert.ToInt32(encoderSignalUniqueID))) {
+ eSQL.future2 = 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(false, eSQL);
+ } else
+ new DialogMessage(Constants.MessageTypes.WARNING,
+ Catalog.GetString("Sorry, video cannot be
stored."));
+ }
}
}
else {
@@ -3081,6 +3097,13 @@ Log.WriteLine(str);
pen_black_encoder_capture.Foreground = UtilGtk.BLACK;
pen_azul_encoder_capture.Foreground = UtilGtk.BLUE_PLOTS;
+
+ checkbutton_video_encoder.Sensitive = false;
+ if(videoOn) {
+ capturer.ClickRec();
+ label_video_feedback_encoder.Text = "Rec";
+ }
+
encoderThreadCapture = new Thread(new ThreadStart(captureCsharp));
GLib.Idle.Add (new GLib.IdleHandler (pulseGTKEncoderCapture));
Log.WriteLine("DDDDDDDDDDDDDDD");
@@ -3248,6 +3271,17 @@ Log.WriteLine(str);
mode == encoderModes.RECALCULATE_OR_LOAD )
{
Log.WriteLine("ffffffinishPulsebarrrrr");
+
+ //stop video
+ if(mode == encoderModes.CAPTURE) {
+ checkbutton_video_encoder.Sensitive = true;
+ if(videoOn) {
+ label_video_feedback_encoder.Text = "";
+ capturer.ClickStop();
+ videoCapturePrepare();
+ }
+ }
+ //save video will be later at encoderSaveSignalOrCurve, because there
encoderSignalUniqueID will be known
if(encoderProcessCancel) {
//encoderButtonsSensitive(encoderSensEnum.DONEYESSIGNAL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]