Esempio n. 1
0
 public void quitSkip()
 {
     skipEndVideoTS = getPlayTime();
     if (skipEndVideoTS > skipStartVideoTS)
     {
         lock (EmotionModel.svmFeature)
         {
             EmotionModel.svmFeature[(int)VideoFeature.FORWARDSKIP].Value = 1;
         }
         ForwardSkipEvent forwardSkipEvent = new ForwardSkipEvent(undeterminedSkipEvent);
         EventFactory.finishPeriodEvent(forwardSkipEvent, skipEndVideoTS);
         storeModule.savePeriodEvent(forwardSkipEvent);
         // for debug
         Console.WriteLine(JsonConvert.SerializeObject(forwardSkipEvent));
         lock (EmotionModel.svmFeature)
         {
             EmotionModel.svmFeature[(int)VideoFeature.FORWARDSKIP].Value = 0;
         }
     }
     else if (skipEndVideoTS < skipStartVideoTS)
     {
         lock (EmotionModel.svmFeature)
         {
             EmotionModel.svmFeature[(int)VideoFeature.REVERSESKIP].Value = 1;
         }
         ReverseSkipEvent reverseSkipEvent = new ReverseSkipEvent(undeterminedSkipEvent);
         EventFactory.finishPeriodEvent(reverseSkipEvent, skipEndVideoTS);
         storeModule.savePeriodEvent(reverseSkipEvent);
         // for debug
         Console.WriteLine(JsonConvert.SerializeObject(reverseSkipEvent));
         lock (EmotionModel.svmFeature)
         {
             EmotionModel.svmFeature[(int)VideoFeature.REVERSESKIP].Value = 0;
         }
     }
     undeterminedSkipEvent = null;
     skipStartVideoTS      = 0;
     skipEndVideoTS        = 0;
 }
Esempio n. 2
0
 public void enterSkip()
 {
     skipStartVideoTS      = getPlayTime();
     undeterminedSkipEvent = (UndeterminedSkipEvent)EventFactory.startPeriodEvent(curSession.SessionID, skipStartVideoTS, PeriodEventType.UNDETERMINED);
 }