Commit b1fcf14d authored by Olivier Crête's avatar Olivier Crête 👻

inter: Port to 1.0 API

Also remove a lot of empty, non-implemented methods
parent b7d63d3f
......@@ -314,7 +314,7 @@ GST_PLUGINS_NONPORTED=" aiff \
cdxaparse \
dccp faceoverlay \
fieldanalysis freeverb frei0r \
hdvparse inter ivfparse jp2kdecimator \
hdvparse ivfparse jp2kdecimator \
kate librfb \
mpegpsmux mve mxf mythtv nsf nuvdemux \
patchdetect real \
......
......@@ -57,30 +57,14 @@ static void gst_inter_audio_sink_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec);
static void gst_inter_audio_sink_get_property (GObject * object,
guint property_id, GValue * value, GParamSpec * pspec);
static void gst_inter_audio_sink_dispose (GObject * object);
static void gst_inter_audio_sink_finalize (GObject * object);
static GstCaps *gst_inter_audio_sink_get_caps (GstBaseSink * sink);
static gboolean gst_inter_audio_sink_set_caps (GstBaseSink * sink,
GstCaps * caps);
static GstFlowReturn gst_inter_audio_sink_buffer_alloc (GstBaseSink * sink,
guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf);
static void gst_inter_audio_sink_get_times (GstBaseSink * sink,
GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
static gboolean gst_inter_audio_sink_start (GstBaseSink * sink);
static gboolean gst_inter_audio_sink_stop (GstBaseSink * sink);
static gboolean gst_inter_audio_sink_unlock (GstBaseSink * sink);
static gboolean gst_inter_audio_sink_event (GstBaseSink * sink,
GstEvent * event);
static GstFlowReturn gst_inter_audio_sink_preroll (GstBaseSink * sink,
GstBuffer * buffer);
static GstFlowReturn gst_inter_audio_sink_render (GstBaseSink * sink,
GstBuffer * buffer);
static GstStateChangeReturn gst_inter_audio_sink_async_play (GstBaseSink *
sink);
static gboolean gst_inter_audio_sink_activate_pull (GstBaseSink * sink,
gboolean active);
static gboolean gst_inter_audio_sink_unlock_stop (GstBaseSink * sink);
enum
{
......@@ -94,28 +78,25 @@ static GstStaticPadTemplate gst_inter_audio_sink_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
"depth = (int) 16, " "rate = (int) 48000, " "channels = (int) 2")
GST_STATIC_CAPS ("audio/x-raw, format = (string) " GST_AUDIO_NE (S16) ", "
"rate = (int) 48000, channels = (int) 2")
);
/* class initialization */
#define DEBUG_INIT(bla) \
GST_DEBUG_CATEGORY_INIT (gst_inter_audio_sink_debug_category, "interaudiosink", 0, \
"debug category for interaudiosink element");
GST_BOILERPLATE_FULL (GstInterAudioSink, gst_inter_audio_sink, GstBaseSink,
GST_TYPE_BASE_SINK, DEBUG_INIT);
G_DEFINE_TYPE (GstInterAudioSink, gst_inter_audio_sink, GST_TYPE_BASE_SINK);
static void
gst_inter_audio_sink_base_init (gpointer g_class)
gst_inter_audio_sink_class_init (GstInterAudioSinkClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (gst_inter_audio_sink_debug_category,
"interaudiosink", 0, "debug category for interaudiosink element");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_inter_audio_sink_sink_template));
......@@ -124,41 +105,15 @@ gst_inter_audio_sink_base_init (gpointer g_class)
"Sink/Audio",
"Virtual audio sink for internal process communication",
"David Schleef <ds@schleef.org>");
}
static void
gst_inter_audio_sink_class_init (GstInterAudioSinkClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass);
gobject_class->set_property = gst_inter_audio_sink_set_property;
gobject_class->get_property = gst_inter_audio_sink_get_property;
gobject_class->dispose = gst_inter_audio_sink_dispose;
gobject_class->finalize = gst_inter_audio_sink_finalize;
base_sink_class->get_caps = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_get_caps);
base_sink_class->set_caps = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_set_caps);
if (0)
base_sink_class->buffer_alloc =
GST_DEBUG_FUNCPTR (gst_inter_audio_sink_buffer_alloc);
base_sink_class->get_times =
GST_DEBUG_FUNCPTR (gst_inter_audio_sink_get_times);
base_sink_class->start = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_start);
base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_stop);
base_sink_class->unlock = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_unlock);
if (0)
base_sink_class->event = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_event);
//if (0)
base_sink_class->preroll = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_preroll);
base_sink_class->render = GST_DEBUG_FUNCPTR (gst_inter_audio_sink_render);
if (0)
base_sink_class->async_play =
GST_DEBUG_FUNCPTR (gst_inter_audio_sink_async_play);
if (0)
base_sink_class->activate_pull =
GST_DEBUG_FUNCPTR (gst_inter_audio_sink_activate_pull);
base_sink_class->unlock_stop =
GST_DEBUG_FUNCPTR (gst_inter_audio_sink_unlock_stop);
g_object_class_install_property (gobject_class, PROP_CHANNEL,
g_param_spec_string ("channel", "Channel",
......@@ -167,8 +122,7 @@ gst_inter_audio_sink_class_init (GstInterAudioSinkClass * klass)
}
static void
gst_inter_audio_sink_init (GstInterAudioSink * interaudiosink,
GstInterAudioSinkClass * interaudiosink_class)
gst_inter_audio_sink_init (GstInterAudioSink * interaudiosink)
{
interaudiosink->channel = g_strdup ("default");
}
......@@ -206,16 +160,6 @@ gst_inter_audio_sink_get_property (GObject * object, guint property_id,
}
}
void
gst_inter_audio_sink_dispose (GObject * object)
{
/* GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (object); */
/* clean up as possible. may be called multiple times */
G_OBJECT_CLASS (parent_class)->dispose (object);
}
void
gst_inter_audio_sink_finalize (GObject * object)
{
......@@ -224,33 +168,10 @@ gst_inter_audio_sink_finalize (GObject * object)
/* clean up object here */
g_free (interaudiosink->channel);
G_OBJECT_CLASS (parent_class)->finalize (object);
G_OBJECT_CLASS (gst_inter_audio_sink_parent_class)->finalize (object);
}
static GstCaps *
gst_inter_audio_sink_get_caps (GstBaseSink * sink)
{
return NULL;
}
static gboolean
gst_inter_audio_sink_set_caps (GstBaseSink * sink, GstCaps * caps)
{
return TRUE;
}
static GstFlowReturn
gst_inter_audio_sink_buffer_alloc (GstBaseSink * sink, guint64 offset,
guint size, GstCaps * caps, GstBuffer ** buf)
{
return GST_FLOW_ERROR;
}
static void
gst_inter_audio_sink_get_times (GstBaseSink * sink, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end)
......@@ -302,39 +223,18 @@ gst_inter_audio_sink_stop (GstBaseSink * sink)
return TRUE;
}
static gboolean
gst_inter_audio_sink_unlock (GstBaseSink * sink)
{
return TRUE;
}
static gboolean
gst_inter_audio_sink_event (GstBaseSink * sink, GstEvent * event)
{
return TRUE;
}
static GstFlowReturn
gst_inter_audio_sink_preroll (GstBaseSink * sink, GstBuffer * buffer)
{
return GST_FLOW_OK;
}
static GstFlowReturn
gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer)
{
GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
int n;
GST_DEBUG ("render %d", GST_BUFFER_SIZE (buffer));
GST_DEBUG ("render %d", gst_buffer_get_size (buffer));
g_mutex_lock (interaudiosink->surface->mutex);
n = gst_adapter_available (interaudiosink->surface->audio_adapter) / 4;
#define SIZE 1600
if (n > (1600 * 3)) {
if (n > (SIZE * 3)) {
GST_WARNING ("flushing 800 samples");
gst_adapter_flush (interaudiosink->surface->audio_adapter, (SIZE / 2) * 4);
n -= (SIZE / 2);
......@@ -345,24 +245,3 @@ gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer)
return GST_FLOW_OK;
}
static GstStateChangeReturn
gst_inter_audio_sink_async_play (GstBaseSink * sink)
{
return GST_STATE_CHANGE_SUCCESS;
}
static gboolean
gst_inter_audio_sink_activate_pull (GstBaseSink * sink, gboolean active)
{
return TRUE;
}
static gboolean
gst_inter_audio_sink_unlock_stop (GstBaseSink * sink)
{
return TRUE;
}
......@@ -39,9 +39,12 @@
#include "config.h"
#endif
#include "gstinteraudiosrc.h"
#include <gst/gst.h>
#include <gst/base/gstbasesrc.h>
#include "gstinteraudiosrc.h"
#include <gst/audio/audio.h>
#include <string.h>
GST_DEBUG_CATEGORY_STATIC (gst_inter_audio_src_debug_category);
......@@ -54,33 +57,19 @@ static void gst_inter_audio_src_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec);
static void gst_inter_audio_src_get_property (GObject * object,
guint property_id, GValue * value, GParamSpec * pspec);
static void gst_inter_audio_src_dispose (GObject * object);
static void gst_inter_audio_src_finalize (GObject * object);
static GstCaps *gst_inter_audio_src_get_caps (GstBaseSrc * src);
static gboolean gst_inter_audio_src_set_caps (GstBaseSrc * src, GstCaps * caps);
static gboolean gst_inter_audio_src_negotiate (GstBaseSrc * src);
static gboolean gst_inter_audio_src_newsegment (GstBaseSrc * src);
static gboolean gst_inter_audio_src_start (GstBaseSrc * src);
static gboolean gst_inter_audio_src_stop (GstBaseSrc * src);
static void
gst_inter_audio_src_get_times (GstBaseSrc * src, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end);
static gboolean gst_inter_audio_src_is_seekable (GstBaseSrc * src);
static gboolean gst_inter_audio_src_unlock (GstBaseSrc * src);
static gboolean gst_inter_audio_src_event (GstBaseSrc * src, GstEvent * event);
static GstFlowReturn
gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
GstBuffer ** buf);
static gboolean gst_inter_audio_src_do_seek (GstBaseSrc * src,
GstSegment * segment);
static gboolean gst_inter_audio_src_query (GstBaseSrc * src, GstQuery * query);
static gboolean gst_inter_audio_src_check_get_range (GstBaseSrc * src);
static void gst_inter_audio_src_fixate (GstBaseSrc * src, GstCaps * caps);
static gboolean gst_inter_audio_src_unlock_stop (GstBaseSrc * src);
static gboolean
gst_inter_audio_src_prepare_seek_segment (GstBaseSrc * src, GstEvent * seek,
GstSegment * segment);
static GstCaps *gst_inter_audio_src_fixate (GstBaseSrc * src, GstCaps * caps);
enum
{
......@@ -94,27 +83,24 @@ static GstStaticPadTemplate gst_inter_audio_src_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
"depth = (int) 16, " "rate = (int) 48000, " "channels = (int) 2")
GST_STATIC_CAPS ("audio/x-raw, format = (string) " GST_AUDIO_NE (S16) ", "
"rate = (int) 48000, channels = (int) 2")
);
/* class initialization */
#define DEBUG_INIT(bla) \
GST_DEBUG_CATEGORY_INIT (gst_inter_audio_src_debug_category, "interaudiosrc", 0, \
"debug category for interaudiosrc element");
GST_BOILERPLATE_FULL (GstInterAudioSrc, gst_inter_audio_src, GstBaseSrc,
GST_TYPE_BASE_SRC, DEBUG_INIT);
G_DEFINE_TYPE (GstInterAudioSrc, gst_inter_audio_src, GST_TYPE_BASE_SRC);
static void
gst_inter_audio_src_base_init (gpointer g_class)
gst_inter_audio_src_class_init (GstInterAudioSrcClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GstBaseSrcClass *base_src_class = GST_BASE_SRC_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (gst_inter_audio_src_debug_category, "interaudiosrc",
0, "debug category for interaudiosrc element");
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_inter_audio_src_src_template));
......@@ -124,47 +110,17 @@ gst_inter_audio_src_base_init (gpointer g_class)
"Source/Audio",
"Virtual audio source for internal process communication",
"David Schleef <ds@schleef.org>");
}
static void
gst_inter_audio_src_class_init (GstInterAudioSrcClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstBaseSrcClass *base_src_class = GST_BASE_SRC_CLASS (klass);
gobject_class->set_property = gst_inter_audio_src_set_property;
gobject_class->get_property = gst_inter_audio_src_get_property;
gobject_class->dispose = gst_inter_audio_src_dispose;
gobject_class->finalize = gst_inter_audio_src_finalize;
base_src_class->get_caps = GST_DEBUG_FUNCPTR (gst_inter_audio_src_get_caps);
base_src_class->set_caps = GST_DEBUG_FUNCPTR (gst_inter_audio_src_set_caps);
if (0)
base_src_class->negotiate =
GST_DEBUG_FUNCPTR (gst_inter_audio_src_negotiate);
base_src_class->newsegment =
GST_DEBUG_FUNCPTR (gst_inter_audio_src_newsegment);
base_src_class->start = GST_DEBUG_FUNCPTR (gst_inter_audio_src_start);
base_src_class->stop = GST_DEBUG_FUNCPTR (gst_inter_audio_src_stop);
base_src_class->get_times = GST_DEBUG_FUNCPTR (gst_inter_audio_src_get_times);
if (0)
base_src_class->is_seekable =
GST_DEBUG_FUNCPTR (gst_inter_audio_src_is_seekable);
base_src_class->unlock = GST_DEBUG_FUNCPTR (gst_inter_audio_src_unlock);
base_src_class->event = GST_DEBUG_FUNCPTR (gst_inter_audio_src_event);
base_src_class->create = GST_DEBUG_FUNCPTR (gst_inter_audio_src_create);
if (0)
base_src_class->do_seek = GST_DEBUG_FUNCPTR (gst_inter_audio_src_do_seek);
base_src_class->query = GST_DEBUG_FUNCPTR (gst_inter_audio_src_query);
if (0)
base_src_class->check_get_range =
GST_DEBUG_FUNCPTR (gst_inter_audio_src_check_get_range);
base_src_class->fixate = GST_DEBUG_FUNCPTR (gst_inter_audio_src_fixate);
if (0)
base_src_class->unlock_stop =
GST_DEBUG_FUNCPTR (gst_inter_audio_src_unlock_stop);
if (0)
base_src_class->prepare_seek_segment =
GST_DEBUG_FUNCPTR (gst_inter_audio_src_prepare_seek_segment);
g_object_class_install_property (gobject_class, PROP_CHANNEL,
g_param_spec_string ("channel", "Channel",
......@@ -173,8 +129,7 @@ gst_inter_audio_src_class_init (GstInterAudioSrcClass * klass)
}
static void
gst_inter_audio_src_init (GstInterAudioSrc * interaudiosrc,
GstInterAudioSrcClass * interaudiosrc_class)
gst_inter_audio_src_init (GstInterAudioSrc * interaudiosrc)
{
gst_base_src_set_format (GST_BASE_SRC (interaudiosrc), GST_FORMAT_TIME);
gst_base_src_set_live (GST_BASE_SRC (interaudiosrc), TRUE);
......@@ -216,16 +171,6 @@ gst_inter_audio_src_get_property (GObject * object, guint property_id,
}
}
void
gst_inter_audio_src_dispose (GObject * object)
{
/* GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (object); */
/* clean up as possible. may be called multiple times */
G_OBJECT_CLASS (parent_class)->dispose (object);
}
void
gst_inter_audio_src_finalize (GObject * object)
{
......@@ -234,18 +179,7 @@ gst_inter_audio_src_finalize (GObject * object)
/* clean up object here */
g_free (interaudiosrc->channel);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static GstCaps *
gst_inter_audio_src_get_caps (GstBaseSrc * src)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "get_caps");
return NULL;
G_OBJECT_CLASS (gst_inter_audio_src_parent_class)->finalize (object);
}
static gboolean
......@@ -263,30 +197,13 @@ gst_inter_audio_src_set_caps (GstBaseSrc * src, GstCaps * caps)
ret = gst_structure_get_int (structure, "rate", &sample_rate);
if (ret) {
interaudiosrc->sample_rate = sample_rate;
ret = gst_pad_set_caps (src->srcpad, caps);
}
return ret;
}
static gboolean
gst_inter_audio_src_negotiate (GstBaseSrc * src)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "negotiate");
return TRUE;
}
static gboolean
gst_inter_audio_src_newsegment (GstBaseSrc * src)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "newsegment");
return TRUE;
}
static gboolean
gst_inter_audio_src_start (GstBaseSrc * src)
......@@ -340,41 +257,6 @@ gst_inter_audio_src_get_times (GstBaseSrc * src, GstBuffer * buffer,
}
}
static gboolean
gst_inter_audio_src_is_seekable (GstBaseSrc * src)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "is_seekable");
return FALSE;
}
static gboolean
gst_inter_audio_src_unlock (GstBaseSrc * src)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "unlock");
return TRUE;
}
static gboolean
gst_inter_audio_src_event (GstBaseSrc * src, GstEvent * event)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
gboolean ret;
GST_DEBUG_OBJECT (interaudiosrc, "event");
switch (GST_EVENT_TYPE (event)) {
default:
ret = GST_BASE_SRC_CLASS (parent_class)->event (src, event);
}
return ret;
}
#define SIZE 1600
......@@ -406,14 +288,12 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
g_mutex_unlock (interaudiosrc->surface->mutex);
if (n < SIZE) {
GstBuffer *newbuf = gst_buffer_new_and_alloc (SIZE * 4);
GstBuffer *newbuf = gst_buffer_new_and_alloc ((SIZE - n) * 4);
GST_WARNING ("creating %d samples of silence", SIZE - n);
memset (GST_BUFFER_DATA (newbuf) + n * 4, 0, SIZE * 4 - n * 4);
if (buffer) {
memcpy (GST_BUFFER_DATA (newbuf), GST_BUFFER_DATA (buffer), n * 4);
gst_buffer_unref (buffer);
}
if (buffer)
newbuf = gst_buffer_append (newbuf, buffer);
buffer = newbuf;
}
n = SIZE;
......@@ -434,7 +314,6 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
if (interaudiosrc->n_samples == 0) {
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
}
gst_buffer_set_caps (buffer, GST_PAD_CAPS (GST_BASE_SRC_PAD (interaudiosrc)));
interaudiosrc->n_samples += n;
*buf = buffer;
......@@ -442,15 +321,6 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
return GST_FLOW_OK;
}
static gboolean
gst_inter_audio_src_do_seek (GstBaseSrc * src, GstSegment * segment)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "do_seek");
return FALSE;
}
static gboolean
gst_inter_audio_src_query (GstBaseSrc * src, GstQuery * query)
......@@ -479,29 +349,22 @@ gst_inter_audio_src_query (GstBaseSrc * src, GstQuery * query)
break;
}
default:
ret = GST_BASE_SRC_CLASS (parent_class)->query (src, query);
ret = GST_BASE_SRC_CLASS (gst_inter_audio_src_parent_class)->query (src,
query);
break;
}
return ret;
}
static gboolean
gst_inter_audio_src_check_get_range (GstBaseSrc * src)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "get_range");
return FALSE;
}
static void
static GstCaps *
gst_inter_audio_src_fixate (GstBaseSrc * src, GstCaps * caps)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GstStructure *structure;
caps = gst_caps_make_writable (caps);
structure = gst_caps_get_structure (caps, 0);
GST_DEBUG_OBJECT (interaudiosrc, "fixate");
......@@ -509,25 +372,5 @@ gst_inter_audio_src_fixate (GstBaseSrc * src, GstCaps * caps)
gst_structure_fixate_field_nearest_int (structure, "channels", 2);
gst_structure_fixate_field_nearest_int (structure, "rate", 48000);
}
static gboolean
gst_inter_audio_src_unlock_stop (GstBaseSrc * src)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "stop");
return TRUE;
}
static gboolean
gst_inter_audio_src_prepare_seek_segment (GstBaseSrc * src, GstEvent * seek,
GstSegment * segment)
{
GstInterAudioSrc *interaudiosrc = GST_INTER_AUDIO_SRC (src);
GST_DEBUG_OBJECT (interaudiosrc, "seek_segment");
return FALSE;
return caps;
}
......@@ -53,28 +53,13 @@ static void gst_inter_sub_sink_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec);
static void gst_inter_sub_sink_get_property (GObject * object,
guint property_id, GValue * value, GParamSpec * pspec);
static void gst_inter_sub_sink_dispose (GObject * object);
static void gst_inter_sub_sink_finalize (GObject * object);
static GstCaps *gst_inter_sub_sink_get_caps (GstBaseSink * sink);
static gboolean gst_inter_sub_sink_set_caps (GstBaseSink * sink,
GstCaps * caps);
static GstFlowReturn gst_inter_sub_sink_buffer_alloc (GstBaseSink * sink,
guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf);
static void gst_inter_sub_sink_get_times (GstBaseSink * sink,
GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
static gboolean gst_inter_sub_sink_start (GstBaseSink * sink);
static gboolean gst_inter_sub_sink_stop (GstBaseSink * sink);
static gboolean gst_inter_sub_sink_unlock (GstBaseSink * sink);
static gboolean gst_inter_sub_sink_event (GstBaseSink * sink, GstEvent * event);
static GstFlowReturn
gst_inter_sub_sink_preroll (GstBaseSink * sink, GstBuffer * buffer);
static GstFlowReturn
gst_inter_sub_sink_render (GstBaseSink * sink, GstBuffer * buffer);
static GstStateChangeReturn gst_inter_sub_sink_async_play (GstBaseSink * sink);
static gboolean gst_inter_sub_sink_activate_pull (GstBaseSink * sink,
gboolean active);
static gboolean gst_inter_sub_sink_unlock_stop (GstBaseSink * sink);
enum
{
......@@ -94,17 +79,17 @@ GST_STATIC_PAD_TEMPLATE ("sink",
/* class initialization */
#define DEBUG_INIT(bla) \
GST_DEBUG_CATEGORY_INIT (gst_inter_sub_sink_debug_category, "intersubsink", 0, \
"debug category for intersubsink element");
GST_BOILERPLATE_FULL (GstInterSubSink, gst_inter_sub_sink, GstBaseSink,
GST_TYPE_BASE_SINK, DEBUG_INIT);
G_DEFINE_TYPE (GstInterSubSink, gst_inter_sub_sink, GST_TYPE_BASE_SINK);
static void
gst_inter_sub_sink_base_init (gpointer g_class)
gst_inter_sub_sink_class_init (GstInterSubSinkClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);