| OUTDATED |
| -------- |
| |
| typedef gpointer GstCapsFactoryEntry; |
| typedef GstCapsFactoryEntry GstCapsFactory[]; |
| typedef GstCapsFactory *GstCapsListFactory[]; |
| |
| typedef gpointer GstPadFactoryEntry; |
| typedef GstPadFactoryEntry GstPadFactory[]; |
| typedef GstPadFactory *GstPadListFactory[]; |
| |
| #define GST_PADFACTORY_SRC GINT_TO_POINTER (GST_PAD_SRC) |
| #define GST_PADFACTORY_ALWAYS GINT_TO_POINTER (GST_PAD_ALWAYS) |
| |
| typedef struct GstPadTemplate { |
| gchar *name_template; |
| gint direction; |
| gint presence; |
| GList *caps; |
| }; |
| |
| GstPadFactory mpg123_src_padfactory = { |
| "src" |
| GST_PADFACTORY_SRC, |
| GST_PADFACTORY_ALWAYS, |
| |
| "audio/raw" |
| "samplerate", GST_PROPS_INT (44100), |
| . . . |
| NULL |
| }; |
| |
| static GstPadTemplate *srcpadtemplate; |
| |
| mpg123_new(GstMpg123 *mpg123) { |
| mpg123->srcpad = gst_pad_new_template("src", srcpadtemplate); |
| . . . |
| } |
| |
| plugin_init() { |
| GstElementFactory *factory; |
| |
| factory = gst_elementfactory_new("mpg123",. . .); |
| srcpadtemplate = gst_padfactory_new(mpg123_src_padfactory); |
| get_elementfactory_add_padtemplate (srcpadtemplate); |
| } |