Exemplo n.º 1
0
        protected void SeekSink(System.UInt32 InstanceID, DvAVTransport.Enum_A_ARG_TYPE_SeekMode Unit, System.String Target)
        {
            if (ID_Table.ContainsKey(InstanceID) == false)
            {
                throw(new UPnPCustomException(802, InstanceID.ToString() + " is not a valid InstanceID"));
            }
            else
            {
                AVConnection c = (AVConnection)ID_Table[InstanceID];

                if ((c.NumberOfTracks <= 1) && (Unit == DvAVTransport.Enum_A_ARG_TYPE_SeekMode.TRACK_NR))
                {
                    throw new UPnPCustomException(710, "Invalid seek mode. Cannot seek on a zero or one-item playlist or media.");
                }
                c.Seek(Unit, Target);
            }
        }