public unsafe void OnSinks(UIntPtr sinksCount, [Immutable] cef_media_sink_t **sinks) { fixed(cef_media_observer_t *self = &this) { ((delegate * unmanaged[Stdcall] < cef_media_observer_t *, UIntPtr, cef_media_sink_t **, void >)on_sinks)(self, sinksCount, sinks); } }
private void on_sinks(cef_media_observer_t *self, UIntPtr sinksCount, cef_media_sink_t **sinks) { CheckSelf(self); var mSinksCount = checked ((int)sinksCount); var mSinks = new CefMediaSink[mSinksCount]; for (var i = 0; i < mSinksCount; i++) { mSinks[i] = CefMediaSink.FromNative(sinks[i]); } OnSinks(mSinks); }
private static unsafe void OnSinksImpl(cef_media_observer_t *self, UIntPtr sinksCount, cef_media_sink_t **sinks) { var instance = GetInstance((IntPtr)self) as CefMediaObserver; if (instance == null || ((ICefMediaObserverPrivate)instance).AvoidOnSinks()) { return; } CefMediaSink[] obj_sinks = new CefMediaSink[(int)sinksCount]; for (int i = 0; i < obj_sinks.Length; i++) { var item = *(sinks + i); item->@base.AddRef(); obj_sinks[i] = CefMediaSink.Wrap(CefMediaSink.Create, item); } instance.OnSinks(obj_sinks); }
public unsafe extern void OnSinks(UIntPtr sinksCount, [Immutable] cef_media_sink_t **sinks);