public static HResult CreateInstance(out NetworkSource pSource) { HResult hr = HResult.S_OK; try { var spSource = new NetworkSource(); spSource.Initialize(); pSource = spSource; } catch (Exception ex) { pSource = null; hr = (HResult)ex.HResult; } return(hr); }
public MediaStream(NetworkSource pSource) { _cRef = 1; _spSource = pSource; _eSourceState = SourceState.SourceState_Invalid; _fActive = false; _flRate = 1.0f; _isVideo = false; _eDropMode = MFQualityDropMode.None; _fDiscontinuity = false; _fDropTime = false; _fInitDropTime = false; _fWaitingForCleanPoint = true; _hnsStartDroppingAt = 0; _hnsAmountToDrop = 0; _samples = new Queue <object>(); _tokens = new NullableQueue(); _spSource = pSource; }
public static HResult CreateInstance(StspStreamDescription pStreamDescription, IBufferPacket pAttributesBuffer, NetworkSource pSource, out MediaStream ppStream) { ppStream = null; HResult hr = HResult.S_OK; try { MediaStream stream = new MediaStream(pSource); if (null == stream) { MFError.ThrowExceptionForHR(HResult.E_OUTOFMEMORY); } stream.Initialize(pStreamDescription, pAttributesBuffer); ppStream = stream; } catch (Exception ex) { hr = (HResult)ex.HResult; } return(hr); }