本文整理汇总了C#中Gst类的典型用法代码示例。如果您正苦于以下问题:C# Gst类的具体用法?C# Gst怎么用?C# Gst使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Gst类属于命名空间,在下文中一共展示了Gst类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddCodecDescriptionToTagList
public static bool AddCodecDescriptionToTagList(Gst.TagList taglist, string codec_tag, Gst.Caps caps) {
IntPtr native_codec_tag = Gst.GLib.Marshaller.StringToPtrGStrdup (codec_tag);
bool raw_ret = gst_pb_utils_add_codec_description_to_tag_list(taglist == null ? IntPtr.Zero : taglist.Handle, native_codec_tag, caps == null ? IntPtr.Zero : caps.Handle);
bool ret = raw_ret;
Gst.GLib.Marshaller.Free (native_codec_tag);
return ret;
}
示例2: ParseRecordToggled
public static void ParseRecordToggled(Gst.Message message, out Gst.Interfaces.MixerTrack track, out bool record)
{
IntPtr native_ptr;
gst_mixer_message_parse_record_toggled (message == null ? IntPtr.Zero : message.Handle, out native_ptr, out record);
track = (MixerTrack) GLib.Object.GetObject (native_ptr, false);
}
示例3: PushAppData
static void PushAppData (object o, Gst.App.NeedDataArgs args) {
ulong mseconds = 0;
if (appsrc.Clock != null)
mseconds = appsrc.Clock.Time / Clock.MSecond;
Gst.Buffer buffer = DrawData (mseconds);
appsrc.PushBuffer (buffer);
}
示例4: InvokeNative
bool InvokeNative (Gst.Index index, Gst.Object writer, out string writer_string)
{
IntPtr native_writer_string;
bool result = native_cb (index == null ? IntPtr.Zero : index.Handle, writer == null ? IntPtr.Zero : writer.Handle, out native_writer_string, __data);
writer_string = Gst.GLib.Marshaller.PtrToStringGFree(native_writer_string);
return result;
}
示例5: NewMissingElement
public static Gst.Message NewMissingElement(Gst.Object src, string factory)
{
IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (factory);
Message msg = (Message) Gst.MiniObject.GetObject (gst_missing_element_message_new (src.Handle, native_str), true);
GLib.Marshaller.Free (native_str);
return msg;
}
示例6: bus_call
static Boolean bus_call(Gst.Bus bus, Gst.Message _msg)
{
switch (_msg.Type)
{
case Gst.MessageType.Eos:
{
Console.WriteLine("End-of-stream");
_loop.Quit();
break;
}
case Gst.MessageType.Error:
{
/*Gst.GLib.GString*/ String _debug;
Enum _err;
_msg.ParseError(out _err, out _debug);
//g_free(debug);
Console.Error.WriteLine("{0}", _debug);//_err.ToString());
//g_error_free(err);
_loop.Quit();
break;
}
default:
break;
}
return true;
}
示例7: InvokeNative
Gst.FlowReturn InvokeNative (Gst.Object obj, ulong offset, uint length, out Gst.Buffer buffer)
{
IntPtr native_buffer;
Gst.FlowReturn result = (Gst.FlowReturn) native_cb (obj == null ? IntPtr.Zero : obj.Handle, offset, length, out native_buffer);
buffer = Gst.MiniObject.GetObject(native_buffer, true) as Gst.Buffer;
return result;
}
示例8: TypeFind
public static Gst.Caps TypeFind(Gst.Object obj, Gst.Buffer buf, out Gst.TypeFindProbability prob) {
int native_prob;
IntPtr raw_ret = gst_type_find_helper_for_buffer(obj == null ? IntPtr.Zero : obj.Handle, buf == null ? IntPtr.Zero : buf.Handle, out native_prob);
Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) Gst.GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
prob = (Gst.TypeFindProbability) native_prob;
return ret;
}
示例9: LoadPreset
public static bool LoadPreset (Gst.GLib.Object o, string name) {
IntPtr native_name = Gst.GLib.Marshaller.StringToPtrGStrdup (name);
bool raw_ret = default_iface.LoadPreset (o.Handle, native_name);
bool ret = raw_ret;
Gst.GLib.Marshaller.Free (native_name);
return ret;
}
示例10: OnTransformIp
protected override FlowReturn OnTransformIp (Gst.Buffer buf) {
if (!buf.IsWritable)
return FlowReturn.Error;
Cairo.ImageSurface img = new Cairo.ImageSurface (buf.Data, Cairo.Format.Rgb24, width, height, width*4);
using (Cairo.Context context = new Cairo.Context (img)) {
double dx = (double) ( (buf.Timestamp / Clock.MSecond) % 2180) / 5;
context.Save ();
context.Scale (width / 640.0, height / 480.0);
context.MoveTo (300, 10 + dx);
context.LineTo (500 - dx, 400);
context.LineWidth = 4.0;
context.Color = new Color (0, 0, 1.0);
context.Stroke();
context.Restore ();
if (lastX != -1 && lastY != -1) {
context.Color = new Color (1.0, 0, 0);
context.Translate (lastX, lastY);
context.Scale (Math.Min (width / 640.0, height / 480.0), Math.Min (width / 640.0, height / 480.0));
context.Arc (0, 0, 10.0, 0.0, 2 * Math.PI);
context.Fill();
}
}
img.Destroy ();
return base.OnTransformIp (buf);
}
示例11: InvokeNative
Gst.FlowReturn InvokeNative (Gst.Pad pad, ulong offset, uint size, Gst.Caps caps, out Gst.Buffer buf)
{
IntPtr native_buf;
Gst.FlowReturn result = (Gst.FlowReturn) native_cb (pad == null ? IntPtr.Zero : pad.Handle, offset, size, caps == null ? IntPtr.Zero : caps.Handle, out native_buf);
buf = Gst.MiniObject.GetObject(native_buf) as Gst.Buffer;
return result;
}
示例12: SetAngles
public static void SetAngles(Gst.Query query, uint cur_angle, uint n_angles)
{
if (!query.IsWritable)
throw new ApplicationException ();
gst_navigation_query_set_angles (query.Handle, cur_angle, n_angles);
}
示例13: HasFieldTyped
public bool HasFieldTyped(string fieldname, Gst.GLib.GType type) {
IntPtr native_fieldname = Gst.GLib.Marshaller.StringToPtrGStrdup (fieldname);
bool raw_ret = gst_structure_has_field_typed(Handle, native_fieldname, type.Val);
bool ret = raw_ret;
Gst.GLib.Marshaller.Free (native_fieldname);
return ret;
}
示例14: Value
public Value (Gst.GLib.GType gtype)
{
type = IntPtr.Zero;
pad1 = new Padding ();
pad2 = new Padding ();
g_value_init (ref this, gtype.Val);
}
示例15: ParseOptionsListChanged
public static void ParseOptionsListChanged(Gst.Message message, out Gst.Interfaces.MixerOptions options)
{
IntPtr native_options;
gst_mixer_message_parse_options_list_changed (message == null ? IntPtr.Zero : message.Handle, out native_options);
options = (MixerOptions) GLib.Object.GetObject (native_options, false);
}