Updated Vala bindings

This commit is contained in:
Sebastian Pölsterl 2009-06-12 19:28:04 +02:00 committed by Wim Taymans
parent 749765b921
commit 833a3d467c
3 changed files with 101 additions and 5 deletions

View file

@ -25,7 +25,9 @@ namespace Gst {
public class RTSPMedia : GLib.Object {
public int active;
public bool buffering;
public weak GLib.List @dynamic;
public weak Gst.Element element;
public weak Gst.Element fakesink;
public uint id;
public bool is_live;
public weak Gst.Element pipeline;
@ -50,7 +52,7 @@ namespace Gst {
public void set_reusable (bool reusable);
public void set_shared (bool shared);
public bool set_state (Gst.State state, GLib.Array trans);
public bool unprepare ();
public virtual bool unprepare ();
[NoAccessorMethod]
public bool reusable { get; set; }
[NoAccessorMethod]
@ -62,10 +64,13 @@ namespace Gst {
public weak GLib.Mutex @lock;
public weak GLib.HashTable medias;
public weak GLib.Mutex medias_lock;
public void collect_streams (Gst.RTSPUrl url, Gst.RTSPMedia media);
[NoWrapper]
public virtual void configure (Gst.RTSPMedia media);
public virtual Gst.RTSPMedia? @construct (Gst.RTSPUrl url);
[NoWrapper]
public virtual Gst.Element create_pipeline (Gst.RTSPMedia media);
[NoWrapper]
public virtual string gen_key (Gst.RTSPUrl url);
[NoWrapper]
public virtual Gst.Element? get_element (Gst.RTSPUrl url);
@ -102,12 +107,17 @@ namespace Gst {
public weak Gst.Element payloader;
public bool prepared;
public weak Gst.Pad recv_rtcp_sink;
public weak Gst.Pad recv_rtp_sink;
[CCode (array_length = false)]
public weak Gst.Element[] selector;
public weak Gst.Pad send_rtcp_src;
public weak Gst.Pad send_rtp_sink;
public weak Gst.Pad send_rtp_src;
public weak Gst.RTSPRange server_port;
public weak GLib.Object session;
public weak Gst.Pad srcpad;
[CCode (array_length = false)]
public weak Gst.Element[] tee;
public weak GLib.List transports;
[CCode (array_length = false)]
public weak Gst.Element[] udpsink;
@ -117,12 +127,18 @@ namespace Gst {
public Gst.FlowReturn rtp (Gst.Buffer buffer);
}
[Compact]
[CCode (cheader_filename = "gst/gst.h")]
[CCode (cheader_filename = "gst/rtsp-server/rtsp-media.h")]
public class RTSPMediaTrans {
public bool active;
public uint idx;
public weak GLib.DestroyNotify ka_notify;
public void* ka_user_data;
public weak Gst.RTSPKeepAliveFunc keep_alive;
public weak GLib.DestroyNotify notify;
public weak GLib.Object rtpsource;
public weak Gst.RTSPSendFunc send_rtcp;
public weak Gst.RTSPSendFunc send_rtp;
public bool timeout;
public weak Gst.RTSPTransport transport;
public void* user_data;
}
@ -207,12 +223,19 @@ namespace Gst {
public weak Gst.RTSPMediaStream media_stream;
public weak Gst.RTSPMediaTrans trans;
public void set_callbacks (Gst.RTSPSendFunc send_rtp, Gst.RTSPSendFunc send_rtcp, GLib.DestroyNotify notify);
public void set_keepalive (Gst.RTSPKeepAliveFunc keep_alive, GLib.DestroyNotify notify);
public Gst.RTSPTransport set_transport (Gst.RTSPTransport ct);
}
[CCode (cheader_filename = "gst/gst.h")]
[CCode (cheader_filename = "gst/rtsp-server/rtsp-media.h")]
public delegate void RTSPKeepAliveFunc ();
[CCode (cheader_filename = "gst/rtsp-server/rtsp-media.h")]
public delegate bool RTSPSendFunc (Gst.Buffer buffer, uchar channel);
[CCode (cheader_filename = "gst/gst.h")]
[CCode (cheader_filename = "gst/rtsp-server/rtsp-session-pool.h")]
public delegate bool RTSPSessionPoolFunc (Gst.RTSPSessionPool pool);
[CCode (cheader_filename = "gst/gst.h")]
public static Gst.SDPMessage rtsp_sdp_from_media (Gst.RTSPMedia media);
public static Gst.RTSPResult rtsp_params_get (Gst.RTSPClient client, Gst.RTSPUrl uri, Gst.RTSPSession session, Gst.RTSPMessage request, Gst.RTSPMessage response);
[CCode (cheader_filename = "gst/gst.h")]
public static Gst.RTSPResult rtsp_params_set (Gst.RTSPClient client, Gst.RTSPUrl uri, Gst.RTSPSession session, Gst.RTSPMessage request, Gst.RTSPMessage response);
[CCode (cheader_filename = "gst/rtsp-server/rtsp-sdp.h")]
public static unowned Gst.SDPMessage rtsp_sdp_from_media (Gst.RTSPMedia media);
}

View file

@ -1,12 +1,38 @@
<?xml version="1.0"?>
<api version="1.0">
<namespace name="Gst">
<function name="rtsp_params_get" symbol="gst_rtsp_params_get">
<return-type type="GstRTSPResult"/>
<parameters>
<parameter name="client" type="GstRTSPClient*"/>
<parameter name="uri" type="GstRTSPUrl*"/>
<parameter name="session" type="GstRTSPSession*"/>
<parameter name="request" type="GstRTSPMessage*"/>
<parameter name="response" type="GstRTSPMessage*"/>
</parameters>
</function>
<function name="rtsp_params_set" symbol="gst_rtsp_params_set">
<return-type type="GstRTSPResult"/>
<parameters>
<parameter name="client" type="GstRTSPClient*"/>
<parameter name="uri" type="GstRTSPUrl*"/>
<parameter name="session" type="GstRTSPSession*"/>
<parameter name="request" type="GstRTSPMessage*"/>
<parameter name="response" type="GstRTSPMessage*"/>
</parameters>
</function>
<function name="rtsp_sdp_from_media" symbol="gst_rtsp_sdp_from_media">
<return-type type="GstSDPMessage*"/>
<parameters>
<parameter name="media" type="GstRTSPMedia*"/>
</parameters>
</function>
<callback name="GstRTSPKeepAliveFunc">
<return-type type="void"/>
<parameters>
<parameter name="user_data" type="gpointer"/>
</parameters>
</callback>
<callback name="GstRTSPSendFunc">
<return-type type="gboolean"/>
<parameters>
@ -41,6 +67,7 @@
<field name="payloader" type="GstElement*"/>
<field name="prepared" type="gboolean"/>
<field name="recv_rtcp_sink" type="GstPad*"/>
<field name="recv_rtp_sink" type="GstPad*"/>
<field name="send_rtp_sink" type="GstPad*"/>
<field name="send_rtp_src" type="GstPad*"/>
<field name="send_rtcp_src" type="GstPad*"/>
@ -49,6 +76,8 @@
<field name="udpsink" type="GstElement*[]"/>
<field name="appsrc" type="GstElement*[]"/>
<field name="appsink" type="GstElement*[]"/>
<field name="tee" type="GstElement*[]"/>
<field name="selector" type="GstElement*[]"/>
<field name="server_port" type="GstRTSPRange"/>
<field name="caps_sig" type="gulong"/>
<field name="caps" type="GstCaps*"/>
@ -60,7 +89,13 @@
<field name="send_rtcp" type="GstRTSPSendFunc"/>
<field name="user_data" type="gpointer"/>
<field name="notify" type="GDestroyNotify"/>
<field name="keep_alive" type="GstRTSPKeepAliveFunc"/>
<field name="ka_user_data" type="gpointer"/>
<field name="ka_notify" type="GDestroyNotify"/>
<field name="active" type="gboolean"/>
<field name="timeout" type="gboolean"/>
<field name="transport" type="GstRTSPTransport*"/>
<field name="rtpsource" type="GObject*"/>
</struct>
<struct name="GstRTSPSessionMedia">
<method name="get_stream" symbol="gst_rtsp_session_media_get_stream">
@ -93,6 +128,15 @@
<parameter name="notify" type="GDestroyNotify"/>
</parameters>
</method>
<method name="set_keepalive" symbol="gst_rtsp_session_stream_set_keepalive">
<return-type type="void"/>
<parameters>
<parameter name="stream" type="GstRTSPSessionStream*"/>
<parameter name="keep_alive" type="GstRTSPKeepAliveFunc"/>
<parameter name="user_data" type="gpointer"/>
<parameter name="notify" type="GDestroyNotify"/>
</parameters>
</method>
<method name="set_transport" symbol="gst_rtsp_session_stream_set_transport">
<return-type type="GstRTSPTransport*"/>
<parameters>
@ -243,14 +287,22 @@
<parameter name="message" type="GstMessage*"/>
</parameters>
</vfunc>
<vfunc name="unprepare">
<return-type type="gboolean"/>
<parameters>
<parameter name="media" type="GstRTSPMedia*"/>
</parameters>
</vfunc>
<field name="shared" type="gboolean"/>
<field name="reusable" type="gboolean"/>
<field name="reused" type="gboolean"/>
<field name="element" type="GstElement*"/>
<field name="streams" type="GArray*"/>
<field name="dynamic" type="GList*"/>
<field name="prepared" type="gboolean"/>
<field name="active" type="gint"/>
<field name="pipeline" type="GstElement*"/>
<field name="fakesink" type="GstElement*"/>
<field name="source" type="GSource*"/>
<field name="id" type="guint"/>
<field name="is_live" type="gboolean"/>
@ -260,6 +312,14 @@
<field name="range" type="GstRTSPTimeRange"/>
</object>
<object name="GstRTSPMediaFactory" parent="GObject" type-name="GstRTSPMediaFactory" get-type="gst_rtsp_media_factory_get_type">
<method name="collect_streams" symbol="gst_rtsp_media_factory_collect_streams">
<return-type type="void"/>
<parameters>
<parameter name="factory" type="GstRTSPMediaFactory*"/>
<parameter name="url" type="GstRTSPUrl*"/>
<parameter name="media" type="GstRTSPMedia*"/>
</parameters>
</method>
<method name="construct" symbol="gst_rtsp_media_factory_construct">
<return-type type="GstRTSPMedia*"/>
<parameters>
@ -312,6 +372,13 @@
<parameter name="url" type="GstRTSPUrl*"/>
</parameters>
</vfunc>
<vfunc name="create_pipeline">
<return-type type="GstElement*"/>
<parameters>
<parameter name="factory" type="GstRTSPMediaFactory*"/>
<parameter name="media" type="GstRTSPMedia*"/>
</parameters>
</vfunc>
<vfunc name="gen_key">
<return-type type="gchar*"/>
<parameters>

View file

@ -1,6 +1,7 @@
Gst cprefix="Gst" lower_case_cprefix="gst_" cheader_filename="gst/gst.h"
GstRTSPClient cheader_filename="gst/rtsp-server/rtsp-client.h"
GstRTSPMedia cheader_filename="gst/rtsp-server/rtsp-media.h"
GstRTSPMediaTrans cheader_filename="gst/rtsp-server/rtsp-media.h"
GstRTSPMediaFactory cheader_filename="gst/rtsp-server/rtsp-media-factory.h"
GstRTSPMediaMapping cheader_filename="gst/rtsp-server/rtsp-media-mapping.h"
GstRTSPMediaStream cheader_filename="gst/rtsp-server/rtsp-media.h"
@ -15,6 +16,7 @@ gst_rtsp_media_factory_get_launch transfer_ownership="1"
gst_rtsp_media_factory_construct transfer_ownership="1" nullable="1"
gst_rtsp_media_factory_gen_key transfer_ownership="1"
gst_rtsp_media_factory_get_element transfer_ownership="1" nullable="1"
gst_rtsp_media_factory_create_pipeline transfer_ownership="1"
gst_rtsp_media_mapping_find_factory transfer_ownership="1" nullable="1"
gst_rtsp_media_mapping_find_media transfer_ownership="1" nullable="1"
gst_rtsp_sdp_from_media transfer_ownership="1"
@ -30,3 +32,7 @@ gst_rtsp_session_pool_create_session_id transfer_ownership="1"
gst_rtsp_session_pool_create_watch transfer_ownership="1"
gst_rtsp_session_pool_find transfer_ownership="1" nullable="1"
gst_rtsp_session_stream_set_transport transfer_ownership="1"
GstRTSPKeepAliveFunc cheader_filename="gst/rtsp-server/rtsp-media.h"
GstRTSPSendFunc cheader_filename="gst/rtsp-server/rtsp-media.h"
GstRTSPSessionPoolFunc cheader_filename="gst/rtsp-server/rtsp-session-pool.h"
gst_rtsp_sdp_from_media cheader_filename="gst/rtsp-server/rtsp-sdp.h"