Gst.QueryType[] InvokeNative(Gst.Pad pad)
        {
            IntPtr raw_ret = native_cb(pad == null ? IntPtr.Zero : pad.Handle);

            if (raw_ret == IntPtr.Zero)
            {
                return new Gst.QueryType[] {}
            }
            ;

            ArrayList result = new ArrayList();
            bool      term   = false;
            int       ofs    = 0;

            while (!term)
            {
                Gst.QueryType t = (Gst.QueryType)Marshal.ReadInt32(raw_ret, ofs);

                if (t == Gst.QueryType.None)
                {
                    term = true;
                }
                else
                {
                    result.Add(t);
                    ofs += 4;
                }
            }

            return((Gst.QueryType[])result.ToArray(typeof(Gst.QueryType)));
        }
    }
Пример #2
0
        public static string QueryTypeGetName(Gst.QueryType type)
        {
            IntPtr raw_ret = gst_query_type_get_name((int)type);
            string ret     = GLib.Marshaller.Utf8PtrToString(raw_ret);

            return(ret);
        }
Пример #3
0
        public static uint QueryTypeToQuark(Gst.QueryType type)
        {
            uint raw_ret = gst_query_type_to_quark((int)type);
            uint ret     = raw_ret;

            return(ret);
        }
Пример #4
0
        public static Gst.QueryTypeFlags QueryTypeGetFlags(Gst.QueryType type)
        {
            int raw_ret = gst_query_type_get_flags((int)type);

            Gst.QueryTypeFlags ret = (Gst.QueryTypeFlags)raw_ret;
            return(ret);
        }
Пример #5
0
 public Query(Gst.QueryType type, Gst.Structure structure)
 {
     structure.Owned = false;
     Raw             = gst_query_new_custom((int)type, structure == null ? IntPtr.Zero : structure.Handle);
 }