public CompositeMemoryInputMedia(IntPtr hMediaLib) : base(hMediaLib) { ImemGet pLock = OnImemGet; ImemRelease pUnlock = OnImemRelease; m_pLock = Marshal.GetFunctionPointerForDelegate(pLock); m_pUnlock = Marshal.GetFunctionPointerForDelegate(pUnlock); m_callbacks.Add(pLock); m_callbacks.Add(pUnlock); m_mediaHandler = this; DeliveryMode = MediaDeliveryMode.Push; }
public void SetPullModeMediaHandler(IPullMediaHandler mediaHandler) { if (State == MediaState.Playing) { throw new InvalidOperationException("Operation not allowed. Media is playing"); } if (mediaHandler == null) { throw new ArgumentNullException("mediaHandler"); } m_mediaHandler = mediaHandler; DeliveryMode = MediaDeliveryMode.Pull; }