예제 #1
0
        private static unsafe int DoGetMediaInfo_Ext(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aCurrentType, uint *aNrTracks, char **aMediaDuration, char **aCurrentURI, char **aCurrentURIMetaData, char **aNextURI, char **aNextURIMetaData, char **aPlayMedium, char **aRecordMedium, char **aWriteStatus)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)gch.Target;
            string currentType;
            uint   nrTracks;
            string mediaDuration;
            string currentURI;
            string currentURIMetaData;
            string nextURI;
            string nextURIMetaData;
            string playMedium;
            string recordMedium;
            string writeStatus;

            self.GetMediaInfo_Ext(aVersion, aInstanceID, out currentType, out nrTracks, out mediaDuration, out currentURI, out currentURIMetaData, out nextURI, out nextURIMetaData, out playMedium, out recordMedium, out writeStatus);
            *aCurrentType        = (char *)Marshal.StringToHGlobalAnsi(currentType).ToPointer();
            *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);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)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);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)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);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)gch.Target;
            string speed = Marshal.PtrToStringAnsi((IntPtr)aSpeed);

            self.Play(aVersion, aInstanceID, speed);
            return(0);
        }
예제 #5
0
        private static unsafe int DoGetDRMState(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aCurrentDRMState)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)gch.Target;
            string currentDRMState;

            self.GetDRMState(aVersion, aInstanceID, out currentDRMState);
            *aCurrentDRMState = (char *)Marshal.StringToHGlobalAnsi(currentDRMState).ToPointer();
            return(0);
        }
예제 #6
0
        private static unsafe int DoGetCurrentTransportActions(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aActions)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)gch.Target;
            string actions;

            self.GetCurrentTransportActions(aVersion, aInstanceID, out actions);
            *aActions = (char *)Marshal.StringToHGlobalAnsi(actions).ToPointer();
            return(0);
        }
예제 #7
0
        private static unsafe int DoSeek(IntPtr aPtr, uint aVersion, uint aInstanceID, char *aUnit, char *aTarget)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)gch.Target;
            string unit   = Marshal.PtrToStringAnsi((IntPtr)aUnit);
            string target = Marshal.PtrToStringAnsi((IntPtr)aTarget);

            self.Seek(aVersion, aInstanceID, unit, target);
            return(0);
        }
예제 #8
0
        private static unsafe int DoSetNextAVTransportURI(IntPtr aPtr, uint aVersion, uint aInstanceID, char *aNextURI, char *aNextURIMetaData)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)gch.Target;
            string nextURI         = Marshal.PtrToStringAnsi((IntPtr)aNextURI);
            string nextURIMetaData = Marshal.PtrToStringAnsi((IntPtr)aNextURIMetaData);

            self.SetNextAVTransportURI(aVersion, aInstanceID, nextURI, nextURIMetaData);
            return(0);
        }
예제 #9
0
        private static unsafe int DoGetStateVariables(IntPtr aPtr, uint aVersion, uint aInstanceID, char *aStateVariableList, char **aStateVariableValuePairs)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)gch.Target;
            string stateVariableList          = Marshal.PtrToStringAnsi((IntPtr)aStateVariableList);
            string stateVariableValuePairs;

            self.GetStateVariables(aVersion, aInstanceID, stateVariableList, out stateVariableValuePairs);
            *aStateVariableValuePairs = (char *)Marshal.StringToHGlobalAnsi(stateVariableValuePairs).ToPointer();
            return(0);
        }
예제 #10
0
        private static unsafe int DoGetTransportSettings(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aPlayMode, char **aRecQualityMode)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)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);
        }
예제 #11
0
        private static unsafe int DoSetStateVariables(IntPtr aPtr, uint aVersion, uint aInstanceID, char *aAVTransportUDN, char *aServiceType, char *aServiceId, char *aStateVariableValuePairs, char **aStateVariableList)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)gch.Target;
            string aVTransportUDN             = Marshal.PtrToStringAnsi((IntPtr)aAVTransportUDN);
            string serviceType             = Marshal.PtrToStringAnsi((IntPtr)aServiceType);
            string serviceId               = Marshal.PtrToStringAnsi((IntPtr)aServiceId);
            string stateVariableValuePairs = Marshal.PtrToStringAnsi((IntPtr)aStateVariableValuePairs);
            string stateVariableList;

            self.SetStateVariables(aVersion, aInstanceID, aVTransportUDN, serviceType, serviceId, stateVariableValuePairs, out stateVariableList);
            *aStateVariableList = (char *)Marshal.StringToHGlobalAnsi(stateVariableList).ToPointer();
            return(0);
        }
예제 #12
0
        private static unsafe int DoGetDeviceCapabilities(IntPtr aPtr, uint aVersion, uint aInstanceID, char **aPlayMedia, char **aRecMedia, char **aRecQualityModes)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)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);
        }
예제 #13
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);
            DvServiceUpnpOrgAVTransport2 self = (DvServiceUpnpOrgAVTransport2)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);
        }