/// <summary> /// Playback playback controls:Change position [i.e. drag,Only parameter function effectively hWnd parameter of the function of the image acquired before the effective opening,Otherwise meaningless] /// </summary> /// <param name="lPlayHandle">Play handle</param> /// <param name="pPlayCommand">Play command:SeekByBit,SeekByTime</param> /// <param name="offset">SeekByTime:Offset relative to the beginning of time to file,Seconds;SeekByBit:Byte offset relative to the beginning of the file;</param> /// <returns>true:success;false:failure</returns> public static bool NETPlayBackControl(int lPlayHandle, PLAY_CONTROL pPlayCommand, uint offset) { bool returnValue = false; uint FalseValue = 0xFFFFFFFF; switch (pPlayCommand) { case PLAY_CONTROL.SeekByBit: returnValue = CLIENT_SeekPlayBack(lPlayHandle, FalseValue, offset); break; case PLAY_CONTROL.SeekByTime: returnValue = CLIENT_SeekPlayBack(lPlayHandle, offset, FalseValue); break; } NETThrowLastError(returnValue); return returnValue; }
/// <summary> /// Playback playback controls:lay, pause, stop, single step, step to stop, slow, fast /// </summary> /// <param name="lPlayHandle">Play a handle</param> /// <param name="pPlayCommand">Control command:see<seealso cref="PlayControlType"/></param> /// <returns>true:success;false:failure</returns> public static bool NETPlayBackControl(int lPlayHandle, PLAY_CONTROL pPlayCommand) { bool returnValue = false; switch (pPlayCommand) { case PLAY_CONTROL.Play: returnValue = CLIENT_PausePlayBack(lPlayHandle, 0); break; case PLAY_CONTROL.Pause: returnValue = CLIENT_PausePlayBack(lPlayHandle, 1); break; case PLAY_CONTROL.Stop: returnValue = CLIENT_StopPlayBack(lPlayHandle); break; case PLAY_CONTROL.StepPlay: returnValue = CLIENT_StepPlayBack(lPlayHandle, false); break; case PLAY_CONTROL.StepStop: returnValue = CLIENT_StepPlayBack(lPlayHandle, true); break; case PLAY_CONTROL.Fast: returnValue = CLIENT_FastPlayBack(lPlayHandle); break; case PLAY_CONTROL.Slow: returnValue = CLIENT_SlowPlayBack(lPlayHandle); break; } NETThrowLastError(returnValue); return returnValue; }