/// <summary> /// Create a new route between |source| and |sink|. Source and sink must be /// valid, compatible (as reported by CefMediaSink::IsCompatibleWith), and a /// route between them must not already exist. |callback| will be executed /// on success or failure. If route creation succeeds it will also trigger an /// asynchronous call to CefMediaObserver::OnRoutes on all registered /// observers. /// </summary> public void CreateRoute(CefMediaSource source, CefMediaSink sink, CefMediaRouteCreateCallback callback) { cef_media_router_t.create_route(_self, source.ToNative(), sink.ToNative(), callback.ToNative()); }
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); }
/// <summary> /// Returns the sink associated with this route. /// </summary> public CefMediaSink GetSink() { return(CefMediaSink.FromNative( cef_media_route_t.get_sink(_self) )); }