Exemplo n.º 1
0
 public unsafe void CreateRoute(cef_media_source_t *source, cef_media_sink_t *sink, cef_media_route_create_callback_t *callback)
 {
     fixed(cef_media_router_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_media_router_t *, cef_media_source_t *, cef_media_sink_t *, cef_media_route_create_callback_t *, void >)create_route)(self, source, sink, callback);
     }
 }
Exemplo n.º 2
0
 internal static CefMediaSink FromNativeOrNull(cef_media_sink_t *ptr)
 {
     if (ptr == null)
     {
         return(null);
     }
     return(new CefMediaSink(ptr));
 }
Exemplo n.º 3
0
 private CefMediaSink(cef_media_sink_t *ptr)
 {
     if (ptr == null)
     {
         throw new ArgumentNullException("ptr");
     }
     _self = ptr;
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
        public static int release(cef_media_sink_t *self)
        {
            release_delegate d;
            var p = self->_base._release;

            if (p == _p1)
            {
                d = _d1;
            }
            else
            {
                d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
                if (_p1 == IntPtr.Zero)
                {
                    _d1 = d; _p1 = p;
                }
            }
            return(d(self));
        }
        public static int is_compatible_with(cef_media_sink_t *self, cef_media_source_t *source)
        {
            is_compatible_with_delegate d;
            var p = self->_is_compatible_with;

            if (p == _pc)
            {
                d = _dc;
            }
            else
            {
                d = (is_compatible_with_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_compatible_with_delegate));
                if (_pc == IntPtr.Zero)
                {
                    _dc = d; _pc = p;
                }
            }
            return(d(self, source));
        }
        public static void get_device_info(cef_media_sink_t *self, cef_media_sink_device_info_callback_t *callback)
        {
            get_device_info_delegate d;
            var p = self->_get_device_info;

            if (p == _p9)
            {
                d = _d9;
            }
            else
            {
                d = (get_device_info_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_device_info_delegate));
                if (_p9 == IntPtr.Zero)
                {
                    _d9 = d; _p9 = p;
                }
            }
            d(self, callback);
        }
        public static int is_dial_sink(cef_media_sink_t *self)
        {
            is_dial_sink_delegate d;
            var p = self->_is_dial_sink;

            if (p == _pb)
            {
                d = _db;
            }
            else
            {
                d = (is_dial_sink_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_dial_sink_delegate));
                if (_pb == IntPtr.Zero)
                {
                    _db = d; _pb = p;
                }
            }
            return(d(self));
        }
        public static cef_string_userfree *get_description(cef_media_sink_t *self)
        {
            get_description_delegate d;
            var p = self->_get_description;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (get_description_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_description_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            return(d(self));
        }
        public static CefMediaSinkIconType get_icon_type(cef_media_sink_t *self)
        {
            get_icon_type_delegate d;
            var p = self->_get_icon_type;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (get_icon_type_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_icon_type_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            return(d(self));
        }
        public static int is_valid(cef_media_sink_t *self)
        {
            is_valid_delegate d;
            var p = self->_is_valid;

            if (p == _p5)
            {
                d = _d5;
            }
            else
            {
                d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate));
                if (_p5 == IntPtr.Zero)
                {
                    _d5 = d; _p5 = p;
                }
            }
            return(d(self));
        }
        public static cef_string_userfree *get_name(cef_media_sink_t *self)
        {
            get_name_delegate d;
            var p = self->_get_name;

            if (p == _p6)
            {
                d = _d6;
            }
            else
            {
                d = (get_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_name_delegate));
                if (_p6 == IntPtr.Zero)
                {
                    _d6 = d; _p6 = p;
                }
            }
            return(d(self));
        }
        public static int has_at_least_one_ref(cef_media_sink_t *self)
        {
            has_at_least_one_ref_delegate d;
            var p = self->_base._has_at_least_one_ref;

            if (p == _p3)
            {
                d = _d3;
            }
            else
            {
                d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate));
                if (_p3 == IntPtr.Zero)
                {
                    _d3 = d; _p3 = p;
                }
            }
            return(d(self));
        }
        public static void add_ref(cef_media_sink_t *self)
        {
            add_ref_delegate d;
            var p = self->_base._add_ref;

            if (p == _p0)
            {
                d = _d0;
            }
            else
            {
                d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
                if (_p0 == IntPtr.Zero)
                {
                    _d0 = d; _p0 = p;
                }
            }
            d(self);
        }
Exemplo n.º 15
0
 internal static CefMediaSink FromNative(cef_media_sink_t *ptr)
 {
     return(new CefMediaSink(ptr));
 }
Exemplo n.º 16
0
 public unsafe extern void CreateRoute(cef_media_source_t *source, cef_media_sink_t *sink, cef_media_route_create_callback_t *callback);
        public static void create_route(cef_media_router_t *self, cef_media_source_t *source, cef_media_sink_t *sink, cef_media_route_create_callback_t *callback)
        {
            create_route_delegate d;
            var p = self->_create_route;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (create_route_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(create_route_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            d(self, source, sink, callback);
        }
Exemplo n.º 18
0
 public CefMediaSink(cef_media_sink_t *instance)
     : base((cef_base_ref_counted_t *)instance)
 {
 }