mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
+ changes for new float caps without slope/intercept + some category changes for plugins
Original commit message from CVS: + changes for new float caps without slope/intercept + some category changes for plugins
This commit is contained in:
parent
d5c716edbd
commit
f6830d4ad1
9 changed files with 39 additions and 48 deletions
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
static GstElementDetails colorspace_details = {
|
static GstElementDetails colorspace_details = {
|
||||||
"Colorspace converter",
|
"Colorspace converter",
|
||||||
"Filter/Video",
|
"Filter/Convert",
|
||||||
"LGPL",
|
"LGPL",
|
||||||
"Converts video from one colorspace to another using libhermes",
|
"Converts video from one colorspace to another using libhermes",
|
||||||
VERSION,
|
VERSION,
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <gst/audio/audio.h>
|
#include <gst/audio/audio.h>
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
|
|
||||||
this element is still nonfunctional
|
this element is still nonfunctional
|
||||||
|
|
||||||
- work out the src side (caps setting, etc)
|
- work out the src side (caps setting, etc)
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* elementfactory information */
|
/* elementfactory information */
|
||||||
static GstElementDetails gst_jack_bin_details = {
|
static GstElementDetails gst_jack_bin_details = {
|
||||||
"Jack Bin",
|
"Jack Bin",
|
||||||
"Generic/Bin",
|
"Generic/Bin",
|
||||||
"GPL",
|
"GPL",
|
||||||
|
@ -171,7 +171,7 @@ gst_jack_src_request_pad_factory(void)
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
caps = gst_caps_new("src",
|
caps = gst_caps_new("src",
|
||||||
"audio/x-raw-float",
|
"audio/x-raw-float",
|
||||||
GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS);
|
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS);
|
||||||
template = gst_pad_template_new("%s", GST_PAD_SRC,
|
template = gst_pad_template_new("%s", GST_PAD_SRC,
|
||||||
GST_PAD_REQUEST, caps, NULL);
|
GST_PAD_REQUEST, caps, NULL);
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@ gst_jack_sink_request_pad_factory(void)
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
caps = gst_caps_new ("sink",
|
caps = gst_caps_new ("sink",
|
||||||
"audio/x-raw-float",
|
"audio/x-raw-float",
|
||||||
GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS);
|
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS);
|
||||||
template = gst_pad_template_new("%s", GST_PAD_SINK,
|
template = gst_pad_template_new("%s", GST_PAD_SINK,
|
||||||
GST_PAD_REQUEST, caps, NULL);
|
GST_PAD_REQUEST, caps, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* -*- Mode: C; c-basic-offset: 4 -*- */
|
/* -*- Mode: C; c-basic-offset: 4 -*- */
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2002 Andy Wingo <wingo@pobox.com>
|
Copyright (C) 2002 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
License as published by the Free Software Foundation; either
|
License as published by the Free Software Foundation; either
|
||||||
|
@ -85,12 +85,12 @@ struct _GstJack {
|
||||||
|
|
||||||
/* list of GstJackPads */
|
/* list of GstJackPads */
|
||||||
GList *pads;
|
GList *pads;
|
||||||
|
|
||||||
/* for convenience */
|
/* for convenience */
|
||||||
GstPadDirection direction;
|
GstPadDirection direction;
|
||||||
|
|
||||||
gchar *port_name_prefix;
|
gchar *port_name_prefix;
|
||||||
|
|
||||||
GstJackBin *bin;
|
GstJackBin *bin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <gst/control/control.h>
|
#include <gst/control/control.h>
|
||||||
|
#include <gst/audio/audio.h>
|
||||||
|
|
||||||
#include "gstladspa.h"
|
#include "gstladspa.h"
|
||||||
#include <ladspa.h> /* main ladspa sdk include file */
|
#include <ladspa.h> /* main ladspa sdk include file */
|
||||||
|
@ -35,14 +36,10 @@ ladspa_sink_factory (gchar *name)
|
||||||
name,
|
name,
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_CAPS_NEW (
|
gst_caps_new (
|
||||||
"ladspa_sink",
|
"ladspa_sink",
|
||||||
"audio/x-raw-float",
|
"audio/x-raw-float",
|
||||||
"width", GST_PROPS_INT (32),
|
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS
|
||||||
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
|
|
||||||
"rate", GST_PROPS_INT_RANGE (4000, 96000),
|
|
||||||
"buffer-frames", GST_PROPS_INT_RANGE (1, G_MAXINT),
|
|
||||||
"channels", GST_PROPS_INT (1)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -55,14 +52,10 @@ ladspa_src_factory (gchar *name)
|
||||||
name,
|
name,
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_CAPS_NEW (
|
gst_caps_new (
|
||||||
"ladspa_src",
|
"ladspa_src",
|
||||||
"audio/x-raw-float",
|
"audio/x-raw-float",
|
||||||
"width", GST_PROPS_INT (32),
|
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS
|
||||||
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
|
|
||||||
"rate", GST_PROPS_INT_RANGE (4000, 96000),
|
|
||||||
"buffer-frames", GST_PROPS_INT_RANGE (1, G_MAXINT),
|
|
||||||
"channels", GST_PROPS_INT (1)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -91,6 +84,13 @@ static GstElementClass *parent_class = NULL;
|
||||||
static GstPlugin *ladspa_plugin;
|
static GstPlugin *ladspa_plugin;
|
||||||
static GHashTable *ladspa_descriptors;
|
static GHashTable *ladspa_descriptors;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
ARG_0,
|
||||||
|
ARG_SAMPLERATE,
|
||||||
|
ARG_BUFFERSIZE,
|
||||||
|
ARG_LAST,
|
||||||
|
};
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (ladspa_debug);
|
GST_DEBUG_CATEGORY_STATIC (ladspa_debug);
|
||||||
#define DEBUG(...) \
|
#define DEBUG(...) \
|
||||||
GST_CAT_LEVEL_LOG (ladspa_debug, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
|
GST_CAT_LEVEL_LOG (ladspa_debug, GST_LEVEL_DEBUG, NULL, __VA_ARGS__)
|
||||||
|
@ -477,25 +477,24 @@ gst_ladspa_force_src_caps(GstLADSPA *ladspa, GstPad *pad)
|
||||||
if (!ladspa->buffer_frames) {
|
if (!ladspa->buffer_frames) {
|
||||||
ladspa->buffer_frames = 256; /* 5 ms at 44100 kHz (just a default...) */
|
ladspa->buffer_frames = 256; /* 5 ms at 44100 kHz (just a default...) */
|
||||||
g_return_if_fail (ladspa->bufpool == NULL);
|
g_return_if_fail (ladspa->bufpool == NULL);
|
||||||
ladspa->bufpool = gst_buffer_pool_get_default (ladspa->buffer_frames * sizeof(gfloat),
|
ladspa->bufpool =
|
||||||
3);
|
gst_buffer_pool_get_default (ladspa->buffer_frames * sizeof(gfloat), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_OBJ (ladspa, "forcing caps with rate=%d, buffer-frames=%d",
|
DEBUG_OBJ (ladspa, "forcing caps with rate=%d, buffer-frames=%d",
|
||||||
ladspa->samplerate, ladspa->buffer_frames);
|
ladspa->samplerate, ladspa->buffer_frames);
|
||||||
|
|
||||||
gst_pad_try_set_caps (pad, gst_caps_new (
|
gst_pad_try_set_caps (pad,
|
||||||
|
gst_caps_new (
|
||||||
"ladspa_src_caps",
|
"ladspa_src_caps",
|
||||||
"audio/x-raw-float",
|
"audio/x-raw-float",
|
||||||
gst_props_new (
|
gst_props_new (
|
||||||
"width", GST_PROPS_INT (32),
|
"width", GST_PROPS_INT (32),
|
||||||
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
|
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
|
||||||
|
"rate", GST_PROPS_INT (ladspa->samplerate),
|
||||||
"buffer-frames", GST_PROPS_INT (ladspa->buffer_frames),
|
"buffer-frames", GST_PROPS_INT (ladspa->buffer_frames),
|
||||||
"rate", GST_PROPS_INT (ladspa->samplerate),
|
|
||||||
"channels", GST_PROPS_INT (1),
|
"channels", GST_PROPS_INT (1),
|
||||||
NULL
|
NULL)));
|
||||||
)
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -504,7 +503,7 @@ gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GP
|
||||||
GstLADSPA *ladspa = (GstLADSPA*)object;
|
GstLADSPA *ladspa = (GstLADSPA*)object;
|
||||||
GstLADSPAClass *oclass;
|
GstLADSPAClass *oclass;
|
||||||
ladspa_control_info *control_info;
|
ladspa_control_info *control_info;
|
||||||
|
|
||||||
oclass = (GstLADSPAClass*)(G_OBJECT_GET_CLASS (object));
|
oclass = (GstLADSPAClass*)(G_OBJECT_GET_CLASS (object));
|
||||||
|
|
||||||
/* remember, properties have an offset of 1 */
|
/* remember, properties have an offset of 1 */
|
||||||
|
@ -512,7 +511,7 @@ gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GP
|
||||||
|
|
||||||
/* verify it exists */
|
/* verify it exists */
|
||||||
g_return_if_fail (prop_id < oclass->numcontrols);
|
g_return_if_fail (prop_id < oclass->numcontrols);
|
||||||
|
|
||||||
control_info = &(oclass->control_info[prop_id]);
|
control_info = &(oclass->control_info[prop_id]);
|
||||||
g_return_if_fail (control_info->name != NULL);
|
g_return_if_fail (control_info->name != NULL);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
/* elementfactory information */
|
/* elementfactory information */
|
||||||
static GstElementDetails icecastsend_details = {
|
static GstElementDetails icecastsend_details = {
|
||||||
"An Icecast plugin",
|
"An Icecast plugin",
|
||||||
"Sink/Network/Icecast",
|
"Sink/Network",
|
||||||
"GPL",
|
"GPL",
|
||||||
"Sends data to an icecast server using libshout",
|
"Sends data to an icecast server using libshout",
|
||||||
VERSION,
|
VERSION,
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
static GstElementDetails gst_smoothwave_details = {
|
static GstElementDetails gst_smoothwave_details = {
|
||||||
"Smooth waveform",
|
"Smooth waveform",
|
||||||
"Sink/Visualization",
|
"Visualization",
|
||||||
"LGPL",
|
"LGPL",
|
||||||
"Fading grayscale waveform display",
|
"Fading grayscale waveform display",
|
||||||
VERSION,
|
VERSION,
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
/* elementfactory information */
|
/* elementfactory information */
|
||||||
static GstElementDetails snapshot_details = {
|
static GstElementDetails snapshot_details = {
|
||||||
"snapshot",
|
"snapshot",
|
||||||
"Filter/Effect",
|
"Filter/Video",
|
||||||
"LGPL",
|
"LGPL",
|
||||||
"Dump a frame to a png file",
|
"Dump a frame to a png file",
|
||||||
VERSION,
|
VERSION,
|
||||||
|
|
|
@ -60,14 +60,10 @@ GST_PAD_TEMPLATE_FACTORY (sf_src_factory,
|
||||||
"src%d",
|
"src%d",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_REQUEST,
|
GST_PAD_REQUEST,
|
||||||
GST_CAPS_NEW (
|
gst_caps_new (
|
||||||
"sf_src",
|
"sf_src",
|
||||||
"audio/x-raw-float",
|
"audio/x-raw-float",
|
||||||
"rate", GST_PROPS_INT_RANGE (1, G_MAXINT),
|
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS
|
||||||
"width", GST_PROPS_INT (32),
|
|
||||||
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
|
|
||||||
"buffer-frames", GST_PROPS_INT_RANGE (1, G_MAXINT),
|
|
||||||
"channels", GST_PROPS_INT (1)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -75,14 +71,10 @@ GST_PAD_TEMPLATE_FACTORY (sf_sink_factory,
|
||||||
"sink%d",
|
"sink%d",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_REQUEST,
|
GST_PAD_REQUEST,
|
||||||
GST_CAPS_NEW (
|
gst_caps_new (
|
||||||
"sf_sink",
|
"sf_sink",
|
||||||
"audio/x-raw-float",
|
"audio/x-raw-float",
|
||||||
"rate", GST_PROPS_INT_RANGE (1, G_MAXINT),
|
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS
|
||||||
"width", GST_PROPS_INT (32),
|
|
||||||
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
|
|
||||||
"buffer-frames", GST_PROPS_INT_RANGE (1, G_MAXINT),
|
|
||||||
"channels", GST_PROPS_INT (1)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
static GstElementDetails gst_smoothwave_details = {
|
static GstElementDetails gst_smoothwave_details = {
|
||||||
"Smooth waveform",
|
"Smooth waveform",
|
||||||
"Sink/Visualization",
|
"Visualization",
|
||||||
"LGPL",
|
"LGPL",
|
||||||
"Fading grayscale waveform display",
|
"Fading grayscale waveform display",
|
||||||
VERSION,
|
VERSION,
|
||||||
|
|
Loading…
Reference in a new issue