mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-24 09:34:25 +00:00
Updated the docs with the new _request methods
Original commit message from CVS: Updated the docs with the new _request methods
This commit is contained in:
parent
d20f0b4bae
commit
59211a49ff
7 changed files with 97 additions and 109 deletions
|
@ -206,7 +206,7 @@ gst_element_get_padtemplate_list
|
|||
gst_element_get_padtemplate_by_name
|
||||
gst_element_add_ghost_pad
|
||||
gst_element_remove_ghost_pad
|
||||
gst_element_request_pad
|
||||
gst_element_request_compatible_pad
|
||||
gst_element_request_pad_by_name
|
||||
gst_element_connect
|
||||
gst_element_disconnect
|
||||
|
|
|
@ -327,7 +327,7 @@ circumstances.
|
|||
@pad:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_element_request_pad ##### -->
|
||||
<!-- ##### FUNCTION gst_element_request_compatible_pad ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
@ -335,8 +335,6 @@ circumstances.
|
|||
@element:
|
||||
@templ:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@temp:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gst_element_request_pad_by_name ##### -->
|
||||
|
|
|
@ -217,13 +217,6 @@ the stream.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GST_SINESRC ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@obj:
|
||||
|
||||
<!-- ##### FUNCTION gst_object_get_type ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -231,6 +224,13 @@ the stream.
|
|||
|
||||
@Returns:
|
||||
|
||||
<!-- ##### MACRO GST_SINESRC ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@obj:
|
||||
|
||||
<!-- ##### SECTION ./tmpl/plugin.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -1381,6 +1381,16 @@ The end point of a filter graph
|
|||
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gst_element_request_pad ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@element:
|
||||
@templ:
|
||||
@Returns:
|
||||
@temp:
|
||||
|
||||
<!-- ##### FUNCTION gst_pad_set_caps ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -403,30 +403,12 @@ gst_element_get_padtemplate_by_compatible (GstElement *element, GstPadTemplate *
|
|||
return newtempl;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_element_request_pad:
|
||||
* @element: element to request a new pad from
|
||||
* @templ: the padtemplate specifying the pad to connect to.
|
||||
*
|
||||
* Request a new pad from the element. The template will
|
||||
* be used to decide what type of pad to create. This function
|
||||
* is typically used for elements with a padtemplate with presence
|
||||
* GST_PAD_REQUEST.
|
||||
*
|
||||
* Returns: the new pad that was created, NULL if no suitable pad can be
|
||||
* created.
|
||||
*/
|
||||
static GstPad*
|
||||
gst_element_request_pad (GstElement *element, GstPadTemplate *templ)
|
||||
{
|
||||
GstPad *newpad = NULL;
|
||||
GstElementClass *oclass;
|
||||
|
||||
g_return_val_if_fail (element != NULL, NULL);
|
||||
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
|
||||
g_return_val_if_fail (templ != NULL, NULL);
|
||||
|
||||
/* call the state change function so it can set the state */
|
||||
oclass = GST_ELEMENT_CLASS (GTK_OBJECT (element)->klass);
|
||||
if (oclass->request_new_pad)
|
||||
newpad = (oclass->request_new_pad)(element, templ);
|
||||
|
|
|
@ -74,11 +74,11 @@ static inline char *_gst_print_statename(int state) {
|
|||
|
||||
// Note: using 8 bit shift mostly "just because", it leaves us enough room to grow <g>
|
||||
#define GST_STATE_TRANSITION(obj) ((GST_STATE(obj)<<8) | GST_STATE_PENDING(obj))
|
||||
#define GST_STATE_NULL_TO_READY ((GST_STATE_NULL<<8) | GST_STATE_READY)
|
||||
#define GST_STATE_READY_TO_PLAYING ((GST_STATE_READY<<8) | GST_STATE_PLAYING)
|
||||
#define GST_STATE_NULL_TO_READY ((GST_STATE_NULL<<8) | GST_STATE_READY)
|
||||
#define GST_STATE_READY_TO_PLAYING ((GST_STATE_READY<<8) | GST_STATE_PLAYING)
|
||||
#define GST_STATE_PLAYING_TO_PAUSED ((GST_STATE_PLAYING<<8) | GST_STATE_PAUSED)
|
||||
#define GST_STATE_PAUSED_TO_PLAYING ((GST_STATE_PAUSED<<8) | GST_STATE_PLAYING)
|
||||
#define GST_STATE_PLAYING_TO_READY ((GST_STATE_PLAYING<<8) | GST_STATE_READY)
|
||||
#define GST_STATE_PLAYING_TO_READY ((GST_STATE_PLAYING<<8) | GST_STATE_READY)
|
||||
#define GST_STATE_READY_TO_NULL ((GST_STATE_READY<<8) | GST_STATE_NULL)
|
||||
|
||||
#define GST_TYPE_ELEMENT \
|
||||
|
@ -155,20 +155,20 @@ struct _GstElementClass {
|
|||
GstElementFactory *elementfactory;
|
||||
|
||||
/* signal callbacks */
|
||||
void (*state_change) (GstElement *element,GstElementState state);
|
||||
void (*new_pad) (GstElement *element,GstPad *pad);
|
||||
void (*state_change) (GstElement *element,GstElementState state);
|
||||
void (*new_pad) (GstElement *element,GstPad *pad);
|
||||
void (*new_ghost_pad) (GstElement *element,GstPad *pad);
|
||||
void (*error) (GstElement *element,gchar *error);
|
||||
void (*error) (GstElement *element,gchar *error);
|
||||
void (*eos) (GstElement *element);
|
||||
|
||||
/* change the element state */
|
||||
GstElementStateReturn (*change_state) (GstElement *element);
|
||||
GstElementStateReturn (*change_state) (GstElement *element);
|
||||
/* request a new pad */
|
||||
GstPad* (*request_new_pad) (GstElement *element, GstPadTemplate *templ);
|
||||
GstPad* (*request_new_pad) (GstElement *element, GstPadTemplate *templ);
|
||||
|
||||
/* create or read XML representation of self */
|
||||
xmlNodePtr (*save_thyself) (GstElement *element, xmlNodePtr parent);
|
||||
void (*restore_thyself) (GstElement *element, xmlNodePtr self, GHashTable *elements);
|
||||
xmlNodePtr (*save_thyself) (GstElement *element, xmlNodePtr parent);
|
||||
void (*restore_thyself) (GstElement *element, xmlNodePtr self, GHashTable *elements);
|
||||
};
|
||||
|
||||
struct _GstElementDetails {
|
||||
|
@ -208,7 +208,7 @@ GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
|
|||
GList* gst_element_get_pad_list (GstElement *element);
|
||||
GList* gst_element_get_padtemplate_list (GstElement *element);
|
||||
GstPadTemplate* gst_element_get_padtemplate_by_name (GstElement *element, const guchar *name);
|
||||
void gst_element_add_ghost_pad (GstElement *element, GstPad *pad, gchar *name);
|
||||
void gst_element_add_ghost_pad (GstElement *element, GstPad *pad, gchar *name);
|
||||
void gst_element_remove_ghost_pad (GstElement *element, GstPad *pad);
|
||||
|
||||
GstPad* gst_element_request_compatible_pad (GstElement *element, GstPadTemplate *templ);
|
||||
|
@ -241,29 +241,29 @@ GstElement* gst_element_load_thyself (xmlNodePtr parent, GHashTable *elements);
|
|||
**/
|
||||
GstElementFactory* gst_elementfactory_new (const gchar *name,GtkType type,
|
||||
GstElementDetails *details);
|
||||
void gst_elementfactory_destroy (GstElementFactory *elementfactory);
|
||||
void gst_elementfactory_destroy (GstElementFactory *elementfactory);
|
||||
|
||||
GstElementFactory* gst_elementfactory_find (const gchar *name);
|
||||
GList* gst_elementfactory_get_list (void);
|
||||
|
||||
void gst_elementfactory_add_padtemplate (GstElementFactory *elementfactory,
|
||||
GstPadTemplate *templ);
|
||||
void gst_elementfactory_add_padtemplate (GstElementFactory *elementfactory,
|
||||
GstPadTemplate *templ);
|
||||
|
||||
gboolean gst_elementfactory_can_src_caps (GstElementFactory *factory,
|
||||
gboolean gst_elementfactory_can_src_caps (GstElementFactory *factory,
|
||||
GstCaps *caps);
|
||||
gboolean gst_elementfactory_can_sink_caps (GstElementFactory *factory,
|
||||
GstCaps *caps);
|
||||
gboolean gst_elementfactory_can_src_caps_list (GstElementFactory *factory,
|
||||
gboolean gst_elementfactory_can_sink_caps (GstElementFactory *factory,
|
||||
GstCaps *caps);
|
||||
gboolean gst_elementfactory_can_src_caps_list (GstElementFactory *factory,
|
||||
GList *caps);
|
||||
gboolean gst_elementfactory_can_sink_caps_list (GstElementFactory *factory,
|
||||
GList *caps);
|
||||
gboolean gst_elementfactory_can_sink_caps_list (GstElementFactory *factory,
|
||||
GList *caps);
|
||||
|
||||
GstElement* gst_elementfactory_create (GstElementFactory *factory,
|
||||
const gchar *name);
|
||||
const gchar *name);
|
||||
/* FIXME this name is wrong, probably so is the one above it */
|
||||
GstElement* gst_elementfactory_make (const gchar *factoryname, const gchar *name);
|
||||
|
||||
xmlNodePtr gst_elementfactory_save_thyself (GstElementFactory *factory, xmlNodePtr parent);
|
||||
xmlNodePtr gst_elementfactory_save_thyself (GstElementFactory *factory, xmlNodePtr parent);
|
||||
GstElementFactory* gst_elementfactory_load_thyself (xmlNodePtr parent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -194,12 +194,12 @@ static unsigned char gst_videoscale_bicubic(unsigned char *src, double x, double
|
|||
a4 = a*a*(1-a);
|
||||
|
||||
k2 = MAX(0, k-1);
|
||||
t1=a1*RC(j-1,k2)+ a2*RC(j,k2)+ a3*RC(j+1,k2)- a4*RC(j+2,k2);
|
||||
t2=a1*RC(j-1,k)+ a2*RC(j,k)+ a3*RC(j+1,k)- a4*RC(j+2,k);
|
||||
t1=a1*RC(j-1,k2)+ a2*RC(j,k2)+ a3*RC(j+1,k2)- a4*RC(j+2,k2);
|
||||
t2=a1*RC(j-1,k)+ a2*RC(j,k)+ a3*RC(j+1,k)- a4*RC(j+2,k);
|
||||
k2 = MIN(sh, k+1);
|
||||
t3=a1*RC(j-1,k2)+ a2*RC(j,k2)+ a3*RC(j+1,k2)- a4*RC(j+2,k2);
|
||||
t3=a1*RC(j-1,k2)+ a2*RC(j,k2)+ a3*RC(j+1,k2)- a4*RC(j+2,k2);
|
||||
k2 = MIN(sh, k+2);
|
||||
t4=a1*RC(j-1,k2)+ a2*RC(j,k2)+ a3*RC(j+1,k2)- a4*RC(j+2,k2);
|
||||
t4=a1*RC(j-1,k2)+ a2*RC(j,k2)+ a3*RC(j+1,k2)- a4*RC(j+2,k2);
|
||||
|
||||
dest= -b*(1-b)*(1-b)*t1+ (1-2*b*b+b*b*b)*t2+ b*(1+b-b*b)*t3+ b*b*(b-1)*t4;
|
||||
|
||||
|
@ -236,7 +236,6 @@ static void gst_videoscale_scale_plane_slow(GstVideoScale *scale, unsigned char
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#define PREFIX16 0x66
|
||||
|
@ -365,10 +364,9 @@ static void gst_videoscale_scale_nearest(GstVideoScale *scale, unsigned char *sr
|
|||
: "g" (scale->temp), "0" (dest), "1" (src)
|
||||
: "memory" );
|
||||
|
||||
|
||||
dest+= dw;
|
||||
|
||||
pos += inc;
|
||||
}
|
||||
GST_DEBUG (0,"videoscale: scaling nearest done %p\n", scale->copy_row);
|
||||
GST_DEBUG(0,"videoscale: scaling nearest done %p\n", scale->copy_row);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue