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
@pad:
-<!-- ##### FUNCTION gst_element_request_pad ##### -->
+<!-- ##### FUNCTION gst_element_request_compatible_pad ##### -->
<para>
</para>
@element:
@templ:
@Returns:
-<!-- # Unused Parameters # -->
-@temp:
<!-- ##### FUNCTION gst_element_request_pad_by_name ##### -->
</para>
-<!-- ##### MACRO GST_SINESRC ##### -->
+<!-- ##### FUNCTION gst_object_get_type ##### -->
<para>
</para>
-@obj:
+@Returns:
-<!-- ##### FUNCTION gst_object_get_type ##### -->
+<!-- ##### MACRO GST_SINESRC ##### -->
<para>
</para>
-@Returns:
+@obj:
<!-- ##### SECTION ./tmpl/plugin.sgml:Long_Description ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION gst_element_request_pad ##### -->
+<para>
+
+</para>
+
+@element:
+@templ:
+@Returns:
+@temp:
+
<!-- ##### FUNCTION gst_pad_set_caps ##### -->
<para>
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);
// 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 \
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 {
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);
**/
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
#endif /* __cplusplus */
-#endif /* __GST_ELEMENT_H__ */
+#endif /* __GST_ELEMENT_H__ */
return play_type;
}
-static void
-gst_media_play_class_init (GstMediaPlayClass *klass)
+static void
+gst_media_play_class_init (GstMediaPlayClass *klass)
{
GtkObjectClass *object_class;
} connect_struct;
/* we need more control here so... */
-static void
+static void
gst_media_play_connect_func (const gchar *handler_name,
GtkObject *object,
const gchar *signal_name,
}
-static void
-gst_media_play_init(GstMediaPlay *mplay)
+static void
+gst_media_play_init(GstMediaPlay *mplay)
{
GModule *symbols;
connect_struct data;
{
GtkArg arg;
GtkRange *range;
-
+
arg.name = "adjustment";
gtk_object_getv (GTK_OBJECT (mplay->slider), 1, &arg);
range = GTK_RANGE (GTK_VALUE_POINTER (arg));
}
GstMediaPlay *
-gst_media_play_new ()
+gst_media_play_new ()
{
return GST_MEDIA_PLAY (gtk_type_new (GST_TYPE_MEDIA_PLAY));
}
-static void
-gst_media_play_update_status_area (GstMediaPlay *play,
- gulong current_time,
+static void
+gst_media_play_update_status_area (GstMediaPlay *play,
+ gulong current_time,
gulong total_time)
{
gchar time[14];
- sprintf(time, "%02lu:%02lu / %02lu:%02lu",
+ sprintf(time, "%02lu:%02lu / %02lu:%02lu",
current_time/60, current_time%60,
total_time/60, total_time%60);
gst_status_area_set_playtime (play->status, time);
}
-void
-gst_media_play_start_uri (GstMediaPlay *play,
- const guchar *uri)
+void
+gst_media_play_start_uri (GstMediaPlay *play,
+ const guchar *uri)
{
GstPlayReturn ret;
gtk_widget_set_sensitive (play->slider, FALSE);
}
- gtk_window_set_title (GTK_WINDOW (play->window),
+ gtk_window_set_title (GTK_WINDOW (play->window),
g_strconcat ( "Gstplay - ", uri, NULL));
gst_play_play (play->play);
gchar *file_name = gtk_file_selection_get_filename (GTK_FILE_SELECTION(selector));
gdk_threads_leave();
- gst_media_play_start_uri (play, file_name);
+ gst_media_play_start_uri (play, file_name);
gdk_threads_enter();
g_free (data);
}
-static void
+static void
gst_media_play_set_arg (GtkObject *object,
GtkArg *arg,
- guint id)
+ guint id)
{
GstMediaPlay *play;
play = GST_MEDIA_PLAY (object);
}
}
-static void
+static void
gst_media_play_get_arg (GtkObject *object,
GtkArg *arg,
- guint id)
+ guint id)
{
GstMediaPlay *play;
gdk_threads_leave ();
}
-void
-on_gst_media_play_destroy (GtkWidget *widget,
+void
+on_gst_media_play_destroy (GtkWidget *widget,
GstMediaPlay *mplay)
{
gst_main_quit ();
}
-void
-on_exit_menu_activate (GtkWidget *widget,
+void
+on_exit_menu_activate (GtkWidget *widget,
GstMediaPlay *mplay)
{
gdk_threads_leave ();
gst_main_quit ();
}
-gint
-on_gst_media_play_delete_event (GtkWidget *widget,
- GdkEvent *event,
+gint
+on_gst_media_play_delete_event (GtkWidget *widget,
+ GdkEvent *event,
GstMediaPlay *mplay)
{
gdk_threads_leave ();
return FALSE;
}
-void
-on_extended1_activate (GtkCheckMenuItem *item,
+void
+on_extended1_activate (GtkCheckMenuItem *item,
GstMediaPlay *mplay)
{
gdk_threads_leave ();
update_buttons (play, GST_PLAY_STATE(play->play));
}
-static void
-update_buttons (GstMediaPlay *mplay,
- GstPlayState state)
+static void
+update_buttons (GstMediaPlay *mplay,
+ GstPlayState state)
{
gtk_signal_handler_block_by_func (GTK_OBJECT (mplay->play_button),
GTK_SIGNAL_FUNC (on_toggle_play_toggled),
mplay);
}
-static void
+static void
update_slider (GstMediaPlay *mplay,
- GtkAdjustment *adjustment,
- gfloat value)
+ GtkAdjustment *adjustment,
+ gfloat value)
{
gtk_signal_handler_block_by_func (GTK_OBJECT (adjustment),
GTK_SIGNAL_FUNC (gst_media_play_slider_changed),
//FIXME
#include <gst/meta/videoraw.h>
-static void gst_videoscale_scale_yuv(GstVideoScale *scale, unsigned char *src, unsigned char *dest);
-static void gst_videoscale_scale_rgb(GstVideoScale *scale, unsigned char *src, unsigned char *dest);
+static void gst_videoscale_scale_yuv(GstVideoScale *scale, unsigned char *src, unsigned char *dest);
+static void gst_videoscale_scale_rgb(GstVideoScale *scale, unsigned char *src, unsigned char *dest);
/* scalers */
static void generate_rowbytes(unsigned char *copy_row, int src_w, int dst_w, int bpp);
-static void gst_videoscale_scale_nearest(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh);
-static void gst_videoscale_scale_plane_slow(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh);
+static void gst_videoscale_scale_nearest(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh);
+static void gst_videoscale_scale_plane_slow(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh);
static void gst_videoscale_scale_point_sample(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh);
/* filters */
static unsigned char gst_videoscale_bilinear(unsigned char *src, double x, double y, int sw, int sh);
static unsigned char gst_videoscale_bicubic(unsigned char *src, double x, double y, int sw, int sh);
-GstVideoScale *gst_videoscale_new(gint sw, gint sh, gint dw, gint dh, GstColorSpaceType format, GstVideoScaleMethod method)
+GstVideoScale *gst_videoscale_new(gint sw, gint sh, gint dw, gint dh, GstColorSpaceType format, GstVideoScaleMethod method)
{
GstVideoScale *new = g_malloc(sizeof(GstVideoScale));
gint scale_bytes;
return new;
}
-void gst_videoscale_destroy(GstVideoScale *scale)
+void gst_videoscale_destroy(GstVideoScale *scale)
{
g_free(scale);
}
-static void gst_videoscale_scale_rgb(GstVideoScale *scale, unsigned char *src, unsigned char *dest)
+static void gst_videoscale_scale_rgb(GstVideoScale *scale, unsigned char *src, unsigned char *dest)
{
int sw = scale->source_width;
int sh = scale->source_height;
scale->scaler(scale, src, dest, sw, sh, dw, dh);
}
-static void gst_videoscale_scale_yuv(GstVideoScale *scale, unsigned char *src, unsigned char *dest)
+static void gst_videoscale_scale_yuv(GstVideoScale *scale, unsigned char *src, unsigned char *dest)
{
int sw = scale->source_width;
int sh = scale->source_height;
int dw = scale->dest_width;
int dh = scale->dest_height;
-
+
GST_DEBUG (0,"videoscale: scaling YUV420P %dx%d to %dx%d\n", sw, sh, dw, dh);
scale->scaler(scale, src, dest, sw, sh, dw, dh);
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;
}
}
}
-
}
#define PREFIX16 0x66
}
-static void gst_videoscale_scale_point_sample(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh)
+static void gst_videoscale_scale_point_sample(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh)
{
int ypos, yinc, y;
int xpos, xinc, x;
int sum, xcount, ycount, loop;
unsigned char *srcp, *srcp2;
-
+
GST_DEBUG (0,"videoscale: scaling nearest %p %p %d\n", src, dest, dw);
}
}
-static void gst_videoscale_scale_nearest(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh)
+static void gst_videoscale_scale_nearest(GstVideoScale *scale, unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh)
{
int pos, inc, y;
int u1, u2;
-
+
scale->temp = scale->copy_row;
-
+
GST_DEBUG (0,"videoscale: scaling nearest %p %p %p %d\n", scale->copy_row, src, dest, dw);
src += sw;
pos-=0x10000;
}
-
+
__asm__ __volatile__ ("
movl %2, %%eax\n
call *%%eax
: "=&D" (u1), "=&S" (u2)
: "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);
}