Ejemplo n.º 1
0
 /// <summary>
 /// Performs skip operation and does verification
 /// </summary>
 /// <param name="direction">Madatory direction of skip.True if Forward else False. No default value</param>
 /// <param name="PlaybackContext">Mandatory-PLAYBACK or RB-Playback is true/RB is false </param>
 /// <param name="SkipDurationSetting">Enumvideoskip equivalent to required value </param>
 /// <param name="NumOfSkipPoints">[optional parameter]-For BOOKMARK-Num of recordings,if not specified BOFEOF check will be true </param>
 /// <param name="pManager"></param>
 /// <remarks>
 /// Possible Error Codes:
 /// <para>303 - FasVerificationFailure</para>
 /// <para>304 - IRVerificationFailure</para>
 /// <para>313 - SetTrickModeSpeedFailure</para>
 /// <para>318 - SetSkipFailure</para>
 /// <para>328 - INIFailure</para>
 /// <para>332 - NoValidParameters</para>
 /// </remarks>
 public Skip(bool direction, bool PlaybackContext, EnumVideoSkip SkipDurationSetting, int NumOfSkipPoints, IEX.ElementaryActions.Functionality.Manager pManager)
 {
     this._manager             = pManager;
     this.EPG                  = this._manager.UI;
     this._direction           = direction;
     this._PlaybackContext     = PlaybackContext;
     this._NumOfSkipPoints     = NumOfSkipPoints;
     this._SkipDurationSetting = SkipDurationSetting;
 }
        public override void Execute()
        {
            StartStep();

            //EnumVideoSkip valueset = new EnumVideoSkip();

            string        Interval_to_set = SkipFFIntervalDefault;
            EnumVideoSkip valueset        = 0;

            switch (Interval_to_set)
            {
            case "+60 SEC":

                valueset = EnumVideoSkip._60;
                break;


            case "+10 SEC":


                valueset = EnumVideoSkip._10;
                break;

            case "+30 SEC":


                valueset = EnumVideoSkip._30;
                break;


            case "+5 MIN":


                valueset = EnumVideoSkip._300;
                break;


            case "+10 MIN":


                valueset = EnumVideoSkip._600;
                break;
            }



            res = CL.EA.PVR.Skip(Constants.directionFF, Constants.PlaybackContext, valueset);
            if (!res.CommandSucceeded)
            {
                FailStep(CL, res, "Failed to do forward skip with:" + valueset.ToString());
            }


            Interval_to_set = SkipBKIntervalDefault;
            valueset        = 0;

            switch (Interval_to_set)
            {
            case "-60 SEC":

                valueset = EnumVideoSkip._60;
                break;


            case "-7 SEC":

                valueset = EnumVideoSkip._7;
                break;

            case "-15 SEC":


                valueset = EnumVideoSkip._15;
                break;

            case "-10 SEC":


                valueset = EnumVideoSkip._10;
                break;

            case "-30 SEC":


                valueset = EnumVideoSkip._30;
                break;


            case "-5 MIN":


                valueset = EnumVideoSkip._300;
                break;


            case "-10 MIN":


                valueset = EnumVideoSkip._600;
                break;
            }

            //Playback event to check for glitches
            res = CL.EA.PVR.PlaybackRecFromArchive("Event1", Constants.SecsToPlay, Constants.FromBeginning, Constants.VerifyEOF);
            if (!res.CommandSucceeded)
            {
                FailStep(CL, res, "Failed to play the event recording!");
            }

            //Wait for some time
            LogComment(CL, "Waiting for recording to play for some time");

            res = CL.IEX.Wait(Constants.EventDurationwait * 60);
            if (!res.CommandSucceeded)
            {
                FailStep(CL, res, "Failed to wait for recording content!");
            }

            res = CL.EA.PVR.Skip(Constants.directionREW, Constants.PlaybackContext, valueset);
            if (!res.CommandSucceeded)
            {
                FailStep(CL, res, "Failed to do backward skip with:" + valueset.ToString());
            }

            res = CL.EA.ReturnToLiveViewing(true);
            if (!res.CommandSucceeded)
            {
                FailStep(CL, res, "Failed to Return To Live Viewing after Main menu Navigation");
            }


            PassStep();
        }