cothread_state *thread, cothread_func func,int argc, char **argv
</FUNCTION>
<FUNCTION>
+<NAME>cothread_getcurrent</NAME>
+<RETURNS>int </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
<NAME>cothread_switch</NAME>
<RETURNS>void </RETURNS>
cothread_state *thread
<RETURNS>void </RETURNS>
void
</FUNCTION>
-<MACRO>
-<NAME>DEBUG</NAME>
-#define DEBUG(format, args...) g_print("DEBUG:(%d) " format, getpid() , ##args)
-</MACRO>
-<MACRO>
-<NAME>DEBUG</NAME>
-#define DEBUG(format, args...)
-</MACRO>
<VARIABLE>
<NAME>gst_bin_details</NAME>
extern GstElementDetails gst_bin_details;
cothread_context *threadcontext;
gboolean use_cothreads;
+ GList *outside_schedules;
};
</STRUCT>
<FUNCTION>
<RETURNS>GstElement *</RETURNS>
gchar *name
</FUNCTION>
-<FUNCTION>
-<NAME>gst_connection_push</NAME>
-<RETURNS>void </RETURNS>
-GstConnection *connection
-</FUNCTION>
<ENUM>
<NAME>GstElementState</NAME>
typedef enum {
GST_ELEMENT_MULTI_IN = (1 << 4),
GST_ELEMENT_THREAD_SUGGESTED = (1 << 5),
GST_ELEMENT_NO_SEEK = (1 << 6),
+
+ GST_ELEMENT_NEW_LOOPFUNC = (1 << 16),
+ GST_ELEMENT_COTHREAD_STOPPING = (1 << 17),
} GstElementFlags;
</ENUM>
<MACRO>
<NAME>GST_ELEMENT_IS_MULTI_IN</NAME>
-#define GST_ELEMENT_IS_MULTI_IN(obj) (GST_FLAGS(obj) & GST_ELEMENT_MULTI_IN)
+#define GST_ELEMENT_IS_MULTI_IN(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_MULTI_IN))
</MACRO>
<MACRO>
<NAME>GST_ELEMENT_IS_THREAD_SUGGESTED</NAME>
-#define GST_ELEMENT_IS_THREAD_SUGGESTED(obj) (GST_FLAGS(obj) & GST_ELEMENT_THREAD_SUGGESTED)
+#define GST_ELEMENT_IS_THREAD_SUGGESTED(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_THREAD_SUGGESTED))
+</MACRO>
+<MACRO>
+<NAME>GST_ELEMENT_IS_COTHREAD_STOPPING</NAME>
+#define GST_ELEMENT_IS_COTHREAD_STOPPING(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_COTHREAD_STOPPING))
</MACRO>
<STRUCT>
<NAME>GstElement</NAME>
<NAME>GstElementDetails</NAME>
struct GstElementDetails {
gchar *longname; /* long, english name */
- gchar *class; /* type of element, kinda */
+ gchar *klass; /* type of element, kinda */
gchar *description; /* insights of one form or another */
gchar *version; /* version of the element */
gchar *author; /* who wrote this thing? */
GstElementDetails *details; /* pointer to details struct */
- GList *src_types;
- GList *sink_types;
+ GList *padfactories;
};
</STRUCT>
<FUNCTION>
GstElementFactory *elementfactory
</FUNCTION>
<FUNCTION>
-<NAME>gst_elementfactory_add_src</NAME>
+<NAME>gst_elementfactory_unregister</NAME>
<RETURNS>void </RETURNS>
-GstElementFactory *elementfactory, guint16 id
+GstElementFactory *elementfactory
</FUNCTION>
<FUNCTION>
-<NAME>gst_elementfactory_add_sink</NAME>
+<NAME>gst_elementfactory_add_pad</NAME>
<RETURNS>void </RETURNS>
-GstElementFactory *elementfactory, guint16 id
+GstElementFactory *elementfactory,GstPadFactory *pad
</FUNCTION>
<FUNCTION>
<NAME>gst_elementfactory_find</NAME>
</MACRO>
<MACRO>
<NAME>GST_PAD_CONNECTED</NAME>
-#define GST_PAD_CONNECTED(pad) (pad && (pad)->peer != NULL)
+#define GST_PAD_CONNECTED(pad) ((pad) && (pad)->peer != NULL)
</MACRO>
<MACRO>
<NAME>GST_PAD_CAN_PULL</NAME>
-#define GST_PAD_CAN_PULL(pad) (pad && (pad)->pullfunc != NULL)
+#define GST_PAD_CAN_PULL(pad) ((pad) && (pad)->pullfunc != NULL)
</MACRO>
<STRUCT>
<NAME>GstPad</NAME>
GST_PAD_SINK,
} GstPadDirection;
</ENUM>
+<ENUM>
+<NAME>GstPadFlags</NAME>
+typedef enum {
+ GST_PAD_DISABLED = (1 << 4),
+} GstPadFlags;
+</ENUM>
<STRUCT>
<NAME>GstPad</NAME>
struct GstPad {
GstObject object;
gchar *name;
- guint16 type;
+ GstCaps *caps;
+
+ cothread_state *threadstate;
GstPadDirection direction;
GstBuffer *bufpen;
GstPadChainFunction chainfunc;
+ GstPadPushFunction pushfunc;
GstPadPullFunction pullfunc;
GstPadPullRegionFunction pullregionfunc;
- GstPadPushFunction pushfunc;
GstPadQoSFunction qosfunc;
GstObject *parent;
GList *ghostparents;
};
</STRUCT>
+<ENUM>
+<NAME>GstPadPresence</NAME>
+typedef enum {
+ GST_PAD_ALWAYS,
+ GST_PAD_SOMETIMES,
+} GstPadPresence;
+</ENUM>
+<STRUCT>
+<NAME>GstPadFactory</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GstPadFactory</NAME>
+struct GstPadFactory {
+ gchar *nametemplate;
+ GstCapsFactory *caps;
+ GstPadDirection direction;
+ GstPadPresence presence;
+ gpointer priv;
+};
+</STRUCT>
<FUNCTION>
<NAME>gst_pad_get_type</NAME>
<RETURNS>GtkType </RETURNS>
GstPad *pad, GstPadPullFunction pull
</FUNCTION>
<FUNCTION>
+<NAME>gst_pad_set_pullregion_function</NAME>
+<RETURNS>void </RETURNS>
+GstPad *pad, GstPadPullRegionFunction pullregion
+</FUNCTION>
+<FUNCTION>
<NAME>gst_pad_set_qos_function</NAME>
<RETURNS>void </RETURNS>
GstPad *pad, GstPadQoSFunction qos
</FUNCTION>
<FUNCTION>
-<NAME>gst_pad_get_type_id</NAME>
-<RETURNS>guint16 </RETURNS>
-GstPad *pad
+<NAME>gst_pad_set_caps</NAME>
+<RETURNS>void </RETURNS>
+GstPad *pad, GstCaps *caps
</FUNCTION>
<FUNCTION>
-<NAME>gst_pad_set_type_id</NAME>
-<RETURNS>void </RETURNS>
-GstPad *pad, guint16 id
+<NAME>gst_pad_get_caps</NAME>
+<RETURNS>GstCaps *</RETURNS>
+GstPad *pad
</FUNCTION>
<FUNCTION>
<NAME>gst_pad_set_name</NAME>
<RETURNS>void </RETURNS>
xmlNodePtr parent, GstObject *element, GHashTable *elements
</FUNCTION>
+<FUNCTION>
+<NAME>gst_padfactory_create</NAME>
+<RETURNS>GstPad *</RETURNS>
+GstPadFactory *factory, gchar *name
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_padfactory_get_caps</NAME>
+<RETURNS>GstCaps *</RETURNS>
+GstPadFactory *factory
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_padfactory_save_thyself</NAME>
+<RETURNS>xmlNodePtr </RETURNS>
+GstPadFactory *pad, xmlNodePtr parent
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_padfactory_load_thyself</NAME>
+<RETURNS>GstPadFactory *</RETURNS>
+xmlNodePtr parent
+</FUNCTION>
<VARIABLE>
<NAME>gst_pipeline_details</NAME>
extern GstElementDetails gst_pipeline_details;
gchar *name
</FUNCTION>
<FUNCTION>
+<NAME>gst_plugin_set_longname</NAME>
+<RETURNS>void </RETURNS>
+GstPlugin *plugin, gchar *longname
+</FUNCTION>
+<FUNCTION>
<NAME>gst_plugin_load_all</NAME>
<RETURNS>void </RETURNS>
void
gchar *name
</FUNCTION>
<FUNCTION>
-<NAME>gst_library_load</NAME>
+<NAME>gst_plugin_load_absolute</NAME>
<RETURNS>gboolean </RETURNS>
gchar *name
</FUNCTION>
<FUNCTION>
-<NAME>gst_plugin_load_absolute</NAME>
+<NAME>gst_library_load</NAME>
<RETURNS>gboolean </RETURNS>
gchar *name
</FUNCTION>
<FUNCTION>
-<NAME>gst_plugin_set_longname</NAME>
-<RETURNS>void </RETURNS>
-GstPlugin *plugin, gchar *longname
-</FUNCTION>
-<FUNCTION>
<NAME>gst_plugin_add_factory</NAME>
<RETURNS>void </RETURNS>
GstPlugin *plugin, GstElementFactory *factory
<STRUCT>
<NAME>GstSrc</NAME>
struct GstSrc {
- GstElement element;
- gint32 flags;
+ GstElement element;
+ gint32 flags;
};
</STRUCT>
<MACRO>
void
</FUNCTION>
<FUNCTION>
-<NAME>gst_src_push</NAME>
-<RETURNS>void </RETURNS>
-GstSrc *src
-</FUNCTION>
-<FUNCTION>
-<NAME>gst_src_push_region</NAME>
-<RETURNS>void </RETURNS>
-GstSrc *src, gulong offset, gulong size
-</FUNCTION>
-<FUNCTION>
<NAME>gst_src_signal_eos</NAME>
<RETURNS>void </RETURNS>
GstSrc *src
gchar *mime; /* MIME type */
gchar *exts; /* space-delimited list of extensions */
- GstTypeFindFunc typefindfunc; /* typefind function */
+ GSList *typefindfuncs; /* typefind functions */
GList *srcs; /* list of src objects for this type */
GList *sinks; /* list of sink objects for type */
gchar *ext
</FUNCTION>
<FUNCTION>
-<NAME>gst_type_add_src</NAME>
-<RETURNS>void </RETURNS>
-guint16 id, GstElementFactory *src
-</FUNCTION>
-<FUNCTION>
-<NAME>gst_type_add_sink</NAME>
-<RETURNS>void </RETURNS>
-guint16 id, GstElementFactory *sink
-</FUNCTION>
-<FUNCTION>
<NAME>gst_type_get_srcs</NAME>
<RETURNS>GList *</RETURNS>
guint16 id
<RETURNS>GstElement *</RETURNS>
GstXML *xml, const guchar *name
</FUNCTION>
+<STRUCT>
+<NAME>GstCaps</NAME>
+</STRUCT>
+<TYPEDEF>
+<NAME>GstCapsFactoryEntry</NAME>
+typedef gpointer GstCapsFactoryEntry;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>GstCapsFactory[]</NAME>
+typedef GstCapsFactoryEntry GstCapsFactory[];
+</TYPEDEF>
+<TYPEDEF>
+<NAME>GstCapsListFactory[]</NAME>
+typedef GstCapsFactory *GstCapsListFactory[];
+</TYPEDEF>
+<ENUM>
+<NAME>GstCapsDefinition</NAME>
+typedef enum {
+ GST_CAPS_ALWAYS = 1,
+ GST_CAPS_MAYBE = 2,
+} GstCapsDefinition;
+</ENUM>
+<STRUCT>
+<NAME>GstCaps</NAME>
+struct GstCaps {
+ guint16 id; /* type id (major type) */
+
+ GstProps *properties; /* properties for this capability */
+};
+</STRUCT>
+<FUNCTION>
+<NAME>gst_caps_register</NAME>
+<RETURNS>GstCaps *</RETURNS>
+GstCapsFactory *factory
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_caps_check_compatibility</NAME>
+<RETURNS>gboolean </RETURNS>
+GstCaps *caps1, GstCaps *caps2
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_caps_save_thyself</NAME>
+<RETURNS>xmlNodePtr </RETURNS>
+GstCaps *caps, xmlNodePtr parent
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_caps_load_thyself</NAME>
+<RETURNS>GstCaps *</RETURNS>
+xmlNodePtr parent
+</FUNCTION>
<MACRO>
<NAME>GST_BUFFER_POOL</NAME>
#define GST_BUFFER_POOL(buf) \
void
</FUNCTION>
<MACRO>
+<NAME>GST_DEBUG_ENABLED</NAME>
+#define GST_DEBUG_ENABLED
+</MACRO>
+<MACRO>
+<NAME>GST_DEBUG_PREFIX</NAME>
+#define GST_DEBUG_PREFIX(format,args...) \
+"DEBUG(%d:%d)" __PRETTY_FUNCTION__ ":%d" format , getpid() , cothread_getcurrent() , __LINE__ , ## args
+</MACRO>
+<USER_FUNCTION>
+<NAME>_debug_function_f</NAME>
+<RETURNS>void </RETURNS>
+
+</USER_FUNCTION>
+<MACRO>
+<NAME>DEBUG</NAME>
+#define DEBUG(format,args...) \
+ (_debug_string != NULL) ? \
+ fprintf(stderr,GST_DEBUG_PREFIX("%s: "format , _debug_string , ## args )) : \
+ fprintf(stderr,GST_DEBUG_PREFIX(": "format , ## args ))
+</MACRO>
+<MACRO>
+<NAME>DEBUG_ENTER</NAME>
+#define DEBUG_ENTER(format, args...) \
+ fprintf(stderr,GST_DEBUG_PREFIX(format": entering\n" , ## args ))
+</MACRO>
+<MACRO>
+<NAME>DEBUG_SET_STRING</NAME>
+#define DEBUG_SET_STRING(format, args...) \
+ gchar *_debug_string = g_strdup_printf(format , ## args )
+</MACRO>
+<MACRO>
+<NAME>DEBUG_ENTER_STRING</NAME>
+#define DEBUG_ENTER_STRING DEBUG_ENTER("%s",_debug_string)
+</MACRO>
+<MACRO>
+<NAME>DEBUG_LEAVE</NAME>
+#define DEBUG_LEAVE(format, args...) \
+ if (_debug_string != NULL) g_free(_debug_string),\
+ fprintf(stderr,GST_DEBUG_PREFIX(format": leaving\n" , ## args ))
+</MACRO>
+<MACRO>
+<NAME>DEBUG_LEAVE_STRING</NAME>
+#define DEBUG_LEAVE_STRING DEBUG_LEAVE("%s",_debug_string)
+</MACRO>
+<MACRO>
+<NAME>DEBUG</NAME>
+#define DEBUG(format, args...)
+</MACRO>
+<MACRO>
+<NAME>DEBUG_ENTER</NAME>
+#define DEBUG_ENTER(format, args...)
+</MACRO>
+<MACRO>
+<NAME>DEBUG_LEAVE</NAME>
+#define DEBUG_LEAVE(format, args...)
+</MACRO>
+<MACRO>
+<NAME>DEBUG_SET_STRING</NAME>
+#define DEBUG_SET_STRING(format, args...)
+</MACRO>
+<MACRO>
+<NAME>DEBUG_ENTER_STRING</NAME>
+#define DEBUG_ENTER_STRING
+</MACRO>
+<MACRO>
+<NAME>GST_DEBUG_PAD_NAME</NAME>
+#define GST_DEBUG_PAD_NAME(pad) \
+ ((pad)->parent != NULL) ? gst_element_get_name(GST_ELEMENT((pad)->parent)) : "''", gst_pad_get_name(pad)
+</MACRO>
+<STRUCT>
+<NAME>GstProps</NAME>
+</STRUCT>
+<TYPEDEF>
+<NAME>GstPropsFactoryEntry</NAME>
+typedef gpointer GstPropsFactoryEntry;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>GstPropsFactory[]</NAME>
+typedef GstPropsFactoryEntry GstPropsFactory[];
+</TYPEDEF>
+<TYPEDEF>
+<NAME>GstPropsListFactory[]</NAME>
+typedef GstPropsFactory *GstPropsListFactory[];
+</TYPEDEF>
+<ENUM>
+<NAME>GstPropsId</NAME>
+typedef enum {
+ GST_PROPS_END_ID_NUM = 0,
+ GST_PROPS_LIST_ID_NUM,
+ GST_PROPS_INT_ID_NUM,
+ GST_PROPS_INT_RANGE_ID_NUM,
+ GST_PROPS_FOURCC_ID_NUM,
+ GST_PROPS_BOOL_ID_NUM,
+} GstPropsId;
+</ENUM>
+<MACRO>
+<NAME>GST_PROPS_LIST_ID</NAME>
+#define GST_PROPS_LIST_ID GINT_TO_POINTER(GST_PROPS_LIST_ID_NUM)
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_INT_ID</NAME>
+#define GST_PROPS_INT_ID GINT_TO_POINTER(GST_PROPS_INT_ID_NUM)
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_INT_RANGE_ID</NAME>
+#define GST_PROPS_INT_RANGE_ID GINT_TO_POINTER(GST_PROPS_INT_RANGE_ID_NUM)
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_FOURCC_ID</NAME>
+#define GST_PROPS_FOURCC_ID GINT_TO_POINTER(GST_PROPS_FOURCC_ID_NUM)
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_BOOL_ID</NAME>
+#define GST_PROPS_BOOL_ID GINT_TO_POINTER(GST_PROPS_BOOL_ID_NUM)
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_LIST</NAME>
+#define GST_PROPS_LIST(a...) GST_PROPS_LIST_ID,##a,NULL
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_INT</NAME>
+#define GST_PROPS_INT(a) GST_PROPS_INT_ID,(GINT_TO_POINTER(a))
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_INT_RANGE</NAME>
+#define GST_PROPS_INT_RANGE(a,b) GST_PROPS_INT_RANGE_ID,(GINT_TO_POINTER(a)),(GINT_TO_POINTER(b))
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_FOURCC</NAME>
+#define GST_PROPS_FOURCC(a,b,c,d) GST_PROPS_FOURCC_ID,(GINT_TO_POINTER((a)|(b)<<8|(c)<<16|(d)<<24))
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_FOURCC_INT</NAME>
+#define GST_PROPS_FOURCC_INT(a) GST_PROPS_FOURCC_ID,(GINT_TO_POINTER(a))
+</MACRO>
+<MACRO>
+<NAME>GST_PROPS_BOOLEAN</NAME>
+#define GST_PROPS_BOOLEAN(a) GST_PROPS_BOOL_ID,(GINT_TO_POINTER(a))
+</MACRO>
+<STRUCT>
+<NAME>GstProps</NAME>
+struct GstProps {
+ GSList *properties; /* properties for this capability */
+};
+</STRUCT>
+<FUNCTION>
+<NAME>gst_props_register</NAME>
+<RETURNS>GstProps *</RETURNS>
+GstPropsFactory factory
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_props_check_compatibility</NAME>
+<RETURNS>gboolean </RETURNS>
+GstProps *props1, GstProps *props2
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_props_save_thyself</NAME>
+<RETURNS>xmlNodePtr </RETURNS>
+GstProps *props, xmlNodePtr parent
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_props_load_thyself</NAME>
+<RETURNS>GstProps *</RETURNS>
+xmlNodePtr parent
+</FUNCTION>
+<STRUCT>
+<NAME>GstPropsEntry</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GstPropsEntry</NAME>
+struct GstPropsEntry {
+ GQuark propid;
+ GstPropsId propstype;
+
+ union {
+ /* flat values */
+ gboolean bool_data;
+ guint32 fourcc_data;
+ gint int_data;
+
+ /* structured values */
+ struct {
+ GList *entries;
+ } list_data;
+ struct {
+ gint min;
+ gint max;
+ } int_range_data;
+ } data;
+};
+</STRUCT>
+<MACRO>
<NAME>GST_TYPE_ASYNCDISKSRC</NAME>
#define GST_TYPE_ASYNCDISKSRC \
(gst_asyncdisksrc_get_type())
<MACRO>
<NAME>GST_IS_AUDIOSRC_CLASS</NAME>
#define GST_IS_AUDIOSRC_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSRC)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSRC))
</MACRO>
<ENUM>
<NAME>GstAudioSrcFlags</NAME>
<MACRO>
<NAME>GST_IS_ESDSINK_CLASS</NAME>
#define GST_IS_ESDSINK_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDSINK)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDSINK))
</MACRO>
<STRUCT>
<NAME>GstEsdSink</NAME>
<MACRO>
<NAME>GST_IS_FAKESINK_CLASS</NAME>
#define GST_IS_FAKESINK_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKESINK)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKESINK))
</MACRO>
<STRUCT>
<NAME>GstFakeSink</NAME>
<MACRO>
<NAME>GST_IS_FAKESRC_CLASS</NAME>
#define GST_IS_FAKESRC_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKESRC)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FAKESRC))
</MACRO>
<STRUCT>
<NAME>GstFakeSrc</NAME>
<MACRO>
<NAME>GST_IS_FDSINK_CLASS</NAME>
#define GST_IS_FDSINK_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSINK)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSINK))
</MACRO>
<STRUCT>
<NAME>GstFdSink</NAME>
<MACRO>
<NAME>GST_IS_FDSRC_CLASS</NAME>
#define GST_IS_FDSRC_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSRC)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FDSRC))
</MACRO>
<STRUCT>
<NAME>GstFdSrc</NAME>
<MACRO>
<NAME>GST_IS_HTTPSRC_CLASS</NAME>
#define GST_IS_HTTPSRC_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_HTTPSRC)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_HTTPSRC))
</MACRO>
<ENUM>
<NAME>GstHttpSrcFlags</NAME>
<MACRO>
<NAME>GST_IS_IDENTITY_CLASS</NAME>
#define GST_IS_IDENTITY_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_IDENTITY)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_IDENTITY))
</MACRO>
<STRUCT>
<NAME>GstIdentity</NAME>
<MACRO>
<NAME>GST_IS_SINESRC_CLASS</NAME>
#define GST_IS_SINESRC_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SINESRC)))
+ (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SINESRC))
</MACRO>
<STRUCT>
<NAME>GstSineSrc</NAME>
gst_main
gst_main_quit
DEBUG
+GST_DEBUG_ENABLED
+DEBUG_SET_STRING
+DEBUG_ENTER_STRING
+DEBUG_ENTER
+DEBUG_LEAVE_STRING
+DEBUG_LEAVE
<SUBSECTION Standard>
SETUP_STACK
</SECTION>
@Returns:
-<!-- ##### FUNCTION gst_connection_push ##### -->
-<para>
-
-</para>
-
-@connection:
-
-
@GST_ELEMENT_MULTI_IN:
@GST_ELEMENT_THREAD_SUGGESTED:
@GST_ELEMENT_NO_SEEK:
+@GST_ELEMENT_NEW_LOOPFUNC:
+@GST_ELEMENT_COTHREAD_STOPPING:
<!-- ##### MACRO GST_ELEMENT_IS_MULTI_IN ##### -->
<para>
</para>
@longname:
-@class:
+@klass:
@description:
@version:
@author:
@name:
@type:
@details:
-@src_types:
-@sink_types:
+@padfactories:
<!-- ##### USER_FUNCTION GstElementLoopFunction ##### -->
<para>
@elementfactory:
-<!-- ##### FUNCTION gst_elementfactory_add_sink ##### -->
-<para>
-
-</para>
-
-@elementfactory:
-@id:
-
-
-<!-- ##### FUNCTION gst_elementfactory_add_src ##### -->
-<para>
-
-</para>
-
-@elementfactory:
-@id:
-
-
<!-- ##### FUNCTION gst_elementfactory_find ##### -->
<para>
@pull:
-<!-- ##### FUNCTION gst_pad_get_type_id ##### -->
-<para>
-
-</para>
-
-@pad:
-@Returns:
-
-
-<!-- ##### FUNCTION gst_pad_set_type_id ##### -->
-<para>
-
-</para>
-
-@pad:
-@id:
-
-
<!-- ##### FUNCTION gst_pad_set_name ##### -->
<para>
@elements:
+<!-- ##### ARG GstPad:active ##### -->
+<para>
+
+</para>
+
</para>
+<!-- ##### FUNCTION gst_type_add_sink ##### -->
+<para>
+
+</para>
+
+@id:
+@sink:
+
<!-- ##### FUNCTION gst_tee_get_type ##### -->
<para>
@Returns:
-<!-- ##### FUNCTION gst_object_get_type ##### -->
+<!-- ##### MACRO GST_SINESRC ##### -->
<para>
</para>
-@Returns:
+@obj:
-<!-- ##### MACRO GST_SINESRC ##### -->
+<!-- ##### FUNCTION gst_object_get_type ##### -->
<para>
</para>
-@obj:
+@Returns:
<!-- ##### SECTION ./tmpl/plugin.sgml:Long_Description ##### -->
<para>
</para>
-<!-- ##### FUNCTION gst_audiosrc_get_type ##### -->
+<!-- ##### MACRO GST_QUEUE_CLASS ##### -->
<para>
</para>
-@Returns:
+@klass:
-<!-- ##### MACRO GST_QUEUE_CLASS ##### -->
+<!-- ##### FUNCTION gst_audiosrc_get_type ##### -->
<para>
</para>
-@klass:
+@Returns:
<!-- ##### MACRO GST_IS_QUEUE ##### -->
<para>
@pad:
@buf:
+<!-- ##### FUNCTION gst_type_add_src ##### -->
+<para>
+
+</para>
+
+@id:
+@src:
+
<!-- ##### FUNCTION gst_esdsink_get_type ##### -->
<para>
</para>
-<!-- ##### STRUCT GstFakeSink ##### -->
+<!-- ##### MACRO GST_THREAD_CLASS ##### -->
<para>
</para>
+@klass:
-<!-- ##### MACRO GST_THREAD_CLASS ##### -->
+<!-- ##### STRUCT GstFakeSink ##### -->
<para>
</para>
-@klass:
<!-- ##### MACRO GST_BIN_CLASS ##### -->
<para>
@obj:
-<!-- ##### SECTION ./tmpl/gstcolorspace.sgml:Title ##### -->
-GstColorSpace
-
-
<!-- ##### STRUCT GstEsdSink ##### -->
<para>
</para>
+<!-- ##### SECTION ./tmpl/gstcolorspace.sgml:Title ##### -->
+GstColorSpace
+
+
<!-- ##### MACRO GST_PAD ##### -->
<para>
@obj:
+<!-- ##### FUNCTION gst_src_push ##### -->
+<para>
+
+</para>
+
+@src:
+
<!-- ##### STRUCT GstThreadClass ##### -->
<para>
@obj:
+<!-- ##### FUNCTION gst_src_push_region ##### -->
+<para>
+
+</para>
+
+@src:
+@offset:
+@size:
+
<!-- ##### MACRO GST_SINESRC_CLASS ##### -->
<para>
-<!-- ##### MACRO GST_ASYNCDISKSRC_CLASS ##### -->
+<!-- ##### MACRO GST_ESDSINK_CLASS ##### -->
<para>
</para>
@klass:
-<!-- ##### MACRO GST_ESDSINK_CLASS ##### -->
+<!-- ##### MACRO GST_ASYNCDISKSRC_CLASS ##### -->
<para>
</para>
</para>
+<!-- ##### FUNCTION gst_pad_set_type_id ##### -->
+<para>
+
+</para>
+
+@pad:
+@id:
+
<!-- ##### STRUCT GstAudioSrcClass ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION gst_connection_push ##### -->
+<para>
+
+</para>
+
+@connection:
+
<!-- ##### MACRO GST_TYPE_CONNECTION ##### -->
<para>
@obj:
+<!-- ##### FUNCTION gst_elementfactory_add_sink ##### -->
+<para>
+
+</para>
+
+@elementfactory:
+@id:
+
<!-- ##### FUNCTION gst_fakesrc_get_type ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION gst_pad_get_type_id ##### -->
+<para>
+
+</para>
+
+@pad:
+@Returns:
+
<!-- ##### FUNCTION gst_queue_chain ##### -->
<para>
</para>
-<!-- ##### MACRO GST_META ##### -->
+<!-- ##### FUNCTION gst_audiosink_get_type ##### -->
<para>
</para>
-@meta:
+@Returns:
-<!-- ##### FUNCTION gst_audiosink_get_type ##### -->
+<!-- ##### MACRO GST_META ##### -->
<para>
</para>
-@Returns:
+@meta:
<!-- ##### FUNCTION gst_httpsrc_get_type ##### -->
<para>
</para>
-<!-- ##### MACRO GST_IS_SINESRC_CLASS ##### -->
+<!-- ##### MACRO GST_TYPE_FILTER ##### -->
<para>
</para>
-@obj:
-<!-- ##### MACRO GST_TYPE_FILTER ##### -->
+<!-- ##### MACRO GST_IS_SINESRC_CLASS ##### -->
<para>
</para>
+@obj:
<!-- ##### MACRO GST_IS_AUDIOSRC_CLASS ##### -->
<para>
@obj:
+<!-- ##### SECTION ./tmpl/plugin.sgml:Short_Description ##### -->
+
+
+
<!-- ##### FUNCTION gst_audiosrc_push ##### -->
<para>
@src:
-<!-- ##### SECTION ./tmpl/plugin.sgml:Short_Description ##### -->
-
-
-
<!-- ##### MACRO GST_HTTPSRC_CLASS ##### -->
<para>
@fd:
@Returns:
+<!-- ##### FUNCTION gst_elementfactory_add_src ##### -->
+<para>
+
+</para>
+
+@elementfactory:
+@id:
+
<!-- ##### MACRO GST_BUFFER_POOL ##### -->
<para>
@name:
@Returns:
-<!-- ##### MACRO GST_CPU_FLAG_MMX ##### -->
+<!-- ##### MACRO GST_TYPE_ESDSINK ##### -->
<para>
-A flag indicating that MMX instructions are supported.
+
</para>
-<!-- ##### MACRO GST_TYPE_ESDSINK ##### -->
+<!-- ##### MACRO GST_CPU_FLAG_MMX ##### -->
<para>
-
+A flag indicating that MMX instructions are supported.
</para>
@src:
-<!-- ##### FUNCTION gst_src_push ##### -->
-<para>
-
-</para>
-
-@src:
-
-
-<!-- ##### FUNCTION gst_src_push_region ##### -->
-<para>
-
-</para>
-
-@src:
-@offset:
-@size:
-
-
<!-- ##### SIGNAL GstSrc::eos ##### -->
<para>
An eos signal is triggered whenever the GstSrc has reached the end of
@id:
@mime:
@exts:
-@typefindfunc:
+@typefindfuncs:
@srcs:
@sinks:
@converters:
@Returns:
-<!-- ##### FUNCTION gst_type_add_src ##### -->
-<para>
-
-</para>
-
-@id:
-@src:
-
-
-<!-- ##### FUNCTION gst_type_add_sink ##### -->
-<para>
-
-</para>
-
-@id:
-@sink:
-
-
<!-- ##### FUNCTION gst_type_get_srcs ##### -->
<para>
/* FILL ME */
};
-static GstCapsFactory audiosink_sink_caps = {
+static GstPadFactory audiosink_sink_factory = {
+ "sink",
+ GST_PAD_FACTORY_SINK,
+ GST_PAD_FACTORY_ALWAYS,
"audio/raw",
"format", GST_PROPS_INT (AFMT_S16_LE),
"depth", GST_PROPS_LIST (
static GstSinkClass *parent_class = NULL;
static guint gst_audiosink_signals[LAST_SIGNAL] = { 0 };
-static GstCaps *gst_audiosink_sink_caps = NULL;
+static GstPadTemplate *gst_audiosink_sink_template;
GtkType
gst_audiosink_get_type (void)
static void
gst_audiosink_init (GstAudioSink *audiosink)
{
- audiosink->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
+ audiosink->sinkpad = gst_pad_new_from_template (gst_audiosink_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (audiosink), audiosink->sinkpad);
- gst_pad_set_caps (audiosink->sinkpad, gst_audiosink_sink_caps);
gst_pad_set_chain_function (audiosink->sinkpad, gst_audiosink_chain);
gboolean
gst_audiosink_factory_init (GstElementFactory *factory)
{
- gst_audiosink_sink_caps = gst_caps_register (audiosink_sink_caps);
+ gst_audiosink_sink_template = gst_padtemplate_new (&audiosink_sink_factory);
+ gst_elementfactory_add_padtemplate (factory, gst_audiosink_sink_template);
return TRUE;
}
httpsrc->bytes_per_read = 4096;
}
-static void gst_httpsrc_push(GstPad *pad) {
+static void gst_httpsrc_pull(GstPad *pad) {
GstHttpSrc *src;
GstBuffer *buf;
glong readbytes;
}
/**
+ * gst_caps_new:
+ * @mime: the mime type to attach to the capability
+ *
+ * create a new capability with the given mime type
+ *
+ * Returns: a new capability
+ */
+GstCaps*
+gst_caps_new (gchar *mime)
+{
+ GstCaps *caps;
+
+ g_return_val_if_fail (mime != NULL, NULL);
+
+ caps = g_new0 (GstCaps, 1);
+ caps->id = get_type_for_mime (mime);
+
+ return caps;
+}
+
+/**
* gst_caps_register:
* @factory: the factory to register
*
*
* Returns: The registered capability
*/
-GstCaps *
+GstCaps*
gst_caps_register (GstCapsFactory *factory)
{
GstCapsFactoryEntry tag;
/* initialize the subsystem */
void _gst_caps_initialize (void);
+GstCaps* gst_caps_new (gchar *mime);
GstCaps* gst_caps_register (GstCapsFactory *factory);
gboolean gst_caps_check_compatibility (GstCaps *caps1, GstCaps *caps2);
GstElementDetails *details; /* pointer to details struct */
- GList *padfactories;
+ GList *padtemplates;
};
GtkType gst_element_get_type (void);
void gst_elementfactory_register (GstElementFactory *elementfactory);
void gst_elementfactory_unregister (GstElementFactory *elementfactory);
-void gst_elementfactory_add_pad (GstElementFactory *elementfactory,
- GstPadFactory *pad);
+void gst_elementfactory_add_padtemplate (GstElementFactory *elementfactory,
+ GstPadTemplate *pad);
GstElementFactory* gst_elementfactory_find (gchar *name);
GList* gst_elementfactory_get_list (void);
void
gst_elementfactory_unregister (GstElementFactory *factory)
{
- GList *padfactories;
+ GList *padtemplates;
g_return_if_fail (factory != NULL);
- padfactories = factory->padfactories;
+ padtemplates = factory->padtemplates;
- while (padfactories) {
- GstPadFactory *padfactory = (GstPadFactory *)padfactories->data;
- GstCaps *caps = gst_padfactory_get_caps (padfactory);
+ while (padtemplates) {
+ GstPadTemplate *padfactory = (GstPadTemplate *)padtemplates->data;
+ GstCaps *caps = padfactory->caps;
if (caps) {
switch (padfactory->direction) {
break;
}
}
- padfactories = g_list_next (padfactories);
+ padtemplates = g_list_next (padtemplates);
}
_gst_elementfactories = g_list_remove (_gst_elementfactories, factory);
factory->name = g_strdup(name);
factory->type = type;
factory->details = details;
- factory->padfactories = NULL;
+ factory->padtemplates = NULL;
return factory;
}
}
/**
- * gst_elementfactory_add_pad :
+ * gst_elementfactory_add_padtemplate :
* @elementfactory: factory to add the src id to
- * @pad: the padfactory to add
+ * @template: the padtemplate to add
*
- * Add the given padfactory to this element.
- *
+ * Add the given padtemplate to this elementfactory.
*/
void
-gst_elementfactory_add_pad (GstElementFactory *factory,
- GstPadFactory *padfactory)
+gst_elementfactory_add_padtemplate (GstElementFactory *factory,
+ GstPadTemplate *template)
{
GstCaps *caps;
g_return_if_fail(factory != NULL);
- g_return_if_fail(padfactory != NULL);
+ g_return_if_fail(template != NULL);
- factory->padfactories = g_list_append (factory->padfactories, padfactory);
+ factory->padtemplates = g_list_append (factory->padtemplates, template);
- caps = gst_padfactory_get_caps (padfactory);
+ caps = template->caps;
if (caps) {
- switch (padfactory->direction) {
+ switch (template->direction) {
case GST_PAD_SRC:
_gst_type_add_src (caps->id, factory);
break;
xmlNewChild(parent,NULL,"author", factory->details->author);
xmlNewChild(parent,NULL,"copyright", factory->details->copyright);
- pads = factory->padfactories;
+ pads = factory->padtemplates;
if (pads) {
while (pads) {
xmlNodePtr subtree;
- GstPadFactory *padfactory = (GstPadFactory *)pads->data;
+ GstPadTemplate *padtemplate = (GstPadTemplate *)pads->data;
- subtree = xmlNewChild(parent, NULL, "padfactory", NULL);
- gst_padfactory_save_thyself(padfactory, subtree);
+ subtree = xmlNewChild(parent, NULL, "padtemplate", NULL);
+ gst_padtemplate_save_thyself(padtemplate, subtree);
pads = g_list_next (pads);
}
GstElementFactory *factory = g_new0(GstElementFactory, 1);
xmlNodePtr children = parent->childs;
factory->details = g_new0(GstElementDetails, 1);
- factory->padfactories = NULL;
+ factory->padtemplates = NULL;
while (children) {
if (!strcmp(children->name, "name")) {
if (!strcmp(children->name, "copyright")) {
factory->details->copyright = g_strdup(xmlNodeGetContent(children));
}
- if (!strcmp(children->name, "padfactory")) {
- GstPadFactory *padfactory;
+ if (!strcmp(children->name, "padtemplate")) {
+ GstPadTemplate *template;
- padfactory = gst_padfactory_load_thyself (children);
+ template = gst_padtemplate_load_thyself (children);
- gst_elementfactory_add_pad (factory, padfactory);
+ gst_elementfactory_add_padtemplate (factory, template);
}
children = children->next;
pad = GST_PAD (gtk_type_new (gst_pad_get_type ()));
pad->name = g_strdup (name);
pad->direction = direction;
+
+ return pad;
+}
+
+/**
+ * gst_pad_new_from_template:
+ * @temp: the pad template to use
+ * @name: the name of the element
+ *
+ * Create a new pad with given name from the given template.
+ *
+ * Returns: new pad
+ */
+GstPad*
+gst_pad_new_from_template (GstPadTemplate *temp,
+ gchar *name)
+{
+ GstPad *pad;
+
+ g_return_val_if_fail (name != NULL, NULL);
+ g_return_val_if_fail (temp != NULL, NULL);
+
+ pad = gst_pad_new (name, temp->direction);
+ pad->caps = temp->caps;
+
return pad;
}
return self;
}
-/**
- * gst_padfactory_create:
- * @factory: the pad factory
- * @name: the name of the new pad
- *
- * crrates a new pad form the given factory
- *
- * Returns: the new pad;
- */
-GstPad*
-gst_padfactory_create (GstPadFactory *factory,
- gchar *name)
+GstPadTemplate*
+gst_padtemplate_new (GstPadFactory *factory)
{
- GstPad *newpad;
- GstCaps *caps;
+ GstPadTemplate *new;
+ GstPadFactoryEntry tag;
+ gint i = 0;
- newpad = gst_pad_new (name, factory->direction);
+ g_return_val_if_fail (factory != NULL, NULL);
- caps = gst_padfactory_get_caps (factory);
+ new = g_new0 (GstPadTemplate, 1);
- gst_pad_set_caps (newpad, caps);
+ tag = (*factory)[i++];
+ g_return_val_if_fail (tag != NULL, new);
+ new->name_template = g_strdup ((gchar *)tag);
- return newpad;
+ tag = (*factory)[i++];
+ new->direction = GPOINTER_TO_UINT (tag);
+
+ tag = (*factory)[i++];
+ new->presence = GPOINTER_TO_UINT (tag);
+
+ new->caps = gst_caps_register ((GstCapsFactory *)&(*factory)[i]);
+
+ return new;
}
-GstCaps*
-gst_padfactory_get_caps (GstPadFactory *factory)
+GstPadTemplate*
+gst_padtemplate_create (gchar *name_template,
+ GstPadDirection direction, GstPadPresence presence,
+ GstCaps *caps, ...)
{
- if (factory->priv) {
- return (GstCaps *) factory->priv;
- }
- else if (factory->caps) {
- GstCaps *caps;
-
- caps = gst_caps_register (factory->caps);
-
- factory->priv = caps;
-
- return caps;
- }
- else return NULL;
+ return NULL;
}
+
xmlNodePtr
-gst_padfactory_save_thyself (GstPadFactory *pad, xmlNodePtr parent)
+gst_padtemplate_save_thyself (GstPadTemplate *pad, xmlNodePtr parent)
{
xmlNodePtr subtree;
- xmlNewChild(parent,NULL,"nametemplate", pad->nametemplate);
+ xmlNewChild(parent,NULL,"nametemplate", pad->name_template);
xmlNewChild(parent,NULL,"direction", (pad->direction == GST_PAD_SINK? "sink":"src"));
xmlNewChild(parent,NULL,"presence", (pad->presence == GST_PAD_ALWAYS? "always":"sometimes"));
subtree = xmlNewChild(parent,NULL,"caps", NULL);
- gst_caps_save_thyself (gst_padfactory_get_caps (pad), subtree);
+ gst_caps_save_thyself (pad->caps, subtree);
return parent;
}
-GstPadFactory*
-gst_padfactory_load_thyself (xmlNodePtr parent)
+GstPadTemplate*
+gst_padtemplate_load_thyself (xmlNodePtr parent)
{
xmlNodePtr field = parent->childs;
- GstPadFactory *factory = g_new0 (GstPadFactory, 1);
+ GstPadTemplate *factory = g_new0 (GstPadTemplate, 1);
while (field) {
if (!strcmp(field->name, "nametemplate")) {
- factory->nametemplate = g_strdup(xmlNodeGetContent(field));
+ factory->name_template = g_strdup(xmlNodeGetContent(field));
}
if (!strcmp(field->name, "direction")) {
gchar *value = xmlNodeGetContent(field);
}
}
else if (!strcmp(field->name, "caps")) {
- factory->priv = gst_caps_load_thyself (field);
+ factory->caps = gst_caps_load_thyself (field);
}
field = field->next;
}
GST_PAD_SOMETIMES,
} GstPadPresence;
-typedef struct _GstPadFactory GstPadFactory;
+typedef struct _GstPadTemplate GstPadTemplate;
-/* factory */
-struct _GstPadFactory {
- gchar *nametemplate;
- GstCapsFactory *caps;
+/* template */
+struct _GstPadTemplate {
+ gchar *name_template;
GstPadDirection direction;
GstPadPresence presence;
- gpointer priv;
+ GstCaps *caps;
};
+/* factory */
+typedef gpointer GstPadFactoryEntry;
+typedef GstPadFactoryEntry GstPadFactory[];
+#define GST_PAD_FACTORY_ALWAYS GINT_TO_POINTER(GST_PAD_ALWAYS)
+#define GST_PAD_FACTORY_SOMETIMES GINT_TO_POINTER(GST_PAD_SOMETIMES)
+
+#define GST_PAD_FACTORY_SRC GINT_TO_POINTER(GST_PAD_SRC)
+#define GST_PAD_FACTORY_SINK GINT_TO_POINTER(GST_PAD_SINK)
GtkType gst_pad_get_type (void);
GstPad* gst_pad_new (gchar *name, GstPadDirection direction);
#define gst_pad_destroy(pad) gst_object_destroy (GST_OBJECT (pad))
+GstPad* gst_pad_new_from_template (GstPadTemplate *temp, gchar *name);
GstPadDirection gst_pad_get_direction (GstPad *pad);
/* factory */
-GstPad* gst_padfactory_create (GstPadFactory *factory, gchar *name);
-
-GstCaps* gst_padfactory_get_caps (GstPadFactory *factory);
+GstPadTemplate* gst_padtemplate_new (GstPadFactory *factory);
+GstPadTemplate* gst_padtemplate_create (gchar *name_template,
+ GstPadDirection direction, GstPadPresence presence,
+ GstCaps *caps, ...);
-xmlNodePtr gst_padfactory_save_thyself (GstPadFactory *pad, xmlNodePtr parent);
-GstPadFactory* gst_padfactory_load_thyself (xmlNodePtr parent);
+xmlNodePtr gst_padtemplate_save_thyself (GstPadTemplate *pad, xmlNodePtr parent);
+GstPadTemplate* gst_padtemplate_load_thyself (xmlNodePtr parent);
#ifdef __cplusplus
}
g_return_if_fail (type != NULL);
g_return_if_fail (src != NULL);
- g_print ("gsttype: handle src \"%s\" %d\n", src->name, remove);
-
if (remove)
type->srcs = g_list_remove (type->srcs, src);
else
type->srcs = g_list_prepend (type->srcs, src);
// find out if the element has to be indexed in the matrix
- walk = src->padfactories;
+ walk = src->padtemplates;
while (walk) {
- GstPadFactory *factory;
+ GstPadTemplate *template;
- factory = (GstPadFactory *) walk->data;
+ template = (GstPadTemplate *) walk->data;
- if (factory->direction == GST_PAD_SINK) {
+ if (template->direction == GST_PAD_SINK) {
GstType *type2;
GList *converters;
GList *orig;
GstCaps *caps;
- caps = gst_padfactory_get_caps (factory);
+ caps = template->caps;
if (caps)
type2 = gst_type_find_by_id (caps->id);
g_return_if_fail (type != NULL);
g_return_if_fail (sink != NULL);
- g_print ("gsttype: handle sink \"%s\" %d\n", sink->name, remove);
-
if (remove)
type->sinks = g_list_remove (type->sinks, sink);
else
type->sinks = g_list_prepend (type->sinks, sink);
// find out if the element has to be indexed in the matrix
- walk = sink->padfactories;
+ walk = sink->padtemplates;
while (walk) {
- GstPadFactory *factory;
+ GstPadTemplate *template;
- factory = (GstPadFactory *) walk->data;
+ template = (GstPadTemplate *) walk->data;
- if (factory->direction == GST_PAD_SRC) {
+ if (template->direction == GST_PAD_SRC) {
guint16 id2;
GList *converters;
GList *orig;
GstCaps *caps;
- caps = gst_padfactory_get_caps (factory);
+ caps = template->caps;
if (caps)
id2 = caps->id;
/* FILL ME */
};
-static GstCapsFactory audiosink_sink_caps = {
+static GstPadFactory audiosink_sink_factory = {
+ "sink",
+ GST_PAD_FACTORY_SINK,
+ GST_PAD_FACTORY_ALWAYS,
"audio/raw",
"format", GST_PROPS_INT (AFMT_S16_LE),
"depth", GST_PROPS_LIST (
static GstSinkClass *parent_class = NULL;
static guint gst_audiosink_signals[LAST_SIGNAL] = { 0 };
-static GstCaps *gst_audiosink_sink_caps = NULL;
+static GstPadTemplate *gst_audiosink_sink_template;
GtkType
gst_audiosink_get_type (void)
static void
gst_audiosink_init (GstAudioSink *audiosink)
{
- audiosink->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
+ audiosink->sinkpad = gst_pad_new_from_template (gst_audiosink_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (audiosink), audiosink->sinkpad);
- gst_pad_set_caps (audiosink->sinkpad, gst_audiosink_sink_caps);
gst_pad_set_chain_function (audiosink->sinkpad, gst_audiosink_chain);
gboolean
gst_audiosink_factory_init (GstElementFactory *factory)
{
- gst_audiosink_sink_caps = gst_caps_register (audiosink_sink_caps);
+ gst_audiosink_sink_template = gst_padtemplate_new (&audiosink_sink_factory);
+ gst_elementfactory_add_padtemplate (factory, gst_audiosink_sink_template);
return TRUE;
}
httpsrc->bytes_per_read = 4096;
}
-static void gst_httpsrc_push(GstPad *pad) {
+static void gst_httpsrc_pull(GstPad *pad) {
GstHttpSrc *src;
GstBuffer *buf;
glong readbytes;