mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
73ed037fa4
* gstreamer-sharp/BindingHelper.cs: Static helper class to assist in making element bindings (delegate manipulation/invocation) * gstreamer-sharp/DynamicSignal.cs: Updated DynamicSignalArgs so they can more easily be derived * gstreamer-sharp/Makefile.am: Updated build * sample/HelloWorld.cs: More cleaning * sample/Makefile.am: * sample/TypeFind.cs: Added typefind sample * gstreamer-sharp.mdp: Updated MonoDevelop project * gstreamer-sharp/plugins-base/DecodeBin.cs: Signal support rewritten to use BindingHelper/DynamicSignal * gstreamer-sharp/plugins-base/TypeFindElement.cs: New typefind element wrapper using BindingHelper/DynamicSignal * gstreamer-sharp/Element.custom: Fixed property getter/setter methods and added indexer wrapper for property lookup for syntax convenience git-svn-id: svn://anonsvn.mono-project.com/source/branches/abock/gstreamer-sharp@62570 e3ebcda4-bce8-0310-ba0a-eca2169e7518
37 lines
972 B
C#
37 lines
972 B
C#
using System;
|
|
using Gst;
|
|
|
|
public static class GstTypefindTest
|
|
{
|
|
private static TypeFindElement typefind;
|
|
|
|
public static void Main(string [] args)
|
|
{
|
|
Application.Init();
|
|
|
|
Pipeline pipeline = new Pipeline("pipeline");
|
|
Element source = ElementFactory.Make("filesrc", "source");
|
|
typefind = TypeFindElement.Make("typefind");
|
|
Element sink = ElementFactory.Make("fakesink", "sink");
|
|
|
|
source.SetProperty("location", args[0]);
|
|
|
|
typefind.HaveType += OnHaveType;
|
|
|
|
pipeline.AddMany(source, typefind, sink);
|
|
source.Link(typefind);
|
|
typefind.Link(sink);
|
|
|
|
pipeline.SetState(State.Paused);
|
|
pipeline.SetState(State.Null);
|
|
|
|
pipeline.Dispose();
|
|
}
|
|
|
|
private static void OnHaveType(object o, HaveTypeArgs args)
|
|
{
|
|
args.Caps.Refcount++;
|
|
Console.WriteLine("MimeType: {0}, {1}", args.Caps, typefind.Caps);
|
|
}
|
|
}
|
|
|