internal void _Poll() { if (this.PlayState == CpAVTransport.Enum_TransportState.PLAYING || this.PlayState == CpAVTransport.Enum_TransportState.RECORDING) { _cp.GetPositionInfo(UInt32.Parse(InstanceID), null, new CpAVTransport.Delegate_OnResult_GetPositionInfo(PollSink)); } }
public AVTransportLastChange(CpAVTransport cpAV, string Ident, int ID, AVTransportLastChange.ReadyHandler ReadyCallback) { OpenSource.Utilities.InstanceTracker.Add(this); this.OnReady += ReadyCallback; InstanceID = ID.ToString(); Identifier = Ident; _cp = cpAV; _cp.OnStateVariable_LastChange += new CpAVTransport.StateVariableModifiedHandler_LastChange(LastChangeSink); _cp._subscribe(500); lock (this) { if (_cp.HasAction_GetPositionInfo) { ++StateCounter; //PollerTimeoutHandler = new LifeTimeMonitor.LifeTimeHandler(PollerTimeoutSink); //PollerTimeout.AddWeakEvent_OnExpired(PollerTimeoutHandler); _cp.GetPositionInfo((UInt32)ID, null, new CpAVTransport.Delegate_OnResult_GetPositionInfo(PositionInfoSink)); } if (_cp.HasAction_GetMediaInfo) { ++StateCounter; _cp.GetMediaInfo((UInt32)ID, null, new CpAVTransport.Delegate_OnResult_GetMediaInfo(MediaInfoSink)); } if (_cp.HasAction_GetTransportInfo) { ++StateCounter; _cp.GetTransportInfo((UInt32)ID, null, new CpAVTransport.Delegate_OnResult_GetTransportInfo(GetTransportInfoSink)); } if (_cp.HasAction_GetTransportSettings) { ++StateCounter; _cp.GetTransportSettings((UInt32)ID, null, new CpAVTransport.Delegate_OnResult_GetTransportSettings(GetTransportSettingsSink)); } } }