mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
f6f9563dc8
Add a script that creates elements based on any of the GStreamer base classes. It isn't very user friendly at the moment, one needs to edit the script to make it work properly. Each base class has a template file describing what to put into the constructed element. Eventually, these templates should be moved to reside with the base class source and installed to a well-known directory, where an installed script could find them. The template files use the .c ending so editors know they are C source, but gst-indent doesn't handle them correctly. So they need to be committed with -n. Ugh. I'll try to figure out a fix for that soon.
150 lines
2.9 KiB
C
150 lines
2.9 KiB
C
% ClassName
|
|
GstBaseSrc
|
|
% TYPE_CLASS_NAME
|
|
GST_TYPE_BASE_SRC
|
|
% pkg-config
|
|
gstreamer-base-0.10
|
|
% includes
|
|
#include <gst/base/gstbasesrc.h>
|
|
% prototypes
|
|
static GstCaps *gst_replace_get_caps (GstBaseSrc * src);
|
|
static gboolean gst_replace_set_caps (GstBaseSrc * src, GstCaps * caps);
|
|
static gboolean gst_replace_negotiate (GstBaseSrc * src);
|
|
static gboolean gst_replace_newsegment (GstBaseSrc * src);
|
|
static gboolean gst_replace_start (GstBaseSrc * src);
|
|
static gboolean gst_replace_stop (GstBaseSrc * src);
|
|
static void
|
|
gst_replace_get_times (GstBaseSrc * src, GstBuffer * buffer,
|
|
GstClockTime * start, GstClockTime * end);
|
|
static gboolean gst_replace_get_size (GstBaseSrc * src, guint64 * size);
|
|
static gboolean gst_replace_is_seekable (GstBaseSrc * src);
|
|
static gboolean gst_replace_unlock (GstBaseSrc * src);
|
|
static gboolean gst_replace_event (GstBaseSrc * src, GstEvent * event);
|
|
static GstFlowReturn
|
|
gst_replace_create (GstBaseSrc * src, guint64 offset, guint size,
|
|
GstBuffer ** buf);
|
|
static gboolean gst_replace_do_seek (GstBaseSrc * src, GstSegment * segment);
|
|
static gboolean gst_replace_query (GstBaseSrc * src, GstQuery * query);
|
|
static gboolean gst_replace_check_get_range (GstBaseSrc * src);
|
|
static void gst_replace_fixate (GstBaseSrc * src, GstCaps * caps);
|
|
static gboolean gst_replace_unlock_stop (GstBaseSrc * src);
|
|
static gboolean
|
|
gst_replace_prepare_seek_segment (GstBaseSrc * src, GstEvent * seek,
|
|
GstSegment * segment);
|
|
% declare-class
|
|
GstBaseSrc *base_src_class = GST_BASE_SRC (klass);
|
|
% set-methods
|
|
base_src_class-> = GST_DEBUG_FUNCPTR (gst_replace_);
|
|
% methods
|
|
|
|
static GstCaps *
|
|
gst_replace_get_caps (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_set_caps (GstBaseSrc * src, GstCaps * caps)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_negotiate (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_newsegment (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_start (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_stop (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static void
|
|
gst_replace_get_times (GstBaseSrc * src, GstBuffer * buffer,
|
|
GstClockTime * start, GstClockTime * end)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_get_size (GstBaseSrc * src, guint64 * size)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_is_seekable (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_unlock (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_event (GstBaseSrc * src, GstEvent * event)
|
|
{
|
|
|
|
}
|
|
|
|
static GstFlowReturn
|
|
gst_replace_create (GstBaseSrc * src, guint64 offset, guint size,
|
|
GstBuffer ** buf)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_do_seek (GstBaseSrc * src, GstSegment * segment)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_query (GstBaseSrc * src, GstQuery * query)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_check_get_range (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static void
|
|
gst_replace_fixate (GstBaseSrc * src, GstCaps * caps)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_unlock_stop (GstBaseSrc * src)
|
|
{
|
|
|
|
}
|
|
|
|
static gboolean
|
|
gst_replace_prepare_seek_segment (GstBaseSrc * src, GstEvent * seek,
|
|
GstSegment * segment)
|
|
{
|
|
|
|
}
|
|
% end
|