Esempio n. 1
0
        void IBMDSwitcherStillsCallback.Notify(_BMDSwitcherMediaPoolEventType eventType, IBMDSwitcherFrame frame, int index)
        {
            switch (eventType)
            {
            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeValidChanged:
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeNameChanged:
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeHashChanged:
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeAudioValidChanged:
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeAudioNameChanged:
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeAudioHashChanged:
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeLockBusy:
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeLockIdle:
                OnLockIdle?.Invoke();
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeTransferCompleted:
                OnTransferCompleted?.Invoke();
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeTransferCancelled:
                OnTransferCancelled?.Invoke();
                break;

            case _BMDSwitcherMediaPoolEventType.bmdSwitcherMediaPoolEventTypeTransferFailed:
                OnTransferFailled?.Invoke();
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        public void QueueDownload(string source, string destination, string tag, OnTransferCompleted callback)
        {
            Uri requestUri = new Uri(source, UriKind.Absolute);
            Uri downloadLocation = new Uri(destination, UriKind.Relative);
            BackgroundTransferRequest request = new BackgroundTransferRequest(requestUri, downloadLocation);
            request.TransferPreferences = TransferPreferences.AllowCellularAndBattery;

            request.TransferStatusChanged += new EventHandler<BackgroundTransferEventArgs>(OnBackgroundTransferStatusChanged);
            request.Tag = tag;

            try
            {
                _idMapping.Add(request.RequestId, callback);
                BackgroundTransferService.Add(request);
            }
            catch (InvalidOperationException)
            {
                _requests.Add(request);
            }
        }
Esempio n. 3
0
        public void QueueDownload(string source, string destination, string tag, OnTransferCompleted callback)
        {
            Uri requestUri       = new Uri(source, UriKind.Absolute);
            Uri downloadLocation = new Uri(destination, UriKind.Relative);
            BackgroundTransferRequest request = new BackgroundTransferRequest(requestUri, downloadLocation);

            request.TransferPreferences = TransferPreferences.AllowCellularAndBattery;

            request.TransferStatusChanged += new EventHandler <BackgroundTransferEventArgs>(OnBackgroundTransferStatusChanged);
            request.Tag = tag;

            try
            {
                _idMapping.Add(request.RequestId, callback);
                BackgroundTransferService.Add(request);
            }
            catch (InvalidOperationException)
            {
                _requests.Add(request);
            }
        }