コード例 #1
0
        private void EventResponseGetProtocolInfo(object obj, ServiceConnectionManager.AsyncActionGetProtocolInfo.EventArgsResponse e)
        {
            UserLog.WriteLine(e.Sink);
            iProtocolInfo = e.Sink;
            if (Device.Model == "WD TV Live Hub" || Device.Model == "WD TV Live")
            {
                iProtocolInfo += ",http-get:*:audio/x-flac:*,http-get:*:audio/mp4:*,http-get:*:audio/wav:*,http-get:*:video/quicktime:*,http-get:*:video/x-matroska:*";
            }
            if (Device.Model == "AVR-3808")
            {
                iProtocolInfo += ",http-get:*:audio/x-flac:*";
            }

            try
            {
                Lock();

                iInitialised = true;
                OnInitialised();
            }
            finally
            {
                Unlock();
            }

            iActionGetPositionInfo.GetPositionInfoBegin(iInstanceId);
        }
コード例 #2
0
        private void EventResponseGetProtocolInfo(object obj, ServiceConnectionManager.AsyncActionGetProtocolInfo.EventArgsResponse e)
        {
            iProtocolInfo = e.Sink;
            if (Device.Model == "WD TV Live Hub" || Device.Model == "WD TV Live")
            {
                iProtocolInfo += ",http-get:*:audio/x-flac:*,http-get:*:audio/mp4:*,http-get:*:audio/wav:*,http-get:*:video/quicktime:*,http-get:*:video/x-matroska:*";
            }
            if (Device.Model == "AVR-3808")
            {
                iProtocolInfo += ",http-get:*:audio/x-flac:*";
            }

            if (iEventInitialisedTime != null)
            {
                iEventInitialisedTime(this, EventArgs.Empty);
            }

            if (iEventInitialisedInfo != null)
            {
                iEventInitialisedInfo(this, EventArgs.Empty);
            }

            if (EventTransportStateChanged != null)
            {
                EventTransportStateChanged(this, EventArgs.Empty);
            }

            if (EventControlInitialised != null)
            {
                EventControlInitialised(this, EventArgs.Empty);
            }

            if (EventPlaylistChanged != null)
            {
                EventPlaylistChanged(this, EventArgs.Empty);
            }

            if (EventTrackChanged != null)
            {
                EventTrackChanged(this, EventArgs.Empty);
            }

            if (iEventTrackChanged != null)
            {
                iEventTrackChanged(this, EventArgs.Empty);
            }

            if (EventMetaTextChanged != null)
            {
                EventMetaTextChanged(this, EventArgs.Empty);
            }

            if (EventDetailsChanged != null)
            {
                EventDetailsChanged(this, EventArgs.Empty);
            }

            if (EventPlaylistInitialised != null)
            {
                EventPlaylistInitialised(this, EventArgs.Empty);
            }

            if (EventRepeatChanged != null)
            {
                EventRepeatChanged(this, EventArgs.Empty);
            }

            if (EventShuffleChanged != null)
            {
                EventShuffleChanged(this, EventArgs.Empty);
            }

            iActionGetPositionInfo.GetPositionInfoBegin(iInstanceId);
        }