Пример #1
0
        private static unsafe int DoGetMediaInfo(IntPtr aPtr, uint aVersion, uint aInstanceID, uint *aNrTracks, char **aMediaDuration, char **aCurrentURI, char **aCurrentURIMetaData, char **aNextURI, char **aNextURIMetaData, char **aPlayMedium, char **aRecordMedium, char **aWriteStatus)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            uint   nrTracks;
            string mediaDuration;
            string currentURI;
            string currentURIMetaData;
            string nextURI;
            string nextURIMetaData;
            string playMedium;
            string recordMedium;
            string writeStatus;

            self.GetMediaInfo(aVersion, aInstanceID, out nrTracks, out mediaDuration, out currentURI, out currentURIMetaData, out nextURI, out nextURIMetaData, out playMedium, out recordMedium, out writeStatus);
            *aNrTracks           = nrTracks;
            *aMediaDuration      = (char *)Marshal.StringToHGlobalAnsi(mediaDuration).ToPointer();
            *aCurrentURI         = (char *)Marshal.StringToHGlobalAnsi(currentURI).ToPointer();
            *aCurrentURIMetaData = (char *)Marshal.StringToHGlobalAnsi(currentURIMetaData).ToPointer();
            *aNextURI            = (char *)Marshal.StringToHGlobalAnsi(nextURI).ToPointer();
            *aNextURIMetaData    = (char *)Marshal.StringToHGlobalAnsi(nextURIMetaData).ToPointer();
            *aPlayMedium         = (char *)Marshal.StringToHGlobalAnsi(playMedium).ToPointer();
            *aRecordMedium       = (char *)Marshal.StringToHGlobalAnsi(recordMedium).ToPointer();
            *aWriteStatus        = (char *)Marshal.StringToHGlobalAnsi(writeStatus).ToPointer();
            return(0);
        }
Пример #2
0
        private static unsafe int DoPrevious(IntPtr aPtr, uint aVersion, uint aInstanceID)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;

            self.Previous(aVersion, aInstanceID);
            return(0);
        }
Пример #3
0
        private static unsafe int DoSetRecordQualityMode(IntPtr aPtr, uint aVersion, uint aInstanceID, char *aNewRecordQualityMode)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            string newRecordQualityMode       = Marshal.PtrToStringAnsi((IntPtr)aNewRecordQualityMode);

            self.SetRecordQualityMode(aVersion, aInstanceID, newRecordQualityMode);
            return(0);
        }
Пример #4
0
        private static unsafe int DoPlay(IntPtr aPtr, uint aVersion, uint aInstanceID, char *aSpeed)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            string speed = Marshal.PtrToStringAnsi((IntPtr)aSpeed);

            self.Play(aVersion, aInstanceID, speed);
            return(0);
        }
Пример #5
0
        private static unsafe int DoGetCurrentTransportActions(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aActions)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            string actions;

            self.GetCurrentTransportActions(aVersion, aInstanceID, out actions);
            *aActions = (char *)Marshal.StringToHGlobalAnsi(actions).ToPointer();
            return(0);
        }
Пример #6
0
        private static unsafe int DoSeek(IntPtr aPtr, uint aVersion, uint aInstanceID, char *aUnit, char *aTarget)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            string unit   = Marshal.PtrToStringAnsi((IntPtr)aUnit);
            string target = Marshal.PtrToStringAnsi((IntPtr)aTarget);

            self.Seek(aVersion, aInstanceID, unit, target);
            return(0);
        }
Пример #7
0
        private static unsafe int DoSetNextAVTransportURI(IntPtr aPtr, uint aVersion, uint aInstanceID, char *aNextURI, char *aNextURIMetaData)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            string nextURI         = Marshal.PtrToStringAnsi((IntPtr)aNextURI);
            string nextURIMetaData = Marshal.PtrToStringAnsi((IntPtr)aNextURIMetaData);

            self.SetNextAVTransportURI(aVersion, aInstanceID, nextURI, nextURIMetaData);
            return(0);
        }
Пример #8
0
        private static unsafe int DoGetTransportSettings(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aPlayMode, char **aRecQualityMode)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            string playMode;
            string recQualityMode;

            self.GetTransportSettings(aVersion, aInstanceID, out playMode, out recQualityMode);
            *aPlayMode       = (char *)Marshal.StringToHGlobalAnsi(playMode).ToPointer();
            *aRecQualityMode = (char *)Marshal.StringToHGlobalAnsi(recQualityMode).ToPointer();
            return(0);
        }
Пример #9
0
        private static unsafe int DoGetDeviceCapabilities(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aPlayMedia, char **aRecMedia, char **aRecQualityModes)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            string playMedia;
            string recMedia;
            string recQualityModes;

            self.GetDeviceCapabilities(aVersion, aInstanceID, out playMedia, out recMedia, out recQualityModes);
            *aPlayMedia       = (char *)Marshal.StringToHGlobalAnsi(playMedia).ToPointer();
            *aRecMedia        = (char *)Marshal.StringToHGlobalAnsi(recMedia).ToPointer();
            *aRecQualityModes = (char *)Marshal.StringToHGlobalAnsi(recQualityModes).ToPointer();
            return(0);
        }
Пример #10
0
        private static unsafe int DoGetTransportInfo(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aCurrentTransportState, char **aCurrentTransportStatus, char **aCurrentSpeed)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            string currentTransportState;
            string currentTransportStatus;
            string currentSpeed;

            self.GetTransportInfo(aVersion, aInstanceID, out currentTransportState, out currentTransportStatus, out currentSpeed);
            *aCurrentTransportState  = (char *)Marshal.StringToHGlobalAnsi(currentTransportState).ToPointer();
            *aCurrentTransportStatus = (char *)Marshal.StringToHGlobalAnsi(currentTransportStatus).ToPointer();
            *aCurrentSpeed           = (char *)Marshal.StringToHGlobalAnsi(currentSpeed).ToPointer();
            return(0);
        }
Пример #11
0
        private static unsafe int DoGetPositionInfo(IntPtr aPtr, uint aVersion, uint aInstanceID, uint *aTrack, char **aTrackDuration, char **aTrackMetaData, char **aTrackURI, char **aRelTime, char **aAbsTime, int *aRelCount, int *aAbsCount)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport1 self = (DvServiceUpnpOrgAVTransport1)gch.Target;
            uint   track;
            string trackDuration;
            string trackMetaData;
            string trackURI;
            string relTime;
            string absTime;
            int    relCount;
            int    absCount;

            self.GetPositionInfo(aVersion, aInstanceID, out track, out trackDuration, out trackMetaData, out trackURI, out relTime, out absTime, out relCount, out absCount);
            *aTrack         = track;
            *aTrackDuration = (char *)Marshal.StringToHGlobalAnsi(trackDuration).ToPointer();
            *aTrackMetaData = (char *)Marshal.StringToHGlobalAnsi(trackMetaData).ToPointer();
            *aTrackURI      = (char *)Marshal.StringToHGlobalAnsi(trackURI).ToPointer();
            *aRelTime       = (char *)Marshal.StringToHGlobalAnsi(relTime).ToPointer();
            *aAbsTime       = (char *)Marshal.StringToHGlobalAnsi(absTime).ToPointer();
            *aRelCount      = relCount;
            *aAbsCount      = absCount;
            return(0);
        }