示例#1
0
        private void PlaySink(AVConnection sender, DvAVTransport.Enum_TransportPlaySpeed Speed)
        {
            if (sender.CurrentURI == null)
            {
                Manager.Instance.Stop();
                sender.CurrentTransportState = DvAVTransport.Enum_TransportState.STOPPED;
                return;
            }

            if (sender.CurrentTransportState == DvAVTransport.Enum_TransportState.PAUSED_PLAYBACK)
            {
                Manager.Instance.Play();
            }
            else
            {
                if (sender.CurrentTransportState != DvAVTransport.Enum_TransportState.PLAYING)
                {
                    lock (syncLock)
                    {
                        sender.CurrentTransportState = DvAVTransport.Enum_TransportState.TRANSITIONING;
                        if (sender.CurrentURI.LocalPath.EndsWith(".m3u", System.StringComparison.OrdinalIgnoreCase))
                        {
                            Manager.Instance.PlayM3UList(sender.CurrentURI.ToString());
                        }
                        else
                        {
                            Manager.Instance.PlayMediaRessource(sender.CurrentURI.ToString());
                        }
                    }
                }
            }
        }
 internal void Play(DvAVTransport.Enum_TransportPlaySpeed speed)
 {
     _CurrentTransportSpeed = speed;
     if (OnPlay != null)
     {
         OnPlay(this, speed);
     }
 }
示例#3
0
 protected void PlaySink(System.UInt32 InstanceID, DvAVTransport.Enum_TransportPlaySpeed Speed)
 {
     if (ID_Table.ContainsKey(InstanceID) == false)
     {
         throw(new UPnPCustomException(802, InstanceID.ToString() + " is not a valid InstanceID"));
     }
     else
     {
         AVConnection c = (AVConnection)ID_Table[InstanceID];
         c.Play(Speed);
     }
 }
 internal void Play(DvAVTransport.Enum_TransportPlaySpeed speed)
 {
     _CurrentTransportSpeed = speed;
     if(OnPlay!=null) OnPlay(this,speed);
 }
示例#5
0
 protected void GetTransportInfoSink(System.UInt32 InstanceID, out DvAVTransport.Enum_TransportState CurrentTransportState, out DvAVTransport.Enum_TransportStatus CurrentTransportStatus, out DvAVTransport.Enum_TransportPlaySpeed CurrentSpeed)
 {
     if (ID_Table.ContainsKey(InstanceID) == false)
     {
         throw(new UPnPCustomException(802, InstanceID.ToString() + " is not a valid InstanceID"));
     }
     else
     {
         AVConnection c = (AVConnection)ID_Table[InstanceID];
         CurrentTransportState  = c._CurrentTransportState;
         CurrentSpeed           = c._CurrentTransportSpeed;
         CurrentTransportStatus = c._CurrentStatus;
     }
 }