From 0c042686058d1ed6d68333ccd78ffe8bda01879a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 13 Jul 2009 12:24:04 -0400 Subject: Automatic update of common submodule From 5845b63 to fedaaee --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index 5845b632..fedaaee6 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 5845b632c99d8f0ab863bd955a9568d7937108f8 +Subproject commit fedaaee6fa5c0006f5b7264732cb4e29584ef100 -- cgit v1.2.1 From 6fd890d65f11fe4da6257944f993a91dd8b6c5f7 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 30 Jun 2009 16:31:12 +0100 Subject: resindvd: Don't send empty language code strings Ignore empty language codes on some poorly coded DVDs, rather than setting empty strings into our outgoing taglist. --- ext/resindvd/resindvdsrc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 7b44bf9c..38be6394 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1904,7 +1904,9 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) gst_structure_set (s, t, G_TYPE_INT, (int) a->audio_format, NULL); g_free (t); - if (a->lang_type) { + /* Check that the language code is flagged and at least somewhat valid + * before putting it in the output structure */ + if (a->lang_type && a->lang_code > 0x100) { t = g_strdup_printf ("audio-%d-language", i); lang_code[0] = (a->lang_code >> 8) & 0xff; lang_code[1] = a->lang_code & 0xff; @@ -1913,7 +1915,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) GST_DEBUG_OBJECT (src, "Audio stream %d is language %s", i, lang_code); } else - GST_DEBUG_OBJECT (src, "Audio stream %d - no language %s", i, lang_code); + GST_DEBUG_OBJECT (src, "Audio stream %d - no language", i); } if (have_audio == FALSE) { @@ -1947,7 +1949,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) g_free (t); t = g_strdup_printf ("subpicture-%d-language", i); - if (u->type) { + if (u->type && u->lang_code > 0x100) { lang_code[0] = (u->lang_code >> 8) & 0xff; lang_code[1] = u->lang_code & 0xff; gst_structure_set (s, t, G_TYPE_STRING, lang_code, NULL); -- cgit v1.2.1 From 969fbce46ebbe598e63968b58cc675fa4830ec6c Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 13 Jul 2009 18:04:14 -0700 Subject: schro: Add enum types for schroedinger settings --- ext/schroedinger/gstschroenc.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c index 2d0fb39b..24c55e7a 100644 --- a/ext/schroedinger/gstschroenc.c +++ b/ext/schroedinger/gstschroenc.c @@ -149,6 +149,31 @@ gst_schro_enc_base_init (gpointer g_class) gst_element_class_set_details (element_class, &schro_enc_details); } +static GType +register_enum_list (const SchroEncoderSetting * setting) +{ + GType type; + static GEnumValue *enumtypes; + int n; + char *typename; + int i; + + n = setting->max + 1; + + enumtypes = g_malloc0 ((n + 1) * sizeof (GEnumValue)); + for (i = 0; i < n; i++) { + enumtypes[i].value = i; + enumtypes[i].value_name = setting->enum_list[i]; + enumtypes[i].value_nick = setting->enum_list[i]; + } + + typename = g_strdup_printf ("SchroEncoderSettingEnum_%s", setting->name); + type = g_enum_register_static (typename, enumtypes); + g_free (typename); + + return type; +} + static void gst_schro_enc_class_init (GstSchroEncClass * klass) { @@ -183,8 +208,8 @@ gst_schro_enc_class_init (GstSchroEncClass * klass) break; case SCHRO_ENCODER_SETTING_TYPE_ENUM: g_object_class_install_property (gobject_class, i + 1, - g_param_spec_int (setting->name, setting->name, setting->name, - setting->min, setting->max, setting->default_value, + g_param_spec_enum (setting->name, setting->name, setting->name, + register_enum_list (setting), setting->default_value, G_PARAM_READWRITE)); break; case SCHRO_ENCODER_SETTING_TYPE_DOUBLE: @@ -308,6 +333,10 @@ gst_schro_enc_set_property (GObject * object, guint prop_id, schro_encoder_setting_set_double (src->encoder, setting->name, g_value_get_boolean (value)); break; + default: + schro_encoder_setting_set_double (src->encoder, setting->name, + g_value_get_enum (value)); + break; } } } @@ -337,6 +366,11 @@ gst_schro_enc_get_property (GObject * object, guint prop_id, GValue * value, g_value_set_boolean (value, schro_encoder_setting_get_double (src->encoder, setting->name)); break; + default: + /* it's an enum */ + g_value_set_enum (value, + schro_encoder_setting_get_double (src->encoder, setting->name)); + break; } } } -- cgit v1.2.1 From b3232301da7f7dbab34f1953c8e79177e70c2347 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 14 Jul 2009 10:44:58 +0200 Subject: metadata: fix copy'n'paste in tag description --- ext/metadata/metadatatags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/metadata/metadatatags.c b/ext/metadata/metadatatags.c index 4beee172..9d25ef8f 100644 --- a/ext/metadata/metadatatags.c +++ b/ext/metadata/metadatatags.c @@ -316,7 +316,7 @@ metadata_tags_exif_register (void) gst_tag_register (GST_TAG_CAPTURE_ORIENTATION, GST_TAG_FLAG_META, G_TYPE_UINT, GST_TAG_CAPTURE_ORIENTATION, - "The kind of light source.", NULL); + "The orientation of the camera.", NULL); /* from -100 to 100 -- cgit v1.2.1 From 493535dd8990d129685f925ef3bd8f92965741b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 14 Jul 2009 14:07:44 +0200 Subject: baseparse: Fix seek event leaking --- gst/aacparse/gstbaseparse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/aacparse/gstbaseparse.c b/gst/aacparse/gstbaseparse.c index 026b1341..fd2dfe45 100644 --- a/gst/aacparse/gstbaseparse.c +++ b/gst/aacparse/gstbaseparse.c @@ -1575,12 +1575,13 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event) * it directly or fail. For TIME, try upstream, but do it ourselves if * it fails upstream */ if (format != GST_FORMAT_TIME) { - gst_event_ref (event); return gst_pad_push_event (parse->sinkpad, event); } else { gst_event_ref (event); - if (gst_pad_push_event (parse->sinkpad, event)) + if (gst_pad_push_event (parse->sinkpad, event)) { + gst_event_unref (event); return TRUE; + } } /* get flush flag */ -- cgit v1.2.1 From 8e1c21f309fbe68dc4c8e004bbca4b095db3a1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 14 Jul 2009 14:08:04 +0200 Subject: aacparse: Add function for the baseparse subclass to push buffers downstream Also handle the case gracefully where the subclass decides to drop the first buffers and has no caps set yet. It's still required to have valid caps set when the first buffer should be passed downstream. --- gst/aacparse/gstbaseparse.c | 84 ++++++++++++++++++++++++++++++--------------- gst/aacparse/gstbaseparse.h | 3 ++ 2 files changed, 60 insertions(+), 27 deletions(-) diff --git a/gst/aacparse/gstbaseparse.c b/gst/aacparse/gstbaseparse.c index fd2dfe45..b59319a5 100644 --- a/gst/aacparse/gstbaseparse.c +++ b/gst/aacparse/gstbaseparse.c @@ -735,7 +735,6 @@ gst_base_parse_handle_and_push_buffer (GstBaseParse * parse, GstBaseParseClass * klass, GstBuffer * buffer) { GstFlowReturn ret; - GstClockTime last_stop = GST_CLOCK_TIME_NONE; if (parse->priv->discont) { GST_DEBUG_OBJECT (parse, "marking DISCONT"); @@ -749,6 +748,46 @@ gst_base_parse_handle_and_push_buffer (GstBaseParse * parse, * keep track of timestamp and calculate everything possible * if not set already */ + /* First buffers are dropped, this means that the subclass needs more + * frames to decide on the format and queues them internally */ + if (ret == GST_BASE_PARSE_FLOW_DROPPED && !GST_PAD_CAPS (parse->srcpad)) { + gst_buffer_unref (buffer); + return GST_FLOW_OK; + } + + /* convert internal flow to OK and mark discont for the next buffer. */ + if (ret == GST_BASE_PARSE_FLOW_DROPPED) { + parse->priv->discont = TRUE; + ret = GST_FLOW_OK; + + gst_buffer_unref (buffer); + + return ret; + } else if (ret != GST_FLOW_OK) { + return ret; + } + + return gst_base_parse_push_buffer (parse, buffer); +} + +/** + * gst_base_parse_push_buffer: + * @parse: #GstBaseParse. + * @buffer: #GstBuffer. + * + * Pushes the buffer downstream, sends any pending events and + * does some timestamp and segment handling. + * + * This must be called with srcpad STREAM_LOCK held. + * + * Returns: #GstFlowReturn + */ +GstFlowReturn +gst_base_parse_push_buffer (GstBaseParse * parse, GstBuffer * buffer) +{ + GstFlowReturn ret = GST_FLOW_OK; + GstClockTime last_stop = GST_CLOCK_TIME_NONE; + if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) last_stop = GST_BUFFER_TIMESTAMP (buffer); if (last_stop != GST_CLOCK_TIME_NONE && GST_BUFFER_DURATION_IS_VALID (buffer)) @@ -792,39 +831,30 @@ gst_base_parse_handle_and_push_buffer (GstBaseParse * parse, /* TODO: Add to seek table */ - if (ret == GST_FLOW_OK) { - if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) && - GST_CLOCK_TIME_IS_VALID (parse->segment.stop) && - GST_BUFFER_TIMESTAMP (buffer) > parse->segment.stop) { - GST_LOG_OBJECT (parse, "Dropped frame, after segment"); - gst_buffer_unref (buffer); - } else if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) && - GST_BUFFER_DURATION_IS_VALID (buffer) && - GST_CLOCK_TIME_IS_VALID (parse->segment.start) && - GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer) - < parse->segment.start) { - /* FIXME: subclass needs way to override the start as downstream might - * need frames before for proper decoding */ - GST_LOG_OBJECT (parse, "Dropped frame, before segment"); - gst_buffer_unref (buffer); - } else { - ret = gst_pad_push (parse->srcpad, buffer); - GST_LOG_OBJECT (parse, "frame (%d bytes) pushed: %d", - GST_BUFFER_SIZE (buffer), ret); - } - } else { + if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) && + GST_CLOCK_TIME_IS_VALID (parse->segment.stop) && + GST_BUFFER_TIMESTAMP (buffer) > parse->segment.stop) { + GST_LOG_OBJECT (parse, "Dropped frame, after segment"); gst_buffer_unref (buffer); + } else if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) && + GST_BUFFER_DURATION_IS_VALID (buffer) && + GST_CLOCK_TIME_IS_VALID (parse->segment.start) && + GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer) + < parse->segment.start) { + /* FIXME: subclass needs way to override the start as downstream might + * need frames before for proper decoding */ + GST_LOG_OBJECT (parse, "Dropped frame, before segment"); + gst_buffer_unref (buffer); + } else { + ret = gst_pad_push (parse->srcpad, buffer); + GST_LOG_OBJECT (parse, "frame (%d bytes) pushed: %d", + GST_BUFFER_SIZE (buffer), ret); } /* Update current running segment position */ if (ret == GST_FLOW_OK && last_stop != GST_CLOCK_TIME_NONE) gst_segment_set_last_stop (&parse->segment, GST_FORMAT_TIME, last_stop); - /* convert internal flow to OK and mark discont for the next buffer. */ - if (ret == GST_BASE_PARSE_FLOW_DROPPED) { - parse->priv->discont = TRUE; - ret = GST_FLOW_OK; - } return ret; } diff --git a/gst/aacparse/gstbaseparse.h b/gst/aacparse/gstbaseparse.h index a2856cc7..9d53f07b 100644 --- a/gst/aacparse/gstbaseparse.h +++ b/gst/aacparse/gstbaseparse.h @@ -225,6 +225,9 @@ struct _GstBaseParseClass { GType gst_base_parse_get_type (void); +GstFlowReturn gst_base_parse_push_buffer (GstBaseParse *parse, + GstBuffer *buffer); + void gst_base_parse_set_duration (GstBaseParse *parse, GstFormat fmt, gint64 duration); -- cgit v1.2.1 From 27d6b256951ee4d0342715927ec896dc0510b797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 14 Jul 2009 14:10:55 +0200 Subject: amrparse: Sync baseparse changes --- gst/amrparse/gstbaseparse.c | 89 ++++++++++++++++++++++++++++++--------------- gst/amrparse/gstbaseparse.h | 3 ++ 2 files changed, 63 insertions(+), 29 deletions(-) diff --git a/gst/amrparse/gstbaseparse.c b/gst/amrparse/gstbaseparse.c index ad963785..870492a8 100644 --- a/gst/amrparse/gstbaseparse.c +++ b/gst/amrparse/gstbaseparse.c @@ -735,7 +735,6 @@ gst_base_parse_handle_and_push_buffer (GstBaseParse * parse, GstBaseParseClass * klass, GstBuffer * buffer) { GstFlowReturn ret; - GstClockTime last_stop = GST_CLOCK_TIME_NONE; if (parse->priv->discont) { GST_DEBUG_OBJECT (parse, "marking DISCONT"); @@ -749,6 +748,46 @@ gst_base_parse_handle_and_push_buffer (GstBaseParse * parse, * keep track of timestamp and calculate everything possible * if not set already */ + /* First buffers are dropped, this means that the subclass needs more + * frames to decide on the format and queues them internally */ + if (ret == GST_BASE_PARSE_FLOW_DROPPED && !GST_PAD_CAPS (parse->srcpad)) { + gst_buffer_unref (buffer); + return GST_FLOW_OK; + } + + /* convert internal flow to OK and mark discont for the next buffer. */ + if (ret == GST_BASE_PARSE_FLOW_DROPPED) { + parse->priv->discont = TRUE; + ret = GST_FLOW_OK; + + gst_buffer_unref (buffer); + + return ret; + } else if (ret != GST_FLOW_OK) { + return ret; + } + + return gst_base_parse_push_buffer (parse, buffer); +} + +/** + * gst_base_parse_push_buffer: + * @parse: #GstBaseParse. + * @buffer: #GstBuffer. + * + * Pushes the buffer downstream, sends any pending events and + * does some timestamp and segment handling. + * + * This must be called with srcpad STREAM_LOCK held. + * + * Returns: #GstFlowReturn + */ +GstFlowReturn +gst_base_parse_push_buffer (GstBaseParse * parse, GstBuffer * buffer) +{ + GstFlowReturn ret = GST_FLOW_OK; + GstClockTime last_stop = GST_CLOCK_TIME_NONE; + if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) last_stop = GST_BUFFER_TIMESTAMP (buffer); if (last_stop != GST_CLOCK_TIME_NONE && GST_BUFFER_DURATION_IS_VALID (buffer)) @@ -792,39 +831,30 @@ gst_base_parse_handle_and_push_buffer (GstBaseParse * parse, /* TODO: Add to seek table */ - if (ret == GST_FLOW_OK) { - if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) && - GST_CLOCK_TIME_IS_VALID (parse->segment.stop) && - GST_BUFFER_TIMESTAMP (buffer) > parse->segment.stop) { - GST_LOG_OBJECT (parse, "Dropped frame, after segment"); - gst_buffer_unref (buffer); - } else if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) && - GST_BUFFER_DURATION_IS_VALID (buffer) && - GST_CLOCK_TIME_IS_VALID (parse->segment.start) && - GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer) - < parse->segment.start) { - /* FIXME: subclass needs way to override the start as downstream might - * need frames before for proper decoding */ - GST_LOG_OBJECT (parse, "Dropped frame, before segment"); - gst_buffer_unref (buffer); - } else { - ret = gst_pad_push (parse->srcpad, buffer); - GST_LOG_OBJECT (parse, "frame (%d bytes) pushed: %d", - GST_BUFFER_SIZE (buffer), ret); - } - } else { + if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) && + GST_CLOCK_TIME_IS_VALID (parse->segment.stop) && + GST_BUFFER_TIMESTAMP (buffer) > parse->segment.stop) { + GST_LOG_OBJECT (parse, "Dropped frame, after segment"); gst_buffer_unref (buffer); + } else if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) && + GST_BUFFER_DURATION_IS_VALID (buffer) && + GST_CLOCK_TIME_IS_VALID (parse->segment.start) && + GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer) + < parse->segment.start) { + /* FIXME: subclass needs way to override the start as downstream might + * need frames before for proper decoding */ + GST_LOG_OBJECT (parse, "Dropped frame, before segment"); + gst_buffer_unref (buffer); + } else { + ret = gst_pad_push (parse->srcpad, buffer); + GST_LOG_OBJECT (parse, "frame (%d bytes) pushed: %d", + GST_BUFFER_SIZE (buffer), ret); } /* Update current running segment position */ if (ret == GST_FLOW_OK && last_stop != GST_CLOCK_TIME_NONE) gst_segment_set_last_stop (&parse->segment, GST_FORMAT_TIME, last_stop); - /* convert internal flow to OK and mark discont for the next buffer. */ - if (ret == GST_BASE_PARSE_FLOW_DROPPED) { - parse->priv->discont = TRUE; - ret = GST_FLOW_OK; - } return ret; } @@ -1575,12 +1605,13 @@ gst_base_parse_handle_seek (GstBaseParse * parse, GstEvent * event) * it directly or fail. For TIME, try upstream, but do it ourselves if * it fails upstream */ if (format != GST_FORMAT_TIME) { - gst_event_ref (event); return gst_pad_push_event (parse->sinkpad, event); } else { gst_event_ref (event); - if (gst_pad_push_event (parse->sinkpad, event)) + if (gst_pad_push_event (parse->sinkpad, event)) { + gst_event_unref (event); return TRUE; + } } /* get flush flag */ diff --git a/gst/amrparse/gstbaseparse.h b/gst/amrparse/gstbaseparse.h index a2856cc7..9d53f07b 100644 --- a/gst/amrparse/gstbaseparse.h +++ b/gst/amrparse/gstbaseparse.h @@ -225,6 +225,9 @@ struct _GstBaseParseClass { GType gst_base_parse_get_type (void); +GstFlowReturn gst_base_parse_push_buffer (GstBaseParse *parse, + GstBuffer *buffer); + void gst_base_parse_set_duration (GstBaseParse *parse, GstFormat fmt, gint64 duration); -- cgit v1.2.1 From ff3ef9a92a9438ab85f488d019a50350bd503ea5 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 15 Jul 2009 11:17:36 +0300 Subject: camerabin: leave image/video bin in ready when changing mode --- gst/camerabin/gstcamerabin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 9d8a14cc..5eace93b 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -954,7 +954,7 @@ gst_camerabin_change_mode (GstCameraBin * camera, gint mode) camera->mode = mode; if (camera->active_bin) { GST_DEBUG_OBJECT (camera, "stopping active bin"); - gst_element_set_state (camera->active_bin, GST_STATE_NULL); + gst_element_set_state (camera->active_bin, GST_STATE_READY); } if (camera->mode == MODE_IMAGE) { GstStateChangeReturn state_ret; -- cgit v1.2.1 From c73bf8e4b6ee4b94232e3fc4c9c78005453f20f9 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 15 Jul 2009 12:20:17 +0300 Subject: camerabin: track todo items --- gst/camerabin/TODO | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gst/camerabin/TODO diff --git a/gst/camerabin/TODO b/gst/camerabin/TODO new file mode 100644 index 00000000..423c0628 --- /dev/null +++ b/gst/camerabin/TODO @@ -0,0 +1,31 @@ += Cleanups = +* often two g_object_set for same object one after the other +* use GST_*_OBJECT () more often +* there are two gst_element_set_state() one after each other + += Renaming = +* internal use of img->image, vid->video + += Refactorisation = +* gstcamerabin:gst_camerabin_rewrite_tags + - sounds fishy, should use normal tagsetter method + - gst_camerabin_rewrite_tags_to_bin(9 why don't we just send a tag-event? + +* file-name property + - supplying an already opened filedeskriptor would be more safe + - need to check what filesink does if the file exists and cannot be overwritten + +* imagbin + - we want async operation here (especialy for burst mode capture) + - right now, its a bit fragile as we muck with locked_state + - main problem is that the location for filesink can only be set in NULL/READY + and we need to do that sync'ed with the dataflow. we can't use multifilesink + as it does a file per pad_push + - one problem of the current approach is that we can't have an image in e.g, + postprocessing while anotherone is beeing saved + - we could use a pool of imagebins: + - configure one (set filename) + - push_buffer + - on eos, put it back to the pool + - for this we need to check that we can have multiple instances of e.g. + dsp jpeg encoders -- cgit v1.2.1 From aace8e130fa8dde86e18eceedab130f017c67f8e Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 15 Jul 2009 17:44:10 +0300 Subject: camerabin: use nonbuffered io to save memcopies We write large blocks anyway, so no extra buffering please. Also use one g_object_set to set multiple properties on same object. --- gst/camerabin/camerabinimage.c | 8 +++----- gst/camerabin/camerabinvideo.c | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gst/camerabin/camerabinimage.c b/gst/camerabin/camerabinimage.c index 8eea8d91..25730ccd 100644 --- a/gst/camerabin/camerabinimage.c +++ b/gst/camerabin/camerabinimage.c @@ -463,15 +463,13 @@ gst_camerabin_image_create_elements (GstCameraBinImage * img) g_object_set (G_OBJECT (img->meta_mux), "exif-byte-order", 1, NULL); } - /* Create file sink element */ + /* Add sink element for storing the image */ if (!(img->sink = gst_camerabin_create_and_add_element (imgbin, DEFAULT_SINK))) { goto done; } - - /* Set properties */ - g_object_set (G_OBJECT (img->sink), "location", img->filename->str, NULL); - g_object_set (G_OBJECT (img->sink), "async", FALSE, NULL); + g_object_set (G_OBJECT (img->sink), "location", img->filename->str, "async", FALSE, "buffer-mode", 2, /* non buffered io */ + NULL); ret = TRUE; diff --git a/gst/camerabin/camerabinvideo.c b/gst/camerabin/camerabinvideo.c index 4bbc5057..40a2bfa7 100644 --- a/gst/camerabin/camerabinvideo.c +++ b/gst/camerabin/camerabinvideo.c @@ -600,8 +600,8 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) gst_camerabin_create_and_add_element (vidbin, DEFAULT_SINK))) { goto error; } - g_object_set (G_OBJECT (vid->sink), "location", vid->filename->str, NULL); - + g_object_set (G_OBJECT (vid->sink), "location", vid->filename->str, "buffer-mode", 2, /* non buffered io */ + NULL); /* Add user set or default audio source element */ if (vid->user_aud_src) { -- cgit v1.2.1 From 1a6cd35c5044f41cfe2293d5aa5c85e035a9860b Mon Sep 17 00:00:00 2001 From: Zaheer Merali Date: Wed, 15 Jul 2009 18:27:39 +0100 Subject: mpegtsparse: add component tag to structure for component message --- gst/mpegdemux/mpegtspacketizer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/mpegdemux/mpegtspacketizer.c b/gst/mpegdemux/mpegtspacketizer.c index 5ed71f0c..d22b0051 100644 --- a/gst/mpegdemux/mpegtspacketizer.c +++ b/gst/mpegdemux/mpegtspacketizer.c @@ -1787,7 +1787,8 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer, break; } component = gst_structure_new ("audio", "type", G_TYPE_STRING, - comptype, NULL); + comptype, "tag", G_TYPE_INT, + DESC_DVB_COMPONENT_tag (comp_descriptor), NULL); break; case 0x03: /* subtitles/teletext/vbi */ comptype = "reserved"; @@ -1827,7 +1828,8 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer, break; } component = gst_structure_new ("teletext", "type", G_TYPE_STRING, - comptype, NULL); + comptype, "tag", G_TYPE_INT, + DESC_DVB_COMPONENT_tag (comp_descriptor), NULL); break; } if (component) { -- cgit v1.2.1 From fac1dbab6e19d5a79a417864f496d2be86250bbb Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 10 Jun 2009 19:21:21 +0100 Subject: oss4: Enhancements to the mixer and audio output Code cleanups, general improvements, support for the new mixer flags in latest gst-plugins-base. Fixes: #584252 Patch By: Brian Cameron Patch By: Garrett D'Amore --- sys/oss4/oss4-audio.c | 45 +---- sys/oss4/oss4-mixer-slider.c | 17 +- sys/oss4/oss4-mixer-switch.c | 68 +++----- sys/oss4/oss4-mixer.c | 379 +++++++++++++++++++++++++------------------ 4 files changed, 270 insertions(+), 239 deletions(-) diff --git a/sys/oss4/oss4-audio.c b/sys/oss4/oss4-audio.c index 0a3c0af1..297ea7ff 100644 --- a/sys/oss4/oss4-audio.c +++ b/sys/oss4/oss4-audio.c @@ -494,29 +494,12 @@ gst_oss4_audio_get_template_caps (void) return caps; } -static gint -gst_oss4_audio_ilog2 (gint x) -{ - /* well... hacker's delight explains... */ - x = x | (x >> 1); - x = x | (x >> 2); - x = x | (x >> 4); - x = x | (x >> 8); - x = x | (x >> 16); - x = x - ((x >> 1) & 0x55555555); - x = (x & 0x33333333) + ((x >> 2) & 0x33333333); - x = (x + (x >> 4)) & 0x0f0f0f0f; - x = x + (x >> 8); - x = x + (x >> 16); - return (x & 0x0000003f) - 1; -} - /* called by gst_oss4_sink_prepare() and gst_oss4_source_prepare() */ gboolean gst_oss4_audio_set_format (GstObject * obj, int fd, GstRingBufferSpec * spec) { struct audio_buf_info info = { 0, }; - int fmt, chans, rate, fragsize; + int fmt, chans, rate; fmt = gst_oss4_audio_get_oss_format (spec->format); if (fmt == 0) @@ -555,17 +538,6 @@ gst_oss4_audio_set_format (GstObject * obj, int fd, GstRingBufferSpec * spec) goto format_not_what_was_requested; } - /* CHECKME: maybe we should just leave the fragsize alone? (tpm) */ - fragsize = gst_oss4_audio_ilog2 (spec->segsize); - fragsize = ((spec->segtotal & 0x7fff) << 16) | fragsize; - GST_DEBUG_OBJECT (obj, "setting segsize: %d, segtotal: %d, value: %08x", - spec->segsize, spec->segtotal, fragsize); - - /* we could also use the new SNDCTL_DSP_POLICY if there's something in - * particular we're trying to achieve here */ - if (ioctl (fd, SNDCTL_DSP_SETFRAGMENT, &fragsize) == -1) - goto set_fragsize_failed; - if (GST_IS_OSS4_SOURCE (obj)) { if (ioctl (fd, SNDCTL_DSP_GETISPACE, &info) == -1) goto get_ispace_failed; @@ -575,12 +547,17 @@ gst_oss4_audio_set_format (GstObject * obj, int fd, GstRingBufferSpec * spec) } spec->segsize = info.fragsize; - spec->segtotal = info.fragstotal; + + /* we add some extra fragments -- this helps us account for delays due to + * conversion buffer, streams queueing, etc. It is important that these + * be taken into account because otherwise the delay counter can wind up + * being too large, and the buffer will wrap. */ + spec->segtotal = info.fragstotal + 4; spec->bytes_per_sample = (spec->width / 8) * spec->channels; GST_DEBUG_OBJECT (obj, "got segsize: %d, segtotal: %d, value: %08x", - spec->segsize, spec->segtotal, fragsize); + spec->segsize, spec->segtotal, info.fragsize); return TRUE; @@ -615,12 +592,6 @@ set_rate_failed: ("DSP_SPEED(%d) failed: %s", rate, g_strerror (errno))); return FALSE; } -set_fragsize_failed: - { - GST_ELEMENT_ERROR (obj, RESOURCE, SETTINGS, (NULL), - ("DSP_SETFRAGMENT(%d) failed: %s", fragsize, g_strerror (errno))); - return FALSE; - } get_ospace_failed: { GST_ELEMENT_ERROR (obj, RESOURCE, SETTINGS, (NULL), diff --git a/sys/oss4/oss4-mixer-slider.c b/sys/oss4/oss4-mixer-slider.c index f8e7f661..cdc91049 100644 --- a/sys/oss4/oss4-mixer-slider.c +++ b/sys/oss4/oss4-mixer-slider.c @@ -159,8 +159,10 @@ gst_oss4_mixer_slider_set_volume (GstOss4MixerSlider * s, const gint * volumes) /* if we're supposed to be muted, and are 'simulating' the mute because * we don't have a mute control, don't actually change the volume, just * save it as the new desired volume for later when we get unmuted again */ - if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_MUTE) && !s->mc->mute) - goto done; + if (!GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_NO_MUTE)) { + if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_MUTE) && !s->mc->mute) + goto done; + } val = gst_oss4_mixer_slider_pack_volume (s, volumes); @@ -196,14 +198,21 @@ gst_oss4_mixer_slider_set_mute (GstOss4MixerSlider * s, gboolean mute) GstMixerTrack *track = GST_MIXER_TRACK (s); gboolean ret; - /* if we don't have a mute control, simulate mute (which is a bit broken, - * since we can't differentiate between capture/playback volume etc., so + /* if the control does not support muting, then do not do anything */ + if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_NO_MUTE)) { + return TRUE; + } + + /* If we do not have a mute control, simulate mute (which is a bit broken, + * since we can not differentiate between capture/playback volume etc., so * we just assume that setting the volume to 0 would be the same as muting * this control) */ if (s->mc->mute == NULL) { int volume; if (mute) { + /* make sure the current volume values get saved. */ + gst_oss4_mixer_slider_get_volume (s, s->volumes); volume = 0; } else { volume = gst_oss4_mixer_slider_pack_volume (s, s->volumes); diff --git a/sys/oss4/oss4-mixer-switch.c b/sys/oss4/oss4-mixer-switch.c index 403abbc5..11d74b46 100644 --- a/sys/oss4/oss4-mixer-switch.c +++ b/sys/oss4/oss4-mixer-switch.c @@ -49,45 +49,30 @@ gst_oss4_mixer_switch_init (GstOss4MixerSwitch * s) /* nothing to do here */ } -static GstMixerTrackFlags -gst_oss4_mixer_switch_get_switch_flag (GstMixerTrack * track) -{ - if ((track->flags & GST_MIXER_TRACK_INPUT)) { - return GST_MIXER_TRACK_RECORD; - } else if ((track->flags & GST_MIXER_TRACK_OUTPUT)) { - return GST_MIXER_TRACK_MUTE; - } else { - GST_ERROR_OBJECT (track, "switch neither input nor output track!?"); - } - return 0; -} - gboolean -gst_oss4_mixer_switch_set (GstOss4MixerSwitch * s, gboolean enabled) +gst_oss4_mixer_switch_set (GstOss4MixerSwitch * s, gboolean disabled) { - GstMixerTrackFlags switch_flag; GstMixerTrack *track; int newval; track = GST_MIXER_TRACK (s); - switch_flag = gst_oss4_mixer_switch_get_switch_flag (track); - newval = (enabled) ? 1 : 0; + newval = disabled ? GST_MIXER_TRACK_MUTE : 0; - if (!!newval == !!(track->flags & switch_flag)) { + if (newval == (track->flags & GST_MIXER_TRACK_MUTE)) { GST_LOG_OBJECT (s, "switch is already %d, doing nothing", newval); return TRUE; } - if (!gst_oss4_mixer_set_control_val (s->mixer, s->mc, newval)) { - GST_WARNING_OBJECT (s, "could not set switch to %d", newval); + if (!gst_oss4_mixer_set_control_val (s->mixer, s->mc, !disabled)) { + GST_WARNING_OBJECT (s, "could not set switch to %d", !disabled); return FALSE; } - if (newval) { - track->flags |= switch_flag; + if (disabled) { + track->flags |= GST_MIXER_TRACK_MUTE; } else { - track->flags &= ~switch_flag; + track->flags &= ~GST_MIXER_TRACK_MUTE; } GST_LOG_OBJECT (s, "set switch to %d", newval); @@ -96,31 +81,28 @@ gst_oss4_mixer_switch_set (GstOss4MixerSwitch * s, gboolean enabled) } gboolean -gst_oss4_mixer_switch_get (GstOss4MixerSwitch * s, gboolean * enabled) +gst_oss4_mixer_switch_get (GstOss4MixerSwitch * s, gboolean * disabled) { - GstMixerTrackFlags switch_flag; GstMixerTrack *track; - int val = -1; + int flag; + int enabled = -1; track = GST_MIXER_TRACK (s); - switch_flag = gst_oss4_mixer_switch_get_switch_flag (track); - if (!gst_oss4_mixer_get_control_val (s->mixer, s->mc, &val) || val < 0) { + if (!gst_oss4_mixer_get_control_val (s->mixer, s->mc, &enabled) + || (enabled < 0)) { GST_WARNING_OBJECT (s, "could not get switch state"); return FALSE; } - *enabled = (val != 0); + flag = (enabled == 0) ? GST_MIXER_TRACK_MUTE : 0; - if (!!val != !!(track->flags & switch_flag)) { - GST_INFO_OBJECT (s, "updating inconsistent switch state to %d", !!val); - if (*enabled) { - track->flags |= switch_flag; - } else { - track->flags &= ~switch_flag; - } + if (enabled) { + track->flags &= ~GST_MIXER_TRACK_MUTE; + } else { + track->flags |= GST_MIXER_TRACK_MUTE; } - + *disabled = (enabled == 0); return TRUE; } @@ -149,6 +131,12 @@ gst_oss4_mixer_switch_new (GstOss4Mixer * mixer, GstOss4MixerControl * mc) if (!gst_oss4_mixer_get_control_val (s->mixer, s->mc, &cur) || cur < 0) return NULL; + if (cur) { + track->flags &= ~GST_MIXER_TRACK_MUTE; + } else { + track->flags |= GST_MIXER_TRACK_MUTE; + } + return track; } @@ -161,9 +149,5 @@ gst_oss4_mixer_switch_process_change_unlocked (GstMixerTrack * track) if (!s->mc->changed) return; - if ((track->flags & GST_MIXER_TRACK_INPUT)) { - gst_mixer_record_toggled (GST_MIXER (s->mixer), track, !!s->mc->last_val); - } else { - gst_mixer_mute_toggled (GST_MIXER (s->mixer), track, !!s->mc->last_val); - } + gst_mixer_mute_toggled (GST_MIXER (s->mixer), track, !s->mc->last_val); } diff --git a/sys/oss4/oss4-mixer.c b/sys/oss4/oss4-mixer.c index 031549b3..ded496b3 100644 --- a/sys/oss4/oss4-mixer.c +++ b/sys/oss4/oss4-mixer.c @@ -673,12 +673,12 @@ gst_oss4_mixer_set_control_val (GstOss4Mixer * mixer, GstOss4MixerControl * mc, return TRUE; } +#if 0 static gchar * gst_oss4_mixer_control_get_pretty_name (GstOss4MixerControl * mc) { gchar *name; -#if 0 const gchar *name, *u; /* "The id field is the original name given by the driver when it called @@ -694,7 +694,6 @@ gst_oss4_mixer_control_get_pretty_name (GstOss4MixerControl * mc) /* maybe capitalize the first letter? */ return g_ascii_strdown (name, -1); -#endif /* the .id thing doesn't really seem to work right, ie. for some sliders * it's just '-' so you have to use the name of the parent control etc. * let's not use it for now, much too painful. */ @@ -708,102 +707,119 @@ gst_oss4_mixer_control_get_pretty_name (GstOss4MixerControl * mc) g_strdelimit (name, ".", ' '); return name; } +#endif -#if 0 -/* FIXME: translations for common option strings */ +/* these translations are a bit ad-hoc and horribly incomplete; it is not + * really going to work this way with all the different chipsets and drivers. + * We also use these for translating option values. */ static struct { const gchar oss_name[32]; const gchar *label; -} option_labels[] = { +} labels[] = { { - "Fast", N_("Fast")}, { - "Low", N_("Low")}, { - "Medium", N_("Medium")}, { - "High", N_("High")}, { - "High+", N_("Very high")}, { - "Production", N_("Production")}, { - "OFF", N_("Off")}, { - "ON", N_("On")}, { - "Stereo", N_("Stereo")}, { - "Multich", N_("Surround sound")}, { - "input-mix", N_("Input mix")}, { + "volume", N_("Volume")}, { + "master", N_("Master")}, { "front", N_("Front")}, { "rear", N_("Rear")}, { + "headphones", N_("Headphones")}, { + "center", N_("Center")}, { + "lfe", N_("LFE")}, { + "surround", N_("Surround")}, { "side", N_("Side")}, { - "center/LFE", N_("Center / LFE")}, { + "speaker", N_("Built-in Speaker")}, { + "aux1-out", N_("AUX 1 Out")}, { + "aux2-out", N_("AUX 2 Out")}, { + "aux-out", N_("AUX Out")}, { + "bass", N_("Bass")}, { + "treble", N_("Treble")}, { + "3d-depth", N_("3D Depth")}, { + "3d-center", N_("3D Center")}, { + "3d-enhance", N_("3D Enhance")}, { + "phone", N_("Telephone")}, { "mic", N_("Microphone")}, { - "fp-mic", N_("Front panel microphone")}, { + "line-out", N_("Line Out")}, { + "line-in", N_("Line In")}, { + "linein", N_("Line In")}, { + "cd", N_("Internal CD")}, { + "video", N_("Video In")}, { + "aux1-in", N_("AUX 1 In")}, { + "aux2-in", N_("AUX 2 In")}, { + "aux-in", N_("AUX In")}, { + "pcm", N_("PCM")}, { + "record-gain", N_("Record Gain")}, { + "igain", N_("Record Gain")}, { + "ogain", N_("Output Gain")}, { + "micboost", N_("Microphone Boost")}, { + "loopback", N_("Loopback")}, { + "diag", N_("Diagnostic")}, { + "loudness", N_("Bass Boost")}, { + "outputs", N_("Playback Ports")}, { "input", N_("Input")}, { - "linein", N_("Line-in")}, { - "pcm1", N_("PCM 1")}, { - "pcm2", N_("PCM 2")}, { - "pcm3", N_("PCM 3")}, { -"pcm4", N_("PCM 4")},}; -#endif - -/* these translations are a bit ad-hoc and horribly incomplete; it's not - * really going to work this way with all the different chipsets and drivers */ -static struct -{ - const gchar oss_name[32]; - const gchar *label; -} labels[] = { - /* connectors (e.g. hdaudio) */ - { - "jack.green", N_("Green connector")}, { - "jack.fp-green", N_("Green front panel connector")}, { - "jack.pink", N_("Pink connector")}, { - "jack.fp-pink", N_("Pink front panel connector")}, { - "jack.blue", N_("Blue connector")}, { - "jack.fp-blue", N_("Blue front panel connector")}, { - "jack.orange", N_("Orange connector")}, { - "jack.fp-orange", N_("Orange front panel connector")}, { - "jack.black", N_("Black connector")}, { - "jack.fp-black", N_("Black front panel connector")}, { - "jack.gray", N_("Gray connector")}, { - "jack.fp-gray", N_("Gray front panel connector")}, { - "jack.white", N_("White connector")}, { - "jack.fp-white", N_("White front panel connector")}, { - "jack.red", N_("Red connector")}, { - "jack.fp-red", N_("Red front panel connector")}, { - "jack.yellow", N_("Yellow connector")}, { - "jack.fp-yellow", N_("Yellow front panel connector")}, - /* connector functions (e.g. hdaudio) */ - { - "jack.green.mode", N_("Green connector function")}, { - "jack.fp-green.mode", N_("Green front panel connector function")}, { - "jack.pink.mode", N_("Pink connector function")}, { - "jack.fp-pink.mode", N_("Pink front panel connector function")}, { - "jack.blue.mode", N_("Blue connector function")}, { - "jack.fp-blue.mode", N_("Blue front panel connector function")}, { - "jack.orange.mode", N_("Orange connector function")}, { - "jack.fp-orange.mode", N_("Orange front panel connector function")}, { - "jack.black.mode", N_("Black connector function")}, { - "jack.fp-black.mode", N_("Black front panel connector function")}, { - "jack.gray.mode", N_("Gray connector function")}, { - "jack.fp-gray.mode", N_("Gray front panel connector function")}, { - "jack.white.mode", N_("White connector function")}, { - "jack.fp-white.mode", N_("White front panel connector function")}, { - "jack.red.mode", N_("Red connector function")}, { - "jack.fp-red.mode", N_("Red front panel connector function")}, { - "jack.yellow.mode", N_("Yellow connector function")}, { - "jack.fp-yellow.mode", N_("Yellow front panel connector function")}, - /* other */ - { - "misc.mic", N_("Microphone")}, { - "misc.fp-mic", N_("Front panel microphone")}, { - "misc.linein", N_("Line-in")}, { - "misc.fp-linein", N_("Front panel line-in")}, { - "misc.headphone", N_("Headphones")}, { - "misc.fp-headphone", N_("Front panel headphones")}, { - "misc.front", N_("Front")}, { - "misc.rear", N_("Rear")}, { - "misc.side", N_("Side")}, { - "misc.center/lfe", N_("Center / LFE")}, { - "misc.pcm", N_("PCM")}, { - "misc.input-mix", N_("Input mix")} - /* FIXME translate Audigy NX USB labels) */ + "inputs", N_("Record Source")}, { + "record-source", N_("Record Source")}, { + "monitor-source", N_("Monitor Source")}, { + "beep", N_("Keyboard Beep")}, { + "monitor-gain", N_("Monitor")}, { + "stereo-simulate", N_("Simulate Stereo")}, { + "stereo", N_("Stereo")}, { + "multich", N_("Surround Sound")}, { + "mic-gain", N_("Microphone Gain")}, { + "speaker-source", N_("Speaker Source")}, { + "mic-source", N_("Microphone Source")}, { + "jack", N_("Jack")}, { + "center/lfe", N_("Center / LFE")}, { + "stereo-mix", N_("Stereo Mix")}, { + "mono-mix", N_("Mono Mix")}, { + "input-mix", N_("Input Mix")}, { + "spdif-in", N_("SPDIF In")}, { + "spdif-out", N_("SPDIF Out")}, { + "mic1", N_("Microphone 1")}, { + "mic2", N_("Microphone 2")}, { + "digital-out", N_("Digital Out")}, { + "digital-in", N_("Digital In")}, { + "hdmi", N_("HDMI")}, { + "modem", N_("Modem")}, { + "handset", N_("Handset")}, { + "other", N_("Other")}, { + "stereo", N_("Stereo")}, { + "none", N_("None")}, { + "on", N_("On")}, { + "off", N_("Off")}, { + "mute", N_("Mute")}, { + "fast", N_("Fast")}, { + "very-low", N_("Very Low")}, { + "low", N_("Low")}, { + "medium", N_("Medium")}, { + "high", N_("High")}, { + "very-high", N_("Very High")}, { + "high+", N_("Very High")}, { + "production", N_("Production")}, { + "fp-mic", N_("Front Panel Microphone")}, { + "fp-linein", N_("Front Panel Line In")}, { + "fp-headphones", N_("Front Panel Headphones")}, { + "fp-lineout", N_("Front Panel Line Out")}, { + "green", N_("Green Connector")}, { + "pink", N_("Pink Connector")}, { + "blue", N_("Blue Connector")}, { + "white", N_("White Connector")}, { + "black", N_("Black Connector")}, { + "gray", N_("Gray Connector")}, { + "orange", N_("Orange Connector")}, { + "red", N_("Red Connector")}, { + "yellow", N_("Yellow Connector")}, { + "fp-green", N_("Green Front Panel Connector")}, { + "fp-pink", N_("Pink Front Panel Connector")}, { + "fp-blue", N_("Blue Front Panel Connector")}, { + "fp-white", N_("White Front Panel Connector")}, { + "fp-black", N_("Black Front Panel Connector")}, { + "fp-gray", N_("Gray Front Panel Connector")}, { + "fp-orange", N_("Orange Front Panel Connector")}, { + "fp-red", N_("Red Front Panel Connector")}, { + "fp-yellow", N_("Yellow Front Panel Connector")}, { + "spread", N_("Spread Output")}, { + "downmix", N_("Downmix")}, + /* FIXME translate Audigy NX USB labels) */ /* { "rec.src", N_("Record Source") }, { "output.mute", N_("Mute output") } @@ -836,42 +852,89 @@ static struct const gchar * gst_oss4_mixer_control_get_translated_name (GstOss4MixerControl * mc) { - gchar name[33] = { 0, }; - char vmix_str[32] = { '\0', }; + gchar name[128] = { 0, }; + gchar scratch[128] = { 0, }; + gchar fmtbuf[128] = { 0, }; + gchar vmix_str[32] = { '\0', }; + gchar *ptr; int dummy, i; + int num = -1; + + g_strlcpy (fmtbuf, "%s", sizeof (fmtbuf)); /* main virtual mixer controls (we hide the stream volumes) */ if (sscanf (mc->mixext.extname, "vmix%d-%32c", &dummy, vmix_str) == 2) { if (strcmp (vmix_str, "src") == 0) - return _("Virtual mixer input"); + return _("Virtual Mixer Input"); else if (strcmp (vmix_str, "vol") == 0) - return _("Virtual mixer output"); + return _("Virtual Mixer Output"); else if (strcmp (vmix_str, "channels") == 0) - return _("Virtual mixer channel configuration"); + return _("Virtual Mixer Channels"); } - /* munge connector.foo => jack.foo (change from 4.0 -> 4.1) */ - if (g_str_has_prefix (mc->mixext.extname, "connector.")) { - g_snprintf (name, sizeof (name), "jack.%s", mc->mixext.extname + 10); - } else { - g_strlcpy (name, mc->mixext.extname, sizeof (name)); - } + g_strlcpy (name, mc->mixext.extname, sizeof (name)); - /* munge foo.function => foo.mode (change from 4.0 -> 4.1) */ - if (g_str_has_suffix (name, ".function")) - memcpy (name + strlen (name) - strlen (".function"), ".mode", 5 + 1); + /* we deal with either "connector." or "jack." */ + if ((g_str_has_prefix (name, "connector.")) || + (g_str_has_prefix (name, "jack."))) { + ptr = strchr (mc->mixext.extname, '.'); + ptr++; + g_strlcpy (scratch, ptr, sizeof (scratch)); + g_strlcpy (name, scratch, sizeof (name)); + } - /* chop off trailing numbers */ - while (strlen (name) > 0 && g_ascii_isdigit (name[strlen (name) - 1])) - name[strlen (name) - 1] = '\0'; + /* special handling for jack retasking suffixes */ + if (g_str_has_suffix (name, ".function") || g_str_has_suffix (name, ".mode")) { + g_strlcpy (fmtbuf, _("%s Function"), sizeof (fmtbuf)); + ptr = strrchr (name, '.'); + *ptr = 0; + } - for (i = 0; i < G_N_ELEMENTS (labels); ++i) { - if (strcmp (name, labels[i].oss_name) == 0) - return _(labels[i].label); + /* parse off trailing numbers */ + i = strlen (name); + while ((i > 0) && (g_ascii_isdigit (name[i - 1]))) { + i--; } + /* the check catches the case where the control name is just a number */ + if ((i > 0) && (name[i] != '\0')) { + num = atoi (name + i); + name[i] = '\0'; + /* format appends a number to the base, but preserves any surrounding + format */ + g_snprintf (scratch, sizeof (scratch), fmtbuf, _("%s %d")); + g_strlcpy (fmtbuf, scratch, sizeof (fmtbuf)); + } + + /* look for a match, progressively skipping '.' delimited prefixes as we go */ + ptr = name; + do { + if (*ptr == '.') + ptr++; + for (i = 0; i < G_N_ELEMENTS (labels); ++i) { + if (g_strcasecmp (ptr, labels[i].oss_name) == 0) { + g_snprintf (name, sizeof (name), fmtbuf, _(labels[i].label), num); + return g_quark_to_string (g_quark_from_string (name)); + } + } + } while ((ptr = strchr (ptr, '.')) != NULL); + /* failing that, just replace periods with spaces */ g_strdelimit (name, ".", ' '); - return g_quark_to_string (g_quark_from_string (name)); /* eek */ + g_snprintf (scratch, sizeof (scratch), fmtbuf, name); + return g_quark_to_string (g_quark_from_string (scratch)); /* eek */ +} + +const gchar * +gst_oss4_mixer_control_get_translated_option (gchar * name) +{ + int i; + for (i = 0; i < G_N_ELEMENTS (labels); ++i) { + if (g_strcasecmp (name, labels[i].oss_name) == 0) { + name = _(labels[i].label); + return (name); + } + } + return (name); } #ifndef GST_DISABLE_GST_DEBUG @@ -1063,21 +1126,6 @@ gst_oss4_mixer_get_controls (GstOss4Mixer * mixer) mixer_ext_flags_get_string (mix_ext.flags), mix_ext.flags); GST_INFO (" parent : %d", mix_ext.parent); - /* get tooltip (just for informational purposes for now) */ - if (MIXEXT_HAS_DESCRIPTION (mix_ext)) { - oss_mixer_enuminfo desc = { 0, }; - - desc.dev = mix_ext.dev; - desc.ctrl = mix_ext.ctrl; - if (ioctl (mixer->fd, SNDCTL_MIX_DESCRIPTION, &desc) >= 0) { - /* "The string may contain multiple lines. The first line is the - * 'tooltip'. Optional subsequent lines may contain more detailed - * help text. Lines are separated by a linefeed character." */ - g_strdelimit (&desc.strings[desc.strindex[0]], "\n\r", '\0'); - GST_INFO (" tooltip: %s", &desc.strings[desc.strindex[0]]); - } - } - if (!MIXEXT_IS_ROOT (mix_ext)) { /* find parent (we assume it comes in the list before the child) */ for (l = controls; l != NULL; l = l->next) { @@ -1122,30 +1170,24 @@ static void gst_oss4_mixer_controls_guess_master (GstOss4Mixer * mixer, const GList * controls) { - GstOss4MixerControl *firstpcm_mc = NULL; GstOss4MixerControl *master_mc = NULL; const GList *l; for (l = controls; l != NULL; l = l->next) { GstOss4MixerControl *mc = (GstOss4MixerControl *) l->data; - if (((mc->mixext.flags & MIXF_MAINVOL)) && master_mc == NULL) { - GST_INFO_OBJECT (mixer, "Master control: %s", mc->mixext.extname); - master_mc = mc; - break; - } /* do we need to check if it's a slider type here? */ - if (((mc->mixext.flags & MIXF_PCMVOL)) && firstpcm_mc == NULL) { + if ((mc->mixext.flags & MIXF_PCMVOL)) { GST_INFO_OBJECT (mixer, "First PCM control: %s", mc->mixext.extname); - firstpcm_mc = mc; + master_mc = mc; + break; } - } - /* if no control with MIXF_MAINVOL found, use first one with PCMVOL */ - if (master_mc == NULL && firstpcm_mc != NULL) { - GST_INFO_OBJECT (mixer, "Marking first PCM control as master: %s", - firstpcm_mc->mixext.extname); - master_mc = firstpcm_mc; + if (((mc->mixext.flags & MIXF_MAINVOL)) && master_mc == NULL) { + GST_INFO_OBJECT (mixer, "First main volume control: %s", + mc->mixext.extname); + master_mc = mc; + } } if (master_mc != NULL) @@ -1308,7 +1350,9 @@ gst_oss4_mixer_enum_control_update_enum_list (GstOss4Mixer * mixer, mc->enum_vals = g_new0 (GQuark, mc->mixext.maxvalue + 1); for (i = 0; i < mc->mixext.maxvalue; ++i) { GST_LOG (" %s", ei.strings + ei.strindex[i]); - mc->enum_vals[i] = g_quark_from_string (ei.strings + ei.strindex[i]); + mc->enum_vals[i] = + g_quark_from_string (gst_oss4_mixer_control_get_translated_option + (ei.strings + ei.strindex[i])); } } @@ -1461,7 +1505,8 @@ gst_oss4_mixer_create_tracks (GstOss4Mixer * mixer, const GList * controls) if (track == NULL) continue; - track->label = gst_oss4_mixer_control_get_pretty_name (mc); + /* The mixer API requires this to be g_strdup'd */ + track->label = g_strdup (gst_oss4_mixer_control_get_translated_name (mc)); track->flags = 0; GST_LOG ("translated label: %s [%s] = %s", track->label, mc->mixext.id, @@ -1471,20 +1516,41 @@ gst_oss4_mixer_create_tracks (GstOss4Mixer * mixer, const GList * controls) * esp. if a slider's role can be changed on the fly, like when you change * function of a connector. What should we do in that case? Change the flag * and make the app rebuild the interface? Ignore it? */ - if (g_str_has_prefix (mc->mixext.extname, "record.")) { - mc->is_output = FALSE; - mc->is_input = TRUE; + if (mc->mixext.flags & (MIXF_MAINVOL | MIXF_PCMVOL)) { + track->flags = GST_MIXER_TRACK_OUTPUT | GST_MIXER_TRACK_WHITELIST; + + } else if (mc->mixext.flags & MIXF_RECVOL) { + /* record gain whitelisted by default */ + track->flags = GST_MIXER_TRACK_INPUT | GST_MIXER_TRACK_NO_RECORD | + GST_MIXER_TRACK_WHITELIST; + + } else if (mc->mixext.flags & MIXF_MONVOL) { + /* monitor sources not whitelisted by default */ + track->flags = GST_MIXER_TRACK_INPUT | GST_MIXER_TRACK_NO_RECORD; } - /* FIXME: determine is_input and is_output */ - /* must be either INPUT or OUTPUT (but not both and not neither) for now, - * or gnome-volume-control aborts */ - if (mc->is_input) - track->flags |= GST_MIXER_TRACK_INPUT; - else if (mc->is_output) - track->flags |= GST_MIXER_TRACK_OUTPUT; - else + /* + * The kernel may give us better clues about the scope of a control. + * If so, try to honor it. + */ + switch (mc->mixext.desc & MIXEXT_SCOPE_MASK) { + case MIXEXT_SCOPE_INPUT: + case MIXEXT_SCOPE_RECSWITCH: + track->flags |= GST_MIXER_TRACK_INPUT | GST_MIXER_TRACK_NO_RECORD | + GST_MIXER_TRACK_WHITELIST; + break; + case MIXEXT_SCOPE_MONITOR: + /* don't whitelist monitor tracks by default */ + track->flags |= GST_MIXER_TRACK_INPUT | GST_MIXER_TRACK_NO_RECORD; + break; + case MIXEXT_SCOPE_OUTPUT: + track->flags = GST_MIXER_TRACK_OUTPUT | GST_MIXER_TRACK_WHITELIST; + break; + } + + if (mc->is_master) { track->flags |= GST_MIXER_TRACK_OUTPUT; + } if (mc->is_master) track->flags |= GST_MIXER_TRACK_MASTER; @@ -1597,6 +1663,10 @@ gst_oss4_mixer_get_volume (GstMixer * mixer, GstMixerTrack * track, memset (volumes, 0, track->num_channels * sizeof (gint)); + if (GST_IS_OSS4_MIXER_SWITCH (track)) { + gboolean enabled = FALSE; + gst_oss4_mixer_switch_get (GST_OSS4_MIXER_SWITCH (track), &enabled); + } if (GST_IS_OSS4_MIXER_SLIDER (track)) { gst_oss4_mixer_slider_get_volume (GST_OSS4_MIXER_SLIDER (track), volumes); } @@ -1649,11 +1719,7 @@ gst_oss4_mixer_set_mute (GstMixer * mixer, GstMixerTrack * track, gboolean mute) if (GST_IS_OSS4_MIXER_SLIDER (track)) { gst_oss4_mixer_slider_set_mute (GST_OSS4_MIXER_SLIDER (track), mute); } else if (GST_IS_OSS4_MIXER_SWITCH (track)) { - if ((track->flags & GST_MIXER_TRACK_OUTPUT)) { - gst_oss4_mixer_switch_set (GST_OSS4_MIXER_SWITCH (track), mute); - } else { - GST_WARNING_OBJECT (track, "set_mute called on non-OUTPUT track"); - } + gst_oss4_mixer_switch_set (GST_OSS4_MIXER_SWITCH (track), mute); } GST_OBJECT_UNLOCK (oss); @@ -1717,7 +1783,8 @@ gst_oss4_mixer_get_option (GstMixer * mixer, GstMixerOptions * options) static GstMixerFlags gst_oss4_mixer_get_mixer_flags (GstMixer * mixer) { - return GST_MIXER_FLAG_AUTO_NOTIFICATIONS; + return GST_MIXER_FLAG_AUTO_NOTIFICATIONS | GST_MIXER_FLAG_HAS_WHITELIST | + GST_MIXER_FLAG_GROUPING; } static void -- cgit v1.2.1 From aba7cfa0643cf168d80dd5255aad58645eca47b6 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 15 Jul 2009 16:17:35 +0100 Subject: vdpau: Fix a compiler warning about uninitialised variable use. --- sys/vdpau/gstvdpmpegdec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vdpau/gstvdpmpegdec.c b/sys/vdpau/gstvdpmpegdec.c index 674146c4..c3fb324e 100644 --- a/sys/vdpau/gstvdpmpegdec.c +++ b/sys/vdpau/gstvdpmpegdec.c @@ -172,7 +172,8 @@ gst_vdp_mpeg_dec_set_caps (GstPad * pad, GstCaps * caps) gboolean res; const GValue *value; - VdpDecoderProfile profile; + /* Default to MPEG1 until we find otherwise */ + VdpDecoderProfile profile = VDP_DECODER_PROFILE_MPEG1; GstVdpDevice *device; VdpStatus status; @@ -210,8 +211,6 @@ gst_vdp_mpeg_dec_set_caps (GstPad * pad, GstCaps * caps) /* parse caps to setup decoder */ gst_structure_get_int (structure, "mpegversion", &mpeg_dec->version); - if (mpeg_dec->version == 1) - profile = VDP_DECODER_PROFILE_MPEG1; value = gst_structure_get_value (structure, "codec_data"); if (value) { -- cgit v1.2.1 From 4109c2193fb99277b12aef3a3d9ec7a51465f19b Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 15 Jul 2009 18:10:04 +0100 Subject: metadata: Fix some compiler warnings Cast some debug string parameters so that they don't cause mismatched type warnings. --- ext/metadata/metadataexif.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ext/metadata/metadataexif.c b/ext/metadata/metadataexif.c index 0769dab4..cbdbf30d 100644 --- a/ext/metadata/metadataexif.c +++ b/ext/metadata/metadataexif.c @@ -694,14 +694,17 @@ metadataparse_exif_content_foreach_entry_func (ExifEntry * entry, /* DDD - degrees */ value = (gdouble) rt->numerator / (gdouble) rt->denominator; - GST_DEBUG ("deg: %lu / %lu", rt->numerator, rt->denominator); + GST_DEBUG ("deg: %lu / %lu", (gulong) rt->numerator, + (gulong) rt->denominator); rt++; /* MM - minutes and SS - seconds */ - GST_DEBUG ("min: %lu / %lu", rt->numerator, rt->denominator); + GST_DEBUG ("min: %lu / %lu", (gulong) rt->numerator, + (gulong) rt->denominator); value += (gdouble) rt->numerator / ((gdouble) rt->denominator * 60.0); rt++; - GST_DEBUG ("sec: %lu / %lu", rt->numerator, rt->denominator); + GST_DEBUG ("sec: %lu / %lu", (gulong) rt->numerator, + (gulong) rt->denominator); value += (gdouble) rt->numerator / ((gdouble) rt->denominator * 3600.0); @@ -1052,21 +1055,24 @@ metadatamux_exif_for_each_tag_in_list (const GstTagList * list, /* DDD - degrees */ rt->numerator = (gulong) v; rt->denominator = 1; - GST_DEBUG ("deg: %lf : %lu / %lu", v, rt->numerator, rt->denominator); + GST_DEBUG ("deg: %lf : %lu / %lu", v, (gulong) rt->numerator, + (gulong) rt->denominator); v -= rt->numerator; rt++; /* MM - minutes */ rt->numerator = (gulong) (v * 60.0); rt->denominator = 1; - GST_DEBUG ("min: %lf : %lu / %lu", v, rt->numerator, rt->denominator); + GST_DEBUG ("min: %lf : %lu / %lu", v, (gulong) rt->numerator, + (gulong) rt->denominator); v -= ((gdouble) rt->numerator / 60.0); rt++; /* SS - seconds */ rt->numerator = (gulong) (0.5 + v * 3600.0); rt->denominator = 1; - GST_DEBUG ("sec: %lf : %lu / %lu", v, rt->numerator, rt->denominator); + GST_DEBUG ("sec: %lf : %lu / %lu", v, (gulong) rt->numerator, + (gulong) rt->denominator); if (entry->tag == EXIF_TAG_GPS_LONGITUDE) { GST_DEBUG ("longitude : %lf", value); -- cgit v1.2.1 From 9deb7346316559ce25e2fb5458905a8c0cedd8c1 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 16 Jul 2009 13:55:14 +0100 Subject: oss4: Attempt to fix a compiler warning Don't store a const gchar * in a non-const gchar * local var. Also, make the translation string function static since it's only used in the one file. --- sys/oss4/oss4-mixer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/oss4/oss4-mixer.c b/sys/oss4/oss4-mixer.c index ded496b3..a67bb102 100644 --- a/sys/oss4/oss4-mixer.c +++ b/sys/oss4/oss4-mixer.c @@ -924,14 +924,13 @@ gst_oss4_mixer_control_get_translated_name (GstOss4MixerControl * mc) return g_quark_to_string (g_quark_from_string (scratch)); /* eek */ } -const gchar * -gst_oss4_mixer_control_get_translated_option (gchar * name) +static const gchar * +gst_oss4_mixer_control_get_translated_option (const gchar * name) { int i; for (i = 0; i < G_N_ELEMENTS (labels); ++i) { if (g_strcasecmp (name, labels[i].oss_name) == 0) { - name = _(labels[i].label); - return (name); + return _(labels[i].label); } } return (name); -- cgit v1.2.1 From 6303b0e80d0904f271a881e02aeffd2e91689121 Mon Sep 17 00:00:00 2001 From: Josep Torra Date: Thu, 16 Jul 2009 12:03:32 +0200 Subject: pesfilter: Permit unbounded packets for 0xfd (extended stream id). Added parsing of PES extension related data. Fixes some VC1 related issues. --- gst/mpegdemux/gstpesfilter.c | 49 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/gst/mpegdemux/gstpesfilter.c b/gst/mpegdemux/gstpesfilter.c index b520c766..736d4960 100644 --- a/gst/mpegdemux/gstpesfilter.c +++ b/gst/mpegdemux/gstpesfilter.c @@ -151,6 +151,7 @@ gst_pes_filter_parse (GstPESFilter * filter) * to set the allow_unbounded flag if they want */ if (filter->length == 0 && ((filter->start_code & 0xFFFFFFF0) == PACKET_VIDEO_START_CODE || + filter->start_code == ID_EXTENDED_STREAM_ID || filter->allow_unbounded)) { GST_DEBUG ("id 0x%02x, unbounded length", filter->id); filter->unbounded_packet = TRUE; @@ -389,9 +390,53 @@ gst_pes_filter_parse (GstPESFilter * filter) } /* PES_extension_flag */ if ((flags & 0x01)) { - GST_DEBUG ("%x PES_extension", filter->id); + flags = *data++; + header_data_length -= 1; + datalen -= 1; + GST_DEBUG ("%x PES_extension, flags 0x%02x", filter->id, flags); + /* PES_private_data_flag */ + if ((flags & 0x80)) { + GST_DEBUG ("%x PES_private_data_flag", filter->id); + data += 16; + header_data_length -= 16; + datalen -= 16; + } + /* pack_header_field_flag */ + if ((flags & 0x40)) { + guint8 pack_field_length = *data; + GST_DEBUG ("%x pack_header_field_flag, pack_field_length %d", + filter->id, pack_field_length); + data += pack_field_length + 1; + header_data_length -= pack_field_length + 1; + datalen -= pack_field_length + 1; + } + /* program_packet_sequence_counter_flag */ + if ((flags & 0x20)) { + GST_DEBUG ("%x program_packet_sequence_counter_flag", filter->id); + data += 2; + header_data_length -= 2; + datalen -= 2; + } + /* P-STD_buffer_flag */ + if ((flags & 0x10)) { + GST_DEBUG ("%x P-STD_buffer_flag", filter->id); + data += 2; + header_data_length -= 2; + datalen -= 2; + } + /* PES_extension_flag_2 */ + if ((flags & 0x01)) { + guint8 PES_extension_field_length = *data++; + GST_DEBUG ("%x PES_extension_flag_2, len %d", + filter->id, PES_extension_field_length & 0x7f); + if (PES_extension_field_length == 0x81) { + GST_DEBUG ("%x substream id 0x%02x", filter->id, *data); + } + data += PES_extension_field_length & 0x7f; + header_data_length -= (PES_extension_field_length & 0x7f) + 1; + datalen -= (PES_extension_field_length & 0x7f) + 1; + } } - /* calculate the amount of real data in this PES packet */ data += header_data_length; datalen -= header_data_length; -- cgit v1.2.1 From 1b246c72d19616a20a85697aebab6146da44d364 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Thu, 16 Jul 2009 18:14:18 +0300 Subject: Add more debug output to metadatamux --- ext/metadata/gstmetadatamux.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ext/metadata/gstmetadatamux.c b/ext/metadata/gstmetadatamux.c index e6a66fa3..9ddf6ccf 100644 --- a/ext/metadata/gstmetadatamux.c +++ b/ext/metadata/gstmetadatamux.c @@ -418,9 +418,12 @@ gst_metadata_mux_create_chunks_from_tags (GstBaseMetadata * base) guint8 *buf = NULL; guint32 size = 0; + GST_DEBUG_OBJECT (base, "Creating chunks from tags.."); + if (taglist) { if (gst_base_metadata_get_option_flag (base) & META_OPT_EXIF) { + GST_DEBUG_OBJECT (base, "Using EXIF"); metadatamux_exif_create_chunk_from_tag_list (&buf, &size, taglist, &filter->exif_options); gst_base_metadata_update_inject_segment_with_new_data (base, &buf, &size, @@ -428,12 +431,14 @@ gst_metadata_mux_create_chunks_from_tags (GstBaseMetadata * base) } if (gst_base_metadata_get_option_flag (base) & META_OPT_IPTC) { + GST_DEBUG_OBJECT (base, "Using IPTC"); metadatamux_iptc_create_chunk_from_tag_list (&buf, &size, taglist); gst_base_metadata_update_inject_segment_with_new_data (base, &buf, &size, MD_CHUNK_IPTC); } if (gst_base_metadata_get_option_flag (base) & META_OPT_XMP) { + GST_DEBUG_OBJECT (base, "Using XMP"); metadatamux_xmp_create_chunk_from_tag_list (&buf, &size, taglist); gst_base_metadata_update_inject_segment_with_new_data (base, &buf, &size, MD_CHUNK_XMP); @@ -441,6 +446,10 @@ gst_metadata_mux_create_chunks_from_tags (GstBaseMetadata * base) } + else { + GST_DEBUG_OBJECT (base, "Empty taglist"); + } + if (buf) { g_free (buf); } -- cgit v1.2.1 From 2db8d6ea0bc3b6bd4eab91b167c5af790e1a6e0f Mon Sep 17 00:00:00 2001 From: Aleksey Yulin Date: Thu, 16 Jul 2009 19:49:26 +0200 Subject: mpegtsdemux: Don't use PIDs > MPEGTS_MAX_PID The mpegtsdemux streams array only has MPEGTS_MAX_PID entries and accessing one afterwards will result in crashes. Fixes bug #575672. --- gst/mpegdemux/gstmpegtsdemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index cb082a2b..65539d0a 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -1697,7 +1697,8 @@ gst_mpegts_demux_parse_adaptation_field (GstMpegTSStream * stream, memset (pmts_checked, 0, sizeof (gboolean) * (MPEGTS_MAX_PID + 1)); for (j = 0; j < MPEGTS_MAX_PID + 1; j++) { - if (demux->streams[j] && demux->streams[j]->PMT_pid) { + if (demux->streams[j] + && demux->streams[j]->PMT_pid <= MPEGTS_MAX_PID) { if (!pmts_checked[demux->streams[j]->PMT_pid]) { /* check if this is correct pcr for pmt */ if (demux->streams[demux->streams[j]->PMT_pid] && -- cgit v1.2.1 From b9890a2bf724cafb561c47df2ff48cc3ae4f0e89 Mon Sep 17 00:00:00 2001 From: Austin Lund Date: Fri, 19 Jun 2009 20:13:53 +1000 Subject: Increased the length of time for tuning in gstdvbsrc.c. Some devices take a while to tune and 500ms was too short to detect successful tuning. As well as waiting for 5 seconds each 100ms the status is checked and the loop is broken out of when tuning has suceeded. --- sys/dvb/gstdvbsrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index 37b46f42..fd76a4ea 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -1326,13 +1326,15 @@ gst_dvbsrc_tune (GstDvbSrc * object) #endif g_warning ("Error tuning channel: %s", strerror (errno)); } - for (i = 0; i < 5; i++) { + for (i = 0; i < 50; i++) { usleep (100000); if (ioctl (object->fd_frontend, FE_READ_STATUS, &status) == -1) { perror ("FE_READ_STATUS"); break; } GST_LOG_OBJECT (object, "status == 0x%02x", status); + if (status & FE_HAS_LOCK) + break; } if (status & FE_HAS_LOCK) break; -- cgit v1.2.1 From 8eac8701ff4ba06702c655dc40bdd9d8eec8fe21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 16 Jul 2009 15:43:15 -0400 Subject: mimdec: Print the incoming fourcc on errors --- ext/mimic/gstmimdec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c index 1579bd41..f06473ba 100644 --- a/ext/mimic/gstmimdec.c +++ b/ext/mimic/gstmimdec.c @@ -181,10 +181,10 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in) goto out; } - fourcc = GST_MAKE_FOURCC ('M', 'L', '2', '0'); - if (GUINT32_FROM_LE (*((guint32 *) (header + 12))) != fourcc) { - GST_WARNING_OBJECT (mimdec, "invalid frame: unknown FOURCC code %d", - fourcc); + fourcc = GUINT32_FROM_LE (*((guint32 *) (header + 12))); + if (GST_MAKE_FOURCC ('M', 'L', '2', '0') != fourcc) { + GST_WARNING_OBJECT (mimdec, "invalid frame: unknown FOURCC code" + " %X (%" GST_FOURCC_FORMAT ")", fourcc, GST_FOURCC_ARGS (fourcc)); gst_adapter_flush (mimdec->adapter, 24); res = GST_FLOW_ERROR; goto out; -- cgit v1.2.1 From cee75e2c891ac95264dd13adc071bb3f10adcc15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 16 Jul 2009 15:43:46 -0400 Subject: mimdec: Don't try to parse the header before dropping the paused frames --- ext/mimic/gstmimdec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c index f06473ba..1323b154 100644 --- a/ext/mimic/gstmimdec.c +++ b/ext/mimic/gstmimdec.c @@ -181,6 +181,12 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in) goto out; } + if (header[1] == 1) { + /* This is a a paused frame, skip it */ + gst_adapter_flush (mimdec->adapter, 24); + continue; + } + fourcc = GUINT32_FROM_LE (*((guint32 *) (header + 12))); if (GST_MAKE_FOURCC ('M', 'L', '2', '0') != fourcc) { GST_WARNING_OBJECT (mimdec, "invalid frame: unknown FOURCC code" @@ -201,12 +207,6 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in) mimdec->have_header = TRUE; } - /* Check if its paused frame, drop it */ - if (mimdec->payload_size == 0) { - mimdec->have_header = FALSE; - continue; - } - if (gst_adapter_available (mimdec->adapter) < mimdec->payload_size) { goto out; } -- cgit v1.2.1 From 5e051fa98aeebdce2eca6b321ec1929e6f8fdf61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 16 Jul 2009 16:06:26 -0400 Subject: mimdec: Ignore the timestamps inside the buffers --- ext/mimic/gstmimdec.c | 97 ++------------------------------------------------- ext/mimic/gstmimdec.h | 2 -- 2 files changed, 2 insertions(+), 97 deletions(-) diff --git a/ext/mimic/gstmimdec.c b/ext/mimic/gstmimdec.c index 1323b154..6a0abce5 100644 --- a/ext/mimic/gstmimdec.c +++ b/ext/mimic/gstmimdec.c @@ -68,8 +68,6 @@ static GstFlowReturn gst_mimdec_chain (GstPad * pad, GstBuffer * in); static GstStateChangeReturn gst_mimdec_change_state (GstElement * element, GstStateChange transition); -static gboolean gst_mimdec_sink_event (GstPad * pad, GstEvent * event); - GST_BOILERPLATE (GstMimDec, gst_mimdec, GstElement, GST_TYPE_ELEMENT); @@ -118,7 +116,6 @@ gst_mimdec_init (GstMimDec * mimdec, GstMimDecClass * klass) "sink"); gst_element_add_pad (GST_ELEMENT (mimdec), mimdec->sinkpad); gst_pad_set_chain_function (mimdec->sinkpad, gst_mimdec_chain); - gst_pad_set_event_function (mimdec->sinkpad, gst_mimdec_sink_event); mimdec->srcpad = gst_pad_new_from_template (gst_static_pad_template_get (&src_factory), @@ -154,6 +151,7 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in) gint width, height; GstCaps *caps; GstFlowReturn res = GST_FLOW_OK; + GstClockTime in_time = GST_BUFFER_TIMESTAMP (in); GST_DEBUG ("in gst_mimdec_chain"); @@ -215,9 +213,6 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in) (guchar *) gst_adapter_peek (mimdec->adapter, mimdec->payload_size); if (mimdec->dec == NULL) { - GstEvent *event = NULL; - gboolean result = TRUE; - /* Check if its a keyframe, otherwise skip it */ if (GUINT32_FROM_LE (*((guint32 *) (frame_body + 12))) != 0) { gst_adapter_flush (mimdec->adapter, mimdec->payload_size); @@ -259,20 +254,6 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in) res = GST_FLOW_ERROR; goto out; } - - if (mimdec->need_newsegment) - event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME, - mimdec->current_ts * GST_MSECOND, -1, 0); - mimdec->need_newsegment = FALSE; - GST_OBJECT_UNLOCK (mimdec); - if (event) - result = gst_pad_push_event (mimdec->srcpad, event); - GST_OBJECT_LOCK (mimdec); - if (!result) { - GST_WARNING_OBJECT (mimdec, "gst_pad_push_event failed"); - res = GST_FLOW_ERROR; - goto out; - } } out_buf = gst_buffer_new_and_alloc (mimdec->buffer_size); @@ -289,7 +270,7 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in) goto out; } - GST_BUFFER_TIMESTAMP (out_buf) = mimdec->current_ts * GST_MSECOND; + GST_BUFFER_TIMESTAMP (out_buf) = in_time; mimic_get_property (mimdec->dec, "width", &width); mimic_get_property (mimdec->dec, "height", &height); @@ -341,83 +322,9 @@ gst_mimdec_change_state (GstElement * element, GstStateChange transition) GST_OBJECT_UNLOCK (element); } break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - GST_OBJECT_LOCK (element); - mimdec->need_newsegment = TRUE; - GST_OBJECT_UNLOCK (element); - break; default: break; } return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); } - -static gboolean -gst_mimdec_sink_event (GstPad * pad, GstEvent * event) -{ - gboolean res = TRUE; - GstMimDec *mimdec = GST_MIMDEC (gst_pad_get_parent (pad)); - - /* - * Ignore upstream newsegment event, its EVIL, we should implement - * proper seeking instead - */ - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_NEWSEGMENT: - { - gboolean update; - GstFormat format; - gdouble rate, arate; - gint64 start, stop, time; - - gst_event_parse_new_segment_full (event, &update, &rate, &arate, - &format, &start, &stop, &time); - - /* we need TIME and a positive rate */ - if (format != GST_FORMAT_TIME) - goto newseg_wrong_format; - - if (rate <= 0.0) - goto newseg_wrong_rate; - - GST_OBJECT_LOCK (mimdec); - mimdec->need_newsegment = FALSE; - GST_OBJECT_UNLOCK (mimdec); - - res = gst_pad_push_event (mimdec->srcpad, event); - } - break; - case GST_EVENT_FLUSH_STOP: - GST_OBJECT_LOCK (mimdec); - mimdec->need_newsegment = TRUE; - GST_OBJECT_UNLOCK (mimdec); - - res = gst_pad_push_event (mimdec->srcpad, event); - break; - default: - res = gst_pad_push_event (mimdec->srcpad, event); - break; - } - -done: - - gst_object_unref (mimdec); - - return res; - -newseg_wrong_format: - { - GST_DEBUG_OBJECT (mimdec, "received non TIME newsegment"); - gst_event_unref (event); - goto done; - } -newseg_wrong_rate: - { - GST_DEBUG_OBJECT (mimdec, "negative rates not supported yet"); - gst_event_unref (event); - goto done; - } - - -} diff --git a/ext/mimic/gstmimdec.h b/ext/mimic/gstmimdec.h index e1db38d1..7db6b1b8 100644 --- a/ext/mimic/gstmimdec.h +++ b/ext/mimic/gstmimdec.h @@ -57,8 +57,6 @@ struct _GstMimDec gboolean have_header; guint32 payload_size; guint32 current_ts; - - gboolean need_newsegment; }; struct _GstMimDecClass -- cgit v1.2.1 From ff907b11b676481b775b8da7fd6c0b04fc75aaf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 16 Jul 2009 17:27:09 -0400 Subject: mimenc: Don't pretend to be ML20 if paused --- ext/mimic/gstmimenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mimic/gstmimenc.c b/ext/mimic/gstmimenc.c index 84f34012..fce5a47d 100644 --- a/ext/mimic/gstmimenc.c +++ b/ext/mimic/gstmimenc.c @@ -392,7 +392,7 @@ gst_mimenc_create_tcp_header (GstMimEnc * mimenc, guint32 payload_size, *((guint16 *) (p + 4)) = GUINT16_TO_LE (mimenc->height); *((guint16 *) (p + 6)) = keyframe ? 1 : 0; *((guint32 *) (p + 8)) = GUINT32_TO_LE (payload_size); - *((guint32 *) (p + 12)) = + *((guint32 *) (p + 12)) = paused ? 0 : GUINT32_TO_LE (GST_MAKE_FOURCC ('M', 'L', '2', '0')); *((guint32 *) (p + 16)) = 0; *((guint32 *) (p + 20)) = timestamp / GST_MSECOND; -- cgit v1.2.1 From 3d44d9263023bba698f7f2d17775c26ae4873ecd Mon Sep 17 00:00:00 2001 From: Zaheer Merali Date: Fri, 17 Jul 2009 09:36:15 +0100 Subject: mpegtsparse: add component tag to the video component structure in eit --- gst/mpegdemux/mpegtspacketizer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/mpegdemux/mpegtspacketizer.c b/gst/mpegdemux/mpegtspacketizer.c index d22b0051..da53a926 100644 --- a/gst/mpegdemux/mpegtspacketizer.c +++ b/gst/mpegdemux/mpegtspacketizer.c @@ -1749,7 +1749,9 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer, break; } component = gst_structure_new ("video", "high-definition", - G_TYPE_BOOLEAN, TRUE, "frequency", G_TYPE_INT, freq, NULL); + G_TYPE_BOOLEAN, TRUE, "frequency", G_TYPE_INT, freq, + "tag", G_TYPE_INT, DESC_DVB_COMPONENT_tag (comp_descriptor), + NULL); if (widescreen == 0) { gst_structure_set (component, "aspect-ratio", G_TYPE_STRING, "4:3", NULL); -- cgit v1.2.1 From b1d353e2de91545128bcd0900799e98aeec1e370 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 17 Jul 2009 15:38:06 +0300 Subject: camerabin: implemnet two more tests Add tests for videorecording startup and capture startup delay. --- tests/examples/camerabin/gst-camera-perf.c | 325 +++++++++++++++++++++++------ 1 file changed, 259 insertions(+), 66 deletions(-) diff --git a/tests/examples/camerabin/gst-camera-perf.c b/tests/examples/camerabin/gst-camera-perf.c index 858e60cd..cadffa2b 100644 --- a/tests/examples/camerabin/gst-camera-perf.c +++ b/tests/examples/camerabin/gst-camera-perf.c @@ -54,6 +54,13 @@ #include #include +/* + * debug logging + */ +GST_DEBUG_CATEGORY_STATIC (camera_perf); +#define GST_CAT_DEFAULT camera_perf + + /* * enums, typedefs and defines */ @@ -61,7 +68,7 @@ #define GET_TIME(t) \ do { \ t = gst_util_get_timestamp (); \ - GST_INFO("%2d ----------------------------------------", test_ix); \ + GST_DEBUG("%2d ----------------------------------------", test_ix); \ } while(0) #define DIFF_TIME(e,s,d) d=GST_CLOCK_DIFF(s,e) @@ -102,10 +109,16 @@ static guint32 num_pics = 0; static guint32 num_pics_cont = 0; //static guint32 num_vids = 0; static guint test_ix = 0; -static gboolean signal_sink = FALSE; +static gboolean signal_vf_sink = FALSE; +static gboolean signal_vid_sink = FALSE; +static gboolean signal_img_enc = FALSE; static gboolean signal_shot = FALSE; static gboolean signal_cont = FALSE; +static gboolean need_pad_probe = FALSE; +static gboolean need_ienc_pad_probe = FALSE; +static gboolean need_vmux_pad_probe = FALSE; + static gboolean have_img_captured = FALSE; static gboolean have_img_done = FALSE; @@ -113,6 +126,7 @@ static gboolean have_img_done = FALSE; static GstClockTime t_initial = G_GUINT64_CONSTANT (0); static GstClockTime t_final[CONT_SHOTS] = { G_GUINT64_CONSTANT (0), }; +static GstClockTime test_06_taget, test_09_taget; static GstClockTimeDiff diff; static ResultType result; @@ -135,10 +149,10 @@ static const gchar *test_names[TEST_CASES] = { "Shot to snapshot", "Shot to shot", "Serial shooting", - "(Shutter lag)", + "Shutter lag", "Image saved", "Mode change", - "(Video recording)" /* time to get videobin to PLAYING? or first buffer reaching filesink? */ + "Video recording" }; /* @@ -147,28 +161,88 @@ static const gchar *test_names[TEST_CASES] = { static void print_result (void); static gboolean run_test (gpointer user_data); +static gboolean setup_add_pad_probe (GstElement * elem, const gchar * pad_name, + GCallback handler, gpointer data); + /* * Callbacks */ static gboolean -img_sink_has_buffer (GstPad * pad, GstBuffer * buf, gpointer user_data) +pad_has_buffer (GstPad * pad, GstBuffer * buf, gpointer user_data) { - if (signal_sink) { - signal_sink = FALSE; + gboolean *signal_sink = (gboolean *) user_data; + gboolean print_and_restart = FALSE; + + if (*signal_sink) { + *signal_sink = FALSE; GET_TIME (t_final[0]); + GST_DEBUG_OBJECT (pad, "%2d pad has buffer", test_ix); + switch (test_ix) { + case 5: + DIFF_TIME (t_final[num_pics_cont], t_initial, diff); + result.avg = result.min = result.max = diff; + print_and_restart = TRUE; + break; + case 8: + DIFF_TIME (t_final[num_pics_cont], t_initial, diff); + result.avg = result.min = result.max = diff; + g_signal_emit_by_name (camera_bin, "user-stop", 0); + print_and_restart = TRUE; + break; + default: + GST_WARNING_OBJECT (pad, "%2d pad has buffer, not handled", test_ix); + break; + } + } + if (print_and_restart) { + print_result (); + g_idle_add ((GSourceFunc) run_test, NULL); + return FALSE; } return TRUE; } +static void +element_added (GstBin * bin, GstElement * element, gpointer user_data) +{ + GstElement *elem; + + if (GST_IS_BIN (element)) { + g_signal_connect (element, "element-added", (GCallback) element_added, + NULL); + } + + if (need_vmux_pad_probe) { + g_object_get (camera_bin, "videomux", &elem, NULL); + if (elem) { + setup_add_pad_probe (elem, "src", (GCallback) pad_has_buffer, + &signal_vid_sink); + need_vmux_pad_probe = FALSE; + target[8] = test_09_taget; + GST_INFO_OBJECT (elem, "got default video muxer"); + } + } + if (need_ienc_pad_probe) { + g_object_get (camera_bin, "imageenc", &elem, NULL); + if (elem) { + setup_add_pad_probe (elem, "src", (GCallback) pad_has_buffer, + &signal_img_enc); + need_ienc_pad_probe = FALSE; + target[5] = test_06_taget; + GST_INFO_OBJECT (elem, "got default image encoder"); + } + } +} + static gboolean img_capture_done (GstElement * camera, GString * fname, gpointer user_data) { gboolean ret = FALSE; gboolean print_and_restart = FALSE; - GST_INFO ("shot %d, cont %d, num %d", signal_shot, signal_cont, + GST_DEBUG ("shot %d, cont %d, num %d", signal_shot, signal_cont, num_pics_cont); if (signal_shot) { @@ -181,7 +255,7 @@ img_capture_done (GstElement * camera, GString * fname, gpointer user_data) print_and_restart = TRUE; break; } - GST_INFO ("%2d shot done", test_ix); + GST_DEBUG ("%2d shot done", test_ix); } if (signal_cont) { @@ -198,7 +272,7 @@ img_capture_done (GstElement * camera, GString * fname, gpointer user_data) } snprintf (tmp, 6, "_%04d", num_pics_cont); memcpy (filename->str + i, tmp, 5); - GST_INFO ("%2d cont new filename '%s'", test_ix, filename->str); + GST_DEBUG ("%2d cont new filename '%s'", test_ix, filename->str); g_object_set (camera_bin, "filename", filename->str, NULL); // FIXME: is burst capture broken? new filename and return TRUE should be enough // as a workaround we will kick next image from here @@ -244,7 +318,7 @@ img_capture_done (GstElement * camera, GString * fname, gpointer user_data) result.min = min; result.max = max; print_and_restart = TRUE; - GST_INFO ("%2d cont done", test_ix); + GST_DEBUG ("%2d cont done", test_ix); } } @@ -286,33 +360,36 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) break; } case GST_MESSAGE_STATE_CHANGED: - if (GST_MESSAGE_SRC (message) == GST_OBJECT (camera_bin)) { + if (GST_IS_BIN (GST_MESSAGE_SRC (message))) { GstState oldstate, newstate; gst_message_parse_state_changed (message, &oldstate, &newstate, NULL); - GST_INFO ("state-changed: %s -> %s", + GST_DEBUG_OBJECT (GST_MESSAGE_SRC (message), "state-changed: %s -> %s", gst_element_state_get_name (oldstate), gst_element_state_get_name (newstate)); - if (GST_STATE_TRANSITION (oldstate, - newstate) == GST_STATE_CHANGE_PAUSED_TO_PLAYING) { - GET_TIME (t_final[0]); - DIFF_TIME (t_final[0], t_initial, diff); - - result.avg = result.min = result.max = diff; - print_result (); - g_idle_add ((GSourceFunc) run_test, NULL); + if (GST_MESSAGE_SRC (message) == GST_OBJECT (camera_bin)) { + if (GST_STATE_TRANSITION (oldstate, + newstate) == GST_STATE_CHANGE_PAUSED_TO_PLAYING) { + GET_TIME (t_final[0]); + DIFF_TIME (t_final[0], t_initial, diff); + + result.avg = result.min = result.max = diff; + print_result (); + g_idle_add ((GSourceFunc) run_test, NULL); + } } } break; case GST_MESSAGE_EOS: /* end-of-stream */ + GST_INFO ("got eos() - should not happen"); g_main_loop_quit (loop); break; default: st = gst_message_get_structure (message); if (st) { if (gst_structure_has_name (st, "image-captured")) { - GST_INFO ("%2d image-captured", test_ix); + GST_DEBUG ("%2d image-captured", test_ix); switch (test_ix) { case 3: GET_TIME (t_final[num_pics_cont]); @@ -330,12 +407,14 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) break; } } else if (gst_structure_has_name (st, "preview-image")) { - GST_INFO ("%2d preview-image", test_ix); + GST_DEBUG ("%2d preview-image", test_ix); switch (test_ix) { case 2: GET_TIME (t_final[num_pics_cont]); DIFF_TIME (t_final[num_pics_cont], t_initial, diff); result.avg = result.min = result.max = diff; + /* turn off preview image generation again */ + g_object_set (camera_bin, "preview-caps", NULL, NULL); break; } } @@ -363,52 +442,43 @@ cleanup_pipeline (void) } static gboolean -setup_pipeline_video_sink (void) +setup_add_pad_probe (GstElement * elem, const gchar * pad_name, + GCallback handler, gpointer data) { - GstElement *sink = NULL; GstPad *pad = NULL; - sink = gst_element_factory_make ("fakesink", NULL); - if (NULL == sink) { - g_warning ("failed to create sink\n"); - goto error; - } - - pad = gst_element_get_static_pad (sink, "sink"); - if (NULL == pad) { - g_warning ("sink has no pad named 'sink'\n"); - goto error; + if (!(pad = gst_element_get_static_pad (elem, pad_name))) { + GST_WARNING ("sink has no pad named '%s'", pad_name); + return FALSE; } - g_object_set (sink, "sync", TRUE, NULL); - gst_pad_add_buffer_probe (pad, (GCallback) img_sink_has_buffer, NULL); + gst_pad_add_buffer_probe (pad, (GCallback) handler, data); gst_object_unref (pad); - g_object_set (camera_bin, "vfsink", sink, NULL); - return TRUE; -error: - if (sink) - gst_object_unref (sink); - return FALSE; } static gboolean -setup_pipeline_element (const gchar * property_name, const gchar * element_name) +setup_pipeline_element (const gchar * property_name, const gchar * element_name, + GstElement ** res_elem) { gboolean res = TRUE; + GstElement *elem = NULL; - GstElement *elem; if (element_name) { elem = gst_element_factory_make (element_name, NULL); if (elem) { g_object_set (camera_bin, property_name, elem, NULL); } else { - g_warning ("can't create element '%s' for property '%s'", element_name, + GST_WARNING ("can't create element '%s' for property '%s'", element_name, property_name); res = FALSE; } + } else { + GST_DEBUG ("no element for property '%s' given", property_name); } + if (res_elem) + *res_elem = elem; return res; } @@ -417,6 +487,7 @@ setup_pipeline (void) { GstBus *bus; gboolean res = TRUE; + GstElement *vmux, *ienc, *sink; g_string_printf (filename, "test_%04u.jpg", num_pics); @@ -432,11 +503,24 @@ setup_pipeline (void) gst_bus_add_watch (bus, bus_callback, NULL); gst_object_unref (bus); - if (!setup_pipeline_video_sink ()) { + GST_INFO_OBJECT (camera_bin, "camerabin created"); + + /* configure used elements */ + res &= setup_pipeline_element ("vfsink", "fakesink", &sink); + res &= setup_pipeline_element ("audiosrc", audiosrc_name, NULL); + res &= setup_pipeline_element ("videosrc", videosrc_name, NULL); + res &= setup_pipeline_element ("audioenc", audioenc_name, NULL); + res &= setup_pipeline_element ("videoenc", videoenc_name, NULL); + res &= setup_pipeline_element ("imageenc", imageenc_name, &ienc); + res &= setup_pipeline_element ("videomux", videomux_name, &vmux); + if (!res) { goto error; } + GST_INFO_OBJECT (camera_bin, "elements created"); + /* set properties */ + g_object_set (camera_bin, "filename", filename->str, NULL); if (src_csp && strlen (src_csp) == 4) { GstCaps *filter_caps; @@ -446,8 +530,7 @@ setup_pipeline (void) "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC (src_csp[0], src_csp[1], src_csp[2], src_csp[3]), NULL); if (filter_caps) { - g_object_set (camera_bin, "filename", filename->str, - "filter-caps", filter_caps, NULL); + g_object_set (camera_bin, "filter-caps", filter_caps, NULL); gst_caps_unref (filter_caps); } else { g_warning ("can't make filter-caps with format=%s\n", src_csp); @@ -455,16 +538,49 @@ setup_pipeline (void) } } - /* configure used elements */ - res &= setup_pipeline_element ("audiosrc", audiosrc_name); - res &= setup_pipeline_element ("videosrc", videosrc_name); - res &= setup_pipeline_element ("audioenc", audioenc_name); - res &= setup_pipeline_element ("videoenc", videoenc_name); - res &= setup_pipeline_element ("imageenc", imageenc_name); - res &= setup_pipeline_element ("videomux", videomux_name); - if (!res) { + g_object_set (sink, "sync", TRUE, NULL); + + GST_INFO_OBJECT (camera_bin, "elements configured"); + + /* connect signal handlers */ + g_assert (sink); + if (!setup_add_pad_probe (sink, "sink", (GCallback) pad_has_buffer, + &signal_vf_sink)) { goto error; } + if (!vmux) { + g_object_get (camera_bin, "videomux", &vmux, NULL); + if (!vmux) { + need_pad_probe = need_vmux_pad_probe = TRUE; + test_09_taget = target[8]; + target[8] = G_GUINT64_CONSTANT (0); + } + } + if (vmux) { + if (!setup_add_pad_probe (vmux, "src", (GCallback) pad_has_buffer, + &signal_vid_sink)) { + goto error; + } + } + if (!ienc) { + g_object_get (camera_bin, "imageenc", &ienc, NULL); + if (!ienc) { + need_pad_probe = need_ienc_pad_probe = TRUE; + test_06_taget = target[5]; + target[5] = G_GUINT64_CONSTANT (0); + } + } + if (ienc) { + if (!setup_add_pad_probe (ienc, "src", (GCallback) pad_has_buffer, + &signal_img_enc)) { + goto error; + } + } + if (need_pad_probe) { + g_signal_connect (camera_bin, "element-added", (GCallback) element_added, + NULL); + } + GST_INFO_OBJECT (camera_bin, "probe signals connected"); /* configure a resolution and framerate */ if (image_width && image_height && view_framerate_num && view_framerate_den) { @@ -477,13 +593,14 @@ setup_pipeline (void) g_warning ("can't set camerabin to ready\n"); goto error; } + GST_INFO_OBJECT (camera_bin, "camera ready"); if (GST_STATE_CHANGE_FAILURE == gst_element_set_state (camera_bin, GST_STATE_PLAYING)) { g_warning ("can't set camerabin to playing\n"); goto error; } - GST_INFO_OBJECT (camera_bin, "created and started"); + GST_INFO_OBJECT (camera_bin, "camera started"); return TRUE; error: cleanup_pipeline (); @@ -541,6 +658,9 @@ test_03 (void) g_object_set (camera_bin, "preview-caps", snap_caps, NULL); gst_caps_unref (snap_caps); + /* switch to image mode */ + g_object_set (camera_bin, "mode", 0, NULL); + g_object_set (camera_bin, "filename", filename->str, NULL); GET_TIME (t_initial); g_signal_emit_by_name (camera_bin, "user-start", 0); @@ -556,6 +676,8 @@ test_03 (void) static gboolean test_04 (void) { + /* switch to image mode */ + g_object_set (camera_bin, "mode", 0, NULL); GET_TIME (t_initial); g_signal_emit_by_name (camera_bin, "user-start", 0); @@ -564,6 +686,7 @@ test_04 (void) return FALSE; } + /* 05) Serial shooting * * It tests the time between shots in continuous mode. @@ -573,6 +696,8 @@ test_05 (void) { signal_cont = TRUE; have_img_captured = have_img_done = FALSE; + /* switch to image mode */ + g_object_set (camera_bin, "mode", 0, NULL); GET_TIME (t_initial); g_signal_emit_by_name (camera_bin, "user-start", 0); @@ -582,6 +707,27 @@ test_05 (void) } +/* 06) Shutter lag + * + * It tests the time from user-start signal to buffer reaching img-enc + */ +static gboolean +test_06 (void) +{ + signal_img_enc = TRUE; + + /* switch to image mode */ + g_object_set (camera_bin, "mode", 0, NULL); + g_object_set (camera_bin, "filename", filename->str, NULL); + GET_TIME (t_initial); + g_signal_emit_by_name (camera_bin, "user-start", 0); + + /* the actual results are fetched in pad_has_buffer */ + result.times = 1; + return FALSE; +} + + /* 07) Image saved * * It tests the time between pressing the Shot and the final image is saved to @@ -592,10 +738,11 @@ test_07 (void) { signal_shot = TRUE; + /* switch to image mode */ + g_object_set (camera_bin, "mode", 0, NULL); + g_object_set (camera_bin, "filename", filename->str, NULL); GET_TIME (t_initial); g_signal_emit_by_name (camera_bin, "user-start", 0); - /* call "user-stop" just to go back to initial state (view-finder) again */ - g_signal_emit_by_name (camera_bin, "user-stop", 0); /* the actual results are fetched in img_capture_done */ result.times = 1; return FALSE; @@ -616,6 +763,10 @@ test_08 (void) const gint count = 6; gint i; + /* switch to image mode */ + g_object_set (camera_bin, "mode", 0, NULL); + g_object_set (camera_bin, "filename", filename->str, NULL); + for (i = 0; i < count; ++i) { GET_TIME (t_final[i]); g_object_set (camera_bin, "mode", (i + 1) & 1, NULL); @@ -641,6 +792,29 @@ test_08 (void) return TRUE; } + +/* 09) Video recording + * + * It tests the time it takes to start video recording. + * FIXME: shouldn't we wait for the buffer arriving on the venc instead of sink? + */ +static gboolean +test_09 (void) +{ + signal_vid_sink = TRUE; + + /* switch to video mode */ + g_object_set (camera_bin, "mode", 1, NULL); + g_object_set (camera_bin, "filename", filename->str, NULL); + GET_TIME (t_initial); + g_signal_emit_by_name (camera_bin, "user-start", 0); + + /* the actual results are fetched in pad_has_buffer */ + result.times = 1; + return FALSE; +} + + typedef gboolean (*test_case) (void); static test_case test_cases[TEST_CASES] = { test_01, @@ -648,10 +822,10 @@ static test_case test_cases[TEST_CASES] = { test_03, test_04, test_05, - NULL, + test_06, test_07, test_08, - NULL + test_09 }; static void @@ -671,6 +845,13 @@ static gboolean run_test (gpointer user_data) { gboolean ret = TRUE; + guint old_test_ix = test_ix; + + if (test_ix == TEST_CASES) { + GST_INFO ("done"); + g_main_loop_quit (loop); + return FALSE; + } printf ("| %02d ", test_ix + 1); if (test_cases[test_ix]) { @@ -693,14 +874,23 @@ run_test (gpointer user_data) test_ix++; } - if (!camera_bin || test_ix == TEST_CASES) { + if (old_test_ix == 0 && ret == TRUE && !camera_bin) { + GST_INFO ("done (camerabin creation failed)"); + g_main_loop_quit (loop); + return FALSE; + } + if (old_test_ix > 0 && !camera_bin) { + GST_INFO ("done (camerabin was destroyed)"); + g_main_loop_quit (loop); + return FALSE; + } + if (test_ix == TEST_CASES) { GST_INFO ("done"); g_main_loop_quit (loop); return FALSE; - } else { - GST_INFO ("%2d result: %d", test_ix, ret); - return ret; } + GST_INFO ("%2d result: %d", test_ix, ret); + return ret; } int @@ -750,6 +940,9 @@ main (int argc, char *argv[]) } g_option_context_free (ctx); + GST_DEBUG_CATEGORY_INIT (camera_perf, "camera-perf", 0, + "camera performcance test"); + /* init */ filename = g_string_new_len ("", 16); loop = g_main_loop_new (NULL, FALSE); -- cgit v1.2.1 From 4ef918df28fff5efa67a93a00bfbf0562e8b213f Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 17 Jul 2009 15:45:32 +0300 Subject: camerabin: use gst_caps_replace instead of separate calls This fixes setting snapshot caps back to NULL also. --- gst/camerabin/gstcamerabin.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 5eace93b..50f863d3 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -2862,12 +2862,8 @@ gst_camerabin_set_property (GObject * object, guint prop_id, break; case ARG_FILTER_CAPS: GST_OBJECT_LOCK (camera); - if (camera->view_finder_caps) { - gst_caps_unref (camera->view_finder_caps); - } - /* just ref, we don't modify it inplace */ - camera->view_finder_caps = - gst_caps_ref ((GstCaps *) gst_value_get_caps (value)); + gst_caps_replace (&camera->view_finder_caps, + (GstCaps *) gst_value_get_caps (value)); GST_OBJECT_UNLOCK (camera); if (GST_STATE (camera) != GST_STATE_NULL) { gst_camerabin_set_capsfilter_caps (camera, camera->view_finder_caps); @@ -2875,10 +2871,8 @@ gst_camerabin_set_property (GObject * object, guint prop_id, break; case ARG_PREVIEW_CAPS: GST_OBJECT_LOCK (camera); - if (camera->preview_caps) { - gst_caps_unref (camera->preview_caps); - } - camera->preview_caps = gst_caps_copy (gst_value_get_caps (value)); + gst_caps_replace (&camera->preview_caps, + (GstCaps *) gst_value_get_caps (value)); GST_OBJECT_UNLOCK (camera); gst_camerabin_preview_create_pipeline (camera); break; -- cgit v1.2.1 From 4307be631de43ea2a36e8ad06e941a2e36032857 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 17 Jul 2009 15:47:10 +0300 Subject: metadata: reset state if there is something to reset The condition was wrong and as such the element was writing the same tags on subsequent images if reused. --- ext/metadata/gstbasemetadata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/metadata/gstbasemetadata.c b/ext/metadata/gstbasemetadata.c index 4609013b..dd91b2aa 100644 --- a/ext/metadata/gstbasemetadata.c +++ b/ext/metadata/gstbasemetadata.c @@ -1151,8 +1151,8 @@ gst_base_metadata_calculate_offsets (GstBaseMetadata * base) goto done; } - metadata_chunk_array_remove_zero_size (&META_DATA_INJECT_CHUNKS (base-> - metadata)); + metadata_chunk_array_remove_zero_size (&META_DATA_INJECT_CHUNKS + (base->metadata)); metadata_lazy_update (base->metadata); @@ -1420,7 +1420,7 @@ gst_base_metadata_change_state (GstElement * element, GstStateChange transition) switch (transition) { case GST_STATE_CHANGE_PAUSED_TO_READY: gst_base_metadata_reset_streaming (filter); - if (filter->state != MT_STATE_PARSED) + if (filter->state == MT_STATE_PARSED) gst_base_metadata_reset_parsing (filter); break; default: -- cgit v1.2.1 From 01200712ead2c6d94ab29c9af2f283f34844e4d7 Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Sat, 18 Jul 2009 08:43:37 +0200 Subject: mpegdemux: Fix integer overflow This breaks playback of files >4 GB as the offset was a guint before. Changing it to a guint64 fixes this. --- gst/mpegdemux/gstmpegdemux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index ce1d0978..51b1ff1b 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -2540,7 +2540,7 @@ gst_flups_demux_loop (GstPad * pad) { GstFluPSDemux *demux; GstFlowReturn ret = GST_FLOW_OK; - guint offset = 0; + guint64 offset = 0; demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad)); @@ -2579,7 +2579,7 @@ gst_flups_demux_loop (GstPad * pad) goto pause; } } else { /* Reverse playback */ - guint size = MIN (offset, BLOCK_SZ); + guint64 size = MIN (offset, BLOCK_SZ); /* pull in data */ ret = gst_flups_demux_pull_block (pad, demux, offset - size, size); -- cgit v1.2.1 From 114425d7eebfe4729ded504765d1a4c027db5734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 19 Jul 2009 15:37:50 +0100 Subject: real: differentiate between 'module does not exist' and genuine module opening errors Don't log a GST_ERROR if one of the codec modules we were looking for doesn't exist. That's not a genuine error, but somewhat expected. --- gst/real/gstrealaudiodec.c | 14 +++++++++++--- gst/real/gstrealvideodec.c | 20 ++++++++++++-------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/gst/real/gstrealaudiodec.c b/gst/real/gstrealaudiodec.c index 1a94a77b..5f5b900d 100644 --- a/gst/real/gstrealaudiodec.c +++ b/gst/real/gstrealaudiodec.c @@ -262,12 +262,20 @@ open_library (GstRealAudioDec * dec, gint version, GstRADecLibrary * lib) GST_LOG_OBJECT (dec, "opening module %s", codec); - lib->module = g_module_open (codec, G_MODULE_BIND_LAZY); + /* This is racy, but it doesn't matter here; would be nice if GModule + * gave us a GError instead of an error string, but it doesn't, so.. */ + if (g_file_test (codec, G_FILE_TEST_EXISTS)) { + lib->module = g_module_open (codec, G_MODULE_BIND_LAZY); + if (lib->module == NULL) { + GST_ERROR_OBJECT (dec, "Could not open codec library '%s': %s", + codec, g_module_error ()); + } + } else { + GST_DEBUG_OBJECT (dec, "%s does not exist", codec); + } g_free (codec); if (lib->module) goto codec_search_done; - - GST_LOG_OBJECT (dec, "failure, try next one..."); } } diff --git a/gst/real/gstrealvideodec.c b/gst/real/gstrealvideodec.c index 74cb6f5a..313a99f2 100644 --- a/gst/real/gstrealvideodec.c +++ b/gst/real/gstrealvideodec.c @@ -480,7 +480,17 @@ open_library (GstRealVideoDec * dec, GstRealVideoDecVersion version, gchar *codec = g_strconcat (split_path[i], "/", split_names[j], NULL); GST_DEBUG_OBJECT (dec, "trying %s", codec); - module = g_module_open (codec, G_MODULE_BIND_LAZY); + /* This is racy, but it doesn't matter here; would be nice if GModule + * gave us a GError instead of an error string, but it doesn't, so.. */ + if (g_file_test (codec, G_FILE_TEST_EXISTS)) { + module = g_module_open (codec, G_MODULE_BIND_LAZY); + if (module == NULL) { + GST_ERROR_OBJECT (dec, "Could not open codec library '%s': %s", + codec, g_module_error ()); + } + } else { + GST_LOG_OBJECT (dec, "%s does not exist", codec); + } g_free (codec); if (module) goto codec_search_done; @@ -492,7 +502,7 @@ codec_search_done: g_strfreev (split_names); if (module == NULL) - goto could_not_open; + return FALSE; GST_DEBUG_OBJECT (dec, "module opened, finding symbols"); @@ -527,12 +537,6 @@ unknown_version: GST_ERROR_OBJECT (dec, "Cannot handle version %i.", version); return FALSE; } -could_not_open: - { - GST_ERROR_OBJECT (dec, "Could not open library '%s' in '%s': %s", names, - path, g_module_error ()); - return FALSE; - } could_not_load: { close_library (dec, lib); -- cgit v1.2.1 From e88984ccbd4b2b7b5527cbc3ff488c5c85bb1e97 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Sun, 15 Feb 2009 18:35:04 +0000 Subject: add new Kate plugin, for Kate overlay streams katedec: Kate decoder (text only) kateenc: Kate encoder (text and DVD SPU only) katetag: Kate tagger kateparse: Kate parser tiger: Kate renderer using the Tiger rendering library Fixes #525743. --- LICENSE_readme | 3 + REQUIREMENTS | 6 +- configure.ac | 26 + docs/plugins/Makefile.am | 5 + docs/plugins/gst-plugins-bad-plugins-docs.sgml | 6 + docs/plugins/gst-plugins-bad-plugins-sections.txt | 70 + ext/Makefile.am | 8 + ext/kate/Makefile.am | 20 + ext/kate/README | 20 + ext/kate/gstkate.c | 150 ++ ext/kate/gstkate.h | 55 + ext/kate/gstkatedec.c | 318 ++++ ext/kate/gstkatedec.h | 88 + ext/kate/gstkateenc.c | 1834 +++++++++++++++++++++ ext/kate/gstkateenc.h | 120 ++ ext/kate/gstkateparse.c | 613 +++++++ ext/kate/gstkateparse.h | 78 + ext/kate/gstkatetag.c | 347 ++++ ext/kate/gstkatetag.h | 65 + ext/kate/gstkatetiger.c | 802 +++++++++ ext/kate/gstkatetiger.h | 108 ++ ext/kate/gstkateutil.c | 371 +++++ ext/kate/gstkateutil.h | 77 + gst-plugins-bad.spec.in | 1 + tests/check/Makefile.am | 11 + tests/check/elements/kate.c | 839 ++++++++++ 26 files changed, 6039 insertions(+), 2 deletions(-) create mode 100644 ext/kate/Makefile.am create mode 100644 ext/kate/README create mode 100644 ext/kate/gstkate.c create mode 100644 ext/kate/gstkate.h create mode 100644 ext/kate/gstkatedec.c create mode 100644 ext/kate/gstkatedec.h create mode 100644 ext/kate/gstkateenc.c create mode 100644 ext/kate/gstkateenc.h create mode 100644 ext/kate/gstkateparse.c create mode 100644 ext/kate/gstkateparse.h create mode 100644 ext/kate/gstkatetag.c create mode 100644 ext/kate/gstkatetag.h create mode 100644 ext/kate/gstkatetiger.c create mode 100644 ext/kate/gstkatetiger.h create mode 100644 ext/kate/gstkateutil.c create mode 100644 ext/kate/gstkateutil.h create mode 100644 tests/check/elements/kate.c diff --git a/LICENSE_readme b/LICENSE_readme index 67fd312c..718d6d23 100644 --- a/LICENSE_readme +++ b/LICENSE_readme @@ -85,6 +85,8 @@ textoverlay pango (http://www.pango.org/) dirac (http://www.bbc.co.uk/rd/projects/dirac/) effectv (Our ports was relicensed)(http://effectv.sourceforge.net/) musepack (http://www.musepack.net/) +kate libtiger (http://libtiger.googlecode.com/) + Optional, only for the tiger element Plugins which use a BSD covered library are as follows: @@ -93,6 +95,7 @@ vorbis libogg/libvorbis (http://www.xiph.org/ogg/vorbis/) gsttheora libtheora (http://www.theora.org/) speex (http://www.speex.org/) flac libFLAC (http://flac.sourceforge.net/) +kate libkate (http://libkate.googlecode.com/) Plugins based on libraries with other free licenses: diff --git a/REQUIREMENTS b/REQUIREMENTS index 121f73c2..773996f7 100644 --- a/REQUIREMENTS +++ b/REQUIREMENTS @@ -118,9 +118,11 @@ libtheora (for Ogg Theora video support) libmms (for MMS protocol support) (http://www.sf.net/projects/libmms) libamrnb (for AMR-NB support) - (http://http://www.penguin.cz/~utx/amr) + (http://www.penguin.cz/~utx/amr) libamrwb (for AMR-WB support) - (http://http://www.penguin.cz/~utx/amr) + (http://www.penguin.cz/~utx/amr) +libkate (for Kate support) + (http://libkate.googlecode.com/) Optional (debian) packages: diff --git a/configure.ac b/configure.ac index fa52dde5..5834cbd8 100644 --- a/configure.ac +++ b/configure.ac @@ -944,6 +944,30 @@ AG_GST_CHECK_FEATURE(JP2K, [jp2k], jp2kdec jp2kenc, [ AC_SUBST(JP2K_LIBS) ]) +dnl *** kate *** +translit(dnm, m, l) AM_CONDITIONAL(USE_KATE, true) +AG_GST_CHECK_FEATURE(KATE, [Kate], kate, [ + PKG_CHECK_MODULES(KATE, kate >= 0.1.7, HAVE_KATE="yes", [ + HAVE_KATE="no" + AC_MSG_RESULT(no) + ]) + AC_SUBST(KATE_CFLAGS) + AC_SUBST(KATE_LIBS) + PKG_CHECK_MODULES(TIGER, tiger >= 0.3.2, + [ + HAVE_TIGER="yes" + AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available]) + ], + [ + HAVE_TIGER="no" + AC_MSG_RESULT(no) + ] + ) + AM_CONDITIONAL(USE_TIGER, test "x$HAVE_TIGER" = "xyes") + AC_SUBST(TIGER_CFLAGS) + AC_SUBST(TIGER_LIBS) +]) + dnl *** ladspa *** translit(dnm, m, l) AM_CONDITIONAL(USE_LADSPA, true) AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [ @@ -1526,6 +1550,7 @@ AM_CONDITIONAL(USE_THEORADEC, false) AM_CONDITIONAL(USE_TIMIDITY, false) AM_CONDITIONAL(USE_XVID, false) AM_CONDITIONAL(USE_WILDMIDI, false) +AM_CONDITIONAL(USE_KATE, false) AM_CONDITIONAL(USE_WININET, false) AM_CONDITIONAL(USE_ACM, false) AM_CONDITIONAL(USE_VDPAU, false) @@ -1698,6 +1723,7 @@ ext/gsm/Makefile ext/ivorbis/Makefile ext/jack/Makefile ext/jp2k/Makefile +ext/kate/Makefile ext/ladspa/Makefile ext/lv2/Makefile ext/libmms/Makefile diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 2bda68f2..98598b17 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -100,6 +100,11 @@ EXTRA_HFILES = \ $(top_srcdir)/ext/ivorbis/vorbisdec.h \ $(top_srcdir)/ext/jack/gstjackaudiosrc.h \ $(top_srcdir)/ext/jack/gstjackaudiosink.h \ + $(top_srcdir)/ext/kate/gstkateenc.h \ + $(top_srcdir)/ext/kate/gstkatedec.h \ + $(top_srcdir)/ext/kate/gstkateparse.h \ + $(top_srcdir)/ext/kate/gstkatetag.h \ + $(top_srcdir)/ext/kate/gstkatetiger.h \ $(top_srcdir)/ext/musicbrainz/gsttrm.h \ $(top_srcdir)/ext/metadata/gstbasemetadata.h \ $(top_srcdir)/ext/metadata/gstmetadatademux.h \ diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index 21ac6101..8d1dba41 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -50,6 +50,10 @@ + + + + @@ -76,6 +80,7 @@ + @@ -120,6 +125,7 @@ + diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index e5742a85..c220f0ca 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -471,6 +471,76 @@ GstLiveAdderFunction gst_live_adder_get_type +
+element-katedec +katedec +GstKateDec + +GstKateDecClass +GST_KATE_DEC +GST_KATE_DEC_CLASS +GST_IS_KATE_DEC +GST_IS_KATE_DEC_CLASS +GST_TYPE_KATE_DEC +gst_kate_dec_get_type +
+ +
+element-kateenc +kateenc +GstKateEnc + +GstKateEncClass +GST_KATE_ENC +GST_KATE_ENC_CLASS +GST_IS_KATE_ENC +GST_IS_KATE_ENC_CLASS +GST_TYPE_KATE_ENC +gst_kate_enc_get_type +
+ +
+element-kateparse +kateparse +GstKateParse + +GstKateParseClass +GST_KATE_PARSE +GST_KATE_PARSE_CLASS +GST_IS_KATE_PARSE +GST_IS_KATE_PARSE_CLASS +GST_TYPE_KATE_PARSE +gst_kate_parse_get_type +
+ +
+element-katetag +katetag +GstKateTag + +GstKateTagClass +GST_KATE_TAG +GST_KATE_TAG_CLASS +GST_IS_KATE_TAG +GST_IS_KATE_TAG_CLASS +GST_TYPE_KATE_TAG +gst_kate_tag_get_type +
+ +
+element-tiger +tiger +GstKateTiger + +GstKateTigerClass +GST_KATE_TIGER +GST_KATE_TIGER_CLASS +GST_IS_KATE_TIGER +GST_IS_KATE_TIGER_CLASS +GST_TYPE_KATE_TIGER +gst_kate_tiger_get_type +
+
gstbasemetadata GstBaseMetadata diff --git a/ext/Makefile.am b/ext/Makefile.am index a2ecd18d..fafa1146 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -148,6 +148,12 @@ else JP2K_DIR = endif +if USE_KATE +KATE_DIR=kate +else +KATE_DIR= +endif + if USE_LADSPA LADSPA_DIR = ladspa else @@ -362,6 +368,7 @@ SUBDIRS=\ $(IVORBIS_DIR) \ $(JACK_DIR) \ $(JP2K_DIR) \ + $(KATE_DIR) \ $(LADSPA_DIR) \ $(LV2_DIR) \ $(LCS_DIR) \ @@ -411,6 +418,7 @@ DIST_SUBDIRS = \ ladspa \ jack \ jp2k \ + kate \ libmms \ lv2 \ dts \ diff --git a/ext/kate/Makefile.am b/ext/kate/Makefile.am new file mode 100644 index 00000000..f907da5f --- /dev/null +++ b/ext/kate/Makefile.am @@ -0,0 +1,20 @@ +# plugindir is set in configure + +plugin_LTLIBRARIES = libgstkate.la + +# sources used to compile this plug-in +libgstkate_la_SOURCES = gstkate.c gstkatedec.c gstkateenc.c gstkateparse.c gstkatetag.c gstkateutil.c +if USE_TIGER +libgstkate_la_SOURCES += gstkatetiger.c +endif + +# flags used to compile this plugin +libgstkate_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(TIGER_CFLAGS) $(KATE_CFLAGS) +libgstkate_la_LIBADD = $(GST_PLUGIN_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) $(GST_LIBS) $(TIGER_LIBS) $(KATE_LIBS) +libgstkate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) +libgstkate_la_LIBTOOLFLAGS = --tag=disable-static + +# headers we need but don't want installed +noinst_HEADERS = gstkate.h gstkatedec.h gstkateenc.h gstkateparse.h gstkatetag.h gstkateutil.h gstkatetiger.h + +EXTRA_DIST=README diff --git a/ext/kate/README b/ext/kate/README new file mode 100644 index 00000000..394b057a --- /dev/null +++ b/ext/kate/README @@ -0,0 +1,20 @@ +Kate is a free codec for text based data, which can also carry images. +It is typically used to create overlays on a video. + +libkate, a codec for Kate streams, is required to build this plugin: +http://libkate.googlecode.com/ + +libtiger, a rendering library for Kate streams, is optional: +http://libtiger.googlecode.com/ + +The Kate plugin contains various elements to manipulate Kate streams: + + - katedec: decodes Kate streams to text + - kateenc: encodes Kate streams from text and SPU images + - kateparse: parses Kate streams + - katetag: allows changing metadata in Kate streams + - tiger: decodes and renders Kate streams using libtiger (needs libtiger) + +More information about Kate can be found at: +http://wiki.xiph.org/index.php/OggKate + diff --git a/ext/kate/gstkate.c b/ext/kate/gstkate.c new file mode 100644 index 00000000..5e60d187 --- /dev/null +++ b/ext/kate/gstkate.c @@ -0,0 +1,150 @@ +/* + * GStreamer + * Copyright 2005 Thomas Vander Stichele + * Copyright 2005 Ronald S. Bultje + * Copyright 2008 Vincent Penquerc'h + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Alternatively, the contents of this file may be used under the + * GNU Lesser General Public License Version 2.1 (the "LGPL"), in + * which case the following provisions apply instead of the ones + * mentioned above: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +#include "gstkate.h" +#include "gstkatedec.h" +#include "gstkateenc.h" +#include "gstkateparse.h" +#include "gstkatetag.h" +#ifdef HAVE_TIGER +#include "gstkatetiger.h" +#endif + +GST_DEBUG_CATEGORY (gst_katedec_debug); +GST_DEBUG_CATEGORY (gst_kateenc_debug); +GST_DEBUG_CATEGORY (gst_kateparse_debug); +GST_DEBUG_CATEGORY (gst_katetag_debug); +#ifdef HAVE_TIGER +GST_DEBUG_CATEGORY (gst_katetiger_debug); +#endif + + +static GstStaticCaps kate_caps = GST_STATIC_CAPS (GST_KATE_MIME_TYPE); + +#define KATE_CAPS (gst_static_caps_get(&kate_caps)) +static void +gst_kate_type_find (GstTypeFind * tf, gpointer private) +{ + guint8 *data = gst_type_find_peek (tf, 0, 8); + + if (data) { + if (memcmp (data, "\200kate\0\0\0", 8) != 0) + return; + + gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, KATE_CAPS); + } +} + +/* entry point to initialize the plug-in + * initialize the plug-in itself + * register the element factories and pad templates + * register the features + */ +static gboolean +plugin_init (GstPlugin * plugin) +{ + GstCaps *caps; + + caps = gst_caps_new_simple (GST_KATE_MIME_TYPE, NULL); + if (!gst_type_find_register (plugin, GST_KATE_MIME_TYPE, GST_RANK_PRIMARY, + gst_kate_type_find, NULL, caps, NULL, NULL)) { + GST_WARNING ("kate: failed to register typefind"); + gst_caps_unref (caps); + return FALSE; + } + gst_caps_unref (caps); + + GST_DEBUG_CATEGORY_INIT (gst_katedec_debug, "katedec", 0, "Kate decoder"); + GST_DEBUG_CATEGORY_INIT (gst_kateenc_debug, "kateenc", 0, "Kate encoder"); + GST_DEBUG_CATEGORY_INIT (gst_kateparse_debug, "kateparse", 0, "Kate parser"); + GST_DEBUG_CATEGORY_INIT (gst_katetag_debug, "katetag", 0, "Kate tagger"); +#ifdef HAVE_TIGER + GST_DEBUG_CATEGORY_INIT (gst_katetiger_debug, "tiger", 0, + "Kate Tiger renderer"); +#endif + + /* if we don't build tiger, we'll want to autoplug and convert to text, + but if we do build tiger, we'll want to use it preferentially as it + can play non text streams too */ + if (!gst_element_register (plugin, "katedec", GST_RANK_PRIMARY, + GST_TYPE_KATE_DEC)) + return FALSE; + + if (!gst_element_register (plugin, "kateenc", GST_RANK_NONE, + GST_TYPE_KATE_ENC)) + return FALSE; + + if (!gst_element_register (plugin, "kateparse", GST_RANK_NONE, + GST_TYPE_KATE_PARSE)) + return FALSE; + + if (!gst_element_register (plugin, "katetag", GST_RANK_NONE, + GST_TYPE_KATE_TAG)) + return FALSE; + +#ifdef HAVE_TIGER + if (!gst_element_register (plugin, "tiger", GST_RANK_NONE, + GST_TYPE_KATE_TIGER)) + return FALSE; +#endif + + return TRUE; +} + +/* this is the structure that gstreamer looks for to register plugins + */ +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + "kate", + "Kate plugin", + plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/ext/kate/gstkate.h b/ext/kate/gstkate.h new file mode 100644 index 00000000..ee69590f --- /dev/null +++ b/ext/kate/gstkate.h @@ -0,0 +1,55 @@ +/* + * GStreamer + * Copyright (C) 2008 Vincent Penquerc'h + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Alternatively, the contents of this file may be used under the + * GNU Lesser General Public License Version 2.1 (the "LGPL"), in + * which case the following provisions apply instead of the ones + * mentioned above: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_KATE_H__ +#define __GST_KATE_H__ + +#include + +G_BEGIN_DECLS + +#define GST_KATE_MIME_TYPE "application/x-kate" + +G_END_DECLS + +#endif /* __GST_KATE_H__ */ diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c new file mode 100644 index 00000000..851bab2c --- /dev/null +++ b/ext/kate/gstkatedec.c @@ -0,0 +1,318 @@ +/* + * GStreamer + * Copyright 2005 Thomas Vander Stichele + * Copyright 2005 Ronald S. Bultje + * Copyright 2008 Vincent Penquerc'h + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Alternatively, the contents of this file may be used under the + * GNU Lesser General Public License Version 2.1 (the "LGPL"), in + * which case the following provisions apply instead of the ones + * mentioned above: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:element-katedec + * @see_also: oggdemux + * + * + * + * This element decodes Kate streams + * Kate is a free codec + * for text based data, such as subtitles. Any number of kate streams can be + * embedded in an Ogg stream. + * + * + * libkate (see above url) is needed to build this plugin. + * + * Example pipeline + * + * This explicitely decodes a Kate stream: + * + * gst-launch filesrc location=test.ogg ! oggdemux ! katedec ! fakesink silent=TRUE + * + * + * + * This will automatically detect and use any Kate streams multiplexed + * in an Ogg stream: + * + * gst-launch playbin uri=file:///tmp/test.ogg + * + * + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +#include "gstkate.h" +#include "gstkatedec.h" + +GST_DEBUG_CATEGORY_EXTERN (gst_katedec_debug); +#define GST_CAT_DEFAULT gst_katedec_debug + +/* Filter signals and args */ +enum +{ + /* FILL ME */ + LAST_SIGNAL +}; + +enum +{ + ARG_REMOVE_MARKUP = DECODER_BASE_ARG_COUNT +}; + +static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + ); + +static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("text/plain; text/x-pango-markup") + ); + +GST_BOILERPLATE (GstKateDec, gst_kate_dec, GstElement, GST_TYPE_ELEMENT); + +static void gst_kate_dec_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_kate_dec_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); + +static GstFlowReturn gst_kate_dec_chain (GstPad * pad, GstBuffer * buf); +static GstStateChangeReturn gst_kate_dec_change_state (GstElement * element, + GstStateChange transition); +static gboolean gst_kate_dec_sink_query (GstPad * pad, GstQuery * query); + +static void +gst_kate_dec_base_init (gpointer gclass) +{ + static GstElementDetails element_details = + GST_ELEMENT_DETAILS ("Kate stream text decoder", + "Codec/Decoder/Subtitle", + "Decodes Kate text streams", + "Vincent Penquerc'h "); + GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&src_factory)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&sink_factory)); + gst_element_class_set_details (element_class, &element_details); +} + +/* initialize the plugin's class */ +static void +gst_kate_dec_class_init (GstKateDecClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + + gobject_class = (GObjectClass *) klass; + gstelement_class = (GstElementClass *) klass; + + gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_kate_dec_set_property); + gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_kate_dec_get_property); + + gst_kate_util_install_decoder_base_properties (gobject_class); + + g_object_class_install_property (gobject_class, ARG_REMOVE_MARKUP, + g_param_spec_boolean ("remove-markup", "Remove markup", + "Remove markup from decoded text ?", FALSE, G_PARAM_READWRITE)); + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_kate_dec_change_state); +} + +/* initialize the new element + * instantiate pads and add them to element + * set functions + * initialize structure + */ +static void +gst_kate_dec_init (GstKateDec * dec, GstKateDecClass * gclass) +{ + GST_DEBUG_OBJECT (dec, "gst_kate_dec_init"); + + dec->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); + gst_pad_set_chain_function (dec->sinkpad, + GST_DEBUG_FUNCPTR (gst_kate_dec_chain)); + gst_pad_set_query_function (dec->sinkpad, + GST_DEBUG_FUNCPTR (gst_kate_dec_sink_query)); + gst_pad_use_fixed_caps (dec->sinkpad); + gst_pad_set_caps (dec->sinkpad, + gst_static_pad_template_get_caps (&sink_factory)); + gst_element_add_pad (GST_ELEMENT (dec), dec->sinkpad); + + dec->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); + gst_element_add_pad (GST_ELEMENT (dec), dec->srcpad); + + gst_kate_util_decode_base_init (&dec->decoder); + + dec->remove_markup = FALSE; +} + +static void +gst_kate_dec_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + switch (prop_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_kate_dec_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstKateDec *kd = GST_KATE_DEC (object); + + switch (prop_id) { + case ARG_REMOVE_MARKUP: + g_value_set_boolean (value, kd->remove_markup); + break; + default: + if (!gst_kate_util_decoder_base_get_property (&kd->decoder, object, + prop_id, value, pspec)) { + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } + break; + } +} + +/* GstElement vmethod implementations */ + +/* chain function + * this function does the actual processing + */ + +static GstFlowReturn +gst_kate_dec_chain (GstPad * pad, GstBuffer * buf) +{ + GstKateDec *kd = GST_KATE_DEC (gst_pad_get_parent (pad)); + const kate_event *ev = NULL; + GstFlowReturn rflow = GST_FLOW_OK; + + rflow = + gst_kate_util_decoder_base_chain_kate_packet (&kd->decoder, + GST_ELEMENT_CAST (kd), pad, buf, kd->srcpad, &ev); + if (G_UNLIKELY (rflow != GST_FLOW_OK)) { + gst_object_unref (kd); + gst_buffer_unref (buf); + return rflow; + } + + if (ev) { + gchar *escaped; + GstBuffer *buffer; + size_t len; + + if (kd->remove_markup && ev->text_markup_type != kate_markup_none) { + size_t len0 = ev->len + 1; + escaped = g_strdup (ev->text); + if (escaped) { + kate_text_remove_markup (ev->text_encoding, escaped, &len0); + } + } else if (ev->text_markup_type == kate_markup_none) { + /* no pango markup yet, escape text */ + /* TODO: actually do the pango thing */ + escaped = g_markup_printf_escaped ("%s", ev->text); + } else { + escaped = g_strdup (ev->text); + } + + if (G_LIKELY (escaped)) { + len = strlen (escaped); + GST_DEBUG_OBJECT (kd, "kate event: %s, escaped %s", ev->text, escaped); + buffer = gst_buffer_new_and_alloc (len + 1); + if (G_LIKELY (buffer)) { + /* allocate and copy the NULs, but don't include them in passed size */ + memcpy (GST_BUFFER_DATA (buffer), escaped, len + 1); + GST_BUFFER_SIZE (buffer) = len; + GST_BUFFER_TIMESTAMP (buffer) = ev->start_time * GST_SECOND; + GST_BUFFER_DURATION (buffer) = + (ev->end_time - ev->start_time) * GST_SECOND; + gst_buffer_set_caps (buffer, GST_PAD_CAPS (kd->srcpad)); + rflow = gst_pad_push (kd->srcpad, buffer); + if (rflow == GST_FLOW_NOT_LINKED) { + GST_DEBUG_OBJECT (kd, "source pad not linked, ignored"); + } else if (rflow != GST_FLOW_OK) { + GST_WARNING_OBJECT (kd, "failed to push buffer: %s", + gst_flow_get_name (rflow)); + } + } else { + GST_WARNING_OBJECT (kd, "failed to create buffer"); + rflow = GST_FLOW_ERROR; + } + g_free (escaped); + } else { + GST_WARNING_OBJECT (kd, "failed to allocate string"); + rflow = GST_FLOW_ERROR; + } + } + + gst_object_unref (kd); + gst_buffer_unref (buf); + return rflow; +} + +static GstStateChangeReturn +gst_kate_dec_change_state (GstElement * element, GstStateChange transition) +{ + GstKateDec *kd = GST_KATE_DEC (element); + return gst_kate_decoder_base_change_state (&kd->decoder, element, + parent_class, transition); +} + +gboolean +gst_kate_dec_sink_query (GstPad * pad, GstQuery * query) +{ + GstKateDec *kd = GST_KATE_DEC (gst_pad_get_parent (pad)); + gboolean res = + gst_kate_decoder_base_sink_query (&kd->decoder, GST_ELEMENT_CAST (kd), + pad, query); + gst_object_unref (kd); + return res; +} diff --git a/ext/kate/gstkatedec.h b/ext/kate/gstkatedec.h new file mode 100644 index 00000000..a7011ecb --- /dev/null +++ b/ext/kate/gstkatedec.h @@ -0,0 +1,88 @@ +/* + * GStreamer + * Copyright 2005 Thomas Vander Stichele + * Copyright 2005 Ronald S. Bultje + * Copyright 2008 Vincent Penquerc'h + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Alternatively, the contents of this file may be used under the + * GNU Lesser General Public License Version 2.1 (the "LGPL"), in + * which case the following provisions apply instead of the ones + * mentioned above: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_KATE_DEC_H__ +#define __GST_KATE_DEC_H__ + +#include +#include +#include "gstkateutil.h" + +G_BEGIN_DECLS +/* #defines don't like whitespacey bits */ +#define GST_TYPE_KATE_DEC \ + (gst_kate_dec_get_type()) +#define GST_KATE_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KATE_DEC,GstKateDec)) +#define GST_KATE_DEC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KATE,GstKateDecClass)) +#define GST_IS_KATE_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KATE_DEC)) +#define GST_IS_KATE_DEC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KATE_DEC)) +typedef struct _GstKateDec GstKateDec; +typedef struct _GstKateDecClass GstKateDecClass; + +struct _GstKateDec +{ + GstElement element; + + GstPad *sinkpad; + GstPad *srcpad; + + GstKateDecoderBase decoder; + + gboolean remove_markup; +}; + +struct _GstKateDecClass +{ + GstElementClass parent_class; +}; + +GType gst_kate_dec_get_type (void); + +G_END_DECLS +#endif /* __GST_KATE_DEC_H__ */ diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c new file mode 100644 index 00000000..26eff02b --- /dev/null +++ b/ext/kate/gstkateenc.c @@ -0,0 +1,1834 @@ +/* + * GStreamer + * Copyright 2005 Thomas Vander Stichele + * Copyright 2005 Ronald S. Bultje + * Copyright (C) 2007 Fluendo S.A. + * Copyright 2008 Vincent Penquerc'h + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Alternatively, the contents of this file may be used under the + * GNU Lesser General Public License Version 2.1 (the "LGPL"), in + * which case the following provisions apply instead of the ones + * mentioned above: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:element-kateenc + * @see_also: oggmux + * + * + * + * This element encodes Kate streams + * Kate is a free codec + * for text based data, such as subtitles. Any number of kate streams can be + * embedded in an Ogg stream. + * + * + * libkate (see above url) is needed to build this plugin. + * + * Example pipeline + * + * This encodes a DVD SPU track to a Kate stream: + * + * gst-launch dvdreadsrc ! dvddemux ! dvdsubparse ! kateenc ! oggmux ! filesink location=test.ogg + * + * + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include + +#include "gstkate.h" +#include "gstkateutil.h" +#include "gstkateenc.h" + +GST_DEBUG_CATEGORY_EXTERN (gst_kateenc_debug); +#define GST_CAT_DEFAULT gst_kateenc_debug + +/* Filter signals and args */ +enum +{ + /* FILL ME */ + LAST_SIGNAL +}; + +enum +{ + ARG_0, + ARG_LANGUAGE, + ARG_CATEGORY, + ARG_GRANULE_RATE_NUM, + ARG_GRANULE_RATE_DEN, + ARG_GRANULE_SHIFT, + ARG_KEEPALIVE_MIN_TIME, + ARG_ORIGINAL_CANVAS_WIDTH, + ARG_ORIGINAL_CANVAS_HEIGHT, + ARG_DEFAULT_SPU_DURATION, +}; + +/* taken off the dvdsubdec element */ +static const guint32 gst_kate_enc_default_clut[16] = { + 0xb48080, 0x248080, 0x628080, 0xd78080, + 0x808080, 0x808080, 0x808080, 0x808080, + 0x808080, 0x808080, 0x808080, 0x808080, + 0x808080, 0x808080, 0x808080, 0x808080 +}; + +#define GST_KATE_UINT16_BE(ptr) ( ( ((guint16)((ptr)[0])) <<8) | ((ptr)[1]) ) + +/* taken off the DVD SPU decoder - now is time for today's WTF ???? */ +#define GST_KATE_STM_TO_GST(stm) ((GST_MSECOND * 1024 * (stm)) / 90) + +#define DEFAULT_KEEPALIVE_MIN_TIME 2.5f +#define DEFAULT_DEFAULT_SPU_DURATION 1.5f + +#define GST_KATE_SPU_MIME_TYPE "video/x-dvd-subpicture" + +static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("text/plain; text/x-pango-markup; " GST_KATE_SPU_MIME_TYPE) + ); + +static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + ); + +static void gst_kate_enc_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_kate_enc_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); +static void gst_kate_enc_dispose (GObject * object); + +static GstFlowReturn gst_kate_enc_chain (GstPad * pad, GstBuffer * buf); +static GstStateChangeReturn gst_kate_enc_change_state (GstElement * element, + GstStateChange transition); +static gboolean gst_kate_enc_sink_event (GstPad * pad, GstEvent * event); +static const GstQueryType *gst_kate_enc_source_query_type (GstPad * pad); +static gboolean gst_kate_enc_source_query (GstPad * pad, GstQuery * query); +static void gst_kate_enc_add_interfaces (GType kateenc_type); + +GST_BOILERPLATE_FULL (GstKateEnc, gst_kate_enc, GstElement, + GST_TYPE_ELEMENT, gst_kate_enc_add_interfaces); + +static void +gst_kate_enc_base_init (gpointer gclass) +{ + static const GstElementDetails element_details = + GST_ELEMENT_DETAILS ("Kate stream encoder", + "Codec/Encoder/Subtitle", + "Encodes Kate streams from text or subpictures", + "Vincent Penquerc'h "); + GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&src_factory)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&sink_factory)); + gst_element_class_set_details (element_class, &element_details); +} + +/* initialize the plugin's class */ +static void +gst_kate_enc_class_init (GstKateEncClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + + gobject_class = (GObjectClass *) klass; + gstelement_class = (GstElementClass *) klass; + + parent_class = g_type_class_peek_parent (klass); + + gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_kate_enc_set_property); + gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_kate_enc_get_property); + gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_kate_enc_dispose); + + g_object_class_install_property (gobject_class, ARG_LANGUAGE, + g_param_spec_string ("language", "Language", + "Set the language of the stream", "", G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_CATEGORY, + g_param_spec_string ("category", "Category", + "Set the category of the stream", "", G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_GRANULE_RATE_NUM, + g_param_spec_int ("granule-rate-numerator", "Granule rate numerator", + "Set the numerator of the granule rate", + 1, G_MAXINT, 1, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_GRANULE_RATE_DEN, + g_param_spec_int ("granule-rate-denominator", "Granule rate denominator", + "Set the denominator of the granule rate", + 1, G_MAXINT, 1000, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_GRANULE_SHIFT, + g_param_spec_int ("granule-shift", "Granule shift", + "Set the granule shift", 0, 64, 32, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_ORIGINAL_CANVAS_WIDTH, + g_param_spec_int ("original-canvas-width", "Original canvas width", + "Set the width of the canvas this stream was authored for (0 is unspecified)", + 0, G_MAXINT, 0, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_ORIGINAL_CANVAS_HEIGHT, + g_param_spec_int ("original-canvas-height", "Original canvas height", + "Set the height of the canvas this stream was authored for (0 is unspecified)", + 0, G_MAXINT, 0, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_KEEPALIVE_MIN_TIME, + g_param_spec_float ("keepalive-min-time", "Keepalive mimimum time", + "Set minimum time to emit keepalive packets (0 disables keepalive packets)", + 0.0f, FLT_MAX, DEFAULT_KEEPALIVE_MIN_TIME, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_SPU_DURATION, + g_param_spec_float ("default-spu-duration", "Default SPU duration", + "Set the assumed max duration (in seconds) of SPUs with no duration specified", + 0.0f, FLT_MAX, DEFAULT_DEFAULT_SPU_DURATION, G_PARAM_READWRITE)); + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_kate_enc_change_state); +} + +static void +gst_kate_enc_add_interfaces (GType kateenc_type) +{ + static const GInterfaceInfo tag_setter_info = { NULL, NULL, NULL }; + + g_type_add_interface_static (kateenc_type, GST_TYPE_TAG_SETTER, + &tag_setter_info); +} + +/* initialize the new element + * instantiate pads and add them to element + * set functions + * initialize structure + */ +static void +gst_kate_enc_init (GstKateEnc * ke, GstKateEncClass * gclass) +{ + GST_DEBUG_OBJECT (ke, "gst_kate_enc_init"); + + ke->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); + gst_pad_set_chain_function (ke->sinkpad, + GST_DEBUG_FUNCPTR (gst_kate_enc_chain)); + gst_pad_set_event_function (ke->sinkpad, + GST_DEBUG_FUNCPTR (gst_kate_enc_sink_event)); + gst_element_add_pad (GST_ELEMENT (ke), ke->sinkpad); + + ke->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); + gst_pad_set_query_type_function (ke->srcpad, + GST_DEBUG_FUNCPTR (gst_kate_enc_source_query_type)); + gst_pad_set_query_function (ke->srcpad, + GST_DEBUG_FUNCPTR (gst_kate_enc_source_query)); + gst_element_add_pad (GST_ELEMENT (ke), ke->srcpad); + + ke->initialized = FALSE; + ke->headers_sent = FALSE; + ke->last_timestamp = 0; + ke->latest_end_time = 0; + ke->language = NULL; + ke->category = NULL; + ke->granule_rate_numerator = 1000; + ke->granule_rate_denominator = 1; + ke->granule_shift = 32; + ke->original_canvas_width = 0; + ke->original_canvas_height = 0; + ke->keepalive_min_time = DEFAULT_KEEPALIVE_MIN_TIME; + ke->default_spu_duration = DEFAULT_DEFAULT_SPU_DURATION; + memcpy (ke->spu_clut, gst_kate_enc_default_clut, + sizeof (gst_kate_enc_default_clut)); + ke->delayed_spu = FALSE; +} + +static void +gst_kate_enc_dispose (GObject * object) +{ + GstKateEnc *ke = GST_KATE_ENC (object); + + GST_LOG_OBJECT (ke, "disposing"); + + if (ke->language) { + g_free (ke->language); + ke->language = NULL; + } + if (ke->category) { + g_free (ke->category); + ke->category = NULL; + } + + GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); +} + +static void +gst_kate_enc_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstKateEnc *ke = GST_KATE_ENC (object); + const char *str; + + switch (prop_id) { + case ARG_LANGUAGE: + if (ke->language) { + g_free (ke->language); + ke->language = NULL; + } + str = g_value_get_string (value); + if (str) + ke->language = g_strdup (str); + break; + case ARG_CATEGORY: + if (ke->category) { + g_free (ke->category); + ke->category = NULL; + } + str = g_value_get_string (value); + if (str) + ke->category = g_strdup (str); + break; + case ARG_GRANULE_RATE_NUM: + ke->granule_rate_numerator = g_value_get_int (value); + break; + case ARG_GRANULE_RATE_DEN: + ke->granule_rate_denominator = g_value_get_int (value); + break; + case ARG_GRANULE_SHIFT: + ke->granule_rate_denominator = g_value_get_int (value); + break; + case ARG_KEEPALIVE_MIN_TIME: + ke->keepalive_min_time = g_value_get_float (value); + break; + case ARG_ORIGINAL_CANVAS_WIDTH: + ke->original_canvas_width = g_value_get_int (value); + break; + case ARG_ORIGINAL_CANVAS_HEIGHT: + ke->original_canvas_height = g_value_get_int (value); + break; + case ARG_DEFAULT_SPU_DURATION: + ke->default_spu_duration = g_value_get_float (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_kate_enc_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstKateEnc *ke = GST_KATE_ENC (object); + + switch (prop_id) { + case ARG_LANGUAGE: + g_value_set_string (value, ke->language ? ke->language : ""); + break; + case ARG_CATEGORY: + g_value_set_string (value, ke->category ? ke->category : ""); + break; + case ARG_GRANULE_RATE_NUM: + g_value_set_int (value, ke->granule_rate_numerator); + break; + case ARG_GRANULE_RATE_DEN: + g_value_set_int (value, ke->granule_rate_denominator); + break; + case ARG_GRANULE_SHIFT: + g_value_set_int (value, ke->granule_shift); + break; + case ARG_KEEPALIVE_MIN_TIME: + g_value_set_float (value, ke->keepalive_min_time); + break; + case ARG_ORIGINAL_CANVAS_WIDTH: + g_value_set_int (value, ke->original_canvas_width); + break; + case ARG_ORIGINAL_CANVAS_HEIGHT: + g_value_set_int (value, ke->original_canvas_height); + break; + case ARG_DEFAULT_SPU_DURATION: + g_value_set_float (value, ke->default_spu_duration); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +/* GstElement vmethod implementations */ + +static GstBuffer * +gst_kate_enc_create_buffer (GstKateEnc * ke, kate_packet * kp, + kate_int64_t granpos, GstClockTime timestamp, GstClockTime duration, + gboolean header) +{ + GstBuffer *buffer; + + buffer = gst_buffer_new_and_alloc (kp->nbytes); + if (G_UNLIKELY (!buffer)) { + GST_WARNING_OBJECT (ke, "Failed to allocate buffer for %u bytes", + kp->nbytes); + return NULL; + } + + memcpy (GST_BUFFER_DATA (buffer), kp->data, kp->nbytes); + + /* same system as other Ogg codecs, as per ext/ogg/README: + OFFSET_END is the granulepos + OFFSET is its time representation + */ + GST_BUFFER_OFFSET_END (buffer) = granpos; + GST_BUFFER_OFFSET (buffer) = timestamp; + GST_BUFFER_TIMESTAMP (buffer) = timestamp; + GST_BUFFER_DURATION (buffer) = duration; + + /* data packets are each on their own page */ +// if (!header) +// GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); + + return buffer; +} + +static GstFlowReturn +gst_kate_enc_push_buffer (GstKateEnc * ke, GstBuffer * buffer) +{ + GstFlowReturn rflow; + + ke->last_timestamp = GST_BUFFER_TIMESTAMP (buffer); + if (GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer) > + ke->latest_end_time) { + ke->latest_end_time = + GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer); + } + + /* Hack to flush each packet on its own page - taken off the CMML encoder element */ + GST_BUFFER_DURATION (buffer) = G_MAXINT64; + + rflow = gst_pad_push (ke->srcpad, buffer); + if (G_UNLIKELY (rflow != GST_FLOW_OK)) { + GST_ERROR_OBJECT (ke, "Failed to push buffer: %d", rflow); + } + + return rflow; +} + +static GstFlowReturn +gst_kate_enc_push_and_free_kate_packet (GstKateEnc * ke, kate_packet * kp, + kate_int64_t granpos, GstClockTime timestamp, GstClockTime duration, + gboolean header) +{ + GstBuffer *buffer; + + GST_LOG_OBJECT (ke, "Creating buffer, %u bytes", kp->nbytes); + buffer = + gst_kate_enc_create_buffer (ke, kp, granpos, timestamp, duration, header); + if (G_UNLIKELY (!buffer)) { + GST_WARNING_OBJECT (ke, "Failed to create buffer, %u bytes", kp->nbytes); + kate_packet_clear (kp); + return GST_FLOW_ERROR; + } + + kate_packet_clear (kp); + + return gst_kate_enc_push_buffer (ke, buffer); +} + +static void +gst_kate_enc_metadata_set1 (const GstTagList * list, const gchar * tag, + gpointer kateenc) +{ + GstKateEnc *ke = GST_KATE_ENC (kateenc); + GList *vc_list, *l; + + vc_list = gst_tag_to_vorbis_comments (list, tag); + + for (l = vc_list; l != NULL; l = l->next) { + const gchar *vc_string = (const gchar *) l->data; + gchar *key = NULL, *val = NULL; + + GST_LOG_OBJECT (ke, "Kate comment: %s", vc_string); + if (gst_tag_parse_extended_comment (vc_string, &key, NULL, &val, TRUE)) { + kate_comment_add_tag (&ke->kc, key, val); + g_free (key); + g_free (val); + } + } + + g_list_foreach (vc_list, (GFunc) g_free, NULL); + g_list_free (vc_list); +} + +static void +gst_kate_enc_set_metadata (GstKateEnc * ke) +{ + GstTagList *merged_tags; + const GstTagList *user_tags; + + user_tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (ke)); + + GST_DEBUG_OBJECT (ke, "upstream tags = %" GST_PTR_FORMAT, ke->tags); + GST_DEBUG_OBJECT (ke, "user-set tags = %" GST_PTR_FORMAT, user_tags); + + /* gst_tag_list_merge() will handle NULL for either or both lists fine */ + merged_tags = gst_tag_list_merge (user_tags, ke->tags, + gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (ke))); + + if (merged_tags) { + GST_DEBUG_OBJECT (ke, "merged tags = %" GST_PTR_FORMAT, merged_tags); + gst_tag_list_foreach (merged_tags, gst_kate_enc_metadata_set1, ke); + gst_tag_list_free (merged_tags); + } +} + +static GstFlowReturn +gst_kate_enc_send_headers (GstKateEnc * ke) +{ + GstFlowReturn rflow = GST_FLOW_OK; + GstCaps *caps; + GList *headers = NULL, *item; + + gst_kate_enc_set_metadata (ke); + + /* encode headers and store them in a list */ + while (1) { + kate_packet kp; + int ret = kate_encode_headers (&ke->k, &ke->kc, &kp); + if (ret == 0) { + GstBuffer *buffer = + gst_kate_enc_create_buffer (ke, &kp, 0ll, 0ll, 0ll, TRUE); + if (!buffer) { + rflow = GST_FLOW_ERROR; + break; + } + kate_packet_clear (&kp); + + headers = g_list_append (headers, buffer); + } else if (ret > 0) { + GST_LOG_OBJECT (ke, "Last header encoded"); + break; + } else { + GST_LOG_OBJECT (ke, "Error encoding header: %d", ret); + rflow = GST_FLOW_ERROR; + break; + } + } + + if (rflow == GST_FLOW_OK) { + caps = + gst_kate_util_set_header_on_caps (&ke->element, + gst_pad_get_caps (ke->srcpad), headers); + if (caps) { + GST_DEBUG_OBJECT (ke, "here are the caps: %" GST_PTR_FORMAT, caps); + gst_pad_set_caps (ke->srcpad, caps); + + GST_LOG_OBJECT (ke, "setting caps on headers"); + item = headers; + while (item) { + GstBuffer *buffer = item->data; + GST_LOG_OBJECT (ke, "settings caps on header %p", buffer); + gst_buffer_set_caps (buffer, caps); + item = item->next; + } + + gst_caps_unref (caps); + + GST_LOG_OBJECT (ke, "pushing headers"); + item = headers; + while (item) { + GstBuffer *buffer = item->data; + GST_LOG_OBJECT (ke, "pushing header %p", buffer); + gst_kate_enc_push_buffer (ke, buffer); + item = item->next; + } + } else { + GST_ERROR_OBJECT (ke, "Failed to set headers on caps"); + } + } + + g_list_free (headers); + + return rflow; +} + +static GstFlowReturn +gst_kate_enc_flush_headers (GstKateEnc * ke) +{ + GstFlowReturn rflow = GST_FLOW_OK; + if (!ke->headers_sent) { + GST_INFO_OBJECT (ke, "headers not yet sent, flushing"); + rflow = gst_kate_enc_send_headers (ke); + if (rflow == GST_FLOW_OK) { + ke->headers_sent = TRUE; + GST_INFO_OBJECT (ke, "headers flushed"); + } else { + GST_WARNING_OBJECT (ke, "Failed to flush headers: %d", rflow); + } + } + return rflow; +} + +enum SpuCmd +{ + SPU_CMD_FSTA_DSP = 0x00, /* Forced Display */ + SPU_CMD_DSP = 0x01, /* Display Start */ + SPU_CMD_STP_DSP = 0x02, /* Display Off */ + SPU_CMD_SET_COLOR = 0x03, /* Set the color indexes for the palette */ + SPU_CMD_SET_ALPHA = 0x04, /* Set the alpha indexes for the palette */ + SPU_CMD_SET_DAREA = 0x05, /* Set the display area for the SPU */ + SPU_CMD_DSPXA = 0x06, /* Pixel data addresses */ + SPU_CMD_CHG_COLCON = 0x07, /* Change Color & Contrast */ + SPU_CMD_END = 0xff +}; + +static void +gst_kate_enc_decode_colormap (GstKateEnc * ke, const guint8 * ptr) +{ + ke->spu_colormap[3] = ptr[0] >> 4; + ke->spu_colormap[2] = ptr[0] & 0x0f; + ke->spu_colormap[1] = ptr[1] >> 4; + ke->spu_colormap[0] = ptr[1] & 0x0f; +} + +static void +gst_kate_enc_decode_alpha (GstKateEnc * ke, const guint8 * ptr) +{ + ke->spu_alpha[3] = ptr[0] >> 4; + ke->spu_alpha[2] = ptr[0] & 0x0f; + ke->spu_alpha[1] = ptr[1] >> 4; + ke->spu_alpha[0] = ptr[1] & 0x0f; +} + +static void +gst_kate_enc_decode_area (GstKateEnc * ke, const guint8 * ptr) +{ + ke->spu_left = ((((guint16) ptr[0]) & 0x3f) << 4) | (ptr[1] >> 4); + ke->spu_top = ((((guint16) ptr[3]) & 0x3f) << 4) | (ptr[4] >> 4); + ke->spu_right = ((((guint16) ptr[1]) & 0x03) << 8) | ptr[2]; + ke->spu_bottom = ((((guint16) ptr[4]) & 0x03) << 8) | ptr[5]; + GST_DEBUG_OBJECT (ke, "SPU area %u %u -> %u %d", ke->spu_left, ke->spu_top, + ke->spu_right, ke->spu_bottom); +} + +static void +gst_kate_enc_decode_pixaddr (GstKateEnc * ke, const guint8 * ptr) +{ + ke->spu_pix_data[0] = GST_KATE_UINT16_BE (ptr + 0); + ke->spu_pix_data[1] = GST_KATE_UINT16_BE (ptr + 2); +} + +/* heavily inspired from dvdspudec */ +static guint16 +gst_kate_enc_decode_colcon (GstKateEnc * ke, const guint8 * ptr) +{ + guint16 nbytes = GST_KATE_UINT16_BE (ptr + 0); + guint16 nbytes_left = nbytes; + + GST_LOG_OBJECT (ke, "Number of bytes in color/contrast change command is %u", + nbytes); + if (G_UNLIKELY (nbytes < 2)) { + GST_WARNING_OBJECT (ke, + "Number of bytes in color/contrast change command is %u, should be at least 2", + nbytes); + return 0; + } + + ptr += 2; + nbytes_left -= 2; + + /* we will just skip that data for now */ + while (nbytes_left > 0) { + guint32 entry, nchanges, sz; + GST_LOG_OBJECT (ke, "Reading a color/contrast change entry, %u bytes left", + nbytes_left); + if (G_UNLIKELY (nbytes_left < 4)) { + GST_WARNING_OBJECT (ke, + "Not enough bytes to read a full color/contrast entry header"); + break; + } + entry = GST_READ_UINT32_BE (ptr); + GST_LOG_OBJECT (ke, "Color/contrast change entry header is %08x", entry); + nchanges = CLAMP ((ptr[2] >> 4), 1, 8); + ptr += 4; + nbytes_left -= 4; + if (entry == 0x0fffffff) { + GST_LOG_OBJECT (ke, + "Encountered color/contrast change termination code, breaking, %u bytes left", + nbytes_left); + break; + } + GST_LOG_OBJECT (ke, "Color/contrast change entry has %u changes", nchanges); + sz = 6 * nchanges; + if (G_UNLIKELY (sz > nbytes_left)) { + GST_WARNING_OBJECT (ke, + "Not enough bytes to read a full color/contrast entry"); + break; + } + ptr += sz; + nbytes_left -= sz; + } + return nbytes - nbytes_left; +} + +static inline guint8 +gst_kate_enc_get_nybble (const guint8 * nybbles, size_t * nybble_offset) +{ + guint8 ret; + + ret = nybbles[(*nybble_offset) / 2]; + + /* If the offset is even, we shift the answer down 4 bits, otherwise not */ + if ((*nybble_offset) & 0x01) + ret &= 0x0f; + else + ret = ret >> 4; + + (*nybble_offset)++; + + return ret; +} + +static guint16 +gst_kate_enc_get_rle_code (const guint8 * nybbles, size_t * nybble_offset) +{ + guint16 code; + + code = gst_kate_enc_get_nybble (nybbles, nybble_offset); + if (code < 0x4) { /* 4 .. f */ + code = (code << 4) | gst_kate_enc_get_nybble (nybbles, nybble_offset); + if (code < 0x10) { /* 1x .. 3x */ + code = (code << 4) | gst_kate_enc_get_nybble (nybbles, nybble_offset); + if (code < 0x40) { /* 04x .. 0fx */ + code = (code << 4) | gst_kate_enc_get_nybble (nybbles, nybble_offset); + } + } + } + return code; +} + +static void +gst_kate_enc_crop_bitmap (GstKateEnc * ke, kate_bitmap * kb, guint16 * dx, + guint16 * dy) +{ + int top, bottom, left, right; + guint8 zero = 0; + size_t n, x, y, w, h; + +#if 0 + /* find the zero */ + zero = kb->pixels[0]; + for (x = 0; x < kb->width; ++x) { + if (kb->pixels[x] != zero) { + GST_LOG_OBJECT (ke, "top line at %u is not zero: %u", x, kb->pixels[x]); + return; + } + } +#endif + + /* top */ + for (top = 0; top < kb->height; ++top) { + int empty = 1; + for (x = 0; x < kb->width; ++x) { + if (G_UNLIKELY (kb->pixels[x + top * kb->width] != zero)) { + empty = 0; + break; + } + } + if (!empty) + break; + } + + /* bottom */ + for (bottom = kb->height - 1; bottom >= top; --bottom) { + int empty = 1; + for (x = 0; x < kb->width; ++x) { + if (G_UNLIKELY (kb->pixels[x + bottom * kb->width] != zero)) { + empty = 0; + break; + } + } + if (!empty) + break; + } + + /* left */ + for (left = 0; left < kb->width; ++left) { + int empty = 1; + for (y = top; y <= bottom; ++y) { + if (G_UNLIKELY (kb->pixels[left + y * kb->width] != zero)) { + empty = 0; + break; + } + } + if (!empty) + break; + } + + /* right */ + for (right = kb->width - 1; right >= left; --right) { + int empty = 1; + for (y = top; y <= bottom; ++y) { + if (G_UNLIKELY (kb->pixels[right + y * kb->width] != zero)) { + empty = 0; + break; + } + } + if (!empty) + break; + } + + + w = right - left + 1; + h = bottom - top + 1; + GST_LOG_OBJECT (ke, "cropped from %zu %zu to %zu %zu", kb->width, kb->height, + w, h); + *dx += left; + *dy += top; + n = 0; + for (y = 0; y < h; ++y) { + memmove (kb->pixels + n, kb->pixels + kb->width * (y + top) + left, w); + n += w; + } + kb->width = w; + kb->height = h; +} + +#define CHECK(x) do { guint16 _ = (x); if (G_UNLIKELY((_) > sz)) { GST_WARNING_OBJECT (ke, "SPU overflow"); return GST_FLOW_ERROR; } } while (0) +#define ADVANCE(x) do { guint16 _ = (x); ptr += (_); sz -= (_); } while (0) +#define IGNORE(x) do { guint16 __ = (x); CHECK (__); ADVANCE (__); } while (0) + +static GstFlowReturn +gst_kate_enc_decode_command_sequence (GstKateEnc * ke, GstBuffer * buf, + guint16 command_sequence_offset) +{ + guint16 date; + guint16 next_command_sequence; + const guint8 *ptr; + guint16 sz; + + if (command_sequence_offset >= GST_BUFFER_SIZE (buf)) { + GST_WARNING_OBJECT (ke, "Command sequence offset %u is out of range %u", + command_sequence_offset, GST_BUFFER_SIZE (buf)); + return GST_FLOW_ERROR; + } + + ptr = GST_BUFFER_DATA (buf) + command_sequence_offset; + sz = GST_BUFFER_SIZE (buf) - command_sequence_offset; + + GST_DEBUG_OBJECT (ke, "Decoding command sequence at %u (%u bytes)", + command_sequence_offset, sz); + + CHECK (2); + date = GST_KATE_UINT16_BE (ptr); + ADVANCE (2); + GST_DEBUG_OBJECT (ke, "date %u", date); + + CHECK (2); + next_command_sequence = GST_KATE_UINT16_BE (ptr); + ADVANCE (2); + GST_DEBUG_OBJECT (ke, "next command sequence at %u", next_command_sequence); + + while (sz) { + guint8 cmd = *ptr++; + switch (cmd) { + case SPU_CMD_FSTA_DSP: /* 0x00 */ + GST_DEBUG_OBJECT (ke, "[0] DISPLAY"); + break; + case SPU_CMD_DSP: /* 0x01 */ + GST_DEBUG_OBJECT (ke, "[1] SHOW"); + ke->show_time = date; + break; + case SPU_CMD_STP_DSP: /* 0x02 */ + GST_DEBUG_OBJECT (ke, "[2] HIDE"); + ke->hide_time = date; + break; + case SPU_CMD_SET_COLOR: /* 0x03 */ + GST_DEBUG_OBJECT (ke, "[3] SET COLOR"); + CHECK (2); + gst_kate_enc_decode_colormap (ke, ptr); + ADVANCE (2); + break; + case SPU_CMD_SET_ALPHA: /* 0x04 */ + GST_DEBUG_OBJECT (ke, "[4] SET ALPHA"); + CHECK (2); + gst_kate_enc_decode_alpha (ke, ptr); + ADVANCE (2); + break; + case SPU_CMD_SET_DAREA: /* 0x05 */ + GST_DEBUG_OBJECT (ke, "[5] SET DISPLAY AREA"); + CHECK (6); + gst_kate_enc_decode_area (ke, ptr); + ADVANCE (6); + break; + case SPU_CMD_DSPXA: /* 0x06 */ + GST_DEBUG_OBJECT (ke, "[6] SET PIXEL ADDRESSES"); + CHECK (4); + gst_kate_enc_decode_pixaddr (ke, ptr); + GST_DEBUG_OBJECT (ke, " -> first pixel address %u", + ke->spu_pix_data[0]); + GST_DEBUG_OBJECT (ke, " -> second pixel address %u", + ke->spu_pix_data[1]); + ADVANCE (4); + break; + case SPU_CMD_CHG_COLCON: /* 0x07 */ + GST_DEBUG_OBJECT (ke, "[7] CHANGE COLOR/CONTRAST"); + CHECK (2); + ADVANCE (gst_kate_enc_decode_colcon (ke, ptr)); + break; + case SPU_CMD_END: /* 0xff */ + GST_DEBUG_OBJECT (ke, "[0xff] END"); + if (next_command_sequence != command_sequence_offset) { + GST_DEBUG_OBJECT (ke, "Jumping to next sequence at offset %u", + next_command_sequence); + return gst_kate_enc_decode_command_sequence (ke, buf, + next_command_sequence); + } else { + GST_DEBUG_OBJECT (ke, "No more sequences to decode"); + return GST_FLOW_OK; + } + break; + default: + GST_WARNING_OBJECT (ke, "invalid SPU command: %u", cmd); + return GST_FLOW_ERROR; + } + } + return GST_FLOW_ERROR; +} + +static inline int +gst_kate_enc_clamp (int value) +{ + if (value < 0) + return 0; + if (value > 255) + return 255; + return value; +} + +static void +gst_kate_enc_yuv2rgb (int y, int u, int v, int *r, int *g, int *b) +{ +#if 0 + *r = gst_kate_enc_clamp (y + 1.371 * v); + *g = gst_kate_enc_clamp (y - 0.698 * v - 0.336 * u); + *b = gst_kate_enc_clamp (y + 1.732 * u); +#elif 0 + *r = gst_kate_enc_clamp (y + u); + *g = gst_kate_enc_clamp (y - (76 * u - 26 * v) / 256); + *b = gst_kate_enc_clamp (y + v); +#else + y = (y - 16) * 255 / 219; + u -= 128; + v -= 128; + + *r = gst_kate_enc_clamp (y + 1.402 * 255 / 224 * v); + *g = gst_kate_enc_clamp (y + 0.34414 * 255 / 224 * v - + 0.71414 * 255 / 224 * u); + *b = gst_kate_enc_clamp (y + 1.772 * 244 / 224 * u); +#endif +} + +static GstFlowReturn +gst_kate_enc_create_spu_palette (GstKateEnc * ke, kate_palette * kp) +{ + size_t n; + + kate_palette_init (kp); + kp->ncolors = 4; + kp->colors = (kate_color *) g_malloc (kp->ncolors * sizeof (kate_color)); + if (G_UNLIKELY (!kp->colors)) + return GST_FLOW_ERROR; + +#if 1 + for (n = 0; n < kp->ncolors; ++n) { + int idx = ke->spu_colormap[n]; + guint32 color = ke->spu_clut[idx]; + int y = (color >> 16) & 0xff; + int v = (color >> 8) & 0xff; + int u = color & 0xff; + int r, g, b; + gst_kate_enc_yuv2rgb (y, u, v, &r, &g, &b); + kp->colors[n].r = r; + kp->colors[n].g = g; + kp->colors[n].b = b; + kp->colors[n].a = ke->spu_alpha[n] * 17; + } +#else + /* just make a ramp from 0 to 255 for those non transparent colors */ + for (n = 0; n < kp->ncolors; ++n) + if (ke->spu_alpha[n] == 0) + ++ntrans; + + for (n = 0; n < kp->ncolors; ++n) { + kp->colors[n].r = luma; + kp->colors[n].g = luma; + kp->colors[n].b = luma; + kp->colors[n].a = ke->spu_alpha[n] * 17; + if (ke->spu_alpha[n]) + luma /= 2; + } +#endif + + return GST_FLOW_OK; +} + +static GstFlowReturn +gst_kate_enc_decode_spu (GstKateEnc * ke, GstBuffer * buf, kate_region * kr, + kate_bitmap * kb, kate_palette * kp) +{ + const guint8 *ptr = GST_BUFFER_DATA (buf); + size_t sz = GST_BUFFER_SIZE (buf); + guint16 packet_size; + guint16 x, y; + size_t n; + guint8 *pixptr[2]; + size_t nybble_offset[2]; + size_t max_nybbles[2]; + GstFlowReturn rflow; + guint16 next_command_sequence; + guint16 code; + + /* before decoding anything, initialize to sensible defaults */ + memset (ke->spu_colormap, 0, sizeof (ke->spu_colormap)); + memset (ke->spu_alpha, 0, sizeof (ke->spu_alpha)); + ke->spu_top = ke->spu_left = 1; + ke->spu_bottom = ke->spu_right = 0; + ke->spu_pix_data[0] = ke->spu_pix_data[1] = 0; + ke->show_time = ke->hide_time = 0; + + /* read sizes and get to the start of the data */ + CHECK (2); + packet_size = GST_KATE_UINT16_BE (ptr); + ADVANCE (2); + GST_DEBUG_OBJECT (ke, "packet size %u (GstBuffer size %u)", packet_size, + GST_BUFFER_SIZE (buf)); + + CHECK (2); + next_command_sequence = GST_KATE_UINT16_BE (ptr); + ADVANCE (2); + ptr = GST_BUFFER_DATA (buf) + next_command_sequence; + sz = GST_BUFFER_SIZE (buf) - next_command_sequence; + GST_DEBUG_OBJECT (ke, "next command sequence at %u for %u", + next_command_sequence, sz); + + rflow = gst_kate_enc_decode_command_sequence (ke, buf, next_command_sequence); + if (G_UNLIKELY (rflow != GST_FLOW_OK)) + return rflow; + + /* if no addresses or sizes were given, or if they define an empty SPU, nothing more to do */ + if (G_UNLIKELY (ke->spu_right - ke->spu_left < 0 + || ke->spu_bottom - ke->spu_top < 0 || ke->spu_pix_data[0] == 0 + || ke->spu_pix_data[1] == 0)) { + GST_WARNING_OBJECT (ke, "SPU area is empty, nothing to encode"); + return GST_FLOW_ERROR; + } + + /* create the palette */ + rflow = gst_kate_enc_create_spu_palette (ke, kp); + if (G_UNLIKELY (rflow != GST_FLOW_OK)) + return rflow; + + /* create the bitmap */ + kate_bitmap_init (kb); + kb->width = ke->spu_right - ke->spu_left + 1; + kb->height = ke->spu_bottom - ke->spu_top + 1; + kb->bpp = 2; + kb->type = kate_bitmap_type_paletted; + kb->pixels = (unsigned char *) g_malloc (kb->width * kb->height); + if (G_UNLIKELY (!kb->pixels)) { + GST_WARNING_OBJECT (ke, "Failed to allocate memory for pixel data"); + return GST_FLOW_ERROR; + } + + n = 0; + pixptr[0] = GST_BUFFER_DATA (buf) + ke->spu_pix_data[0]; + pixptr[1] = GST_BUFFER_DATA (buf) + ke->spu_pix_data[1]; + nybble_offset[0] = 0; + nybble_offset[1] = 0; + max_nybbles[0] = 2 * (packet_size - ke->spu_pix_data[0]); + max_nybbles[1] = 2 * (packet_size - ke->spu_pix_data[1]); + for (y = 0; y < kb->height; ++y) { + nybble_offset[y & 1] = GST_ROUND_UP_2 (nybble_offset[y & 1]); + for (x = 0; x < kb->width;) { + if (G_UNLIKELY (nybble_offset[y & 1] >= max_nybbles[y & 1])) { + GST_DEBUG_OBJECT (ke, "RLE overflow, clearing the remainder"); + memset (kb->pixels + n, 0, kb->width - x); + n += kb->width - x; + break; + } + code = gst_kate_enc_get_rle_code (pixptr[y & 1], &nybble_offset[y & 1]); + if (code == 0) { + memset (kb->pixels + n, 0, kb->width - x); + n += kb->width - x; + break; + } else { + guint16 npixels = code >> 2; + guint16 pixel = code & 3; + if (npixels > kb->width - x) { + npixels = kb->width - x; + } + memset (kb->pixels + n, pixel, npixels); + n += npixels; + x += npixels; + } + } + } + + GST_LOG_OBJECT (ke, "%u/%u bytes left in the data packet", + max_nybbles[0] - nybble_offset[0], max_nybbles[1] - nybble_offset[1]); + + /* some streams seem to have huge uncropped SPUs, fix those up */ + x = ke->spu_left; + y = ke->spu_top; + gst_kate_enc_crop_bitmap (ke, kb, &x, &y); + + /* create the region */ + kate_region_init (kr); + if (ke->original_canvas_width > 0 && ke->original_canvas_height > 0) { + /* prefer relative sizes in case we're encoding for a different resolution + that what the SPU was created for */ + kr->metric = kate_millionths; + kr->x = 1000000 * x / ke->original_canvas_width; + kr->y = 1000000 * y / ke->original_canvas_height; + kr->w = 1000000 * kb->width / ke->original_canvas_width; + kr->h = 1000000 * kb->height / ke->original_canvas_height; + } else { + kr->metric = kate_pixel; + kr->x = x; + kr->y = y; + kr->w = kb->width; + kr->h = kb->height; + } + + /* some SPUs have no hide time */ + if (ke->hide_time == 0) { + GST_INFO_OBJECT (ke, "SPU has no hide time"); + /* now, we don't know when the next SPU is scheduled to go, since we probably + haven't received it yet, so we'll just make it a 1 second delay, which is + probably going to end before the next one while being readable */ + //ke->hide_time = ke->show_time + (1000*90/1024); + } + + return GST_FLOW_OK; +} + +#undef IGNORE +#undef ADVANCE +#undef CHECK + +static GstFlowReturn +gst_kate_enc_chain_push_packet (GstKateEnc * ke, kate_packet * kp, + GstClockTime start, GstClockTime duration) +{ + kate_int64_t granpos; + GstFlowReturn rflow; + + granpos = kate_encode_get_granule (&ke->k); + if (G_UNLIKELY (granpos < 0)) { + GST_WARNING_OBJECT (ke, "Negative granpos for packet"); + kate_packet_clear (kp); + return GST_FLOW_ERROR; + } + rflow = + gst_kate_enc_push_and_free_kate_packet (ke, kp, granpos, start, duration, + FALSE); + if (G_UNLIKELY (rflow != GST_FLOW_OK)) { + GST_WARNING_OBJECT (ke, "Failed to push Kate packet"); + } + return rflow; +} + +static void +gst_kate_enc_generate_keepalive (GstKateEnc * ke, GstClockTime timestamp) +{ + kate_packet kp; + int ret; + kate_float t = timestamp / (double) GST_SECOND; + GST_DEBUG_OBJECT (ke, "keepalive at %f", t); + ret = kate_encode_keepalive (&ke->k, t, &kp); + if (ret < 0) { + GST_WARNING_OBJECT (ke, "Failed to encode keepalive packet: %d", ret); + } else { + kate_int64_t granpos = kate_encode_get_granule (&ke->k); + GST_LOG_OBJECT (ke, "Keepalive packet encoded"); + if (gst_kate_enc_push_and_free_kate_packet (ke, &kp, granpos, timestamp, 0, + FALSE)) { + GST_WARNING_OBJECT (ke, "Failed to push keepalive packet"); + } + } +} + +static GstFlowReturn +gst_kate_enc_flush_waiting (GstKateEnc * ke, GstClockTime now) +{ + GstFlowReturn rflow = GST_FLOW_OK; + if (ke->delayed_spu) { + int ret; + kate_packet kp; + GstClockTime keepalive_time; + + kate_float t0 = ke->delayed_start / (double) GST_SECOND; + kate_float t1 = now / (double) GST_SECOND; + + GST_INFO_OBJECT (ke, + "We had a delayed SPU packet starting at %f, flushing at %f (assumed duration %f)", + t0, t1, t1 - t0); + + ret = kate_encode_text (&ke->k, t0, t1, "", 0, &kp); + if (G_UNLIKELY (ret < 0)) { + rflow = GST_FLOW_ERROR; + } else { + rflow = + gst_kate_enc_chain_push_packet (ke, &kp, ke->delayed_start, + now - ke->delayed_start + 1); + } + + if (rflow == GST_FLOW_OK) { + GST_DEBUG_OBJECT (ke, "delayed SPU packet flushed"); + } else { + GST_WARNING_OBJECT (ke, "Failed to flush delayed SPU packet: %d", rflow); + } + + /* forget it even if we couldn't flush it */ + ke->delayed_spu = FALSE; + + /* now that we've flushed the packet, we want to insert keepalives as requested */ + if (ke->keepalive_min_time > 0.0f && t1 > t0) { + GST_INFO_OBJECT (ke, "generating keepalives at %f from %f to %f", + ke->keepalive_min_time, t0, t1); + for (keepalive_time = ke->delayed_start; + (keepalive_time += ke->keepalive_min_time * GST_SECOND) < now;) { + GST_INFO_OBJECT (ke, "generating keepalive at %f", + keepalive_time / (double) GST_SECOND); + gst_kate_enc_generate_keepalive (ke, keepalive_time); + } + } + } + return rflow; +} + +static GstFlowReturn +gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf) +{ + kate_packet kp; + kate_region kregion; + kate_bitmap kbitmap; + kate_palette kpalette; + GstFlowReturn rflow; + int ret = 0; + + rflow = gst_kate_enc_decode_spu (ke, buf, &kregion, &kbitmap, &kpalette); + if (G_UNLIKELY (rflow != GST_FLOW_OK)) { + GST_ERROR_OBJECT (ke, "Failed to decode incoming SPU"); +#if 0 + { + static int spu_count = 0; + FILE *f; + char name[32]; + snprintf (name, sizeof (name), "/tmp/bad_spu_%04d", spu_count++); + name[sizeof (name) - 1] = 0; + f = fopen (name, "w"); + if (f) { + fwrite (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf), 1, f); + fclose (f); + } + } +#endif + } else if (G_UNLIKELY (kbitmap.width == 0 || kbitmap.height == 0)) { + /* there are some DVDs (well, at least one) where some dimwits put in a wholly transparent full screen 720x576 SPU !!!!?! */ + GST_WARNING_OBJECT (ke, "SPU is totally invisible - dimwits"); + rflow = GST_FLOW_OK; + } else { + /* timestamp offsets are hidden in the SPU packets */ + GstClockTime start = + GST_BUFFER_TIMESTAMP (buf) + GST_KATE_STM_TO_GST (ke->show_time); + GstClockTime stop = + GST_BUFFER_TIMESTAMP (buf) + GST_KATE_STM_TO_GST (ke->hide_time); + kate_float t0 = start / (double) GST_SECOND; + kate_float t1 = stop / (double) GST_SECOND; + GST_DEBUG_OBJECT (ke, "buf ts %f, start/show %hu/%hu", + GST_BUFFER_TIMESTAMP (buf) / (double) GST_SECOND, ke->show_time, + ke->hide_time); + +#if 0 + { + static int spu_count = 0; + FILE *f; + char name[32]; + snprintf (name, sizeof (name), "/tmp/spu_%04d", spu_count++); + name[sizeof (name) - 1] = 0; + f = fopen (name, "w"); + if (f) { + fwrite (GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf), 1, f); + fclose (f); + } + } +#endif + GST_DEBUG_OBJECT (ke, "Encoding %dx%d SPU: (%u bytes) from %f to %f", + kbitmap.width, kbitmap.height, GST_BUFFER_SIZE (buf), t0, t1); + ret = kate_encode_set_region (&ke->k, &kregion); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (ke, "Failed to set event region (%d)", ret); + rflow = GST_FLOW_ERROR; + } else { + ret = kate_encode_set_palette (&ke->k, &kpalette); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (ke, "Failed to set event palette (%d)", ret); + rflow = GST_FLOW_ERROR; + } else { + ret = kate_encode_set_bitmap (&ke->k, &kbitmap); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (ke, "Failed to set event bitmap (%d)", ret); + rflow = GST_FLOW_ERROR; + } else { + /* Some SPUs have no hide time - so I'm going to delay the encoding of the packet + till either a suitable event happens, and the time of this event will be used + as the end time of this SPU, which will then be encoded and sent off. Suitable + events are the arrival of a subsequent SPU (eg, this SPU will replace the one + with no end), EOS, a new segment event, or a time threshold being reached */ + if (ke->hide_time <= ke->show_time) { + GST_INFO_OBJECT (ke, + "Cannot encode SPU packet now, hide time is now known (starting at %f) - delaying", + t0); + ke->delayed_spu = TRUE; + ke->delayed_start = start; + rflow = GST_FLOW_OK; + } else { + ret = kate_encode_text (&ke->k, t0, t1, "", 0, &kp); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (ke, + "Failed to encode empty text for SPU buffer (%d)", ret); + rflow = GST_FLOW_ERROR; + } else { + rflow = + gst_kate_enc_chain_push_packet (ke, &kp, start, + stop - start + 1); + } + } + } + } + } + g_free (kpalette.colors); + g_free (kbitmap.pixels); + } + + return rflow; +} + +static GstFlowReturn +gst_kate_enc_chain_text (GstKateEnc * ke, GstBuffer * buf, + const char *mime_type) +{ + kate_packet kp; + int ret = 0; + GstFlowReturn rflow; + GstClockTime start = GST_BUFFER_TIMESTAMP (buf); + GstClockTime stop = GST_BUFFER_TIMESTAMP (buf) + GST_BUFFER_DURATION (buf); + + if (!strcmp (mime_type, "text/x-pango-markup")) { + ret = kate_encode_set_markup_type (&ke->k, kate_markup_simple); + } else { + ret = kate_encode_set_markup_type (&ke->k, kate_markup_none); + } + + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (ke, "Failed to set markup type (%d)", ret); + rflow = GST_FLOW_ERROR; + } else { + const char *text = (const char *) GST_BUFFER_DATA (buf); + if (text) { + size_t text_len = GST_BUFFER_SIZE (buf); + kate_float t0 = start / (double) GST_SECOND; + kate_float t1 = stop / (double) GST_SECOND; + GST_LOG_OBJECT (ke, "Encoding text: %*.*s (%u bytes) from %f to %f", + (int) text_len, (int) text_len, GST_BUFFER_DATA (buf), + GST_BUFFER_SIZE (buf), t0, t1); + ret = kate_encode_text (&ke->k, t0, t1, text, text_len, &kp); + if (G_UNLIKELY (ret < 0)) { + rflow = GST_FLOW_ERROR; + } else { + rflow = + gst_kate_enc_chain_push_packet (ke, &kp, start, stop - start + 1); + } + } else { + GST_WARNING_OBJECT (ke, "No text in text packet"); + rflow = GST_FLOW_ERROR; + } + } + + return rflow; +} + +/* chain function + * this function does the actual processing + */ +static GstFlowReturn +gst_kate_enc_chain (GstPad * pad, GstBuffer * buf) +{ + GstKateEnc *ke = GST_KATE_ENC (gst_pad_get_parent (pad)); + GstFlowReturn rflow = GST_FLOW_OK; + GstCaps *caps; + const gchar *mime_type = NULL; + + GST_DEBUG_OBJECT (ke, "got packet, %u bytes", GST_BUFFER_SIZE (buf)); + + /* get the type of the data we're being sent */ + caps = GST_PAD_CAPS (pad); + if (G_UNLIKELY (caps == NULL)) { + GST_ERROR_OBJECT (ke, ": Could not get caps of pad"); + rflow = GST_FLOW_ERROR; + } else { + const GstStructure *structure = gst_caps_get_structure (caps, 0); + if (structure) + mime_type = gst_structure_get_name (structure); + + if (mime_type) { + GST_LOG_OBJECT (ke, "Packet has MIME type %s", mime_type); + + /* first push headers if we haven't done that yet */ + rflow = gst_kate_enc_flush_headers (ke); + + if (G_LIKELY (rflow == GST_FLOW_OK)) { + /* flush any packet we had waiting */ + rflow = gst_kate_enc_flush_waiting (ke, GST_BUFFER_TIMESTAMP (buf)); + + if (G_LIKELY (rflow == GST_FLOW_OK)) { + if (!strcmp (mime_type, GST_KATE_SPU_MIME_TYPE)) { + /* encode a kate_bitmap */ + rflow = gst_kate_enc_chain_spu (ke, buf); + } else { + /* encode text */ + rflow = gst_kate_enc_chain_text (ke, buf, mime_type); + } + } + } + } else { + GST_WARNING_OBJECT (ke, "Packet has no MIME type, ignored"); + } + } + + gst_buffer_unref (buf); + + gst_object_unref (ke); + + GST_LOG_OBJECT (ke, "Leaving chain function"); + + return rflow; +} + +static GstStateChangeReturn +gst_kate_enc_change_state (GstElement * element, GstStateChange transition) +{ + GstKateEnc *ke = GST_KATE_ENC (element); + GstStateChangeReturn res; + int ret; + + GST_INFO_OBJECT (ke, "gst_kate_enc_change_state"); + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + ke->tags = gst_tag_list_new (); + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + GST_DEBUG_OBJECT (ke, "READY -> PAUSED, initializing kate state"); + ret = kate_info_init (&ke->ki); + if (ret < 0) { + GST_WARNING_OBJECT (ke, "failed to initialize kate info structure: %d", + ret); + break; + } + if (ke->language) { + ret = kate_info_set_language (&ke->ki, ke->language); + if (ret < 0) { + GST_WARNING_OBJECT (ke, "failed to set stream language: %d", ret); + break; + } + } + if (ke->category) { + ret = kate_info_set_category (&ke->ki, ke->category); + if (ret < 0) { + GST_WARNING_OBJECT (ke, "failed to set stream category: %d", ret); + break; + } + } + ret = + kate_info_set_original_canvas_size (&ke->ki, + ke->original_canvas_width, ke->original_canvas_height); + if (ret < 0) { + GST_WARNING_OBJECT (ke, "failed to set original canvas size: %d", ret); + break; + } + ret = kate_comment_init (&ke->kc); + if (ret < 0) { + GST_WARNING_OBJECT (ke, + "failed to initialize kate comment structure: %d", ret); + break; + } + ret = kate_encode_init (&ke->k, &ke->ki); + if (ret < 0) { + GST_WARNING_OBJECT (ke, "failed to initialize kate state: %d", ret); + break; + } + ke->headers_sent = FALSE; + ke->initialized = TRUE; + ke->last_timestamp = 0; + ke->latest_end_time = 0; + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + break; + case GST_STATE_CHANGE_READY_TO_NULL: + gst_tag_list_free (ke->tags); + ke->tags = NULL; + break; + default: + break; + } + + res = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + if (res == GST_STATE_CHANGE_FAILURE) { + GST_WARNING_OBJECT (ke, "Parent failed to change state"); + return res; + } + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + GST_DEBUG_OBJECT (ke, "PAUSED -> READY, clearing kate state"); + if (ke->initialized) { + kate_clear (&ke->k); + kate_info_clear (&ke->ki); + kate_comment_clear (&ke->kc); + ke->initialized = FALSE; + ke->last_timestamp = 0; + ke->latest_end_time = 0; + } + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + + GST_DEBUG_OBJECT (ke, "State change done"); + + return res; +} + +static GstClockTime +gst_kate_enc_granule_time (kate_state * k, gint64 granulepos) +{ + float t; + + if (granulepos == -1) + return -1; + + t = kate_granule_time (k->ki, granulepos); + return t * GST_SECOND; +} + +/* +conversions on the sink: + - nothing +conversions on the source: + - default is granules at num/den rate + - default -> time is possible + - bytes do not mean anything, packets can be any number of bytes, and we + have no way to know the number of bytes emitted without decoding +*/ + +static gboolean +gst_kate_enc_convert (GstPad * pad, GstFormat src_fmt, gint64 src_val, + GstFormat * dest_fmt, gint64 * dest_val) +{ + GstKateEnc *ke; + gboolean res = FALSE; + + if (src_fmt == *dest_fmt) { + *dest_val = src_val; + return TRUE; + } + + ke = GST_KATE_ENC (gst_pad_get_parent (pad)); + + if (!ke->initialized) { + GST_WARNING_OBJECT (ke, "not initialized yet"); + gst_object_unref (ke); + return FALSE; + } + + if (src_fmt == GST_FORMAT_BYTES || *dest_fmt == GST_FORMAT_BYTES) { + GST_WARNING_OBJECT (ke, "unsupported format"); + gst_object_unref (ke); + return FALSE; + } + + switch (src_fmt) { + case GST_FORMAT_DEFAULT: + switch (*dest_fmt) { + case GST_FORMAT_TIME: + *dest_val = gst_kate_enc_granule_time (&ke->k, src_val); + res = TRUE; + break; + default: + res = FALSE; + break; + } + break; + default: + res = FALSE; + break; + } + + if (!res) { + GST_WARNING_OBJECT (ke, "unsupported format"); + } + + gst_object_unref (ke); + return res; +} + +#if 1 +static const GstQueryType * +gst_kate_enc_source_query_type (GstPad * pad) +{ + static const GstQueryType types[] = { + GST_QUERY_CONVERT, + 0 + }; + + return types; +} +#endif + +static gboolean +gst_kate_enc_source_query (GstPad * pad, GstQuery * query) +{ + GstKateEnc *ke; + gboolean res = FALSE; + + ke = GST_KATE_ENC (gst_pad_get_parent (pad)); + + GST_DEBUG ("source query %d", GST_QUERY_TYPE (query)); + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_CONVERT: + { + GstFormat src_fmt, dest_fmt; + gint64 src_val, dest_val; + + gst_query_parse_convert (query, &src_fmt, &src_val, &dest_fmt, &dest_val); + if (!gst_kate_enc_convert (pad, src_fmt, src_val, &dest_fmt, &dest_val)) { + return gst_pad_query_default (pad, query); + } + gst_query_set_convert (query, src_fmt, src_val, dest_fmt, dest_val); + res = TRUE; + } + break; + default: + res = gst_pad_query_default (pad, query); + break; + } + + gst_object_unref (ke); + + return res; +} + +static gboolean +gst_kate_enc_sink_event (GstPad * pad, GstEvent * event) +{ + GstKateEnc *ke = GST_KATE_ENC (gst_pad_get_parent (pad)); + GstStructure *structure; + gboolean ret; + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_NEWSEGMENT: + GST_LOG_OBJECT (ke, "Got newsegment event"); + if (ke->initialized) { + GST_LOG_OBJECT (ke, "ensuring all headers are in"); + if (gst_kate_enc_flush_headers (ke) != GST_FLOW_OK) { + GST_WARNING_OBJECT (ke, "Failed to flush headers"); + } else { + GstFormat format; + gint64 timestamp; + + gst_event_parse_new_segment (event, NULL, NULL, &format, ×tamp, + NULL, NULL); + if (format != GST_FORMAT_TIME || !GST_CLOCK_TIME_IS_VALID (timestamp)) { + GST_WARNING_OBJECT (ke, + "No time in newsegment event %p, format %d, timestamp %lld", + event, (int) format, (long long) timestamp); + /* to be safe, we'd need to generate a keepalive anyway, but we'd have to guess at the timestamp to use; a + good guess would be the last known timestamp plus the keepalive time, but if we then get a packet with a + timestamp less than this, it would fail to encode, which would be Bad. If we don't encode a keepalive, we + run the risk of stalling the pipeline and hanging, which is Very Bad. Oh dear. We can't exit(-1), can we ? */ + } else { + float t = timestamp / (double) GST_SECOND; + + if (ke->delayed_spu + && t - ke->delayed_start / (double) GST_SECOND >= + ke->default_spu_duration) { + if (G_UNLIKELY (gst_kate_enc_flush_waiting (ke, + timestamp) != GST_FLOW_OK)) { + GST_WARNING_OBJECT (ke, "Failed to encode delayed packet"); + /* continue with new segment handling anyway */ + } + } + + GST_LOG_OBJECT (ke, "ts %f, last %f (min %f)", t, + ke->last_timestamp / (double) GST_SECOND, + ke->keepalive_min_time); + if (ke->keepalive_min_time > 0.0f + && t - ke->last_timestamp / (double) GST_SECOND >= + ke->keepalive_min_time) { + /* we only generate a keepalive if there is no SPU waiting, as it would + mean out of sequence start times - and granulepos */ + if (!ke->delayed_spu) { + gst_kate_enc_generate_keepalive (ke, timestamp); + } + } + } + } + } + ret = gst_pad_push_event (ke->srcpad, event); + break; + + case GST_EVENT_CUSTOM_DOWNSTREAM: + GST_LOG_OBJECT (ke, "Got custom downstream event"); + /* adapted from the dvdsubdec element */ + structure = event->structure; + if (structure != NULL + && gst_structure_has_name (structure, "application/x-gst-dvd")) { + if (ke->initialized) { + GST_LOG_OBJECT (ke, "ensuring all headers are in"); + if (gst_kate_enc_flush_headers (ke) != GST_FLOW_OK) { + GST_WARNING_OBJECT (ke, "Failed to flush headers"); + } else { + const gchar *event_name = + gst_structure_get_string (structure, "event"); + if (event_name) { + if (!strcmp (event_name, "dvd-spu-clut-change")) { + gchar name[16]; + int idx; + gboolean found; + gint value; + GST_INFO_OBJECT (ke, "New CLUT received"); + for (idx = 0; idx < 16; ++idx) { + g_snprintf (name, sizeof (name), "clut%02d", idx); + found = gst_structure_get_int (structure, name, &value); + if (found) { + ke->spu_clut[idx] = value; + } else { + GST_WARNING_OBJECT (ke, + "DVD CLUT event did not contain %s field", name); + } + } + } else if (!strcmp (event_name, "dvd-lang-codes")) { + /* we can't know which stream corresponds to us */ + } + } else { + GST_WARNING_OBJECT (ke, "custom downstream event with no name"); + } + } + } + } + ret = gst_pad_push_event (ke->srcpad, event); + break; + + case GST_EVENT_TAG: + GST_LOG_OBJECT (ke, "Got tag event"); + if (ke->tags) { + GstTagList *list; + + gst_event_parse_tag (event, &list); + gst_tag_list_insert (ke->tags, list, + gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (ke))); + } else { + g_assert_not_reached (); + } + ret = gst_pad_event_default (pad, event); + break; + + case GST_EVENT_EOS: + GST_INFO_OBJECT (ke, "Got EOS event"); + if (ke->initialized) { + GST_LOG_OBJECT (ke, "ensuring all headers are in"); + if (gst_kate_enc_flush_headers (ke) != GST_FLOW_OK) { + GST_WARNING_OBJECT (ke, "Failed to flush headers"); + } else { + kate_packet kp; + int ret; + GstClockTime delayed_end = + ke->delayed_start + ke->default_spu_duration * GST_SECOND; + + if (G_UNLIKELY (gst_kate_enc_flush_waiting (ke, + delayed_end) != GST_FLOW_OK)) { + GST_WARNING_OBJECT (ke, "Failed to encode delayed packet"); + /* continue with EOS handling anyway */ + } + + ret = kate_encode_finish (&ke->k, -1, &kp); + if (ret < 0) { + GST_WARNING_OBJECT (ke, "Failed to encode EOS packet: %d", ret); + } else { + kate_int64_t granpos = kate_encode_get_granule (&ke->k); + GST_LOG_OBJECT (ke, "EOS packet encoded"); + if (gst_kate_enc_push_and_free_kate_packet (ke, &kp, granpos, + ke->latest_end_time, 0, FALSE)) { + GST_WARNING_OBJECT (ke, "Failed to push EOS packet"); + } + } + } + } + ret = gst_pad_event_default (pad, event); + break; + + default: + GST_LOG_OBJECT (ke, "Got unhandled event"); + ret = gst_pad_event_default (pad, event); + break; + } + + gst_object_unref (ke); + return ret; +} diff --git a/ext/kate/gstkateenc.h b/ext/kate/gstkateenc.h new file mode 100644 index 00000000..168de711 --- /dev/null +++ b/ext/kate/gstkateenc.h @@ -0,0 +1,120 @@ +/* + * GStreamer + * Copyright 2005 Thomas Vander Stichele + * Copyright 2005 Ronald S. Bultje + * Copyright 2008 Vincent Penquerc'h + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Alternatively, the contents of this file may be used under the + * GNU Lesser General Public License Version 2.1 (the "LGPL"), in + * which case the following provisions apply instead of the ones + * mentioned above: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_KATE_ENC_H__ +#define __GST_KATE_ENC_H__ + +#include +#include + +G_BEGIN_DECLS +/* #defines don't like whitespacey bits */ +#define GST_TYPE_KATE_ENC \ + (gst_kate_enc_get_type()) +#define GST_KATE_ENC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KATE_ENC,GstKateEnc)) +#define GST_KATE_ENC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KATE,GstKateEncClass)) +#define GST_IS_KATE_ENC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KATE_ENC)) +#define GST_IS_KATE_ENC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KATE_ENC)) +typedef struct _GstKateEnc GstKateEnc; +typedef struct _GstKateEncClass GstKateEncClass; + +struct _GstKateEnc +{ + GstElement element; + + GstPad *sinkpad, *srcpad; + + kate_info ki; + kate_comment kc; + kate_state k; + + GstTagList *tags; + + GstClockTime last_timestamp; + GstClockTime latest_end_time; + + gboolean headers_sent; + gboolean initialized; + gboolean delayed_spu; + GstClockTime delayed_start; + gchar *language; + gchar *category; + + int granule_rate_numerator; + int granule_rate_denominator; + int granule_shift; + + float keepalive_min_time; + float default_spu_duration; + + size_t original_canvas_width; + size_t original_canvas_height; + + /* SPU decoding */ + guint8 spu_colormap[4]; + guint32 spu_clut[16]; + guint8 spu_alpha[4]; + guint16 spu_top; + guint16 spu_left; + guint16 spu_right; + guint16 spu_bottom; + guint16 spu_pix_data[2]; + guint16 show_time; + guint16 hide_time; +}; + +struct _GstKateEncClass +{ + GstElementClass parent_class; +}; + +GType gst_kate_enc_get_type (void); + +G_END_DECLS +#endif /* __GST_KATE_ENC_H__ */ diff --git a/ext/kate/gstkateparse.c b/ext/kate/gstkateparse.c new file mode 100644 index 00000000..84a752b7 --- /dev/null +++ b/ext/kate/gstkateparse.c @@ -0,0 +1,613 @@ +/* GStreamer + * Copyright (C) <2004> Thomas Vander Stichele + * Copyright (C) 2006 Andy Wingo + * Copyright (C) 2008 Vincent Penquerc'h + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:element-kateparse + * @short_description: parses kate streams + * @see_also: katedec, vorbisparse, oggdemux, theoraparse + * + * + * + * The kateparse element will parse the header packets of the Kate + * stream and put them as the streamheader in the caps. This is used in the + * multifdsink case where you want to stream live kate streams to multiple + * clients, each client has to receive the streamheaders first before they can + * consume the kate packets. + * + * + * This element also makes sure that the buffers that it pushes out are properly + * timestamped and that their offset and offset_end are set. The buffers that + * kateparse outputs have all of the metadata that oggmux expects to receive, + * which allows you to (for example) remux an ogg/kate file. + * + * Example pipelines + * + * + * gst-launch -v filesrc location=kate.ogg ! oggdemux ! kateparse ! fakesink + * + * This pipeline shows that the streamheader is set in the caps, and that each + * buffer has the timestamp, duration, offset, and offset_end set. + * + * + * + * gst-launch filesrc location=kate.ogg ! oggdemux ! kateparse \ + * ! oggmux ! filesink location=kate-remuxed.ogg + * + * This pipeline shows remuxing. kate-remuxed.ogg might not be exactly the same + * as kate.ogg, but they should produce exactly the same decoded data. + * + * + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "gstkate.h" +#include "gstkateutil.h" +#include "gstkateparse.h" + +GST_DEBUG_CATEGORY_EXTERN (gst_kateparse_debug); +#define GST_CAT_DEFAULT gst_kateparse_debug + +static const GstElementDetails gst_kate_parse_details = +GST_ELEMENT_DETAILS ("Kate stream parser", + "Codec/Parser/Subtitle", + "parse raw kate streams", + "Vincent Penquerc'h "); + +static GstStaticPadTemplate gst_kate_parse_sink_factory = +GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + ); + +static GstStaticPadTemplate gst_kate_parse_src_factory = +GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + ); + +GST_BOILERPLATE (GstKateParse, gst_kate_parse, GstElement, GST_TYPE_ELEMENT); + +static GstFlowReturn gst_kate_parse_chain (GstPad * pad, GstBuffer * buffer); +static GstStateChangeReturn gst_kate_parse_change_state (GstElement * element, + GstStateChange transition); +static gboolean gst_kate_parse_sink_event (GstPad * pad, GstEvent * event); +static gboolean gst_kate_parse_src_query (GstPad * pad, GstQuery * query); +#if 0 +static gboolean gst_kate_parse_convert (GstPad * pad, + GstFormat src_format, gint64 src_value, + GstFormat * dest_format, gint64 * dest_value); +#endif +static GstFlowReturn gst_kate_parse_parse_packet (GstKateParse * parse, + GstBuffer * buf); + +static void +gst_kate_parse_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&gst_kate_parse_src_factory)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&gst_kate_parse_sink_factory)); + gst_element_class_set_details (element_class, &gst_kate_parse_details); +} + +static void +gst_kate_parse_class_init (GstKateParseClass * klass) +{ + GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); + + gstelement_class->change_state = gst_kate_parse_change_state; + + klass->parse_packet = GST_DEBUG_FUNCPTR (gst_kate_parse_parse_packet); +} + +static void +gst_kate_parse_init (GstKateParse * parse, GstKateParseClass * g_class) +{ + parse->sinkpad = + gst_pad_new_from_static_template (&gst_kate_parse_sink_factory, "sink"); + gst_pad_set_chain_function (parse->sinkpad, + GST_DEBUG_FUNCPTR (gst_kate_parse_chain)); + gst_pad_set_event_function (parse->sinkpad, + GST_DEBUG_FUNCPTR (gst_kate_parse_sink_event)); + gst_element_add_pad (GST_ELEMENT (parse), parse->sinkpad); + + parse->srcpad = + gst_pad_new_from_static_template (&gst_kate_parse_src_factory, "src"); + gst_pad_set_query_function (parse->srcpad, + GST_DEBUG_FUNCPTR (gst_kate_parse_src_query)); + gst_element_add_pad (GST_ELEMENT (parse), parse->srcpad); +} + +static void +gst_kate_parse_drain_event_queue (GstKateParse * parse) +{ + while (parse->event_queue->length) { + GstEvent *event; + + event = GST_EVENT_CAST (g_queue_pop_head (parse->event_queue)); + gst_pad_event_default (parse->sinkpad, event); + } +} + +static GstFlowReturn +gst_kate_parse_push_headers (GstKateParse * parse) +{ + /* mark and put on caps */ + GstCaps *caps; + GstBuffer *outbuf; + kate_packet packet; + GList *headers, *outbuf_list = NULL; + int ret; + gboolean res; + + /* get the headers into the caps, passing them to kate as we go */ + caps = + gst_kate_util_set_header_on_caps (&parse->element, + gst_pad_get_caps (parse->srcpad), parse->streamheader); + if (G_UNLIKELY (!caps)) { + GST_ERROR_OBJECT (parse, "Failed to set headers on caps"); + return GST_FLOW_ERROR; + } + + GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps); + res = gst_pad_set_caps (parse->srcpad, caps); + gst_caps_unref (caps); + if (G_UNLIKELY (!res)) { + GST_WARNING_OBJECT (parse, "Failed to set pad caps"); + return GST_FLOW_ERROR; + } + + headers = parse->streamheader; + while (headers) { + outbuf = GST_BUFFER_CAST (headers->data); + kate_packet_wrap (&packet, GST_BUFFER_SIZE (outbuf), + GST_BUFFER_DATA (outbuf)); + ret = kate_decode_headerin (&parse->ki, &parse->kc, &packet); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (parse, "kate_decode_headerin returned %d", ret); + } + outbuf_list = g_list_append (outbuf_list, outbuf); + headers = headers->next; + } + + /* first process queued events */ + gst_kate_parse_drain_event_queue (parse); + + /* push out buffers, ignoring return value... */ + headers = outbuf_list; + while (headers) { + outbuf = GST_BUFFER_CAST (headers->data); + gst_buffer_set_caps (outbuf, GST_PAD_CAPS (parse->srcpad)); + gst_pad_push (parse->srcpad, outbuf); + headers = headers->next; + } + + g_list_free (outbuf_list); + + parse->streamheader_sent = TRUE; + + return GST_FLOW_OK; +} + +static void +gst_kate_parse_clear_queue (GstKateParse * parse) +{ + GST_DEBUG_OBJECT (parse, "Clearing queue"); + while (parse->buffer_queue->length) { + GstBuffer *buf; + + buf = GST_BUFFER_CAST (g_queue_pop_head (parse->buffer_queue)); + gst_buffer_unref (buf); + } + while (parse->event_queue->length) { + GstEvent *event; + + event = GST_EVENT_CAST (g_queue_pop_head (parse->event_queue)); + gst_event_unref (event); + } +} + +static GstFlowReturn +gst_kate_parse_push_buffer (GstKateParse * parse, GstBuffer * buf, + gint64 granulepos) +{ + GST_LOG_OBJECT (parse, "granulepos %16llx", granulepos); + if (granulepos < 0) { + /* packets coming not from Ogg won't have a granpos in the offset end, + so we have to synthesize one here - only problem is we don't know + the backlink - pretend there's none for now */ + GST_INFO_OBJECT (parse, "No granulepos on buffer, synthesizing one"); + granulepos = + kate_duration_granule (&parse->ki, + GST_BUFFER_TIMESTAMP (buf) / + (double) GST_SECOND) << kate_granule_shift (&parse->ki); + } + GST_BUFFER_OFFSET (buf) = + kate_granule_time (&parse->ki, granulepos) * GST_SECOND; + GST_BUFFER_OFFSET_END (buf) = granulepos; + GST_BUFFER_TIMESTAMP (buf) = GST_BUFFER_OFFSET (buf); + + /* Hack to flush each packet on its own page - taken off the CMML encoder element */ + /* TODO: this is shite and needs to go once I find a way to tell Ogg to flush + as it messes up Matroska's track duration */ + GST_BUFFER_DURATION (buf) = G_MAXINT64; + + gst_buffer_set_caps (buf, GST_PAD_CAPS (parse->srcpad)); + + return gst_pad_push (parse->srcpad, buf); +} + +static GstFlowReturn +gst_kate_parse_drain_queue_prematurely (GstKateParse * parse) +{ + GstFlowReturn ret = GST_FLOW_OK; + + /* got an EOS event, make sure to push out any buffers that were in the queue + * -- won't normally be the case, but this catches the + * didn't-get-a-granulepos-on-the-last-packet case. Assuming a continuous + * stream. */ + + /* if we got EOS before any buffers came, go ahead and push the other events + * first */ + gst_kate_parse_drain_event_queue (parse); + + while (!g_queue_is_empty (parse->buffer_queue)) { + GstBuffer *buf; + gint64 granpos; + + buf = GST_BUFFER_CAST (g_queue_pop_head (parse->buffer_queue)); + + granpos = GST_BUFFER_OFFSET_END (buf); + ret = gst_kate_parse_push_buffer (parse, buf, granpos); + + if (ret != GST_FLOW_OK) + goto done; + } + + g_assert (g_queue_is_empty (parse->buffer_queue)); + +done: + return ret; +} + +static GstFlowReturn +gst_kate_parse_drain_queue (GstKateParse * parse, gint64 granulepos) +{ + GstFlowReturn ret = GST_FLOW_OK; + + if (!g_queue_is_empty (parse->buffer_queue)) { + GstBuffer *buf; + buf = GST_BUFFER_CAST (g_queue_pop_head (parse->buffer_queue)); + ret = gst_kate_parse_push_buffer (parse, buf, granulepos); + + if (ret != GST_FLOW_OK) + goto done; + } + g_assert (g_queue_is_empty (parse->buffer_queue)); + +done: + return ret; +} + +static GstFlowReturn +gst_kate_parse_queue_buffer (GstKateParse * parse, GstBuffer * buf) +{ + GstFlowReturn ret = GST_FLOW_OK; + gint64 granpos; + + buf = gst_buffer_make_metadata_writable (buf); + + /* oggdemux stores the granule pos in the offset end */ + granpos = GST_BUFFER_OFFSET_END (buf); + GST_LOG_OBJECT (parse, "granpos %16llx", granpos); + g_queue_push_tail (parse->buffer_queue, buf); + +#if 1 + /* if getting buffers from matroska, we won't have a granpos here... */ + //if (GST_BUFFER_OFFSET_END_IS_VALID (buf)) { + ret = gst_kate_parse_drain_queue (parse, granpos); + //} +#else + if (granpos >= 0) { + ret = gst_kate_parse_drain_queue (parse, granpos); + } else { + GST_WARNING_OBJECT (parse, "granulepos < 0 (%lld)", granpos); + ret = GST_FLOW_ERROR; + } +#endif + + return ret; +} + +static GstFlowReturn +gst_kate_parse_parse_packet (GstKateParse * parse, GstBuffer * buf) +{ + GstFlowReturn ret = GST_FLOW_OK; + + g_assert (parse); + + parse->packetno++; + + GST_LOG_OBJECT (parse, "Got packet %02x, %u bytes", + GST_BUFFER_SIZE (buf) ? GST_BUFFER_DATA (buf)[0] : -1, + GST_BUFFER_SIZE (buf)); + + if (GST_BUFFER_SIZE (buf) > 0 && GST_BUFFER_DATA (buf)[0] & 0x80) { + GST_DEBUG_OBJECT (parse, "Found header %02x", GST_BUFFER_DATA (buf)[0]); + /* if 0x80 is set, it's streamheader, + * so put it on the streamheader list and return */ + parse->streamheader = g_list_append (parse->streamheader, buf); + ret = GST_FLOW_OK; + } else { + if (!parse->streamheader_sent) { + GST_DEBUG_OBJECT (parse, "Found non header, pushing headers seen so far"); + ret = gst_kate_parse_push_headers (parse); + } + + if (ret == GST_FLOW_OK) { + ret = gst_kate_parse_queue_buffer (parse, buf); + } + } + + return ret; +} + +static GstFlowReturn +gst_kate_parse_chain (GstPad * pad, GstBuffer * buffer) +{ + GstKateParseClass *klass; + GstKateParse *parse; + + parse = GST_KATE_PARSE (GST_PAD_PARENT (pad)); + klass = GST_KATE_PARSE_CLASS (G_OBJECT_GET_CLASS (parse)); + + g_assert (klass->parse_packet != NULL); + + return klass->parse_packet (parse, buffer); +} + +static gboolean +gst_kate_parse_queue_event (GstKateParse * parse, GstEvent * event) +{ + GstFlowReturn ret = TRUE; + + g_queue_push_tail (parse->event_queue, event); + + return ret; +} + +static gboolean +gst_kate_parse_sink_event (GstPad * pad, GstEvent * event) +{ + gboolean ret; + GstKateParse *parse; + + parse = GST_KATE_PARSE (gst_pad_get_parent (pad)); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_FLUSH_START: + gst_kate_parse_clear_queue (parse); + ret = gst_pad_event_default (pad, event); + break; + case GST_EVENT_EOS: + if (!parse->streamheader_sent) { + GST_DEBUG_OBJECT (parse, "Got EOS, pushing headers seen so far"); + ret = gst_kate_parse_push_headers (parse); + if (ret != GST_FLOW_OK) + goto done; + } + gst_kate_parse_drain_queue_prematurely (parse); + ret = gst_pad_event_default (pad, event); + break; + default: + if (!parse->streamheader_sent && GST_EVENT_IS_SERIALIZED (event)) + ret = gst_kate_parse_queue_event (parse, event); + else + ret = gst_pad_event_default (pad, event); + break; + } + +done: + gst_object_unref (parse); + + return ret; +} + +#if 0 +static gboolean +gst_kate_parse_convert (GstPad * pad, + GstFormat src_format, gint64 src_value, + GstFormat * dest_format, gint64 * dest_value) +{ + gboolean res = TRUE; + GstKateParse *parse; + + parse = GST_KATE_PARSE (GST_PAD_PARENT (pad)); + + /* fixme: assumes atomic access to lots of instance variables modified from + * the streaming thread, including 64-bit variables */ + + if (!parse->streamheader_sent) + return FALSE; + + if (src_format == *dest_format) { + *dest_value = src_value; + return TRUE; + } + + if (parse->sinkpad == pad && + (src_format == GST_FORMAT_BYTES || *dest_format == GST_FORMAT_BYTES)) + return FALSE; + + switch (src_format) { + case GST_FORMAT_TIME: + switch (*dest_format) { + default: + res = FALSE; + } + break; + case GST_FORMAT_DEFAULT: + switch (*dest_format) { + case GST_FORMAT_TIME: + *dest_value = kate_granule_time (&parse->ki, src_value) * GST_SECOND; + break; + default: + res = FALSE; + } + break; + default: + res = FALSE; + } + + return res; +} +#endif + +static gboolean +gst_kate_parse_src_query (GstPad * pad, GstQuery * query) +{ +#if 1 + // TODO + GST_WARNING ("gst_kate_parse_src_query"); + return FALSE; +#else + gint64 granulepos; + GstKateParse *parse; + gboolean res = FALSE; + + parse = GST_KATE_PARSE (GST_PAD_PARENT (pad)); + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_POSITION: + { + GstFormat format; + gint64 value; + + granulepos = parse->prev_granulepos; + + gst_query_parse_position (query, &format, NULL); + + /* and convert to the final format */ + if (!(res = + gst_kate_parse_convert (pad, GST_FORMAT_DEFAULT, granulepos, + &format, &value))) + goto error; + + /* fixme: support segments + value = (value - parse->segment_start) + parse->segment_time; + */ + + gst_query_set_position (query, format, value); + + GST_LOG_OBJECT (parse, "query %p: peer returned granulepos: %" + G_GUINT64_FORMAT " - we return %" G_GUINT64_FORMAT " (format %u)", + query, granulepos, value, format); + + break; + } + case GST_QUERY_DURATION: + { + /* fixme: not threadsafe */ + /* query peer for total length */ + if (!gst_pad_is_linked (parse->sinkpad)) { + GST_WARNING_OBJECT (parse, "sink pad %" GST_PTR_FORMAT " is not linked", + parse->sinkpad); + goto error; + } + if (!(res = gst_pad_query (GST_PAD_PEER (parse->sinkpad), query))) + goto error; + break; + } + case GST_QUERY_CONVERT: + { + GstFormat src_fmt, dest_fmt; + gint64 src_val, dest_val; + + gst_query_parse_convert (query, &src_fmt, &src_val, &dest_fmt, &dest_val); + if (!(res = + gst_kate_parse_convert (pad, src_fmt, src_val, &dest_fmt, + &dest_val))) + goto error; + gst_query_set_convert (query, src_fmt, src_val, dest_fmt, dest_val); + break; + } + default: + res = gst_pad_query_default (pad, query); + break; + } + return res; + +error: + { + GST_WARNING_OBJECT (parse, "error handling query"); + return res; + } +#endif +} + +static GstStateChangeReturn +gst_kate_parse_change_state (GstElement * element, GstStateChange transition) +{ + GstKateParse *parse = GST_KATE_PARSE (element); + GstStateChangeReturn ret; + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + kate_info_init (&parse->ki); + kate_comment_init (&parse->kc); + parse->packetno = 0; + parse->streamheader_sent = FALSE; + parse->streamheader = NULL; + parse->buffer_queue = g_queue_new (); + parse->event_queue = g_queue_new (); + break; + default: + break; + } + + ret = parent_class->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + kate_info_clear (&parse->ki); + kate_comment_clear (&parse->kc); + + gst_kate_parse_clear_queue (parse); + g_queue_free (parse->buffer_queue); + parse->buffer_queue = NULL; + g_queue_free (parse->event_queue); + parse->event_queue = NULL; + break; + + default: + break; + } + + return ret; +} diff --git a/ext/kate/gstkateparse.h b/ext/kate/gstkateparse.h new file mode 100644 index 00000000..509f6c49 --- /dev/null +++ b/ext/kate/gstkateparse.h @@ -0,0 +1,78 @@ +/* -*- c-basic-offset: 2 -*- + * GStreamer + * Copyright (C) <2004> Thomas Vander Stichele + * Copyright (C) <2008> Vincent Penquerc'h + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef __GST_KATE_PARSE_H__ +#define __GST_KATE_PARSE_H__ + + +#include +#include + +G_BEGIN_DECLS +#define GST_TYPE_KATE_PARSE \ + (gst_kate_parse_get_type()) +#define GST_KATE_PARSE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KATE_PARSE,GstKateParse)) +#define GST_KATE_PARSE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KATE_PARSE,GstKateParseClass)) +#define GST_IS_KATE_PARSE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KATE_PARSE)) +#define GST_IS_KATKATEE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KATE_PARSE)) +typedef struct _GstKateParse GstKateParse; +typedef struct _GstKateParseClass GstKateParseClass; + +/** + * GstKateParse: + * + * Opaque data structure. + */ +struct _GstKateParse +{ + GstElement element; + + GstPad *sinkpad; + GstPad *srcpad; + + guint packetno; + gboolean streamheader_sent; + GList *streamheader; + + GQueue *event_queue; + GQueue *buffer_queue; + + kate_info ki; + kate_comment kc; +}; + +struct _GstKateParseClass +{ + GstElementClass parent_class; + + /* virtual functions */ + GstFlowReturn (*parse_packet) (GstKateParse * parse, GstBuffer * buf); +}; + +GType gst_kate_parse_get_type (void); + +G_END_DECLS +#endif /* __GST_KATE_PARSE_H__ */ diff --git a/ext/kate/gstkatetag.c b/ext/kate/gstkatetag.c new file mode 100644 index 00000000..608f0747 --- /dev/null +++ b/ext/kate/gstkatetag.c @@ -0,0 +1,347 @@ +/* + * GStreamer + * Copyright (C) 2006 James Livingston + * Copyright (C) 2008 Vincent Penquerc'h + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:element-katetag + * @see_also: #oggdemux, #oggmux, #kateparse, #GstTagSetter + * @short_description: retags kate streams + * + * + * + * The katetag element can change the tag contained within a raw + * kate stream. Specifically, it modifies the comments header packet + * of the kate stream, as well as the language and category of the + * kate stream. + * + * + * The element will also process the stream as the #kateparse element does + * so it can be used when remuxing an Ogg Kate stream, without additional + * elements. + * + * + * Applications can set the tags to write using the #GstTagSetter interface. + * Tags contained within the kate stream will be picked up + * automatically (and merged according to the merge mode set via the tag + * setter interface). + * + * Example pipelines + * + * This element is only useful with gst-launch for modifying the language + * and/or category (which are properties of the stream located in the kate + * beginning of stream header), because it does not support setting the tags + * on a #GstTagSetter interface. Conceptually, the element will usually be + * used like: + * + * gst-launch -v filesrc location=foo.ogg ! oggdemux ! katetag ! oggmux ! filesink location=bar.ogg + * + * + * + * This pipeline will set the language and category of the stream to the + * given values: + * + * gst-launch -v filesrc location=foo.ogg ! oggdemux ! katetag language=pt_BR category=subtitles ! oggmux ! filesink location=bar.ogg + * + * + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include + +#include + +#include "gstkatetag.h" + + +GST_DEBUG_CATEGORY_EXTERN (gst_katetag_debug); +#define GST_CAT_DEFAULT gst_katetag_debug + +enum +{ + ARG_0, + ARG_LANGUAGE, + ARG_CATEGORY, + ARG_ORIGINAL_CANVAS_WIDTH, + ARG_ORIGINAL_CANVAS_HEIGHT, +}; + +static void gst_kate_tag_base_init (gpointer g_class); +static void gst_kate_tag_class_init (GstKateTagClass * klass); +static void gst_kate_tag_init (GstKateTag * kt, GstKateTagClass * g_class); +static GstFlowReturn gst_kate_tag_parse_packet (GstKateParse * parse, + GstBuffer * buffer); +static void gst_kate_tag_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_kate_tag_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); +static void gst_kate_tag_dispose (GObject * object); + + +#define _do_init(type) \ + G_STMT_START{ \ + static const GInterfaceInfo tag_setter_info = { \ + NULL, \ + NULL, \ + NULL \ + }; \ + g_type_add_interface_static (type, GST_TYPE_TAG_SETTER, \ + &tag_setter_info); \ + }G_STMT_END + +GST_BOILERPLATE_FULL (GstKateTag, gst_kate_tag, GstKateParse, + GST_TYPE_KATE_PARSE, _do_init); + +static GstElementDetails kate_tag_details = +GST_ELEMENT_DETAILS ("Kate stream tagger", + "Formatter/Metadata", + "Retags kate streams", + "Vincent Penquerc'h "); + + +static void +gst_kate_tag_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_set_details (element_class, &kate_tag_details); +} + +static void +gst_kate_tag_class_init (GstKateTagClass * klass) +{ + GObjectClass *gobject_class; + GstKateParseClass *gstkateparse_class; + + gobject_class = (GObjectClass *) klass; + gstkateparse_class = GST_KATE_PARSE_CLASS (klass); + + gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_kate_tag_set_property); + gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_kate_tag_get_property); + gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_kate_tag_dispose); + + g_object_class_install_property (gobject_class, ARG_LANGUAGE, + g_param_spec_string ("language", "Language", + "Set the language of the stream", "", G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_CATEGORY, + g_param_spec_string ("category", "Category", + "Set the category of the stream", "", G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_ORIGINAL_CANVAS_WIDTH, + g_param_spec_int ("original-canvas-width", "Original canvas width", + "Set the width of the canvas this stream was authored for (0 is unspecified)", + 0, G_MAXINT, 0, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_ORIGINAL_CANVAS_HEIGHT, + g_param_spec_int ("original-canvas-height", "Original canvas height", + "Set the height of the canvas this stream was authored for (0 is unspecified)", + 0, G_MAXINT, 0, G_PARAM_READWRITE)); + + gstkateparse_class->parse_packet = + GST_DEBUG_FUNCPTR (gst_kate_tag_parse_packet); +} + +static void +gst_kate_tag_init (GstKateTag * kt, GstKateTagClass * g_class) +{ + kt->language = NULL; + kt->category = NULL; + kt->original_canvas_width = -1; + kt->original_canvas_height = -1; +} + +static void +gst_kate_tag_dispose (GObject * object) +{ + GstKateTag *kt = GST_KATE_TAG (object); + + GST_LOG_OBJECT (kt, "disposing"); + + if (kt->language) { + g_free (kt->language); + kt->language = NULL; + } + if (kt->category) { + g_free (kt->category); + kt->category = NULL; + } + + GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); +} + +static void +gst_kate_tag_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstKateTag *kt = GST_KATE_TAG (object); + const char *str; + + switch (prop_id) { + case ARG_LANGUAGE: + if (kt->language) { + g_free (kt->language); + kt->language = NULL; + } + str = g_value_get_string (value); + if (str) + kt->language = g_strdup (str); + break; + case ARG_CATEGORY: + if (kt->category) { + g_free (kt->category); + kt->category = NULL; + } + str = g_value_get_string (value); + if (str) + kt->category = g_strdup (str); + break; + case ARG_ORIGINAL_CANVAS_WIDTH: + kt->original_canvas_width = g_value_get_int (value); + break; + case ARG_ORIGINAL_CANVAS_HEIGHT: + kt->original_canvas_height = g_value_get_int (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_kate_tag_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstKateTag *kt = GST_KATE_TAG (object); + + switch (prop_id) { + case ARG_LANGUAGE: + g_value_set_string (value, kt->language ? kt->language : ""); + break; + case ARG_CATEGORY: + g_value_set_string (value, kt->category ? kt->category : ""); + break; + case ARG_ORIGINAL_CANVAS_WIDTH: + g_value_set_int (value, kt->original_canvas_width); + break; + case ARG_ORIGINAL_CANVAS_HEIGHT: + g_value_set_int (value, kt->original_canvas_height); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static guint16 +encode_canvas_size (size_t size) +{ + size_t base = size; + size_t shift = 0; + int value; + + while (base & ~((1 << 12) - 1)) { + /* we have a high bit we can't fit, increase shift if we wouldn't lose low bits */ + if ((size >> shift) & 1) + return 0; + ++shift; + base >>= 1; + } + if (G_UNLIKELY (shift >= 16)) + return 0; + + /* the size can be represented in our encoding */ + value = (base << 4) | shift; + + return (guint16) value; +} + +static GstFlowReturn +gst_kate_tag_parse_packet (GstKateParse * parse, GstBuffer * buffer) +{ + GstTagList *old_tags, *new_tags; + const GstTagList *user_tags; + GstKateTag *kt; + gchar *encoder = NULL; + GstBuffer *new_buf; + + kt = GST_KATE_TAG (parse); + + /* rewrite the language and category */ + if (GST_BUFFER_SIZE (buffer) >= 64 && GST_BUFFER_DATA (buffer)[0] == 0x80) { + buffer = gst_buffer_copy (buffer); + + /* language is at offset 32, 16 bytes, zero terminated */ + if (kt->language) { + strncpy ((char *) GST_BUFFER_DATA (buffer) + 32, kt->language, 15); + GST_BUFFER_DATA (buffer)[47] = 0; + } + /* category is at offset 48, 16 bytes, zero terminated */ + if (kt->category) { + strncpy ((char *) GST_BUFFER_DATA (buffer) + 48, kt->category, 15); + GST_BUFFER_DATA (buffer)[63] = 0; + } + if (kt->original_canvas_width >= 0) { + guint16 v = encode_canvas_size (kt->original_canvas_width); + GST_BUFFER_DATA (buffer)[16] = v & 0xff; + GST_BUFFER_DATA (buffer)[17] = (v >> 8) & 0xff; + } + if (kt->original_canvas_height >= 0) { + guint16 v = encode_canvas_size (kt->original_canvas_height); + GST_BUFFER_DATA (buffer)[18] = v & 0xff; + GST_BUFFER_DATA (buffer)[19] = (v >> 8) & 0xff; + } + } + + /* rewrite the comments packet */ + if (GST_BUFFER_SIZE (buffer) >= 9 && GST_BUFFER_DATA (buffer)[0] == 0x81) { + old_tags = + gst_tag_list_from_vorbiscomment_buffer (buffer, + (const guint8 *) "\201kate\0\0\0\0", 9, &encoder); + user_tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (kt)); + + /* build new tag list */ + new_tags = gst_tag_list_merge (user_tags, old_tags, + gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (kt))); + gst_tag_list_free (old_tags); + + new_buf = + gst_tag_list_to_vorbiscomment_buffer (new_tags, + (const guint8 *) "\201kate\0\0\0\0", 9, encoder); + gst_buffer_copy_metadata (new_buf, buffer, GST_BUFFER_COPY_TIMESTAMPS); + + gst_tag_list_free (new_tags); + g_free (encoder); + gst_buffer_unref (buffer); + + /* the buffer will have the framing bit used by Vorbis, but we don't use it */ + --GST_BUFFER_SIZE (new_buf); + + buffer = new_buf; + } + + return GST_KATE_PARSE_CLASS (parent_class)->parse_packet (parse, buffer); +} diff --git a/ext/kate/gstkatetag.h b/ext/kate/gstkatetag.h new file mode 100644 index 00000000..2f27df38 --- /dev/null +++ b/ext/kate/gstkatetag.h @@ -0,0 +1,65 @@ +/* -*- c-basic-offset: 2 -*- + * GStreamer + * Copyright (C) <2006> James Livingston + * Copyright (C) <2008> Vincent Penquerc'h + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef __GST_KATE_TAG_H__ +#define __GST_KATE_TAG_H__ + +#include "gstkateparse.h" + +G_BEGIN_DECLS +#define GST_TYPE_KATE_TAG \ + (gst_kate_tag_get_type()) +#define GST_KATE_TAG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KATE_TAG,GstKateTag)) +#define GST_KATE_TAG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KATE_TAG,GstKateTagClass)) +#define GST_IS_KATE_TAG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KATE_TAG)) +#define GST_IS_KATE_TAG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KATE_TAG)) +typedef struct _GstKateTag GstKateTag; +typedef struct _GstKateTagClass GstKateTagClass; + +/** + * GstKateTag: + * + * Opaque data structure. + */ +struct _GstKateTag +{ + GstKateParse parse; + + gchar *language; + gchar *category; + gint original_canvas_width; + gint original_canvas_height; +}; + +struct _GstKateTagClass +{ + GstKateParseClass parent_class; +}; + +GType gst_kate_tag_get_type (void); + +G_END_DECLS +#endif /* __GST_KATE_TAG_H__ */ diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c new file mode 100644 index 00000000..28360dbe --- /dev/null +++ b/ext/kate/gstkatetiger.c @@ -0,0 +1,802 @@ +/* + * GStreamer + * Copyright 2005 Thomas Vander Stichele + * Copyright 2005 Ronald S. Bultje + * Copyright 2008 Vincent Penquerc'h + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Alternatively, the contents of this file may be used under the + * GNU Lesser General Public License Version 2.1 (the "LGPL"), in + * which case the following provisions apply instead of the ones + * mentioned above: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:element-tiger + * @see_also: katedec + * + * + * + * This element decodes and renders Kate streams + * Kate is a free codec + * for text based data, such as subtitles. Any number of kate streams can be + * embedded in an Ogg stream. + * + * + * libkate (see above url) and libtiger + * are needed to build this element. + * + * Example pipeline + * + * This pipeline renders a Kate stream on top of a Theora video multiplexed + * in the same stream: + * + * gst-launch \ + * filesrc location=video.ogg ! oggdemux name=demux \ + * demux. ! queue ! theoradec ! ffmpegcolorspace ! tiger name=tiger \ + * demux. ! queue ! kateparse ! tiger. \ + * tiger. ! ffmpegcolorspace ! autovideosink + * + * + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include + +#include "gstkate.h" +#include "gstkatetiger.h" + +GST_DEBUG_CATEGORY_EXTERN (gst_katetiger_debug); +#define GST_CAT_DEFAULT gst_katetiger_debug + +/* Filter signals and args */ +enum +{ + /* FILL ME */ + LAST_SIGNAL +}; + +enum +{ + ARG_DEFAULT_FONT_DESC = DECODER_BASE_ARG_COUNT, + ARG_QUALITY, + ARG_DEFAULT_FONT_EFFECT, + ARG_DEFAULT_FONT_EFFECT_STRENGTH, + ARG_DEFAULT_FONT_RED, + ARG_DEFAULT_FONT_GREEN, + ARG_DEFAULT_FONT_BLUE, + ARG_DEFAULT_FONT_ALPHA, + ARG_DEFAULT_BACKGROUND_RED, + ARG_DEFAULT_BACKGROUND_GREEN, + ARG_DEFAULT_BACKGROUND_BLUE, + ARG_DEFAULT_BACKGROUND_ALPHA, +}; + +static GstStaticPadTemplate kate_sink_factory = +GST_STATIC_PAD_TEMPLATE ("kate_sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + ); + +static GstStaticPadTemplate video_sink_factory = +GST_STATIC_PAD_TEMPLATE ("video_sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("video/x-raw-rgb, bpp=(int)32, depth=(int)24") + ); + +static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("video/x-raw-rgb, bpp=(int)32, depth=(int)24") + ); + +GST_BOILERPLATE (GstKateTiger, gst_kate_tiger, GstElement, GST_TYPE_ELEMENT); + +static GType +gst_kate_tiger_font_effect_get_type () +{ + static GType font_effect_type = 0; + + if (!font_effect_type) { + static const GEnumValue font_effects[] = { + {tiger_font_plain, "none", "none"}, + {tiger_font_shadow, "shadow", "shadow"}, + {tiger_font_outline, "outline", "outline"}, + {0, NULL, NULL} + }; + font_effect_type = g_enum_register_static ("GstFontEffect", font_effects); + } + + return font_effect_type; +} + +static void gst_kate_tiger_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_kate_tiger_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); +static void gst_kate_tiger_dispose (GObject * object); + +static GstFlowReturn gst_kate_tiger_kate_chain (GstPad * pad, GstBuffer * buf); +static GstFlowReturn gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf); +static GstStateChangeReturn gst_kate_tiger_change_state (GstElement * element, + GstStateChange transition); +static gboolean gst_kate_tiger_kate_sink_query (GstPad * pad, GstQuery * query); +static gboolean gst_kate_tiger_kate_event (GstPad * pad, GstEvent * event); +static gboolean gst_kate_tiger_video_set_caps (GstPad * pad, GstCaps * caps); +static gboolean gst_kate_tiger_source_event (GstPad * pad, GstEvent * event); + +static void +gst_kate_tiger_base_init (gpointer gclass) +{ + static GstElementDetails element_details = + GST_ELEMENT_DETAILS ("Kate stream renderer", + "Codec/Decoder/Video/Overlay", + "Decodes and renders Kate streams on top of a video", + "Vincent Penquerc'h "); + GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&src_factory)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&kate_sink_factory)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&video_sink_factory)); + gst_element_class_set_details (element_class, &element_details); +} + +/* initialize the plugin's class */ +static void +gst_kate_tiger_class_init (GstKateTigerClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + + gobject_class = (GObjectClass *) klass; + gstelement_class = (GstElementClass *) klass; + + gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_kate_tiger_get_property); + gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_kate_tiger_set_property); + gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_kate_tiger_dispose); + + gst_kate_util_install_decoder_base_properties (gobject_class); + + g_object_class_install_property (gobject_class, ARG_QUALITY, + g_param_spec_double ("quality", "Rendering quality", + "Rendering quality (0 is faster, 1 is best and slower)", + 0.0, 1.0, 1.0, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_FONT_DESC, + g_param_spec_string ("default-font-desc", "Default font description", + "Default font description (Pango style) to render text with", + "", G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_FONT_EFFECT, + g_param_spec_enum ("default-font-effect", "Default font effect", + "Whether to apply an effect to text by default, for increased readability", + gst_kate_tiger_font_effect_get_type (), + tiger_font_plain, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + g_object_class_install_property (gobject_class, + ARG_DEFAULT_FONT_EFFECT_STRENGTH, + g_param_spec_double ("default-font-effect-strength", + "Default font effect strength", + "How pronounced should the font effect be (effect dependent)", 0.0, + 1.0, 0.5, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_FONT_RED, + g_param_spec_int ("default-font-red", + "Default font color (red component)", + "Default font color (red component, between 0 and 255) to render text with", + 0, 255, 255, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_FONT_GREEN, + g_param_spec_int ("default-font-green", + "Default font color (green component)", + "Default font color (green component, between 0 and 255) to render text with", + 0, 255, 255, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_FONT_BLUE, + g_param_spec_int ("default-font-blue", + "Default font color (blue component)", + "Default font color (blue component, between 0 and 255) to render text with", + 0, 255, 255, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_FONT_ALPHA, + g_param_spec_int ("default-font-alpha", + "Default font color (alpha component)", + "Default font color (alpha component, between 0 and 255) to render text with", + 0, 255, 255, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_BACKGROUND_RED, + g_param_spec_int ("default-background-red", + "Default background color (red component)", + "Default background color (red component, between 0 and 255) to render text with", + 0, 255, 255, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_BACKGROUND_GREEN, + g_param_spec_int ("default-background-green", + "Default background color (green component)", + "Default background color (green component, between 0 and 255) to render text with", + 0, 255, 255, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_BACKGROUND_BLUE, + g_param_spec_int ("default-background-blue", + "Default background color (blue component)", + "Default background color (blue component, between 0 and 255) to render text with", + 0, 255, 255, G_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, ARG_DEFAULT_BACKGROUND_ALPHA, + g_param_spec_int ("default-background-alpha", + "Default background color (alpha component)", + "Default background color (alpha component, between 0 and 255) to render text with", + 0, 255, 255, G_PARAM_READWRITE)); + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_kate_tiger_change_state); +} + +/* initialize the new element + * instantiate pads and add them to element + * set functions + * initialize structure + */ +static void +gst_kate_tiger_init (GstKateTiger * tiger, GstKateTigerClass * gclass) +{ + GST_DEBUG_OBJECT (tiger, "gst_kate_tiger_init"); + + tiger->mutex = g_mutex_new (); + + tiger->katesinkpad = + gst_pad_new_from_static_template (&kate_sink_factory, "kate_sink"); + gst_pad_set_chain_function (tiger->katesinkpad, + GST_DEBUG_FUNCPTR (gst_kate_tiger_kate_chain)); + gst_pad_set_query_function (tiger->katesinkpad, + GST_DEBUG_FUNCPTR (gst_kate_tiger_kate_sink_query)); + gst_pad_use_fixed_caps (tiger->katesinkpad); + gst_pad_set_caps (tiger->katesinkpad, + gst_static_pad_template_get_caps (&kate_sink_factory)); + gst_pad_set_event_function (tiger->katesinkpad, gst_kate_tiger_kate_event); + gst_element_add_pad (GST_ELEMENT (tiger), tiger->katesinkpad); + + tiger->videosinkpad = + gst_pad_new_from_static_template (&video_sink_factory, "video_sink"); + gst_pad_set_chain_function (tiger->videosinkpad, + GST_DEBUG_FUNCPTR (gst_kate_tiger_video_chain)); + //gst_pad_set_query_function (tiger->videosinkpad, GST_DEBUG_FUNCPTR (gst_kate_tiger_video_sink_query)); + gst_pad_use_fixed_caps (tiger->videosinkpad); + gst_pad_set_caps (tiger->videosinkpad, + gst_static_pad_template_get_caps (&video_sink_factory)); + gst_pad_set_setcaps_function (tiger->videosinkpad, + GST_DEBUG_FUNCPTR (gst_kate_tiger_video_set_caps)); + gst_element_add_pad (GST_ELEMENT (tiger), tiger->videosinkpad); + + tiger->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); + gst_pad_set_event_function (tiger->srcpad, gst_kate_tiger_source_event); + gst_element_add_pad (GST_ELEMENT (tiger), tiger->srcpad); + + gst_kate_util_decode_base_init (&tiger->decoder); + + tiger->tr = NULL; + + tiger->default_font_desc = NULL; + tiger->quality = -1.0; + tiger->default_font_effect = tiger_font_plain; + tiger->default_font_effect_strength = 0.5; + tiger->default_font_r = 255; + tiger->default_font_g = 255; + tiger->default_font_b = 255; + tiger->default_font_a = 255; + tiger->default_background_r = 0; + tiger->default_background_g = 0; + tiger->default_background_b = 0; + tiger->default_background_a = 0; + + tiger->video_width = 0; + tiger->video_height = 0; +} + +static void +gst_kate_tiger_dispose (GObject * object) +{ + GstKateTiger *tiger = GST_KATE_TIGER (object); + + GST_LOG_OBJECT (tiger, "disposing"); + + if (tiger->default_font_desc) { + g_free (tiger->default_font_desc); + tiger->default_font_desc = NULL; + } + + g_mutex_free (tiger->mutex); + tiger->mutex = NULL; + + GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); +} + +static void +gst_kate_tiger_update_quality (GstKateTiger * tiger) +{ + if (tiger->tr && tiger->quality >= 0.0) { + tiger_renderer_set_quality (tiger->tr, tiger->quality); + } +} + +static void +gst_kate_tiger_update_default_font_effect (GstKateTiger * tiger) +{ + if (tiger->tr) { + tiger_renderer_set_default_font_effect (tiger->tr, + tiger->default_font_effect, tiger->default_font_effect_strength); + } +} + +static void +gst_kate_tiger_update_default_font_color (GstKateTiger * tiger) +{ + if (tiger->tr) { + tiger_renderer_set_default_font_color (tiger->tr, + tiger->default_font_r / 255.0, + tiger->default_font_g / 255.0, + tiger->default_font_b / 255.0, tiger->default_font_a / 255.0); + } +} + +static void +gst_kate_tiger_update_default_background_color (GstKateTiger * tiger) +{ + if (tiger->tr) { + tiger_renderer_set_default_background_fill_color (tiger->tr, + tiger->default_background_r / 255.0, + tiger->default_background_g / 255.0, + tiger->default_background_b / 255.0, + tiger->default_background_a / 255.0); + } +} + +static void +gst_kate_tiger_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstKateTiger *tiger = GST_KATE_TIGER (object); + const char *str; + + g_mutex_lock (tiger->mutex); + + switch (prop_id) { + case ARG_DEFAULT_FONT_DESC: + if (tiger->default_font_desc) { + g_free (tiger->default_font_desc); + tiger->default_font_desc = NULL; + } + str = g_value_get_string (value); + if (str) { + tiger->default_font_desc = g_strdup (str); + if (tiger->tr) + tiger_renderer_set_default_font_description (tiger->tr, + tiger->default_font_desc); + } + break; + case ARG_QUALITY: + tiger->quality = g_value_get_double (value); + gst_kate_tiger_update_quality (tiger); + break; + case ARG_DEFAULT_FONT_EFFECT: + tiger->default_font_effect = g_value_get_enum (value); + gst_kate_tiger_update_default_font_effect (tiger); + break; + case ARG_DEFAULT_FONT_EFFECT_STRENGTH: + tiger->default_font_effect_strength = g_value_get_double (value); + gst_kate_tiger_update_default_font_effect (tiger); + break; + case ARG_DEFAULT_FONT_RED: + tiger->default_font_r = g_value_get_int (value); + gst_kate_tiger_update_default_font_color (tiger); + break; + case ARG_DEFAULT_FONT_GREEN: + tiger->default_font_g = g_value_get_int (value); + gst_kate_tiger_update_default_font_color (tiger); + break; + case ARG_DEFAULT_FONT_BLUE: + tiger->default_font_b = g_value_get_int (value); + gst_kate_tiger_update_default_font_color (tiger); + break; + case ARG_DEFAULT_FONT_ALPHA: + tiger->default_font_a = g_value_get_int (value); + gst_kate_tiger_update_default_font_color (tiger); + break; + case ARG_DEFAULT_BACKGROUND_RED: + tiger->default_background_r = g_value_get_int (value); + gst_kate_tiger_update_default_background_color (tiger); + break; + case ARG_DEFAULT_BACKGROUND_GREEN: + tiger->default_background_g = g_value_get_int (value); + gst_kate_tiger_update_default_background_color (tiger); + break; + case ARG_DEFAULT_BACKGROUND_BLUE: + tiger->default_background_b = g_value_get_int (value); + gst_kate_tiger_update_default_background_color (tiger); + break; + case ARG_DEFAULT_BACKGROUND_ALPHA: + tiger->default_background_a = g_value_get_int (value); + gst_kate_tiger_update_default_background_color (tiger); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } + + g_mutex_unlock (tiger->mutex); +} + +static void +gst_kate_tiger_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + GstKateTiger *tiger = GST_KATE_TIGER (object); + + g_mutex_lock (tiger->mutex); + + switch (prop_id) { + case ARG_DEFAULT_FONT_DESC: + g_value_set_string (value, + tiger->default_font_desc ? tiger->default_font_desc : ""); + break; + case ARG_QUALITY: + g_value_set_double (value, tiger->quality); + break; + case ARG_DEFAULT_FONT_EFFECT: + g_value_set_enum (value, tiger->default_font_effect); + break; + case ARG_DEFAULT_FONT_EFFECT_STRENGTH: + g_value_set_double (value, tiger->default_font_effect_strength); + break; + case ARG_DEFAULT_FONT_RED: + g_value_set_int (value, tiger->default_font_r); + break; + case ARG_DEFAULT_FONT_GREEN: + g_value_set_int (value, tiger->default_font_g); + break; + case ARG_DEFAULT_FONT_BLUE: + g_value_set_int (value, tiger->default_font_b); + break; + case ARG_DEFAULT_FONT_ALPHA: + g_value_set_int (value, tiger->default_font_a); + break; + case ARG_DEFAULT_BACKGROUND_RED: + g_value_set_int (value, tiger->default_background_r); + break; + case ARG_DEFAULT_BACKGROUND_GREEN: + g_value_set_int (value, tiger->default_background_g); + break; + case ARG_DEFAULT_BACKGROUND_BLUE: + g_value_set_int (value, tiger->default_background_b); + break; + case ARG_DEFAULT_BACKGROUND_ALPHA: + g_value_set_int (value, tiger->default_background_a); + break; + default: + if (!gst_kate_util_decoder_base_get_property (&tiger->decoder, object, + prop_id, value, pspec)) { + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } + break; + } + + g_mutex_unlock (tiger->mutex); +} + +/* GstElement vmethod implementations */ + +/* chain function + * this function does the actual processing + */ + +static GstFlowReturn +gst_kate_tiger_kate_chain (GstPad * pad, GstBuffer * buf) +{ + GstKateTiger *tiger = GST_KATE_TIGER (gst_pad_get_parent (pad)); + const kate_event *ev = NULL; + GstFlowReturn rflow = GST_FLOW_OK; + + g_mutex_lock (tiger->mutex); + + GST_LOG_OBJECT (tiger, "Got kate buffer"); + + rflow = + gst_kate_util_decoder_base_chain_kate_packet (&tiger->decoder, + GST_ELEMENT_CAST (tiger), pad, buf, tiger->srcpad, &ev); + if (G_LIKELY (rflow == GST_FLOW_OK)) { + if (ev) { + int ret = tiger_renderer_add_event (tiger->tr, ev->ki, ev); + GST_INFO_OBJECT (tiger, "adding event for %p from %f to %f: %p, \"%s\"", + ev->ki, ev->start_time, ev->end_time, ev->bitmap, ev->text); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (tiger, + "failed to add Kate event to Tiger renderer: %d", ret); + } + } + } + + gst_object_unref (tiger); + gst_buffer_unref (buf); + + g_mutex_unlock (tiger->mutex); + + return rflow; +} + +static gboolean +gst_kate_tiger_video_set_caps (GstPad * pad, GstCaps * caps) +{ + GstKateTiger *tiger = GST_KATE_TIGER (gst_pad_get_parent (pad)); + GstStructure *s; + gint w, h; + gboolean res = FALSE; + + g_mutex_lock (tiger->mutex); + + s = gst_caps_get_structure (caps, 0); + + if (G_LIKELY (gst_structure_get_int (s, "width", &w)) + && G_LIKELY (gst_structure_get_int (s, "height", &h))) { + GST_INFO_OBJECT (tiger, "video sink: %d %d", w, h); + tiger->video_width = w; + tiger->video_height = h; + res = TRUE; + } + + g_mutex_unlock (tiger->mutex); + + gst_object_unref (tiger); + return TRUE; +} + +static GstFlowReturn +gst_kate_tiger_video_chain (GstPad * pad, GstBuffer * buf) +{ + GstKateTiger *tiger = GST_KATE_TIGER (gst_pad_get_parent (pad)); + GstFlowReturn rflow = GST_FLOW_OK; + unsigned char *ptr; + int ret; + + g_mutex_lock (tiger->mutex); + + GST_LOG_OBJECT (tiger, "got video frame, %u bytes", GST_BUFFER_SIZE (buf)); + + /* draw on it */ + buf = gst_buffer_make_writable (buf); + if (G_UNLIKELY (!buf)) { + GST_WARNING_OBJECT (tiger, "Failed to make video buffer writable"); + } else { + ptr = GST_BUFFER_DATA (buf); + if (!ptr) { + GST_WARNING_OBJECT (tiger, + "Failed to get a pointer to video buffer data"); + } else { + ret = tiger_renderer_set_buffer (tiger->tr, ptr, tiger->video_width, tiger->video_height, tiger->video_width * 4, 0); // TODO: stride ? + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (tiger, + "Tiger renderer failed to set buffer to video frame: %d", ret); + } else { + kate_float t = GST_BUFFER_TIMESTAMP (buf) / (gdouble) GST_SECOND; + ret = tiger_renderer_update (tiger->tr, t, 1); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (tiger, "Tiger renderer failed to update: %d", + ret); + } else { + ret = tiger_renderer_render (tiger->tr); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (tiger, + "Tiger renderer failed to render to video frame: %d", ret); + } else { + GST_LOG_OBJECT (tiger, + "Tiger renderer rendered on video frame at %f", t); + } + } + } + } + } + rflow = gst_pad_push (tiger->srcpad, buf); + + gst_object_unref (tiger); + + g_mutex_unlock (tiger->mutex); + + return rflow; +} + +static GstStateChangeReturn +gst_kate_tiger_change_state (GstElement * element, GstStateChange transition) +{ + GstKateTiger *tiger = GST_KATE_TIGER (element); + GstStateChangeReturn res; + + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: + GST_DEBUG_OBJECT (tiger, "PAUSED -> READY, clearing kate state"); + g_mutex_lock (tiger->mutex); + if (tiger->tr) { + tiger_renderer_destroy (tiger->tr); + tiger->tr = NULL; + } + g_mutex_unlock (tiger->mutex); + break; + default: + break; + } + + res = + gst_kate_decoder_base_change_state (&tiger->decoder, element, + parent_class, transition); + + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + GST_DEBUG_OBJECT (tiger, "READY -> PAUSED, initializing kate state"); + g_mutex_lock (tiger->mutex); + if (tiger->decoder.initialized) { + int ret = tiger_renderer_create (&tiger->tr); + if (ret < 0) { + GST_WARNING_OBJECT (tiger, "failed to create tiger renderer: %d", + ret); + } else { + ret = + tiger_renderer_set_default_font_description (tiger->tr, + tiger->default_font_desc); + if (ret < 0) { + GST_WARNING_OBJECT (tiger, + "failed to set tiger default font description: %d", ret); + } + gst_kate_tiger_update_default_font_color (tiger); + gst_kate_tiger_update_default_background_color (tiger); + gst_kate_tiger_update_default_font_effect (tiger); + gst_kate_tiger_update_quality (tiger); + } + } + g_mutex_unlock (tiger->mutex); + break; + default: + break; + } + + return res; +} + +static gboolean +gst_kate_tiger_seek (GstKateTiger * tiger, GstPad * pad, GstEvent * event) +{ + GstFormat format; + gdouble rate; + GstSeekFlags flags; + GstSeekType cur_type, stop_type; + gint64 cur, stop; + + gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur, + &stop_type, &stop); + + /* forward to both sinks */ + gst_event_ref (event); + if (gst_pad_push_event (tiger->videosinkpad, event)) { + if (gst_pad_push_event (tiger->katesinkpad, event)) { + if (format == GST_FORMAT_TIME) { + /* if seeking in time, we can update tiger to remove any appropriate events */ + kate_float target = cur / (gdouble) GST_SECOND; + GST_INFO_OBJECT (tiger, "Seeking in time to %f", target); + g_mutex_lock (tiger->mutex); + tiger_renderer_seek (tiger->tr, target); + g_mutex_unlock (tiger->mutex); + } + return TRUE; + } else { + return FALSE; + } + } else { + gst_event_unref (event); + return FALSE; + } +} + +static gboolean +gst_kate_tiger_source_event (GstPad * pad, GstEvent * event) +{ + GstKateTiger *tiger = + (GstKateTiger *) (gst_object_get_parent (GST_OBJECT (pad))); + gboolean res = TRUE; + + g_return_val_if_fail (tiger != NULL, FALSE); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_SEEK: + GST_INFO_OBJECT (tiger, "Seek on source pad"); + res = gst_kate_tiger_seek (tiger, pad, event); + break; + default: + res = gst_pad_event_default (pad, event); + break; + } + + gst_object_unref (tiger); + + return res; +} + +static gboolean +gst_kate_tiger_kate_event (GstPad * pad, GstEvent * event) +{ + GstKateTiger *tiger = + (GstKateTiger *) (gst_object_get_parent (GST_OBJECT (pad))); + gboolean res = TRUE; + + g_return_val_if_fail (tiger != NULL, FALSE); + + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_NEWSEGMENT: + GST_INFO_OBJECT (tiger, "New segment on Kate pad"); + gst_event_unref (event); + break; + case GST_EVENT_EOS: + /* we ignore this, it just means we don't have anymore Kate packets, but + the Tiger renderer will still draw (if appropriate) on incoming video */ + GST_INFO_OBJECT (tiger, "EOS on Kate pad"); + gst_event_unref (event); + break; + default: + res = gst_pad_event_default (pad, event); + break; + } + + gst_object_unref (tiger); + + return res; +} + +gboolean +gst_kate_tiger_kate_sink_query (GstPad * pad, GstQuery * query) +{ + GstKateTiger *tiger = GST_KATE_TIGER (gst_pad_get_parent (pad)); + gboolean res = gst_kate_decoder_base_sink_query (&tiger->decoder, + GST_ELEMENT_CAST (tiger), pad, query); + gst_object_unref (tiger); + return res; +} diff --git a/ext/kate/gstkatetiger.h b/ext/kate/gstkatetiger.h new file mode 100644 index 00000000..0ab7dc13 --- /dev/null +++ b/ext/kate/gstkatetiger.h @@ -0,0 +1,108 @@ +/* + * GStreamer + * Copyright 2005 Thomas Vander Stichele + * Copyright 2005 Ronald S. Bultje + * Copyright 2008 Vincent Penquerc'h + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Alternatively, the contents of this file may be used under the + * GNU Lesser General Public License Version 2.1 (the "LGPL"), in + * which case the following provisions apply instead of the ones + * mentioned above: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_KATE_TIGER_H__ +#define __GST_KATE_TIGER_H__ + +#include +#include +#include +#include "gstkateutil.h" + +G_BEGIN_DECLS +/* #defines don't like whitespacey bits */ +#define GST_TYPE_KATE_TIGER \ + (gst_kate_tiger_get_type()) +#define GST_KATE_TIGER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_KATE_TIGER,GstKateTiger)) +#define GST_KATE_TIGER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_KATE,GstKateTigerClass)) +#define GST_IS_KATE_TIGER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_KATE_TIGER)) +#define GST_IS_KATE_TIGER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_KATE_TIGER)) +typedef struct _GstKateTiger GstKateTiger; +typedef struct _GstKateTigerClass GstKateTigerClass; + +struct _GstKateTiger +{ + GstElement element; + + GstPad *katesinkpad; + GstPad *videosinkpad; + GstPad *srcpad; + + GstKateDecoderBase decoder; + + tiger_renderer *tr; + + gdouble quality; + gchar *default_font_desc; + gboolean default_font_effect; + gdouble default_font_effect_strength; + guchar default_font_r; + guchar default_font_g; + guchar default_font_b; + guchar default_font_a; + guchar default_background_r; + guchar default_background_g; + guchar default_background_b; + guchar default_background_a; + + gint video_width; + gint video_height; + + GMutex *mutex; +}; + +struct _GstKateTigerClass +{ + GstElementClass parent_class; +}; + +GType gst_kate_tiger_get_type (void); + +G_END_DECLS +#endif /* __GST_KATE_TIGER_H__ */ diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c new file mode 100644 index 00000000..2928771d --- /dev/null +++ b/ext/kate/gstkateutil.c @@ -0,0 +1,371 @@ +/* GStreamer + * Copyright (C) 2008 Vincent Penquerc'h + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include "gstkate.h" +#include "gstkateutil.h" + + +GstCaps * +gst_kate_util_set_header_on_caps (GstElement * element, GstCaps * caps, + GList * headers) +{ + GstStructure *structure; + GValue array = { 0 }; + + if (G_UNLIKELY (!caps)) + return NULL; + if (G_UNLIKELY (!headers)) + return NULL; + + caps = gst_caps_make_writable (caps); + structure = gst_caps_get_structure (caps, 0); + + g_value_init (&array, GST_TYPE_ARRAY); + + while (headers) { + GValue value = { 0 }; + GstBuffer *buffer = headers->data; + g_assert (buffer); + GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_IN_CAPS); + g_value_init (&value, GST_TYPE_BUFFER); + /* as in theoraenc, we need to copy to avoid circular references */ + buffer = gst_buffer_copy (buffer); + gst_value_set_buffer (&value, buffer); + gst_buffer_unref (buffer); + gst_value_array_append_value (&array, &value); + g_value_unset (&value); + headers = headers->next; + } + + gst_structure_set_value (structure, "streamheader", &array); + g_value_unset (&array); + GST_LOG_OBJECT (element, "here are the newly set caps: %" GST_PTR_FORMAT, + caps); + + return caps; +} + +void +gst_kate_util_install_decoder_base_properties (GObjectClass * gobject_class) +{ + g_object_class_install_property (gobject_class, ARG_DEC_BASE_LANGUAGE, + g_param_spec_string ("language", "Language", "The language of the stream", + "", G_PARAM_READABLE)); + + g_object_class_install_property (gobject_class, ARG_DEC_BASE_CATEGORY, + g_param_spec_string ("category", "Category", "The category of the stream", + "", G_PARAM_READABLE)); + + g_object_class_install_property (gobject_class, + ARG_DEC_BASE_ORIGINAL_CANVAS_WIDTH, + g_param_spec_int ("original-canvas-width", + "Original canvas width (0 is unspecified)", + "The canvas width this stream was authored for", 0, G_MAXINT, 0, + G_PARAM_READABLE)); + + g_object_class_install_property (gobject_class, + ARG_DEC_BASE_ORIGINAL_CANVAS_HEIGHT, + g_param_spec_int ("original-canvas-height", "Original canvas height", + "The canvas height this stream was authored for (0 is unspecified)", + 0, G_MAXINT, 0, G_PARAM_READABLE)); +} + +void +gst_kate_util_decode_base_init (GstKateDecoderBase * decoder) +{ + if (G_UNLIKELY (!decoder)) + return; + + decoder->language = NULL; + decoder->category = NULL; + decoder->original_canvas_width = 0; + decoder->original_canvas_height = 0; + decoder->tags = NULL; + decoder->initialized = FALSE; +} + +gboolean +gst_kate_util_decoder_base_get_property (GstKateDecoderBase * decoder, + GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) +{ + gboolean res = TRUE; + switch (prop_id) { + case ARG_DEC_BASE_LANGUAGE: + g_value_set_string (value, decoder->language); + break; + case ARG_DEC_BASE_CATEGORY: + g_value_set_string (value, decoder->category); + break; + case ARG_DEC_BASE_ORIGINAL_CANVAS_WIDTH: + g_value_set_int (value, decoder->original_canvas_width); + break; + case ARG_DEC_BASE_ORIGINAL_CANVAS_HEIGHT: + g_value_set_int (value, decoder->original_canvas_height); + break; + default: + res = FALSE; + break; + } + return res; +} + +GstFlowReturn +gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, + GstElement * element, GstPad * pad, GstBuffer * buf, GstPad * srcpad, + const kate_event ** ev) +{ + kate_packet kp; + int ret; + GstFlowReturn rflow = GST_FLOW_OK; + + GST_DEBUG_OBJECT (element, "got kate packet, %u bytes, type %02x", + GST_BUFFER_SIZE (buf), + GST_BUFFER_SIZE (buf) == 0 ? -1 : GST_BUFFER_DATA (buf)[0]); + kate_packet_wrap (&kp, GST_BUFFER_SIZE (buf), GST_BUFFER_DATA (buf)); + ret = kate_high_decode_packetin (&decoder->k, &kp, ev); + if (G_UNLIKELY (ret < 0)) { + GST_WARNING_OBJECT (element, "kate_high_decode_packetin failed (%d)", ret); + return GST_FLOW_ERROR; + } else if (G_UNLIKELY (ret > 0)) { + GST_DEBUG_OBJECT (element, + "kate_high_decode_packetin has received EOS packet"); + return GST_FLOW_OK; + } + + /* headers may be interesting to retrieve information from */ + if (G_LIKELY (GST_BUFFER_SIZE (buf) > 0)) + switch (GST_BUFFER_DATA (buf)[0]) { + GstCaps *caps; + + case 0x80: /* ID header */ + GST_INFO_OBJECT (element, "Parsed ID header: language %s, category %s", + decoder->k.ki->language, decoder->k.ki->category); + caps = gst_caps_new_simple ("text/x-pango-markup", NULL); + gst_pad_set_caps (srcpad, caps); + gst_caps_unref (caps); + if (decoder->k.ki->language && *decoder->k.ki->language) { + GstTagList *tags = gst_tag_list_new (); + if (tags) { + gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_LANGUAGE_CODE, + decoder->k.ki->language, NULL); + // TODO: category - where should it go ? + decoder->tags = + gst_tag_list_merge (decoder->tags, tags, GST_TAG_MERGE_REPLACE); + gst_tag_list_free (tags); + } + } + + /* update properties */ + if (decoder->language) + g_free (decoder->language); + decoder->language = g_strdup (decoder->k.ki->language); + if (decoder->category) + g_free (decoder->category); + decoder->category = g_strdup (decoder->k.ki->category); + decoder->original_canvas_width = decoder->k.ki->original_canvas_width; + decoder->original_canvas_height = decoder->k.ki->original_canvas_height; + + break; + + case 0x81: /* Vorbis comments header */ + GST_INFO_OBJECT (element, "Parsed comments header"); + { + gchar *encoder = NULL; + GstTagList *list = gst_tag_list_from_vorbiscomment_buffer (buf, + (const guint8 *) "\201kate\0\0\0\0", 9, &encoder); + if (list) { + decoder->tags = + gst_tag_list_merge (decoder->tags, list, GST_TAG_MERGE_REPLACE); + gst_tag_list_free (list); + } + + if (!decoder->tags) { + GST_ERROR_OBJECT (element, "failed to decode comment header"); + decoder->tags = gst_tag_list_new (); + } + if (encoder) { + gst_tag_list_add (decoder->tags, GST_TAG_MERGE_REPLACE, + GST_TAG_ENCODER, encoder, NULL); + g_free (encoder); + } + gst_tag_list_add (decoder->tags, GST_TAG_MERGE_REPLACE, GST_TAG_CODEC, + "kate", NULL); + gst_tag_list_add (decoder->tags, GST_TAG_MERGE_REPLACE, + GST_TAG_ENCODER_VERSION, decoder->k.ki->bitstream_version_major, + NULL); + + if (decoder->initialized) { + gst_element_found_tags_for_pad (element, srcpad, decoder->tags); + decoder->tags = NULL; + } else { + /* Only push them as messages for the time being. * + * They will be pushed on the pad once the decoder is initialized */ + gst_element_post_message (element, + gst_message_new_tag (GST_OBJECT (element), + gst_tag_list_copy (decoder->tags))); + } + } + break; + + default: + break; + } + + return rflow; +} + +GstStateChangeReturn +gst_kate_decoder_base_change_state (GstKateDecoderBase * decoder, + GstElement * element, GstElementClass * parent_class, + GstStateChange transition) +{ + GstStateChangeReturn res; + int ret; + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + GST_DEBUG_OBJECT (element, "READY -> PAUSED, initializing kate state"); + ret = kate_high_decode_init (&decoder->k); + if (ret < 0) { + GST_WARNING_OBJECT (element, "failed to initialize kate state: %d", + ret); + } + decoder->initialized = TRUE; + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + break; + default: + break; + } + + res = parent_class->change_state (element, transition); + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + GST_DEBUG_OBJECT (element, "PAUSED -> READY, clearing kate state"); + if (decoder->initialized) { + kate_high_decode_clear (&decoder->k); + decoder->initialized = FALSE; + } + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + + return res; +} + +static GstClockTime +gst_kate_util_granule_time (kate_state * k, gint64 granulepos) +{ + if (G_UNLIKELY (granulepos == -1)) + return -1; + + return kate_granule_time (k->ki, granulepos) * GST_SECOND; +} + +/* +conversions on the sink: + - default is granules at num/den rate (subject to the granule shift) + - default -> time is possible + - bytes do not mean anything, packets can be any number of bytes, and we + have no way to know the number of bytes emitted without decoding +conversions on the source: + - nothing +*/ + +gboolean +gst_kate_decoder_base_convert (GstKateDecoderBase * decoder, + GstElement * element, GstPad * pad, GstFormat src_fmt, gint64 src_val, + GstFormat * dest_fmt, gint64 * dest_val) +{ + gboolean res = FALSE; + + if (src_fmt == *dest_fmt) { + *dest_val = src_val; + return TRUE; + } + + if (!decoder->initialized) { + GST_WARNING_OBJECT (element, "not initialized yet"); + return FALSE; + } + + if (src_fmt == GST_FORMAT_BYTES || *dest_fmt == GST_FORMAT_BYTES) { + GST_WARNING_OBJECT (element, "unsupported format"); + return FALSE; + } + + switch (src_fmt) { + case GST_FORMAT_DEFAULT: + switch (*dest_fmt) { + case GST_FORMAT_TIME: + *dest_val = gst_kate_util_granule_time (&decoder->k, src_val); + res = TRUE; + break; + default: + res = FALSE; + break; + } + break; + default: + res = FALSE; + break; + } + + if (!res) { + GST_WARNING_OBJECT (element, "unsupported format"); + } + + return res; +} + +gboolean +gst_kate_decoder_base_sink_query (GstKateDecoderBase * decoder, + GstElement * element, GstPad * pad, GstQuery * query) +{ + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_CONVERT: + { + GstFormat src_fmt, dest_fmt; + gint64 src_val, dest_val; + + gst_query_parse_convert (query, &src_fmt, &src_val, &dest_fmt, &dest_val); + if (!gst_kate_decoder_base_convert (decoder, element, pad, src_fmt, + src_val, &dest_fmt, &dest_val)) { + return gst_pad_query_default (pad, query); + } + gst_query_set_convert (query, src_fmt, src_val, dest_fmt, dest_val); + return TRUE; + } + default: + return gst_pad_query_default (pad, query); + } +} diff --git a/ext/kate/gstkateutil.h b/ext/kate/gstkateutil.h new file mode 100644 index 00000000..6e8ea2e0 --- /dev/null +++ b/ext/kate/gstkateutil.h @@ -0,0 +1,77 @@ +/* -*- c-basic-offset: 2 -*- + * GStreamer + * Copyright (C) <2008> Vincent Penquerc'h + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef __GST_KATE_UTIL_H__ +#define __GST_KATE_UTIL_H__ + +#include +#include + +G_BEGIN_DECLS enum +{ + ARG_DEC_BASE_0, + ARG_DEC_BASE_LANGUAGE, + ARG_DEC_BASE_CATEGORY, + ARG_DEC_BASE_ORIGINAL_CANVAS_WIDTH, + ARG_DEC_BASE_ORIGINAL_CANVAS_HEIGHT, + DECODER_BASE_ARG_COUNT +}; + +typedef struct +{ + kate_state k; + + gboolean initialized; + + GstTagList *tags; + + gchar *language; + gchar *category; + + gint original_canvas_width; + gint original_canvas_height; + +} GstKateDecoderBase; + +extern GstCaps *gst_kate_util_set_header_on_caps (GstElement * element, + GstCaps * caps, GList * headers); +extern void gst_kate_util_decode_base_init (GstKateDecoderBase * decoder); +extern void gst_kate_util_install_decoder_base_properties (GObjectClass * + gobject_class); +extern gboolean gst_kate_util_decoder_base_get_property (GstKateDecoderBase * + decoder, GObject * object, guint prop_id, GValue * value, + GParamSpec * pspec); +extern GstFlowReturn +gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, + GstElement * element, GstPad * pad, GstBuffer * buffer, GstPad * srcpad, + const kate_event ** ev); +extern GstStateChangeReturn +gst_kate_decoder_base_change_state (GstKateDecoderBase * decoder, + GstElement * element, GstElementClass * parent_class, + GstStateChange transition); +extern gboolean gst_kate_decoder_base_convert (GstKateDecoderBase * decoder, + GstElement * element, GstPad * pad, GstFormat src_fmt, gint64 src_val, + GstFormat * dest_fmt, gint64 * dest_val); +extern gboolean gst_kate_decoder_base_sink_query (GstKateDecoderBase * decoder, + GstElement * element, GstPad * pad, GstQuery * query); + +G_END_DECLS +#endif /* __GST_KATE_UTIL_H__ */ diff --git a/gst-plugins-bad.spec.in b/gst-plugins-bad.spec.in index ab02bcaa..ea4a5d82 100644 --- a/gst-plugins-bad.spec.in +++ b/gst-plugins-bad.spec.in @@ -158,6 +158,7 @@ rm -rf $RPM_BUILD_ROOT @USE_CELT_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstcelt.so @USE_MPEG2ENC_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstmpeg2enc.so @USE_MPLEX_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstmplex.so +@USE_KATE_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstkate.so %changelog * Thu Mar 12 2009 Christian Schaller diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index bf4f07ce..1aa99d1a 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -63,6 +63,13 @@ else check_timidity= endif +if USE_KATE +check_kate=elements/kate +else +check_kate= +endif + + VALGRIND_TO_FIX = \ elements/mpeg2enc \ elements/mplex @@ -78,6 +85,7 @@ check_PROGRAMS = \ $(check_neon) \ $(check_ofa) \ $(check_timidity) \ + $(check_kate) \ elements/aacparse \ elements/amrparse \ elements/camerabin \ @@ -119,4 +127,7 @@ elements_rtpbin_buffer_list_SOURCES = elements/rtpbin_buffer_list.c elements_timidity_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS) elements_timidity_LDADD = $(GST_BASE_LIBS) $(LDADD) +elements_kate_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS) +elements_kate_LDADD = $(GST_BASE_LIBS) $(LDADD) + EXTRA_DIST = gst-plugins-bad.supp diff --git a/tests/check/elements/kate.c b/tests/check/elements/kate.c new file mode 100644 index 00000000..f7ac3ed4 --- /dev/null +++ b/tests/check/elements/kate.c @@ -0,0 +1,839 @@ +/* GStreamer + * + * unit test for kate + * + * Copyright (C) <2007> Stefan Kost + * Copyright (C) <2008> ogg.k.ogg.k + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include + +#include +#include + + +static const guint8 kate_header_0x80[64] = { + 0x80, 0x6b, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x09, 0x00, 0x00, 0x00, 0x20, /* .kate...... ... */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, /* ................ */ + 0x65, 0x6e, 0x5f, 0x47, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* en_GB........... */ + 0x6e, 0x6f, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* none............ */ +}; + +static const guint8 kate_header_0x81[53] = { + 0x81, 0x6b, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x6c, 0x69, 0x62, /* .kate........lib */ + 0x6b, 0x61, 0x74, 0x65, 0x20, 0x30, 0x2e, 0x31, 0x2e, 0x30, 0x20, 0x28, 0x54, 0x69, 0x67, 0x65, /* kate 0.1.0 (Tige */ + 0x72, 0x29, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x54, 0x49, 0x54, 0x4c, 0x45, 0x3d, /* r)........TITLE= */ + 0x54, 0x69, 0x67, 0x65, 0x72, /* Tiger */ +}; +static const guint8 kate_header_0x8x[10] = { + 0x80, 0x6b, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00 +}; +static const guint8 kate_header_0x88[11] = { + 0x88, 0x6b, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +static const guint8 kate_header_0x00[45] = { + 0x00, 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, /* ................ */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x70, 0x6c, 0x61, /* .............pla */ + 0x69, 0x6e, 0x20, 0x6f, 0x6c, 0x64, 0x20, 0x74, 0x65, 0x78, 0x74, 0x08, 0x00 /* in old text.. */ +}; +static const guint8 kate_header_0x01[1] = { + 0x01 +}; +static const guint8 kate_header_0x7f[1] = { + 0x7f +}; + +static const unsigned char kate_spu[] = { + 0x00, 0x1b, /* size */ + 0x00, 0x06, /* commands at offset 6 */ + 0x45, /* first line data - 2 pixels of colors 0 and 1 */ + 0x76, /* first line data - 2 pixels of colors 3 and 2 */ + 0x00, 0x00, /* timestamp */ + 0x00, 0x06, /* link to next command sequence - points back to the current one to mark no more */ + 0x06, 0x00, 0x04, 0x00, 0x05, /* pointers to data */ + 0x05, 0x00, 0x30, 0x04, 0x00, 0x10, 0x02, /* area: 3x1 -> 4x2 */ + 0x04, 0x0f, 0xff, /* alpha: color 0 transparent, all others opaque */ + 0x01, /* show */ + 0xff /* end */ +}; + +/* A lot of these taken from the vorbisdec test */ + +/* For ease of programming we use globals to keep refs for our floating + * src and sink pads we create; otherwise we always have to do get_pad, + * get_peer, and then remove references in every test function */ +static GstPad *mydecsrcpad, *mydecsinkpad; +static GstPad *myencsrcpad, *myencsinkpad; +static GstPad *myparsesrcpad, *myparsesinkpad; +static GstPad *mytagsrcpad, *mytagsinkpad; + +static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS_ANY); +static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS_ANY); + +static GstElement * +setup_katedec (void) +{ + GstElement *katedec; + + GST_DEBUG ("setup_katedec"); + katedec = gst_check_setup_element ("katedec"); + mydecsrcpad = gst_check_setup_src_pad (katedec, &srctemplate, NULL); + mydecsinkpad = gst_check_setup_sink_pad (katedec, &sinktemplate, NULL); + gst_pad_set_active (mydecsrcpad, TRUE); + gst_pad_set_active (mydecsinkpad, TRUE); + + return katedec; +} + +static void +cleanup_katedec (GstElement * katedec) +{ + GST_DEBUG ("cleanup_katedec"); + gst_element_set_state (katedec, GST_STATE_NULL); + + gst_pad_set_active (mydecsrcpad, FALSE); + gst_pad_set_active (mydecsinkpad, FALSE); + gst_check_teardown_src_pad (katedec); + gst_check_teardown_sink_pad (katedec); + gst_check_teardown_element (katedec); +} + +static GstElement * +setup_kateenc (void) +{ + GstElement *kateenc; + + GST_DEBUG ("setup_kateenc"); + kateenc = gst_check_setup_element ("kateenc"); + myencsrcpad = gst_check_setup_src_pad (kateenc, &srctemplate, NULL); + myencsinkpad = gst_check_setup_sink_pad (kateenc, &sinktemplate, NULL); + gst_pad_set_active (myencsrcpad, TRUE); + gst_pad_set_active (myencsinkpad, TRUE); + + return kateenc; +} + +static void +cleanup_kateenc (GstElement * kateenc) +{ + GST_DEBUG ("cleanup_kateenc"); + gst_element_set_state (kateenc, GST_STATE_NULL); + + gst_pad_set_active (myencsrcpad, FALSE); + gst_pad_set_active (myencsinkpad, FALSE); + gst_check_teardown_src_pad (kateenc); + gst_check_teardown_sink_pad (kateenc); + gst_check_teardown_element (kateenc); +} + +static GstElement * +setup_kateparse (void) +{ + GstElement *kateparse; + + GST_DEBUG ("setup_kateparse"); + kateparse = gst_check_setup_element ("kateparse"); + myparsesrcpad = gst_check_setup_src_pad (kateparse, &srctemplate, NULL); + myparsesinkpad = gst_check_setup_sink_pad (kateparse, &sinktemplate, NULL); + gst_pad_set_active (myparsesrcpad, TRUE); + gst_pad_set_active (myparsesinkpad, TRUE); + + return kateparse; +} + +static void +cleanup_kateparse (GstElement * kateparse) +{ + GST_DEBUG ("cleanup_kateparse"); + gst_element_set_state (kateparse, GST_STATE_NULL); + + gst_pad_set_active (myparsesrcpad, FALSE); + gst_pad_set_active (myparsesinkpad, FALSE); + gst_check_teardown_src_pad (kateparse); + gst_check_teardown_sink_pad (kateparse); + gst_check_teardown_element (kateparse); +} + +static GstElement * +setup_katetag (void) +{ + GstElement *katetag; + + GST_DEBUG ("setup_katetag"); + katetag = gst_check_setup_element ("katetag"); + mytagsrcpad = gst_check_setup_src_pad (katetag, &srctemplate, NULL); + mytagsinkpad = gst_check_setup_sink_pad (katetag, &sinktemplate, NULL); + gst_pad_set_active (mytagsrcpad, TRUE); + gst_pad_set_active (mytagsinkpad, TRUE); + + return katetag; +} + +static void +cleanup_katetag (GstElement * katetag) +{ + GST_DEBUG ("cleanup_katetag"); + gst_element_set_state (katetag, GST_STATE_NULL); + + gst_pad_set_active (mytagsrcpad, FALSE); + gst_pad_set_active (mytagsinkpad, FALSE); + gst_check_teardown_src_pad (katetag); + gst_check_teardown_sink_pad (katetag); + gst_check_teardown_element (katetag); +} + +static void +check_buffers (guint expected, gboolean headers_in_caps) +{ + GstBuffer *outbuffer; + guint i, num_buffers; + const int num_headers = 9; + unsigned char packet_type; + + /* check buffers are the type we expect */ + num_buffers = g_list_length (buffers); + fail_unless (num_buffers >= num_headers + expected); /* at least 9 headers, plus a variable number of data packets */ + for (i = 0; i < num_buffers; ++i) { + outbuffer = GST_BUFFER (buffers->data); + fail_if (outbuffer == NULL); + fail_if (GST_BUFFER_SIZE (outbuffer) == 0); + + if (i < num_headers) { + /* different headers packets */ + packet_type = (0x80 | i); + fail_unless (GST_BUFFER_DATA (outbuffer)[0] == packet_type); + /* headers could be in caps, so would have an extra ref */ + } else if (i == num_buffers - 1) { + /* eos data packet */ + packet_type = 0x7f; + fail_unless (GST_BUFFER_DATA (outbuffer)[0] == packet_type); + } else { + /* data packet */ + packet_type = 0; + fail_unless (GST_BUFFER_DATA (outbuffer)[0] >= 0 + && GST_BUFFER_DATA (outbuffer)[0] < 0x7f); + } + + buffers = g_list_remove (buffers, outbuffer); + + ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1); + gst_buffer_unref (outbuffer); + outbuffer = NULL; + } +} + +GST_START_TEST (test_kate_typefind) +{ + GstTypeFindProbability prob; + const gchar *type; + GstBuffer *buf; + GstCaps *caps = NULL; + + buf = gst_buffer_new (); + GST_BUFFER_DATA (buf) = (guint8 *) kate_header_0x80; + GST_BUFFER_SIZE (buf) = sizeof (kate_header_0x80); + GST_BUFFER_OFFSET (buf) = 0; + + caps = gst_type_find_helper_for_buffer (NULL, buf, &prob); + fail_unless (caps != NULL); + GST_LOG ("Found type: %" GST_PTR_FORMAT, caps); + + type = gst_structure_get_name (gst_caps_get_structure (caps, 0)); + fail_unless_equals_string (type, "application/x-kate"); + fail_unless (prob > GST_TYPE_FIND_MINIMUM && prob <= GST_TYPE_FIND_MAXIMUM); + + gst_buffer_unref (buf); + gst_caps_unref (caps); +} + +GST_END_TEST; + +GST_START_TEST (test_kate_empty_identification_header) +{ + GstElement *katedec; + GstBuffer *inbuffer; + GstBus *bus; + + katedec = setup_katedec (); + bus = gst_bus_new (); + + fail_unless (gst_element_set_state (katedec, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + + inbuffer = gst_buffer_new_and_alloc (0); + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + + /* set a bus here so we avoid getting state change messages */ + gst_element_set_bus (katedec, bus); + + fail_unless_equals_int (gst_pad_push (mydecsrcpad, inbuffer), GST_FLOW_ERROR); + /* ... but it ends up being collected on the global buffer list */ + fail_unless_equals_int (g_list_length (buffers), 0); + + gst_element_set_bus (katedec, NULL); + + /* cleanup */ + gst_object_unref (GST_OBJECT (bus)); + cleanup_katedec (katedec); +} + +GST_END_TEST; + +/* FIXME: also tests comment header */ +GST_START_TEST (test_kate_identification_header) +{ + GstElement *katedec; + GstBuffer *inbuffer; + GstBus *bus; + GstMessage *message; + GstTagList *tag_list; + gchar *language; + gchar *title; + + katedec = setup_katedec (); + fail_unless (gst_element_set_state (katedec, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + bus = gst_bus_new (); + + inbuffer = gst_buffer_new_and_alloc (sizeof (kate_header_0x80)); + memcpy (GST_BUFFER_DATA (inbuffer), kate_header_0x80, + sizeof (kate_header_0x80)); + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_ref (inbuffer); + + gst_element_set_bus (katedec, bus); + /* pushing gives away my reference ... */ + fail_unless (gst_pad_push (mydecsrcpad, inbuffer) == GST_FLOW_OK); + /* ... and nothing ends up on the global buffer list */ + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_unref (inbuffer); + fail_unless (g_list_length (buffers) == 0); + + inbuffer = gst_buffer_new_and_alloc (sizeof (kate_header_0x81)); + memcpy (GST_BUFFER_DATA (inbuffer), kate_header_0x81, + sizeof (kate_header_0x81)); + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_ref (inbuffer); + + /* pushing gives away my reference ... */ + fail_unless (gst_pad_push (mydecsrcpad, inbuffer) == GST_FLOW_OK); + /* ... and nothing ends up on the global buffer list */ + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_unref (inbuffer); + fail_unless (g_list_length (buffers) == 0); + /* there's a tag message waiting */ + fail_if ((message = gst_bus_pop (bus)) == NULL); + gst_message_parse_tag (message, &tag_list); + fail_unless_equals_int (gst_tag_list_get_tag_size (tag_list, + GST_TAG_LANGUAGE_CODE), 1); + fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_LANGUAGE_CODE, + &language)); + fail_unless_equals_string (language, "en_GB"); + g_free (language); + fail_unless_equals_int (gst_tag_list_get_tag_size (tag_list, "title"), 1); + fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_TITLE, &title)); + fail_unless_equals_string (title, "Tiger"); + g_free (title); + gst_tag_list_free (tag_list); + gst_message_unref (message); + + /* cleanup */ + gst_bus_set_flushing (bus, TRUE); + gst_element_set_bus (katedec, NULL); + gst_object_unref (GST_OBJECT (bus)); + cleanup_katedec (katedec); +} + +GST_END_TEST; + +GST_START_TEST (test_kate_encode_nothing) +{ + GstElement *kateenc; + + kateenc = setup_kateenc (); + fail_unless (gst_element_set_state (kateenc, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + + fail_unless (gst_pad_push_event (myencsrcpad, gst_event_new_eos ()) == TRUE); + + fail_unless (gst_element_set_state (kateenc, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS, + "could not set to ready"); + + /* cleanup */ + cleanup_kateenc (kateenc); +} + +GST_END_TEST; + +GST_START_TEST (test_kate_encode_empty) +{ + GstElement *kateenc; + GstBuffer *inbuffer; + GstBus *bus; + GstCaps *caps; + + kateenc = setup_kateenc (); + fail_unless (gst_element_set_state (kateenc, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + bus = gst_bus_new (); + + inbuffer = gst_buffer_new_and_alloc (0); + GST_BUFFER_TIMESTAMP (inbuffer) = GST_BUFFER_OFFSET (inbuffer) = + 1 * GST_SECOND; + GST_BUFFER_DURATION (inbuffer) = 5 * GST_SECOND; + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_ref (inbuffer); + + caps = gst_caps_from_string ("text/plain"); + fail_unless (caps != NULL); + gst_buffer_set_caps (inbuffer, caps); + gst_caps_unref (caps); + + gst_element_set_bus (kateenc, bus); + /* pushing gives away my reference ... */ + fail_unless (gst_pad_push (myencsrcpad, inbuffer) == GST_FLOW_ERROR); + + fail_unless (gst_pad_push_event (myencsrcpad, gst_event_new_eos ()) == TRUE); + + fail_unless (gst_element_set_state (kateenc, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS, + "could not set to ready"); + + gst_element_set_bus (kateenc, NULL); + + /* cleanup */ + gst_object_unref (GST_OBJECT (bus)); + cleanup_kateenc (kateenc); +} + +GST_END_TEST; + +GST_START_TEST (test_kate_encode_simple) +{ + GstElement *kateenc; + GstBuffer *inbuffer; + GstBus *bus; + const gchar *test_string = ""; + GstCaps *caps; + + kateenc = setup_kateenc (); + fail_unless (gst_element_set_state (kateenc, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + bus = gst_bus_new (); + + inbuffer = gst_buffer_new_and_alloc (strlen (test_string) + 1); + memcpy (GST_BUFFER_DATA (inbuffer), test_string, strlen (test_string) + 1); + GST_BUFFER_TIMESTAMP (inbuffer) = GST_BUFFER_OFFSET (inbuffer) = + 1 * GST_SECOND; + GST_BUFFER_DURATION (inbuffer) = 5 * GST_SECOND; + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_ref (inbuffer); + + caps = gst_caps_from_string ("text/plain"); + fail_unless (caps != NULL); + gst_buffer_set_caps (inbuffer, caps); + gst_caps_unref (caps); + + gst_element_set_bus (kateenc, bus); + /* pushing gives away my reference ... */ + fail_unless (gst_pad_push (myencsrcpad, inbuffer) == GST_FLOW_OK); + /* ... and nothing ends up on the global buffer list */ + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_unref (inbuffer); + fail_unless (gst_pad_push_event (myencsrcpad, gst_event_new_eos ()) == TRUE); + + fail_unless (gst_element_set_state (kateenc, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS, + "could not set to ready"); + + /* at least one data packet and one EOS packet should have been emitted */ + check_buffers (1 + 1, FALSE); + + /* cleanup */ + gst_bus_set_flushing (bus, TRUE); + gst_element_set_bus (kateenc, NULL); + gst_object_unref (GST_OBJECT (bus)); + cleanup_kateenc (kateenc); + g_list_free (buffers); +} + +GST_END_TEST; + +GST_START_TEST (test_kate_encode_spu) +{ + GstElement *kateenc; + GstBuffer *inbuffer; + GstBus *bus; + GstCaps *caps; + + kateenc = setup_kateenc (); + fail_unless (gst_element_set_state (kateenc, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + bus = gst_bus_new (); + + inbuffer = gst_buffer_new_and_alloc (sizeof (kate_spu)); + memcpy (GST_BUFFER_DATA (inbuffer), kate_spu, sizeof (kate_spu)); + GST_BUFFER_TIMESTAMP (inbuffer) = GST_BUFFER_OFFSET (inbuffer) = + 1 * GST_SECOND; + GST_BUFFER_DURATION (inbuffer) = 5 * GST_SECOND; + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_ref (inbuffer); + + caps = gst_caps_from_string ("video/x-dvd-subpicture"); + fail_unless (caps != NULL); + gst_buffer_set_caps (inbuffer, caps); + gst_caps_unref (caps); + + gst_element_set_bus (kateenc, bus); + /* pushing gives away my reference ... */ + fail_unless_equals_int (gst_pad_push (myencsrcpad, inbuffer), GST_FLOW_OK); + /* ... and nothing ends up on the global buffer list */ + ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); + gst_buffer_unref (inbuffer); + fail_unless (gst_pad_push_event (myencsrcpad, gst_event_new_eos ()) == TRUE); + + fail_unless (gst_element_set_state (kateenc, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS, + "could not set to ready"); + + /* at least one data packet and one EOS packet should have been emitted */ + check_buffers (2, FALSE); + + /* cleanup */ + gst_bus_set_flushing (bus, TRUE); + gst_element_set_bus (kateenc, NULL); + gst_object_unref (GST_OBJECT (bus)); + cleanup_kateenc (kateenc); + g_list_free (buffers); +} + +GST_END_TEST; + +GST_START_TEST (test_kate_encode_keepalives) +{ + GstElement *kateenc; + GstBus *bus; + guint i, round; + enum + { n_keepalives = 1000 }; + static const struct + { + gdouble keepalive_min_time; + gint packets; + } cfg[3] = { + { + 0.5, n_keepalives}, { + 2.0, n_keepalives / 2}, { + 5.0, n_keepalives / 5},}; + + for (round = 0; round < 3; ++round) { + kateenc = setup_kateenc (); + fail_unless (gst_element_set_state (kateenc, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + bus = gst_bus_new (); + + gst_element_set_bus (kateenc, bus); + + g_object_set (kateenc, "keepalive-min-time", cfg[round].keepalive_min_time, + NULL); + + /* the second one here should not emit a keepalive since the time since last packet + is less than the keepalive delay */ + for (i = 1; i <= n_keepalives; ++i) { + gint64 t = i * GST_SECOND; + fail_unless (gst_pad_push_event (myencsrcpad, + gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_TIME, t, -1, + 0)) == TRUE); + } + + fail_unless (gst_pad_push_event (myencsrcpad, + gst_event_new_eos ()) == TRUE); + + fail_unless (gst_element_set_state (kateenc, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS, + "could not set to ready"); + + /* at least a number data packet and an EOS packet should have been emitted */ + check_buffers (cfg[round].packets + 1, FALSE); + + /* cleanup */ + gst_bus_set_flushing (bus, TRUE); + gst_element_set_bus (kateenc, NULL); + gst_object_unref (GST_OBJECT (bus)); + cleanup_kateenc (kateenc); + g_list_free (buffers); + } +} + +GST_END_TEST; + +static void +test_kate_send_headers (GstPad * pad) +{ + GstBuffer *inbuffer; + int i; + + /* push headers */ + inbuffer = gst_buffer_new (); + GST_BUFFER_DATA (inbuffer) = (guint8 *) kate_header_0x80; + GST_BUFFER_SIZE (inbuffer) = sizeof (kate_header_0x80); + GST_BUFFER_OFFSET (inbuffer) = GST_BUFFER_OFFSET_END (inbuffer) = 0; + fail_unless_equals_int (gst_pad_push (pad, inbuffer), GST_FLOW_OK); + + inbuffer = gst_buffer_new (); + GST_BUFFER_DATA (inbuffer) = (guint8 *) kate_header_0x81; + GST_BUFFER_SIZE (inbuffer) = sizeof (kate_header_0x81); + GST_BUFFER_OFFSET (inbuffer) = GST_BUFFER_OFFSET_END (inbuffer) = 0; + fail_unless_equals_int (gst_pad_push (pad, inbuffer), GST_FLOW_OK); + + for (i = 2; i < 8; ++i) { + inbuffer = gst_buffer_new_and_alloc (sizeof (kate_header_0x8x)); + memcpy (GST_BUFFER_DATA (inbuffer), (guint8 *) kate_header_0x8x, + sizeof (kate_header_0x8x)); + GST_BUFFER_DATA (inbuffer)[0] = 0x80 | i; + GST_BUFFER_OFFSET (inbuffer) = GST_BUFFER_OFFSET_END (inbuffer) = 0; + fail_unless_equals_int (gst_pad_push (pad, inbuffer), GST_FLOW_OK); + } + + inbuffer = gst_buffer_new (); + GST_BUFFER_DATA (inbuffer) = (guint8 *) kate_header_0x88; + GST_BUFFER_SIZE (inbuffer) = sizeof (kate_header_0x88); + GST_BUFFER_OFFSET (inbuffer) = GST_BUFFER_OFFSET_END (inbuffer) = 0; + fail_unless_equals_int (gst_pad_push (pad, inbuffer), GST_FLOW_OK); +} + +GST_START_TEST (test_kate_parse) +{ + GstElement *kateparse; + GstBuffer *inbuffer; + GstBus *bus; + + kateparse = setup_kateparse (); + fail_unless (gst_element_set_state (kateparse, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + bus = gst_bus_new (); + + gst_element_set_bus (kateparse, bus); + + test_kate_send_headers (myparsesrcpad); + + /* push a text packet */ + inbuffer = gst_buffer_new (); + GST_BUFFER_DATA (inbuffer) = (guint8 *) kate_header_0x00; + GST_BUFFER_SIZE (inbuffer) = sizeof (kate_header_0x00); + GST_BUFFER_TIMESTAMP (inbuffer) = GST_BUFFER_OFFSET (inbuffer) = + 1 * GST_SECOND; + GST_BUFFER_DURATION (inbuffer) = 5 * GST_SECOND; + GST_BUFFER_OFFSET_END (inbuffer) = (GST_BUFFER_TIMESTAMP (inbuffer) << 32); /* granpos */ + fail_unless_equals_int (gst_pad_push (myparsesrcpad, inbuffer), GST_FLOW_OK); + + /* push a eos packet */ + inbuffer = gst_buffer_new (); + GST_BUFFER_DATA (inbuffer) = (guint8 *) kate_header_0x7f; + GST_BUFFER_SIZE (inbuffer) = sizeof (kate_header_0x7f); + GST_BUFFER_TIMESTAMP (inbuffer) = GST_BUFFER_OFFSET (inbuffer) = + 6 * GST_SECOND; + GST_BUFFER_DURATION (inbuffer) = 0; + GST_BUFFER_OFFSET_END (inbuffer) = (GST_BUFFER_TIMESTAMP (inbuffer) << 32); /* granpos */ + fail_unless_equals_int (gst_pad_push (myparsesrcpad, inbuffer), GST_FLOW_OK); + + /* signal eos */ + fail_unless (gst_pad_push_event (myparsesrcpad, + gst_event_new_eos ()) == TRUE); + + fail_unless (gst_element_set_state (kateparse, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS, + "could not set to ready"); + + /* at least one data packet and one EOS packet should have been emitted */ + check_buffers (2, TRUE); + + /* cleanup */ + gst_bus_set_flushing (bus, TRUE); + gst_element_set_bus (kateparse, NULL); + gst_object_unref (GST_OBJECT (bus)); + cleanup_kateparse (kateparse); + g_list_free (buffers); +} + +GST_END_TEST; + +GST_START_TEST (test_kate_tag_passthrough) +{ + GstElement *katetag; + GstBus *bus; + GstBuffer *outbuffer; + GList *list; + + katetag = setup_katetag (); + fail_unless (gst_element_set_state (katetag, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + bus = gst_bus_new (); + + gst_element_set_bus (katetag, bus); + + test_kate_send_headers (mytagsrcpad); + + /* signal eos */ + fail_unless (gst_pad_push_event (mytagsrcpad, gst_event_new_eos ()) == TRUE); + + fail_unless (gst_element_set_state (katetag, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS, + "could not set to ready"); + + /* get the first buffer and check language/category */ + fail_unless (g_list_length (buffers) >= 2); /* ID header, Vorbis comments header */ + outbuffer = GST_BUFFER (buffers->data); + fail_if (outbuffer == NULL); + + /* check identification header is unchanged */ + list = g_list_nth (buffers, 0); + fail_unless (list != NULL); + outbuffer = list->data; + fail_unless_equals_int (GST_BUFFER_SIZE (outbuffer), + sizeof (kate_header_0x80)); + fail_unless_equals_int (memcmp (GST_BUFFER_DATA (outbuffer), kate_header_0x80, + sizeof (kate_header_0x80)), 0); + + /* check comment header is unchanged */ + list = g_list_nth (buffers, 1); + fail_unless (list != NULL); + outbuffer = list->data; + fail_unless_equals_int (GST_BUFFER_SIZE (outbuffer), + sizeof (kate_header_0x81)); + fail_unless_equals_int (memcmp (GST_BUFFER_DATA (outbuffer), kate_header_0x81, + sizeof (kate_header_0x81)), 0); + + /* all headers should have been emitted, but no particular packets */ + check_buffers (0, TRUE); + + /* cleanup */ + gst_bus_set_flushing (bus, TRUE); + gst_element_set_bus (katetag, NULL); + gst_object_unref (GST_OBJECT (bus)); + cleanup_katetag (katetag); + g_list_free (buffers); +} + +GST_END_TEST; + +GST_START_TEST (test_kate_tag) +{ + GstElement *katetag; + GstBus *bus; + GstBuffer *outbuffer; + + katetag = setup_katetag (); + fail_unless (gst_element_set_state (katetag, + GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS, + "could not set to playing"); + bus = gst_bus_new (); + + gst_element_set_bus (katetag, bus); + + g_object_set (katetag, "language", "cy", NULL); + g_object_set (katetag, "category", "subtitles", NULL); + + test_kate_send_headers (mytagsrcpad); + + /* signal eos */ + fail_unless (gst_pad_push_event (mytagsrcpad, gst_event_new_eos ()) == TRUE); + + fail_unless (gst_element_set_state (katetag, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS, + "could not set to ready"); + + /* get the first buffer and check language/category */ + fail_unless (g_list_length (buffers) >= 1); + outbuffer = GST_BUFFER (buffers->data); + fail_if (outbuffer == NULL); + fail_if (GST_BUFFER_SIZE (outbuffer) != 64); + fail_if (strcmp ((const char *) GST_BUFFER_DATA (outbuffer) + 32, "cy")); + fail_if (strcmp ((const char *) GST_BUFFER_DATA (outbuffer) + 48, + "subtitles")); + + /* all headers should have been emitted, but no particular packets */ + check_buffers (0, TRUE); + + /* cleanup */ + gst_bus_set_flushing (bus, TRUE); + gst_element_set_bus (katetag, NULL); + gst_object_unref (GST_OBJECT (bus)); + cleanup_katetag (katetag); + g_list_free (buffers); +} + +GST_END_TEST; + +Suite * +kate_suite (void) +{ + Suite *s = suite_create ("kate"); + TCase *tc_chain = tcase_create ("general"); + + suite_add_tcase (s, tc_chain); + +#define X if (0) + tcase_add_test (tc_chain, test_kate_typefind); + tcase_add_test (tc_chain, test_kate_empty_identification_header); + tcase_add_test (tc_chain, test_kate_identification_header); + tcase_add_test (tc_chain, test_kate_encode_nothing); + tcase_add_test (tc_chain, test_kate_encode_empty); + tcase_add_test (tc_chain, test_kate_encode_simple); + tcase_add_test (tc_chain, test_kate_encode_spu); + tcase_add_test (tc_chain, test_kate_encode_keepalives); + tcase_add_test (tc_chain, test_kate_parse); + tcase_add_test (tc_chain, test_kate_tag_passthrough); + tcase_add_test (tc_chain, test_kate_tag); +#undef X + + return s; +} + +int +main (int argc, char **argv) +{ + int nf; + + Suite *s = kate_suite (); + SRunner *sr = srunner_create (s); + + gst_check_init (&argc, &argv); + + srunner_run_all (sr, CK_NORMAL); + nf = srunner_ntests_failed (sr); + srunner_free (sr); + + return nf; +} -- cgit v1.2.1 From ce0d40b634a08aec047f8fd3fb059c1eb4480e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 10 Jul 2009 18:45:28 +0100 Subject: kate: change media type to subtitle/x-kate and update define accordingly --- ext/kate/gstkate.c | 6 +++--- ext/kate/gstkate.h | 2 +- ext/kate/gstkatedec.c | 2 +- ext/kate/gstkateenc.c | 2 +- ext/kate/gstkateparse.c | 4 ++-- ext/kate/gstkatetiger.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/kate/gstkate.c b/ext/kate/gstkate.c index 5e60d187..9d6867a5 100644 --- a/ext/kate/gstkate.c +++ b/ext/kate/gstkate.c @@ -69,7 +69,7 @@ GST_DEBUG_CATEGORY (gst_katetiger_debug); #endif -static GstStaticCaps kate_caps = GST_STATIC_CAPS (GST_KATE_MIME_TYPE); +static GstStaticCaps kate_caps = GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE); #define KATE_CAPS (gst_static_caps_get(&kate_caps)) static void @@ -95,8 +95,8 @@ plugin_init (GstPlugin * plugin) { GstCaps *caps; - caps = gst_caps_new_simple (GST_KATE_MIME_TYPE, NULL); - if (!gst_type_find_register (plugin, GST_KATE_MIME_TYPE, GST_RANK_PRIMARY, + caps = gst_caps_new_simple (GST_KATE_MEDIA_TYPE, NULL); + if (!gst_type_find_register (plugin, GST_KATE_MEDIA_TYPE, GST_RANK_PRIMARY, gst_kate_type_find, NULL, caps, NULL, NULL)) { GST_WARNING ("kate: failed to register typefind"); gst_caps_unref (caps); diff --git a/ext/kate/gstkate.h b/ext/kate/gstkate.h index ee69590f..fbccfea1 100644 --- a/ext/kate/gstkate.h +++ b/ext/kate/gstkate.h @@ -48,7 +48,7 @@ G_BEGIN_DECLS -#define GST_KATE_MIME_TYPE "application/x-kate" +#define GST_KATE_MEDIA_TYPE "subtitle/x-kate" G_END_DECLS diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c index 851bab2c..8becb27e 100644 --- a/ext/kate/gstkatedec.c +++ b/ext/kate/gstkatedec.c @@ -103,7 +103,7 @@ enum static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) ); static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index 26eff02b..8e1b2ec1 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -133,7 +133,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) ); static void gst_kate_enc_set_property (GObject * object, guint prop_id, diff --git a/ext/kate/gstkateparse.c b/ext/kate/gstkateparse.c index 84a752b7..b44eea91 100644 --- a/ext/kate/gstkateparse.c +++ b/ext/kate/gstkateparse.c @@ -79,14 +79,14 @@ static GstStaticPadTemplate gst_kate_parse_sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) ); static GstStaticPadTemplate gst_kate_parse_src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) ); GST_BOILERPLATE (GstKateParse, gst_kate_parse, GstElement, GST_TYPE_ELEMENT); diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c index 28360dbe..20df0481 100644 --- a/ext/kate/gstkatetiger.c +++ b/ext/kate/gstkatetiger.c @@ -115,7 +115,7 @@ static GstStaticPadTemplate kate_sink_factory = GST_STATIC_PAD_TEMPLATE ("kate_sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MIME_TYPE) + GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) ); static GstStaticPadTemplate video_sink_factory = -- cgit v1.2.1 From 71e6bbd19fa1845dc07abc561b1ca5a71ae59d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 13 Jul 2009 22:38:43 +0100 Subject: kate: remove local kate typefinder, use the one in -base --- ext/kate/gstkate.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/ext/kate/gstkate.c b/ext/kate/gstkate.c index 9d6867a5..3a953353 100644 --- a/ext/kate/gstkate.c +++ b/ext/kate/gstkate.c @@ -68,42 +68,9 @@ GST_DEBUG_CATEGORY (gst_katetag_debug); GST_DEBUG_CATEGORY (gst_katetiger_debug); #endif - -static GstStaticCaps kate_caps = GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE); - -#define KATE_CAPS (gst_static_caps_get(&kate_caps)) -static void -gst_kate_type_find (GstTypeFind * tf, gpointer private) -{ - guint8 *data = gst_type_find_peek (tf, 0, 8); - - if (data) { - if (memcmp (data, "\200kate\0\0\0", 8) != 0) - return; - - gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, KATE_CAPS); - } -} - -/* entry point to initialize the plug-in - * initialize the plug-in itself - * register the element factories and pad templates - * register the features - */ static gboolean plugin_init (GstPlugin * plugin) { - GstCaps *caps; - - caps = gst_caps_new_simple (GST_KATE_MEDIA_TYPE, NULL); - if (!gst_type_find_register (plugin, GST_KATE_MEDIA_TYPE, GST_RANK_PRIMARY, - gst_kate_type_find, NULL, caps, NULL, NULL)) { - GST_WARNING ("kate: failed to register typefind"); - gst_caps_unref (caps); - return FALSE; - } - gst_caps_unref (caps); - GST_DEBUG_CATEGORY_INIT (gst_katedec_debug, "katedec", 0, "Kate decoder"); GST_DEBUG_CATEGORY_INIT (gst_kateenc_debug, "kateenc", 0, "Kate encoder"); GST_DEBUG_CATEGORY_INIT (gst_kateparse_debug, "kateparse", 0, "Kate parser"); -- cgit v1.2.1 From 71efbb1e73a557d50093ccaf2ecc47009b7edd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 19 Jul 2009 22:29:19 +0100 Subject: kate: fix up for additional subtitle/x-kate media type --- ext/kate/gstkate.h | 2 +- ext/kate/gstkatedec.c | 2 +- ext/kate/gstkateenc.c | 12 ++++++++---- ext/kate/gstkateparse.c | 14 +++++++++----- ext/kate/gstkatetiger.c | 12 +++++------- ext/kate/gstkateutil.c | 2 ++ tests/check/elements/kate.c | 14 ++++++++++++++ 7 files changed, 40 insertions(+), 18 deletions(-) diff --git a/ext/kate/gstkate.h b/ext/kate/gstkate.h index fbccfea1..f1968813 100644 --- a/ext/kate/gstkate.h +++ b/ext/kate/gstkate.h @@ -48,7 +48,7 @@ G_BEGIN_DECLS -#define GST_KATE_MEDIA_TYPE "subtitle/x-kate" +/* nothing here any more */ G_END_DECLS diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c index 8becb27e..30ab8c16 100644 --- a/ext/kate/gstkatedec.c +++ b/ext/kate/gstkatedec.c @@ -103,7 +103,7 @@ enum static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) + GST_STATIC_CAPS ("subtitle/x-kate") ); static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index 8e1b2ec1..ccf01396 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -133,7 +133,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) + GST_STATIC_CAPS ("subtitle/x-kate; application/x-kate") ); static void gst_kate_enc_set_property (GObject * object, guint prop_id, @@ -554,9 +554,13 @@ gst_kate_enc_send_headers (GstKateEnc * ke) } if (rflow == GST_FLOW_OK) { - caps = - gst_kate_util_set_header_on_caps (&ke->element, - gst_pad_get_caps (ke->srcpad), headers); + if (ke->category != NULL && strstr (ke->category, "subtitle")) { + caps = gst_kate_util_set_header_on_caps (&ke->element, + gst_caps_from_string ("subtitle/x-kate"), headers); + } else { + caps = gst_kate_util_set_header_on_caps (&ke->element, + gst_caps_from_string ("application/x-kate"), headers); + } if (caps) { GST_DEBUG_OBJECT (ke, "here are the caps: %" GST_PTR_FORMAT, caps); gst_pad_set_caps (ke->srcpad, caps); diff --git a/ext/kate/gstkateparse.c b/ext/kate/gstkateparse.c index b44eea91..5cf8ec48 100644 --- a/ext/kate/gstkateparse.c +++ b/ext/kate/gstkateparse.c @@ -76,17 +76,17 @@ GST_ELEMENT_DETAILS ("Kate stream parser", "Vincent Penquerc'h "); static GstStaticPadTemplate gst_kate_parse_sink_factory = -GST_STATIC_PAD_TEMPLATE ("sink", + GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) + GST_STATIC_CAPS ("subtitle/x-kate; application/x-kate") ); static GstStaticPadTemplate gst_kate_parse_src_factory = -GST_STATIC_PAD_TEMPLATE ("src", + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) + GST_STATIC_CAPS ("subtitle/x-kate; application/x-kate") ); GST_BOILERPLATE (GstKateParse, gst_kate_parse, GstElement, GST_TYPE_ELEMENT); @@ -169,7 +169,8 @@ gst_kate_parse_push_headers (GstKateParse * parse) /* get the headers into the caps, passing them to kate as we go */ caps = gst_kate_util_set_header_on_caps (&parse->element, - gst_pad_get_caps (parse->srcpad), parse->streamheader); + gst_pad_get_negotiated_caps (parse->sinkpad), parse->streamheader); + if (G_UNLIKELY (!caps)) { GST_ERROR_OBJECT (parse, "Failed to set headers on caps"); return GST_FLOW_ERROR; @@ -389,6 +390,9 @@ gst_kate_parse_chain (GstPad * pad, GstBuffer * buffer) g_assert (klass->parse_packet != NULL); + if (G_UNLIKELY (GST_PAD_CAPS (pad) == NULL)) + return GST_FLOW_NOT_NEGOTIATED; + return klass->parse_packet (parse, buffer); } diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c index 20df0481..433a3106 100644 --- a/ext/kate/gstkatetiger.c +++ b/ext/kate/gstkatetiger.c @@ -108,14 +108,14 @@ enum ARG_DEFAULT_BACKGROUND_RED, ARG_DEFAULT_BACKGROUND_GREEN, ARG_DEFAULT_BACKGROUND_BLUE, - ARG_DEFAULT_BACKGROUND_ALPHA, + ARG_DEFAULT_BACKGROUND_ALPHA }; static GstStaticPadTemplate kate_sink_factory = -GST_STATIC_PAD_TEMPLATE ("kate_sink", + GST_STATIC_PAD_TEMPLATE ("kate_sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_KATE_MEDIA_TYPE) + GST_STATIC_CAPS ("subtitle/x-kate; application/x-kate") ); static GstStaticPadTemplate video_sink_factory = @@ -294,10 +294,8 @@ gst_kate_tiger_init (GstKateTiger * tiger, GstKateTigerClass * gclass) GST_DEBUG_FUNCPTR (gst_kate_tiger_kate_chain)); gst_pad_set_query_function (tiger->katesinkpad, GST_DEBUG_FUNCPTR (gst_kate_tiger_kate_sink_query)); - gst_pad_use_fixed_caps (tiger->katesinkpad); - gst_pad_set_caps (tiger->katesinkpad, - gst_static_pad_template_get_caps (&kate_sink_factory)); - gst_pad_set_event_function (tiger->katesinkpad, gst_kate_tiger_kate_event); + gst_pad_set_event_function (tiger->katesinkpad, + GST_DEBUG_FUNCPTR (gst_kate_tiger_kate_event)); gst_element_add_pad (GST_ELEMENT (tiger), tiger->katesinkpad); tiger->videosinkpad = diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c index 2928771d..f47ba575 100644 --- a/ext/kate/gstkateutil.c +++ b/ext/kate/gstkateutil.c @@ -33,6 +33,8 @@ gst_kate_util_set_header_on_caps (GstElement * element, GstCaps * caps, GstStructure *structure; GValue array = { 0 }; + GST_LOG_OBJECT (element, "caps: %" GST_PTR_FORMAT, caps); + if (G_UNLIKELY (!caps)) return NULL; if (G_UNLIKELY (!headers)) diff --git a/tests/check/elements/kate.c b/tests/check/elements/kate.c index f7ac3ed4..80ea6882 100644 --- a/tests/check/elements/kate.c +++ b/tests/check/elements/kate.c @@ -40,20 +40,25 @@ static const guint8 kate_header_0x81[53] = { 0x72, 0x29, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x54, 0x49, 0x54, 0x4c, 0x45, 0x3d, /* r)........TITLE= */ 0x54, 0x69, 0x67, 0x65, 0x72, /* Tiger */ }; + static const guint8 kate_header_0x8x[10] = { 0x80, 0x6b, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00 }; + static const guint8 kate_header_0x88[11] = { 0x88, 0x6b, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00 }; + static const guint8 kate_header_0x00[45] = { 0x00, 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, /* ................ */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x70, 0x6c, 0x61, /* .............pla */ 0x69, 0x6e, 0x20, 0x6f, 0x6c, 0x64, 0x20, 0x74, 0x65, 0x78, 0x74, 0x08, 0x00 /* in old text.. */ }; + static const guint8 kate_header_0x01[1] = { 0x01 }; + static const guint8 kate_header_0x7f[1] = { 0x7f }; @@ -600,16 +605,21 @@ static void test_kate_send_headers (GstPad * pad) { GstBuffer *inbuffer; + GstCaps *caps; int i; + caps = gst_caps_new_simple ("subtitle/x-kate", NULL); + /* push headers */ inbuffer = gst_buffer_new (); + gst_buffer_set_caps (inbuffer, caps); GST_BUFFER_DATA (inbuffer) = (guint8 *) kate_header_0x80; GST_BUFFER_SIZE (inbuffer) = sizeof (kate_header_0x80); GST_BUFFER_OFFSET (inbuffer) = GST_BUFFER_OFFSET_END (inbuffer) = 0; fail_unless_equals_int (gst_pad_push (pad, inbuffer), GST_FLOW_OK); inbuffer = gst_buffer_new (); + gst_buffer_set_caps (inbuffer, caps); GST_BUFFER_DATA (inbuffer) = (guint8 *) kate_header_0x81; GST_BUFFER_SIZE (inbuffer) = sizeof (kate_header_0x81); GST_BUFFER_OFFSET (inbuffer) = GST_BUFFER_OFFSET_END (inbuffer) = 0; @@ -617,6 +627,7 @@ test_kate_send_headers (GstPad * pad) for (i = 2; i < 8; ++i) { inbuffer = gst_buffer_new_and_alloc (sizeof (kate_header_0x8x)); + gst_buffer_set_caps (inbuffer, caps); memcpy (GST_BUFFER_DATA (inbuffer), (guint8 *) kate_header_0x8x, sizeof (kate_header_0x8x)); GST_BUFFER_DATA (inbuffer)[0] = 0x80 | i; @@ -625,10 +636,13 @@ test_kate_send_headers (GstPad * pad) } inbuffer = gst_buffer_new (); + gst_buffer_set_caps (inbuffer, caps); GST_BUFFER_DATA (inbuffer) = (guint8 *) kate_header_0x88; GST_BUFFER_SIZE (inbuffer) = sizeof (kate_header_0x88); GST_BUFFER_OFFSET (inbuffer) = GST_BUFFER_OFFSET_END (inbuffer) = 0; fail_unless_equals_int (gst_pad_push (pad, inbuffer), GST_FLOW_OK); + + gst_caps_unref (caps); } GST_START_TEST (test_kate_parse) -- cgit v1.2.1 From 3f347c7edd0796fb033bb58f15017f1f6c6c5ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 19 Jul 2009 23:16:07 +0100 Subject: kate: make sure to free some more stuff --- ext/kate/gstkateparse.c | 14 ++++++++++++++ ext/kate/gstkateutil.c | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/ext/kate/gstkateparse.c b/ext/kate/gstkateparse.c index 5cf8ec48..eb0d2b08 100644 --- a/ext/kate/gstkateparse.c +++ b/ext/kate/gstkateparse.c @@ -193,6 +193,7 @@ gst_kate_parse_push_headers (GstKateParse * parse) if (G_UNLIKELY (ret < 0)) { GST_WARNING_OBJECT (parse, "kate_decode_headerin returned %d", ret); } + /* takes ownership of outbuf, which was previously in parse->streamheader */ outbuf_list = g_list_append (outbuf_list, outbuf); headers = headers->next; } @@ -210,6 +211,8 @@ gst_kate_parse_push_headers (GstKateParse * parse) } g_list_free (outbuf_list); + g_list_free (parse->streamheader); + parse->streamheader = NULL; parse->streamheader_sent = TRUE; @@ -575,6 +578,16 @@ error: #endif } +static void +gst_kate_parse_free_stream_headers (GstKateParse * parse) +{ + while (parse->streamheader != NULL) { + gst_buffer_unref (GST_BUFFER (parse->streamheader->data)); + parse->streamheader = g_list_delete_link (parse->streamheader, + parse->streamheader); + } +} + static GstStateChangeReturn gst_kate_parse_change_state (GstElement * element, GstStateChange transition) { @@ -607,6 +620,7 @@ gst_kate_parse_change_state (GstElement * element, GstStateChange transition) parse->buffer_queue = NULL; g_queue_free (parse->event_queue); parse->event_queue = NULL; + gst_kate_parse_free_stream_headers (parse); break; default: diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c index f47ba575..e25321b0 100644 --- a/ext/kate/gstkateutil.c +++ b/ext/kate/gstkateutil.c @@ -25,6 +25,7 @@ #include "gstkate.h" #include "gstkateutil.h" +/* FIXME: shouldn't all this GstKateDecoderBase stuff really be a base class? */ GstCaps * gst_kate_util_set_header_on_caps (GstElement * element, GstCaps * caps, @@ -107,6 +108,22 @@ gst_kate_util_decode_base_init (GstKateDecoderBase * decoder) decoder->initialized = FALSE; } +static void +gst_kate_util_decode_base_reset (GstKateDecoderBase * decoder) +{ + g_free (decoder->language); + decoder->language = NULL; + g_free (decoder->category); + decoder->category = NULL; + if (decoder->tags) { + gst_tag_list_free (decoder->tags); + decoder->tags = NULL; + } + decoder->original_canvas_width = 0; + decoder->original_canvas_height = 0; + decoder->initialized = FALSE; +} + gboolean gst_kate_util_decoder_base_get_property (GstKateDecoderBase * decoder, GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) @@ -274,8 +291,10 @@ gst_kate_decoder_base_change_state (GstKateDecoderBase * decoder, kate_high_decode_clear (&decoder->k); decoder->initialized = FALSE; } + gst_kate_util_decode_base_reset (decoder); break; case GST_STATE_CHANGE_READY_TO_NULL: + gst_kate_util_decode_base_reset (decoder); break; default: break; -- cgit v1.2.1 From 0d16612717860fff76a9c1889d47f7f5fe0fbf7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 19 Jul 2009 23:29:19 +0100 Subject: checks: add kate unit tests to valgrind blacklist for now And add check binary to ignore list. --- tests/check/Makefile.am | 1 + tests/check/elements/.gitignore | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 1aa99d1a..41581363 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -71,6 +71,7 @@ endif VALGRIND_TO_FIX = \ + elements/kate \ elements/mpeg2enc \ elements/mplex diff --git a/tests/check/elements/.gitignore b/tests/check/elements/.gitignore index 5f268d3b..df2bb15d 100644 --- a/tests/check/elements/.gitignore +++ b/tests/check/elements/.gitignore @@ -6,6 +6,7 @@ deinterleave gdpdepay gdppay interleave +kate legacyresample mpeg2enc mplex @@ -19,6 +20,7 @@ rganalysis rglimiter rgvolume rtpbin +rtpbin_buffer_list selector shapewipe spectrum -- cgit v1.2.1 From faf2d0469691a0f357cf6a4c048cf774ddf5b990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 19 Jul 2009 23:32:07 +0100 Subject: katedec: demote to GST_RANK_NONE for now There are still some autoplugging issues to sort out, and it needs some testing. --- ext/kate/gstkate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/kate/gstkate.c b/ext/kate/gstkate.c index 3a953353..7fecec30 100644 --- a/ext/kate/gstkate.c +++ b/ext/kate/gstkate.c @@ -83,7 +83,7 @@ plugin_init (GstPlugin * plugin) /* if we don't build tiger, we'll want to autoplug and convert to text, but if we do build tiger, we'll want to use it preferentially as it can play non text streams too */ - if (!gst_element_register (plugin, "katedec", GST_RANK_PRIMARY, + if (!gst_element_register (plugin, "katedec", GST_RANK_NONE, GST_TYPE_KATE_DEC)) return FALSE; -- cgit v1.2.1 From 4728d7f18eff48760ff2e753142b7313eaf552d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 19 Jul 2009 23:35:05 +0100 Subject: kate: add some FIXMEs --- ext/kate/gstkatedec.c | 2 ++ ext/kate/gstkateenc.c | 2 ++ ext/kate/gstkateparse.c | 2 ++ ext/kate/gstkatetag.c | 2 ++ ext/kate/gstkatetiger.c | 2 ++ ext/kate/gstkateutil.c | 5 +++-- 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c index 30ab8c16..3a207505 100644 --- a/ext/kate/gstkatedec.c +++ b/ext/kate/gstkatedec.c @@ -74,6 +74,8 @@ * */ +/* FIXME: post appropriate GST_ELEMENT_ERROR when returning FLOW_ERROR */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index ccf01396..e3e6c7b7 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -68,6 +68,8 @@ * */ +/* FIXME: post appropriate GST_ELEMENT_ERROR when returning FLOW_ERROR */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/kate/gstkateparse.c b/ext/kate/gstkateparse.c index eb0d2b08..89d17514 100644 --- a/ext/kate/gstkateparse.c +++ b/ext/kate/gstkateparse.c @@ -58,6 +58,8 @@ * */ +/* FIXME: post appropriate GST_ELEMENT_ERROR when returning FLOW_ERROR */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/ext/kate/gstkatetag.c b/ext/kate/gstkatetag.c index 608f0747..7a39c556 100644 --- a/ext/kate/gstkatetag.c +++ b/ext/kate/gstkatetag.c @@ -63,6 +63,8 @@ * */ +/* FIXME: post appropriate GST_ELEMENT_ERROR when returning FLOW_ERROR */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c index 433a3106..3e72285a 100644 --- a/ext/kate/gstkatetiger.c +++ b/ext/kate/gstkatetiger.c @@ -73,6 +73,8 @@ * */ +/* FIXME: post appropriate GST_ELEMENT_ERROR when returning FLOW_ERROR */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c index e25321b0..78f18dae 100644 --- a/ext/kate/gstkateutil.c +++ b/ext/kate/gstkateutil.c @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +/* FIXME: post appropriate GST_ELEMENT_ERROR when returning FLOW_ERROR */ +/* FIXME: shouldn't all this GstKateDecoderBase stuff really be a base class? */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -25,8 +28,6 @@ #include "gstkate.h" #include "gstkateutil.h" -/* FIXME: shouldn't all this GstKateDecoderBase stuff really be a base class? */ - GstCaps * gst_kate_util_set_header_on_caps (GstElement * element, GstCaps * caps, GList * headers) -- cgit v1.2.1 From 2f7ec508993fd8f8a5f3b343b5873ef09069154a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 19 Jul 2009 23:45:02 +0100 Subject: docs: add inspect info for kate plugin Should fix the docs build. --- docs/plugins/inspect/plugin-kate.xml | 124 +++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 docs/plugins/inspect/plugin-kate.xml diff --git a/docs/plugins/inspect/plugin-kate.xml b/docs/plugins/inspect/plugin-kate.xml new file mode 100644 index 00000000..ee3dccbc --- /dev/null +++ b/docs/plugins/inspect/plugin-kate.xml @@ -0,0 +1,124 @@ + + kate + Kate plugin + ../../ext/kate/.libs/libgstkate.so + libgstkate.so + 0.10.13.1 + LGPL + gst-plugins-bad + GStreamer Bad Plug-ins git/prerelease + Unknown package origin + + + katedec + Kate stream text decoder + Codec/Decoder/Subtitle + Decodes Kate text streams + Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com> + + + sink + sink + always +
subtitle/x-kate
+
+ + src + source + always +
text/plain; text/x-pango-markup
+
+
+
+ + kateenc + Kate stream encoder + Codec/Encoder/Subtitle + Encodes Kate streams from text or subpictures + Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com> + + + sink + sink + always +
text/plain; text/x-pango-markup; video/x-dvd-subpicture
+
+ + src + source + always +
subtitle/x-kate; application/x-kate
+
+
+
+ + kateparse + Kate stream parser + Codec/Parser/Subtitle + parse raw kate streams + Vincent Penquerc'h <ogg.k.ogg.k at googlemail dot com> + + + sink + sink + always +
subtitle/x-kate; application/x-kate
+
+ + src + source + always +
subtitle/x-kate; application/x-kate
+
+
+
+ + katetag + Kate stream tagger + Formatter/Metadata + Retags kate streams + Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com> + + + sink + sink + always +
subtitle/x-kate; application/x-kate
+
+ + src + source + always +
subtitle/x-kate; application/x-kate
+
+
+
+ + tiger + Kate stream renderer + Codec/Decoder/Video/Overlay + Decodes and renders Kate streams on top of a video + Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com> + + + video_sink + sink + always +
video/x-raw-rgb, bpp=(int)32, depth=(int)24
+
+ + kate_sink + sink + always +
subtitle/x-kate; application/x-kate
+
+ + src + source + always +
video/x-raw-rgb, bpp=(int)32, depth=(int)24
+
+
+
+
+
\ No newline at end of file -- cgit v1.2.1 From 9db1323d310d0fdb0a1e41b5278fc0c3fc84641e Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 20 Jul 2009 11:41:40 +0100 Subject: kateenc: keep bitmap/palette/region around when on the spot encoding is not possible due to an unknown end time Fixes valgrind unitialized value report. See #525743. --- ext/kate/gstkateenc.c | 59 +++++++++++++++++++++++++++++++++++++++++---------- ext/kate/gstkateenc.h | 3 +++ 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index e3e6c7b7..6cc1f492 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -283,6 +283,9 @@ gst_kate_enc_init (GstKateEnc * ke, GstKateEncClass * gclass) memcpy (ke->spu_clut, gst_kate_enc_default_clut, sizeof (gst_kate_enc_default_clut)); ke->delayed_spu = FALSE; + ke->delayed_bitmap = NULL; + ke->delayed_palette = NULL; + ke->delayed_region = NULL; } static void @@ -1237,6 +1240,16 @@ gst_kate_enc_flush_waiting (GstKateEnc * ke, GstClockTime now) /* forget it even if we couldn't flush it */ ke->delayed_spu = FALSE; + /* free the delayed data */ + g_free (ke->delayed_bitmap->pixels); + g_free (ke->delayed_bitmap); + ke->delayed_bitmap = NULL; + g_free (ke->delayed_palette->colors); + g_free (ke->delayed_palette); + ke->delayed_palette = NULL; + g_free (ke->delayed_region); + ke->delayed_region = NULL; + /* now that we've flushed the packet, we want to insert keepalives as requested */ if (ke->keepalive_min_time > 0.0f && t1 > t0) { GST_INFO_OBJECT (ke, "generating keepalives at %f from %f to %f", @@ -1256,13 +1269,28 @@ static GstFlowReturn gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf) { kate_packet kp; - kate_region kregion; - kate_bitmap kbitmap; - kate_palette kpalette; + kate_region *kregion; + kate_bitmap *kbitmap; + kate_palette *kpalette; GstFlowReturn rflow; int ret = 0; - rflow = gst_kate_enc_decode_spu (ke, buf, &kregion, &kbitmap, &kpalette); + /* allocate region, bitmap, and palette, in case we have to delay encoding them */ + kregion = (kate_region *) g_malloc (sizeof (kate_region)); + kbitmap = (kate_bitmap *) g_malloc (sizeof (kate_bitmap)); + kpalette = (kate_palette *) g_malloc (sizeof (kate_palette)); + if (!kregion || !kpalette || !kbitmap) { + if (kregion) + g_free (kregion); + if (kbitmap) + g_free (kbitmap); + if (kpalette) + g_free (kpalette); + GST_ERROR_OBJECT (ke, "Out of memory"); + return GST_FLOW_ERROR; + } + + rflow = gst_kate_enc_decode_spu (ke, buf, kregion, kbitmap, kpalette); if (G_UNLIKELY (rflow != GST_FLOW_OK)) { GST_ERROR_OBJECT (ke, "Failed to decode incoming SPU"); #if 0 @@ -1279,7 +1307,7 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf) } } #endif - } else if (G_UNLIKELY (kbitmap.width == 0 || kbitmap.height == 0)) { + } else if (G_UNLIKELY (kbitmap->width == 0 || kbitmap->height == 0)) { /* there are some DVDs (well, at least one) where some dimwits put in a wholly transparent full screen 720x576 SPU !!!!?! */ GST_WARNING_OBJECT (ke, "SPU is totally invisible - dimwits"); rflow = GST_FLOW_OK; @@ -1310,18 +1338,18 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf) } #endif GST_DEBUG_OBJECT (ke, "Encoding %dx%d SPU: (%u bytes) from %f to %f", - kbitmap.width, kbitmap.height, GST_BUFFER_SIZE (buf), t0, t1); - ret = kate_encode_set_region (&ke->k, &kregion); + kbitmap->width, kbitmap->height, GST_BUFFER_SIZE (buf), t0, t1); + ret = kate_encode_set_region (&ke->k, kregion); if (G_UNLIKELY (ret < 0)) { GST_WARNING_OBJECT (ke, "Failed to set event region (%d)", ret); rflow = GST_FLOW_ERROR; } else { - ret = kate_encode_set_palette (&ke->k, &kpalette); + ret = kate_encode_set_palette (&ke->k, kpalette); if (G_UNLIKELY (ret < 0)) { GST_WARNING_OBJECT (ke, "Failed to set event palette (%d)", ret); rflow = GST_FLOW_ERROR; } else { - ret = kate_encode_set_bitmap (&ke->k, &kbitmap); + ret = kate_encode_set_bitmap (&ke->k, kbitmap); if (G_UNLIKELY (ret < 0)) { GST_WARNING_OBJECT (ke, "Failed to set event bitmap (%d)", ret); rflow = GST_FLOW_ERROR; @@ -1337,6 +1365,9 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf) t0); ke->delayed_spu = TRUE; ke->delayed_start = start; + ke->delayed_bitmap = kbitmap; + ke->delayed_palette = kpalette; + ke->delayed_region = kregion; rflow = GST_FLOW_OK; } else { ret = kate_encode_text (&ke->k, t0, t1, "", 0, &kp); @@ -1353,8 +1384,14 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf) } } } - g_free (kpalette.colors); - g_free (kbitmap.pixels); + + if (!ke->delayed_spu) { + g_free (kpalette->colors); + g_free (kpalette); + g_free (kbitmap->pixels); + g_free (kbitmap); + g_free (kregion); + } } return rflow; diff --git a/ext/kate/gstkateenc.h b/ext/kate/gstkateenc.h index 168de711..74310339 100644 --- a/ext/kate/gstkateenc.h +++ b/ext/kate/gstkateenc.h @@ -83,6 +83,9 @@ struct _GstKateEnc gboolean initialized; gboolean delayed_spu; GstClockTime delayed_start; + kate_bitmap *delayed_bitmap; + kate_palette *delayed_palette; + kate_region *delayed_region; gchar *language; gchar *category; -- cgit v1.2.1 From a7c64556ff25eae0ca3325dbbe166352b9b03006 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 20 Jul 2009 12:25:15 +0100 Subject: kateenc: also recognise the new recommended 'SUB' category Move the check for 'simple' subtitles category to a separate routine and add in the new recommended SUB category (#525743). --- ext/kate/gstkateenc.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index 6cc1f492..b9db9cda 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -525,6 +525,24 @@ gst_kate_enc_set_metadata (GstKateEnc * ke) } } +static gboolean +gst_kate_enc_is_simple_subtitle_category (GstKateEnc * ke, const char *category) +{ + static const char *const simple[] = { + "subtitles", + "SUB", + }; + int n; + + if (!category) + return FALSE; + for (n = 0; n < G_N_ELEMENTS (simple); ++n) { + if (!strcmp (category, simple[n])) + return TRUE; + } + return FALSE; +} + static GstFlowReturn gst_kate_enc_send_headers (GstKateEnc * ke) { @@ -559,7 +577,7 @@ gst_kate_enc_send_headers (GstKateEnc * ke) } if (rflow == GST_FLOW_OK) { - if (ke->category != NULL && strstr (ke->category, "subtitle")) { + if (gst_kate_enc_is_simple_subtitle_category (ke, ke->category)) { caps = gst_kate_util_set_header_on_caps (&ke->element, gst_caps_from_string ("subtitle/x-kate"), headers); } else { -- cgit v1.2.1 From cae6b621aaa64bbfdda102e8295b9035e0c42fa8 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 20 Jul 2009 10:17:07 +0300 Subject: camerabin: improve perf test robustness and add comments --- tests/examples/camerabin/gst-camera-perf.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/examples/camerabin/gst-camera-perf.c b/tests/examples/camerabin/gst-camera-perf.c index cadffa2b..56d8b401 100644 --- a/tests/examples/camerabin/gst-camera-perf.c +++ b/tests/examples/camerabin/gst-camera-perf.c @@ -39,7 +39,8 @@ * ./gst-camera-perf --src-colorspace=UYVY --image-width=640 --image-height=480 --view-framerate-num=2999 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux * ./gst-camera-perf --src-colorspace=UYVY --image-width=2592 --image-height=1968 --view-framerate-num=399 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux * ./gst-camera-perf --src-colorspace=UYVY --image-width=2592 --image-height=1968 --view-framerate-num=325 --view-framerate-den=25 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux --image-enc=dspjpegenc - * ./gst-camera-perf --src-colorspace=UYVY --image-width=640 --image-height=480 --view-framerate-num=1491 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux --target-times=1000,0,1500,0,0,0,0,1000,0 + * ./gst-camera-perf --src-colorspace=UYVY --image-width=640 --image-height=480 --view-framerate-num=1491 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=dspmpeg4enc --video-mux=hantromp4mux --image-enc=dspjpegenc --target-times=1000,1500,1500,2000,500,2000,3500,1000,1000 + * ./gst-camera-perf --src-colorspace=UYVY --image-width=2576 --image-height=1936 --view-framerate-num=1491 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux */ /* @@ -217,21 +218,25 @@ element_added (GstBin * bin, GstElement * element, gpointer user_data) if (need_vmux_pad_probe) { g_object_get (camera_bin, "videomux", &elem, NULL); if (elem) { - setup_add_pad_probe (elem, "src", (GCallback) pad_has_buffer, - &signal_vid_sink); need_vmux_pad_probe = FALSE; - target[8] = test_09_taget; GST_INFO_OBJECT (elem, "got default video muxer"); + if (setup_add_pad_probe (elem, "src", (GCallback) pad_has_buffer, + &signal_vid_sink)) { + /* enable test */ + target[8] = test_09_taget; + } } } if (need_ienc_pad_probe) { g_object_get (camera_bin, "imageenc", &elem, NULL); if (elem) { - setup_add_pad_probe (elem, "src", (GCallback) pad_has_buffer, - &signal_img_enc); need_ienc_pad_probe = FALSE; - target[5] = test_06_taget; GST_INFO_OBJECT (elem, "got default image encoder"); + if (setup_add_pad_probe (elem, "src", (GCallback) pad_has_buffer, + &signal_img_enc)) { + /* enable test */ + target[5] = test_06_taget; + } } } } @@ -552,6 +557,7 @@ setup_pipeline (void) g_object_get (camera_bin, "videomux", &vmux, NULL); if (!vmux) { need_pad_probe = need_vmux_pad_probe = TRUE; + /* only run the test if we later get the element */ test_09_taget = target[8]; target[8] = G_GUINT64_CONSTANT (0); } @@ -566,6 +572,7 @@ setup_pipeline (void) g_object_get (camera_bin, "imageenc", &ienc, NULL); if (!ienc) { need_pad_probe = need_ienc_pad_probe = TRUE; + /* only run the test if we later get the element */ test_06_taget = target[5]; target[5] = G_GUINT64_CONSTANT (0); } @@ -847,7 +854,7 @@ run_test (gpointer user_data) gboolean ret = TRUE; guint old_test_ix = test_ix; - if (test_ix == TEST_CASES) { + if (test_ix >= TEST_CASES) { GST_INFO ("done"); g_main_loop_quit (loop); return FALSE; @@ -884,7 +891,7 @@ run_test (gpointer user_data) g_main_loop_quit (loop); return FALSE; } - if (test_ix == TEST_CASES) { + if (test_ix >= TEST_CASES) { GST_INFO ("done"); g_main_loop_quit (loop); return FALSE; -- cgit v1.2.1 From 51e022d2883c91feae664dbbba6d03ca81b95865 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 20 Jul 2009 16:19:40 +0300 Subject: metadata: don't dereference the pointer before the validity check --- ext/metadata/metadataexif.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/metadata/metadataexif.c b/ext/metadata/metadataexif.c index cbdbf30d..1fb97d58 100644 --- a/ext/metadata/metadataexif.c +++ b/ext/metadata/metadataexif.c @@ -556,11 +556,13 @@ metadataparse_exif_content_foreach_entry_func (ExifEntry * entry, MEUserData *meudata = (MEUserData *) user_data; GType type = G_TYPE_NONE; ExifByteOrder byte_order; - const gchar *tag = metadataparse_exif_get_tag_from_exif (entry->tag, &type); + const gchar *tag; /* We need the byte order */ if (!entry || !entry->parent || !entry->parent->parent) return; + + tag = metadataparse_exif_get_tag_from_exif (entry->tag, &type); byte_order = exif_data_get_byte_order (entry->parent->parent); if (metadataparse_handle_unit_tags (entry, meudata, byte_order)) -- cgit v1.2.1 From ebc417f769bffd7eaca260eac5358f953551868c Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 20 Jul 2009 16:20:15 +0300 Subject: fpsdisplaysink: check query return result before using it --- gst/debugutils/fpsdisplaysink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/debugutils/fpsdisplaysink.c b/gst/debugutils/fpsdisplaysink.c index 54f5cc54..ff3e0dfd 100644 --- a/gst/debugutils/fpsdisplaysink.c +++ b/gst/debugutils/fpsdisplaysink.c @@ -206,7 +206,10 @@ display_current_fps (gpointer data) GstFPSDisplaySink *self = GST_FPS_DISPLAY_SINK (data); gint64 current_ts; - gst_element_query (self->video_sink, self->query); + /* if query failed try again on next timer tick */ + if (!gst_element_query (self->video_sink, self->query)) + return TRUE; + gst_query_parse_position (self->query, NULL, ¤t_ts); if (GST_CLOCK_TIME_IS_VALID (self->last_ts)) { -- cgit v1.2.1 From 64457575e7e096c02784aa207e92b2b2599fc13a Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 20 Jul 2009 16:21:06 +0300 Subject: camerabin: remove unused variable assignment Result is not needed here, but variable is used later on. Also remove double new lines in function. --- gst/camerabin/camerabinvideo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gst/camerabin/camerabinvideo.c b/gst/camerabin/camerabinvideo.c index 40a2bfa7..bc915243 100644 --- a/gst/camerabin/camerabinvideo.c +++ b/gst/camerabin/camerabinvideo.c @@ -553,7 +553,6 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) gst_ghost_pad_set_target (GST_GHOST_PAD (vid->sinkpad), vid_sinkpad); gst_object_unref (vid_sinkpad); - /* Add queue element for video */ vid->tee_video_srcpad = gst_element_get_request_pad (vid->tee, "src%d"); if (!(vid->video_queue = @@ -565,7 +564,6 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) gst_pad_add_buffer_probe (vid->tee_video_srcpad, G_CALLBACK (camerabin_video_pad_tee_src0_have_buffer), vid); - #ifdef USE_TIMEOVERLAY /* Add timeoverlay element to visualize elapsed time for debugging */ if (!(gst_camerabin_create_and_add_element (vidbin, "timeoverlay"))) { @@ -615,10 +613,9 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) } /* Add queue element for audio */ - if (!(queue = gst_camerabin_create_and_add_element (vidbin, "queue"))) { + if (!(gst_camerabin_create_and_add_element (vidbin, "queue"))) { goto error; } - queue = NULL; /* Add optional audio conversion and volume elements and raise no errors if adding them fails */ -- cgit v1.2.1 From a80921e334bd5c0d245d2cf27b3acd27b27876f6 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 20 Jul 2009 16:24:05 +0300 Subject: camerabin: log formats in preview image conversion --- gst/camerabin/camerabinpreview.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/camerabin/camerabinpreview.c b/gst/camerabin/camerabinpreview.c index 9b12bbac..b8e53389 100644 --- a/gst/camerabin/camerabinpreview.c +++ b/gst/camerabin/camerabinpreview.c @@ -95,6 +95,8 @@ gst_camerabin_preview_create_pipeline (GstCameraBin * camera) gst_bin_add_many (GST_BIN (camera->preview_pipeline), src, csp, filter, vscale, sink, NULL); + GST_DEBUG ("preview format is: %" GST_PTR_FORMAT, camera->preview_caps); + g_object_set (filter, "caps", camera->preview_caps, NULL); g_object_set (sink, "preroll-queue-len", 1, "signal-handoffs", TRUE, NULL); g_object_set (vscale, "method", 0, NULL); @@ -195,7 +197,8 @@ gst_camerabin_preview_convert (GstCameraBin * camera, GstBuffer * buf) bflags = GST_BUFFER_FLAGS (buf); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_READONLY); - GST_DEBUG ("running conversion pipeline"); + GST_DEBUG ("running conversion pipeline, source is: %" GST_PTR_FORMAT, + GST_BUFFER_CAPS (buf)); gst_element_set_state (camera->preview_pipeline, GST_STATE_PLAYING); g_signal_emit_by_name (src, "push-buffer", buf, &fret); -- cgit v1.2.1 From 8ac16a90e4d0cc05a5c1c84c0c04bded901795bb Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 20 Jul 2009 16:39:42 +0300 Subject: camerabin: add code in test to store snapshots for manual verification Use gdk_pixbuf to save the image in perf-test. Also remove some obsolute commented out code. --- tests/examples/camerabin/gst-camera-perf.c | 38 +++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/tests/examples/camerabin/gst-camera-perf.c b/tests/examples/camerabin/gst-camera-perf.c index 56d8b401..2337321d 100644 --- a/tests/examples/camerabin/gst-camera-perf.c +++ b/tests/examples/camerabin/gst-camera-perf.c @@ -32,7 +32,7 @@ * gcc `pkg-config --cflags --libs gstreamer-0.10` gst-camera-perf.c -ogst-camera-perf * * plain linux: - * ./gst-camera-perf --src-colorspace=YUY2 --image-width=320 --image-height=240 --view-framerate-num=15 --view-framerate-den=1 + * ./gst-camera-perf --src-colorspace=YUY2 --image-width=640 --image-height=480 --view-framerate-num=15 --view-framerate-den=1 * * maemo: * ./gst-camera-perf --src-colorspace=UYVY --image-width=640 --image-height=480 --view-framerate-num=1491 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux @@ -50,11 +50,18 @@ # include "config.h" #endif +/* save the snapshot images + * gcc `pkg-config --cflags --libs gstreamer-0.10 gdk-pixbuf-2.0` gst-camera-perf.c -ogst-camera-perf + * +#define SAVE_SNAPSHOT 1 + **/ #include +#ifdef SAVE_SNAPSHOT +#include +#endif #include #include #include - /* * debug logging */ @@ -422,6 +429,29 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) g_object_set (camera_bin, "preview-caps", NULL, NULL); break; } +#ifdef SAVE_SNAPSHOT + { + const GValue *value = gst_structure_get_value (st, "buffer"); + GstBuffer *buf = gst_value_get_buffer (value); + GstCaps *caps = GST_BUFFER_CAPS (buf); + GstStructure *buf_st = gst_caps_get_structure (caps, 0); + guchar *data = GST_BUFFER_DATA (buf); + gint width, height, rowstride; + GdkPixbuf *pixbuf; + + GST_INFO ("preview : buf=%p, size=%d, format=%" GST_PTR_FORMAT, + buf, GST_BUFFER_SIZE (buf), caps); + gst_structure_get_int (buf_st, "width", &width); + gst_structure_get_int (buf_st, "height", &height); + rowstride = GST_ROUND_UP_4 (width * 3); + //GST_INFO ("rowstride : %d, %d", rowstride, width*3); + pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, FALSE, + 8, width, height, rowstride, NULL, NULL); + gdk_pixbuf_save (pixbuf, "/tmp/gst-camerabin-preview.png", "png", + NULL, NULL); + gdk_pixbuf_unref (pixbuf); + } +#endif } } /* unhandled message */ @@ -632,10 +662,6 @@ test_01 (void) GET_TIME (t_initial); if (setup_pipeline ()) { - /* MAKE SURE THE PIPELINE IS IN PLAYING STATE BEFORE START TAKING PICTURES - AND SO ON (otherwise it will deadlock) */ - - //gst_element_get_state (camera_bin, NULL, NULL, GST_CLOCK_TIME_NONE); /* the actual results are fetched in bus_callback::state-changed */ res = FALSE; } else { -- cgit v1.2.1 From 265b75ca38913c7a9c0281d472f93e7936b6fa91 Mon Sep 17 00:00:00 2001 From: "ogg.k.ogg.k" Date: Mon, 20 Jul 2009 16:24:23 +0100 Subject: kate: fix some minor memory leaks Makes 'make check-valgrind' work for the kate unit test (#525743) --- ext/kate/gstkatetag.c | 5 ++++- ext/kate/gstkateutil.c | 10 ++++++++-- tests/check/Makefile.am | 1 - tests/check/elements/kate.c | 1 - 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ext/kate/gstkatetag.c b/ext/kate/gstkatetag.c index 7a39c556..f5734c12 100644 --- a/ext/kate/gstkatetag.c +++ b/ext/kate/gstkatetag.c @@ -294,7 +294,10 @@ gst_kate_tag_parse_packet (GstKateParse * parse, GstBuffer * buffer) /* rewrite the language and category */ if (GST_BUFFER_SIZE (buffer) >= 64 && GST_BUFFER_DATA (buffer)[0] == 0x80) { - buffer = gst_buffer_copy (buffer); + GstBuffer *new_buffer = gst_buffer_copy (buffer); + + gst_buffer_unref (buffer); + buffer = new_buffer; /* language is at offset 32, 16 bytes, zero terminated */ if (kt->language) { diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c index 78f18dae..b8915d70 100644 --- a/ext/kate/gstkateutil.c +++ b/ext/kate/gstkateutil.c @@ -185,7 +185,7 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, gst_pad_set_caps (srcpad, caps); gst_caps_unref (caps); if (decoder->k.ki->language && *decoder->k.ki->language) { - GstTagList *tags = gst_tag_list_new (); + GstTagList *old = decoder->tags, *tags = gst_tag_list_new (); if (tags) { gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_LANGUAGE_CODE, decoder->k.ki->language, NULL); @@ -193,6 +193,8 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, decoder->tags = gst_tag_list_merge (decoder->tags, tags, GST_TAG_MERGE_REPLACE); gst_tag_list_free (tags); + if (old) + gst_tag_list_free (old); } } @@ -212,7 +214,8 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, GST_INFO_OBJECT (element, "Parsed comments header"); { gchar *encoder = NULL; - GstTagList *list = gst_tag_list_from_vorbiscomment_buffer (buf, + GstTagList *old = decoder->tags, *list = + gst_tag_list_from_vorbiscomment_buffer (buf, (const guint8 *) "\201kate\0\0\0\0", 9, &encoder); if (list) { decoder->tags = @@ -235,6 +238,9 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, GST_TAG_ENCODER_VERSION, decoder->k.ki->bitstream_version_major, NULL); + if (old) + gst_tag_list_free (old); + if (decoder->initialized) { gst_element_found_tags_for_pad (element, srcpad, decoder->tags); decoder->tags = NULL; diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 41581363..1aa99d1a 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -71,7 +71,6 @@ endif VALGRIND_TO_FIX = \ - elements/kate \ elements/mpeg2enc \ elements/mplex diff --git a/tests/check/elements/kate.c b/tests/check/elements/kate.c index 80ea6882..551d72a1 100644 --- a/tests/check/elements/kate.c +++ b/tests/check/elements/kate.c @@ -413,7 +413,6 @@ GST_START_TEST (test_kate_encode_empty) 1 * GST_SECOND; GST_BUFFER_DURATION (inbuffer) = 5 * GST_SECOND; ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); - gst_buffer_ref (inbuffer); caps = gst_caps_from_string ("text/plain"); fail_unless (caps != NULL); -- cgit v1.2.1 From 7ae5022cee9bdcb46f62b109058caf82fe2db2be Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 20 Jul 2009 13:54:49 +0100 Subject: katedec: create SPU format images from suitable background images Make katedec fabricate dvd-style subpictures for subtitle overlay bitmaps, for easier playbin2 integration (#588638). --- ext/kate/Makefile.am | 4 +- ext/kate/README | 2 +- ext/kate/gstkatedec.c | 64 +++- ext/kate/gstkateenc.c | 574 +-------------------------------- ext/kate/gstkatespu.c | 865 ++++++++++++++++++++++++++++++++++++++++++++++++++ ext/kate/gstkatespu.h | 65 ++++ 6 files changed, 990 insertions(+), 584 deletions(-) create mode 100644 ext/kate/gstkatespu.c create mode 100644 ext/kate/gstkatespu.h diff --git a/ext/kate/Makefile.am b/ext/kate/Makefile.am index f907da5f..fd7a8408 100644 --- a/ext/kate/Makefile.am +++ b/ext/kate/Makefile.am @@ -3,7 +3,7 @@ plugin_LTLIBRARIES = libgstkate.la # sources used to compile this plug-in -libgstkate_la_SOURCES = gstkate.c gstkatedec.c gstkateenc.c gstkateparse.c gstkatetag.c gstkateutil.c +libgstkate_la_SOURCES = gstkate.c gstkatedec.c gstkateenc.c gstkateparse.c gstkatetag.c gstkateutil.c gstkatespu.c if USE_TIGER libgstkate_la_SOURCES += gstkatetiger.c endif @@ -15,6 +15,6 @@ libgstkate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstkate_la_LIBTOOLFLAGS = --tag=disable-static # headers we need but don't want installed -noinst_HEADERS = gstkate.h gstkatedec.h gstkateenc.h gstkateparse.h gstkatetag.h gstkateutil.h gstkatetiger.h +noinst_HEADERS = gstkate.h gstkatedec.h gstkateenc.h gstkateparse.h gstkatetag.h gstkateutil.h gstkatespu.h gstkatetiger.h EXTRA_DIST=README diff --git a/ext/kate/README b/ext/kate/README index 394b057a..498a79e2 100644 --- a/ext/kate/README +++ b/ext/kate/README @@ -9,7 +9,7 @@ http://libtiger.googlecode.com/ The Kate plugin contains various elements to manipulate Kate streams: - - katedec: decodes Kate streams to text + - katedec: decodes Kate streams to text and SPU images - kateenc: encodes Kate streams from text and SPU images - kateparse: parses Kate streams - katetag: allows changing metadata in Kate streams diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c index 3a207505..32f31f9c 100644 --- a/ext/kate/gstkatedec.c +++ b/ext/kate/gstkatedec.c @@ -2,7 +2,7 @@ * GStreamer * Copyright 2005 Thomas Vander Stichele * Copyright 2005 Ronald S. Bultje - * Copyright 2008 Vincent Penquerc'h + * Copyright 2008, 2009 Vincent Penquerc'h * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -85,6 +85,7 @@ #include #include "gstkate.h" +#include "gstkatespu.h" #include "gstkatedec.h" GST_DEBUG_CATEGORY_EXTERN (gst_katedec_debug); @@ -111,7 +112,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("text/plain; text/x-pango-markup") + GST_STATIC_CAPS ("text/plain; text/x-pango-markup; " GST_KATE_SPU_MIME_TYPE) ); GST_BOILERPLATE (GstKateDec, gst_kate_dec, GstElement, GST_TYPE_ELEMENT); @@ -250,6 +251,7 @@ gst_kate_dec_chain (GstPad * pad, GstBuffer * buf) gchar *escaped; GstBuffer *buffer; size_t len; + gboolean plain = TRUE; if (kd->remove_markup && ev->text_markup_type != kate_markup_none) { size_t len0 = ev->len + 1; @@ -257,26 +259,64 @@ gst_kate_dec_chain (GstPad * pad, GstBuffer * buf) if (escaped) { kate_text_remove_markup (ev->text_encoding, escaped, &len0); } + plain = TRUE; } else if (ev->text_markup_type == kate_markup_none) { /* no pango markup yet, escape text */ /* TODO: actually do the pango thing */ escaped = g_markup_printf_escaped ("%s", ev->text); + plain = TRUE; } else { escaped = g_strdup (ev->text); + plain = FALSE; } if (G_LIKELY (escaped)) { len = strlen (escaped); - GST_DEBUG_OBJECT (kd, "kate event: %s, escaped %s", ev->text, escaped); - buffer = gst_buffer_new_and_alloc (len + 1); - if (G_LIKELY (buffer)) { - /* allocate and copy the NULs, but don't include them in passed size */ - memcpy (GST_BUFFER_DATA (buffer), escaped, len + 1); - GST_BUFFER_SIZE (buffer) = len; + if (len > 0) { + GST_DEBUG_OBJECT (kd, "kate event: %s, escaped %s", ev->text, escaped); + buffer = gst_buffer_new_and_alloc (len + 1); + if (G_LIKELY (buffer)) { + const char *mime = plain ? "text/plain" : "text/x-pango-markup"; + GstCaps *caps = gst_caps_new_simple (mime, NULL); + gst_buffer_set_caps (buffer, caps); + gst_caps_unref (caps); + /* allocate and copy the NULs, but don't include them in passed size */ + memcpy (GST_BUFFER_DATA (buffer), escaped, len + 1); + GST_BUFFER_SIZE (buffer) = len; + GST_BUFFER_TIMESTAMP (buffer) = ev->start_time * GST_SECOND; + GST_BUFFER_DURATION (buffer) = + (ev->end_time - ev->start_time) * GST_SECOND; + rflow = gst_pad_push (kd->srcpad, buffer); + if (rflow == GST_FLOW_NOT_LINKED) { + GST_DEBUG_OBJECT (kd, "source pad not linked, ignored"); + } else if (rflow != GST_FLOW_OK) { + GST_WARNING_OBJECT (kd, "failed to push buffer: %s", + gst_flow_get_name (rflow)); + } + } else { + GST_WARNING_OBJECT (kd, "failed to create buffer"); + rflow = GST_FLOW_ERROR; + } + } else { + GST_WARNING_OBJECT (kd, "Empty string, nothing to do"); + rflow = GST_FLOW_OK; + } + g_free (escaped); + } else { + GST_WARNING_OBJECT (kd, "failed to allocate string"); + rflow = GST_FLOW_ERROR; + } + + // if there's a background paletted bitmap, construct a DVD SPU for it + if (ev->bitmap && ev->palette) { + GstBuffer *buffer = gst_kate_spu_encode_spu (kd, ev); + if (buffer) { + GstCaps *caps = gst_caps_new_simple (GST_KATE_SPU_MIME_TYPE, NULL); + gst_buffer_set_caps (buffer, caps); + gst_caps_unref (caps); GST_BUFFER_TIMESTAMP (buffer) = ev->start_time * GST_SECOND; GST_BUFFER_DURATION (buffer) = (ev->end_time - ev->start_time) * GST_SECOND; - gst_buffer_set_caps (buffer, GST_PAD_CAPS (kd->srcpad)); rflow = gst_pad_push (kd->srcpad, buffer); if (rflow == GST_FLOW_NOT_LINKED) { GST_DEBUG_OBJECT (kd, "source pad not linked, ignored"); @@ -285,13 +325,9 @@ gst_kate_dec_chain (GstPad * pad, GstBuffer * buf) gst_flow_get_name (rflow)); } } else { - GST_WARNING_OBJECT (kd, "failed to create buffer"); + GST_WARNING_OBJECT (kd, "failed to create SPU from paletted bitmap"); rflow = GST_FLOW_ERROR; } - g_free (escaped); - } else { - GST_WARNING_OBJECT (kd, "failed to allocate string"); - rflow = GST_FLOW_ERROR; } } diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index b9db9cda..514a9bd0 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -3,7 +3,7 @@ * Copyright 2005 Thomas Vander Stichele * Copyright 2005 Ronald S. Bultje * Copyright (C) 2007 Fluendo S.A. - * Copyright 2008 Vincent Penquerc'h + * Copyright 2008, 2009 Vincent Penquerc'h * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -82,6 +82,7 @@ #include "gstkate.h" #include "gstkateutil.h" +#include "gstkatespu.h" #include "gstkateenc.h" GST_DEBUG_CATEGORY_EXTERN (gst_kateenc_debug); @@ -108,24 +109,9 @@ enum ARG_DEFAULT_SPU_DURATION, }; -/* taken off the dvdsubdec element */ -static const guint32 gst_kate_enc_default_clut[16] = { - 0xb48080, 0x248080, 0x628080, 0xd78080, - 0x808080, 0x808080, 0x808080, 0x808080, - 0x808080, 0x808080, 0x808080, 0x808080, - 0x808080, 0x808080, 0x808080, 0x808080 -}; - -#define GST_KATE_UINT16_BE(ptr) ( ( ((guint16)((ptr)[0])) <<8) | ((ptr)[1]) ) - -/* taken off the DVD SPU decoder - now is time for today's WTF ???? */ -#define GST_KATE_STM_TO_GST(stm) ((GST_MSECOND * 1024 * (stm)) / 90) - #define DEFAULT_KEEPALIVE_MIN_TIME 2.5f #define DEFAULT_DEFAULT_SPU_DURATION 1.5f -#define GST_KATE_SPU_MIME_TYPE "video/x-dvd-subpicture" - static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -280,8 +266,8 @@ gst_kate_enc_init (GstKateEnc * ke, GstKateEncClass * gclass) ke->original_canvas_height = 0; ke->keepalive_min_time = DEFAULT_KEEPALIVE_MIN_TIME; ke->default_spu_duration = DEFAULT_DEFAULT_SPU_DURATION; - memcpy (ke->spu_clut, gst_kate_enc_default_clut, - sizeof (gst_kate_enc_default_clut)); + memcpy (ke->spu_clut, gst_kate_spu_default_clut, + sizeof (gst_kate_spu_default_clut)); ke->delayed_spu = FALSE; ke->delayed_bitmap = NULL; ke->delayed_palette = NULL; @@ -531,6 +517,8 @@ gst_kate_enc_is_simple_subtitle_category (GstKateEnc * ke, const char *category) static const char *const simple[] = { "subtitles", "SUB", + "spu-subtitles", + "K-SPU", }; int n; @@ -634,554 +622,6 @@ gst_kate_enc_flush_headers (GstKateEnc * ke) return rflow; } -enum SpuCmd -{ - SPU_CMD_FSTA_DSP = 0x00, /* Forced Display */ - SPU_CMD_DSP = 0x01, /* Display Start */ - SPU_CMD_STP_DSP = 0x02, /* Display Off */ - SPU_CMD_SET_COLOR = 0x03, /* Set the color indexes for the palette */ - SPU_CMD_SET_ALPHA = 0x04, /* Set the alpha indexes for the palette */ - SPU_CMD_SET_DAREA = 0x05, /* Set the display area for the SPU */ - SPU_CMD_DSPXA = 0x06, /* Pixel data addresses */ - SPU_CMD_CHG_COLCON = 0x07, /* Change Color & Contrast */ - SPU_CMD_END = 0xff -}; - -static void -gst_kate_enc_decode_colormap (GstKateEnc * ke, const guint8 * ptr) -{ - ke->spu_colormap[3] = ptr[0] >> 4; - ke->spu_colormap[2] = ptr[0] & 0x0f; - ke->spu_colormap[1] = ptr[1] >> 4; - ke->spu_colormap[0] = ptr[1] & 0x0f; -} - -static void -gst_kate_enc_decode_alpha (GstKateEnc * ke, const guint8 * ptr) -{ - ke->spu_alpha[3] = ptr[0] >> 4; - ke->spu_alpha[2] = ptr[0] & 0x0f; - ke->spu_alpha[1] = ptr[1] >> 4; - ke->spu_alpha[0] = ptr[1] & 0x0f; -} - -static void -gst_kate_enc_decode_area (GstKateEnc * ke, const guint8 * ptr) -{ - ke->spu_left = ((((guint16) ptr[0]) & 0x3f) << 4) | (ptr[1] >> 4); - ke->spu_top = ((((guint16) ptr[3]) & 0x3f) << 4) | (ptr[4] >> 4); - ke->spu_right = ((((guint16) ptr[1]) & 0x03) << 8) | ptr[2]; - ke->spu_bottom = ((((guint16) ptr[4]) & 0x03) << 8) | ptr[5]; - GST_DEBUG_OBJECT (ke, "SPU area %u %u -> %u %d", ke->spu_left, ke->spu_top, - ke->spu_right, ke->spu_bottom); -} - -static void -gst_kate_enc_decode_pixaddr (GstKateEnc * ke, const guint8 * ptr) -{ - ke->spu_pix_data[0] = GST_KATE_UINT16_BE (ptr + 0); - ke->spu_pix_data[1] = GST_KATE_UINT16_BE (ptr + 2); -} - -/* heavily inspired from dvdspudec */ -static guint16 -gst_kate_enc_decode_colcon (GstKateEnc * ke, const guint8 * ptr) -{ - guint16 nbytes = GST_KATE_UINT16_BE (ptr + 0); - guint16 nbytes_left = nbytes; - - GST_LOG_OBJECT (ke, "Number of bytes in color/contrast change command is %u", - nbytes); - if (G_UNLIKELY (nbytes < 2)) { - GST_WARNING_OBJECT (ke, - "Number of bytes in color/contrast change command is %u, should be at least 2", - nbytes); - return 0; - } - - ptr += 2; - nbytes_left -= 2; - - /* we will just skip that data for now */ - while (nbytes_left > 0) { - guint32 entry, nchanges, sz; - GST_LOG_OBJECT (ke, "Reading a color/contrast change entry, %u bytes left", - nbytes_left); - if (G_UNLIKELY (nbytes_left < 4)) { - GST_WARNING_OBJECT (ke, - "Not enough bytes to read a full color/contrast entry header"); - break; - } - entry = GST_READ_UINT32_BE (ptr); - GST_LOG_OBJECT (ke, "Color/contrast change entry header is %08x", entry); - nchanges = CLAMP ((ptr[2] >> 4), 1, 8); - ptr += 4; - nbytes_left -= 4; - if (entry == 0x0fffffff) { - GST_LOG_OBJECT (ke, - "Encountered color/contrast change termination code, breaking, %u bytes left", - nbytes_left); - break; - } - GST_LOG_OBJECT (ke, "Color/contrast change entry has %u changes", nchanges); - sz = 6 * nchanges; - if (G_UNLIKELY (sz > nbytes_left)) { - GST_WARNING_OBJECT (ke, - "Not enough bytes to read a full color/contrast entry"); - break; - } - ptr += sz; - nbytes_left -= sz; - } - return nbytes - nbytes_left; -} - -static inline guint8 -gst_kate_enc_get_nybble (const guint8 * nybbles, size_t * nybble_offset) -{ - guint8 ret; - - ret = nybbles[(*nybble_offset) / 2]; - - /* If the offset is even, we shift the answer down 4 bits, otherwise not */ - if ((*nybble_offset) & 0x01) - ret &= 0x0f; - else - ret = ret >> 4; - - (*nybble_offset)++; - - return ret; -} - -static guint16 -gst_kate_enc_get_rle_code (const guint8 * nybbles, size_t * nybble_offset) -{ - guint16 code; - - code = gst_kate_enc_get_nybble (nybbles, nybble_offset); - if (code < 0x4) { /* 4 .. f */ - code = (code << 4) | gst_kate_enc_get_nybble (nybbles, nybble_offset); - if (code < 0x10) { /* 1x .. 3x */ - code = (code << 4) | gst_kate_enc_get_nybble (nybbles, nybble_offset); - if (code < 0x40) { /* 04x .. 0fx */ - code = (code << 4) | gst_kate_enc_get_nybble (nybbles, nybble_offset); - } - } - } - return code; -} - -static void -gst_kate_enc_crop_bitmap (GstKateEnc * ke, kate_bitmap * kb, guint16 * dx, - guint16 * dy) -{ - int top, bottom, left, right; - guint8 zero = 0; - size_t n, x, y, w, h; - -#if 0 - /* find the zero */ - zero = kb->pixels[0]; - for (x = 0; x < kb->width; ++x) { - if (kb->pixels[x] != zero) { - GST_LOG_OBJECT (ke, "top line at %u is not zero: %u", x, kb->pixels[x]); - return; - } - } -#endif - - /* top */ - for (top = 0; top < kb->height; ++top) { - int empty = 1; - for (x = 0; x < kb->width; ++x) { - if (G_UNLIKELY (kb->pixels[x + top * kb->width] != zero)) { - empty = 0; - break; - } - } - if (!empty) - break; - } - - /* bottom */ - for (bottom = kb->height - 1; bottom >= top; --bottom) { - int empty = 1; - for (x = 0; x < kb->width; ++x) { - if (G_UNLIKELY (kb->pixels[x + bottom * kb->width] != zero)) { - empty = 0; - break; - } - } - if (!empty) - break; - } - - /* left */ - for (left = 0; left < kb->width; ++left) { - int empty = 1; - for (y = top; y <= bottom; ++y) { - if (G_UNLIKELY (kb->pixels[left + y * kb->width] != zero)) { - empty = 0; - break; - } - } - if (!empty) - break; - } - - /* right */ - for (right = kb->width - 1; right >= left; --right) { - int empty = 1; - for (y = top; y <= bottom; ++y) { - if (G_UNLIKELY (kb->pixels[right + y * kb->width] != zero)) { - empty = 0; - break; - } - } - if (!empty) - break; - } - - - w = right - left + 1; - h = bottom - top + 1; - GST_LOG_OBJECT (ke, "cropped from %zu %zu to %zu %zu", kb->width, kb->height, - w, h); - *dx += left; - *dy += top; - n = 0; - for (y = 0; y < h; ++y) { - memmove (kb->pixels + n, kb->pixels + kb->width * (y + top) + left, w); - n += w; - } - kb->width = w; - kb->height = h; -} - -#define CHECK(x) do { guint16 _ = (x); if (G_UNLIKELY((_) > sz)) { GST_WARNING_OBJECT (ke, "SPU overflow"); return GST_FLOW_ERROR; } } while (0) -#define ADVANCE(x) do { guint16 _ = (x); ptr += (_); sz -= (_); } while (0) -#define IGNORE(x) do { guint16 __ = (x); CHECK (__); ADVANCE (__); } while (0) - -static GstFlowReturn -gst_kate_enc_decode_command_sequence (GstKateEnc * ke, GstBuffer * buf, - guint16 command_sequence_offset) -{ - guint16 date; - guint16 next_command_sequence; - const guint8 *ptr; - guint16 sz; - - if (command_sequence_offset >= GST_BUFFER_SIZE (buf)) { - GST_WARNING_OBJECT (ke, "Command sequence offset %u is out of range %u", - command_sequence_offset, GST_BUFFER_SIZE (buf)); - return GST_FLOW_ERROR; - } - - ptr = GST_BUFFER_DATA (buf) + command_sequence_offset; - sz = GST_BUFFER_SIZE (buf) - command_sequence_offset; - - GST_DEBUG_OBJECT (ke, "Decoding command sequence at %u (%u bytes)", - command_sequence_offset, sz); - - CHECK (2); - date = GST_KATE_UINT16_BE (ptr); - ADVANCE (2); - GST_DEBUG_OBJECT (ke, "date %u", date); - - CHECK (2); - next_command_sequence = GST_KATE_UINT16_BE (ptr); - ADVANCE (2); - GST_DEBUG_OBJECT (ke, "next command sequence at %u", next_command_sequence); - - while (sz) { - guint8 cmd = *ptr++; - switch (cmd) { - case SPU_CMD_FSTA_DSP: /* 0x00 */ - GST_DEBUG_OBJECT (ke, "[0] DISPLAY"); - break; - case SPU_CMD_DSP: /* 0x01 */ - GST_DEBUG_OBJECT (ke, "[1] SHOW"); - ke->show_time = date; - break; - case SPU_CMD_STP_DSP: /* 0x02 */ - GST_DEBUG_OBJECT (ke, "[2] HIDE"); - ke->hide_time = date; - break; - case SPU_CMD_SET_COLOR: /* 0x03 */ - GST_DEBUG_OBJECT (ke, "[3] SET COLOR"); - CHECK (2); - gst_kate_enc_decode_colormap (ke, ptr); - ADVANCE (2); - break; - case SPU_CMD_SET_ALPHA: /* 0x04 */ - GST_DEBUG_OBJECT (ke, "[4] SET ALPHA"); - CHECK (2); - gst_kate_enc_decode_alpha (ke, ptr); - ADVANCE (2); - break; - case SPU_CMD_SET_DAREA: /* 0x05 */ - GST_DEBUG_OBJECT (ke, "[5] SET DISPLAY AREA"); - CHECK (6); - gst_kate_enc_decode_area (ke, ptr); - ADVANCE (6); - break; - case SPU_CMD_DSPXA: /* 0x06 */ - GST_DEBUG_OBJECT (ke, "[6] SET PIXEL ADDRESSES"); - CHECK (4); - gst_kate_enc_decode_pixaddr (ke, ptr); - GST_DEBUG_OBJECT (ke, " -> first pixel address %u", - ke->spu_pix_data[0]); - GST_DEBUG_OBJECT (ke, " -> second pixel address %u", - ke->spu_pix_data[1]); - ADVANCE (4); - break; - case SPU_CMD_CHG_COLCON: /* 0x07 */ - GST_DEBUG_OBJECT (ke, "[7] CHANGE COLOR/CONTRAST"); - CHECK (2); - ADVANCE (gst_kate_enc_decode_colcon (ke, ptr)); - break; - case SPU_CMD_END: /* 0xff */ - GST_DEBUG_OBJECT (ke, "[0xff] END"); - if (next_command_sequence != command_sequence_offset) { - GST_DEBUG_OBJECT (ke, "Jumping to next sequence at offset %u", - next_command_sequence); - return gst_kate_enc_decode_command_sequence (ke, buf, - next_command_sequence); - } else { - GST_DEBUG_OBJECT (ke, "No more sequences to decode"); - return GST_FLOW_OK; - } - break; - default: - GST_WARNING_OBJECT (ke, "invalid SPU command: %u", cmd); - return GST_FLOW_ERROR; - } - } - return GST_FLOW_ERROR; -} - -static inline int -gst_kate_enc_clamp (int value) -{ - if (value < 0) - return 0; - if (value > 255) - return 255; - return value; -} - -static void -gst_kate_enc_yuv2rgb (int y, int u, int v, int *r, int *g, int *b) -{ -#if 0 - *r = gst_kate_enc_clamp (y + 1.371 * v); - *g = gst_kate_enc_clamp (y - 0.698 * v - 0.336 * u); - *b = gst_kate_enc_clamp (y + 1.732 * u); -#elif 0 - *r = gst_kate_enc_clamp (y + u); - *g = gst_kate_enc_clamp (y - (76 * u - 26 * v) / 256); - *b = gst_kate_enc_clamp (y + v); -#else - y = (y - 16) * 255 / 219; - u -= 128; - v -= 128; - - *r = gst_kate_enc_clamp (y + 1.402 * 255 / 224 * v); - *g = gst_kate_enc_clamp (y + 0.34414 * 255 / 224 * v - - 0.71414 * 255 / 224 * u); - *b = gst_kate_enc_clamp (y + 1.772 * 244 / 224 * u); -#endif -} - -static GstFlowReturn -gst_kate_enc_create_spu_palette (GstKateEnc * ke, kate_palette * kp) -{ - size_t n; - - kate_palette_init (kp); - kp->ncolors = 4; - kp->colors = (kate_color *) g_malloc (kp->ncolors * sizeof (kate_color)); - if (G_UNLIKELY (!kp->colors)) - return GST_FLOW_ERROR; - -#if 1 - for (n = 0; n < kp->ncolors; ++n) { - int idx = ke->spu_colormap[n]; - guint32 color = ke->spu_clut[idx]; - int y = (color >> 16) & 0xff; - int v = (color >> 8) & 0xff; - int u = color & 0xff; - int r, g, b; - gst_kate_enc_yuv2rgb (y, u, v, &r, &g, &b); - kp->colors[n].r = r; - kp->colors[n].g = g; - kp->colors[n].b = b; - kp->colors[n].a = ke->spu_alpha[n] * 17; - } -#else - /* just make a ramp from 0 to 255 for those non transparent colors */ - for (n = 0; n < kp->ncolors; ++n) - if (ke->spu_alpha[n] == 0) - ++ntrans; - - for (n = 0; n < kp->ncolors; ++n) { - kp->colors[n].r = luma; - kp->colors[n].g = luma; - kp->colors[n].b = luma; - kp->colors[n].a = ke->spu_alpha[n] * 17; - if (ke->spu_alpha[n]) - luma /= 2; - } -#endif - - return GST_FLOW_OK; -} - -static GstFlowReturn -gst_kate_enc_decode_spu (GstKateEnc * ke, GstBuffer * buf, kate_region * kr, - kate_bitmap * kb, kate_palette * kp) -{ - const guint8 *ptr = GST_BUFFER_DATA (buf); - size_t sz = GST_BUFFER_SIZE (buf); - guint16 packet_size; - guint16 x, y; - size_t n; - guint8 *pixptr[2]; - size_t nybble_offset[2]; - size_t max_nybbles[2]; - GstFlowReturn rflow; - guint16 next_command_sequence; - guint16 code; - - /* before decoding anything, initialize to sensible defaults */ - memset (ke->spu_colormap, 0, sizeof (ke->spu_colormap)); - memset (ke->spu_alpha, 0, sizeof (ke->spu_alpha)); - ke->spu_top = ke->spu_left = 1; - ke->spu_bottom = ke->spu_right = 0; - ke->spu_pix_data[0] = ke->spu_pix_data[1] = 0; - ke->show_time = ke->hide_time = 0; - - /* read sizes and get to the start of the data */ - CHECK (2); - packet_size = GST_KATE_UINT16_BE (ptr); - ADVANCE (2); - GST_DEBUG_OBJECT (ke, "packet size %u (GstBuffer size %u)", packet_size, - GST_BUFFER_SIZE (buf)); - - CHECK (2); - next_command_sequence = GST_KATE_UINT16_BE (ptr); - ADVANCE (2); - ptr = GST_BUFFER_DATA (buf) + next_command_sequence; - sz = GST_BUFFER_SIZE (buf) - next_command_sequence; - GST_DEBUG_OBJECT (ke, "next command sequence at %u for %u", - next_command_sequence, sz); - - rflow = gst_kate_enc_decode_command_sequence (ke, buf, next_command_sequence); - if (G_UNLIKELY (rflow != GST_FLOW_OK)) - return rflow; - - /* if no addresses or sizes were given, or if they define an empty SPU, nothing more to do */ - if (G_UNLIKELY (ke->spu_right - ke->spu_left < 0 - || ke->spu_bottom - ke->spu_top < 0 || ke->spu_pix_data[0] == 0 - || ke->spu_pix_data[1] == 0)) { - GST_WARNING_OBJECT (ke, "SPU area is empty, nothing to encode"); - return GST_FLOW_ERROR; - } - - /* create the palette */ - rflow = gst_kate_enc_create_spu_palette (ke, kp); - if (G_UNLIKELY (rflow != GST_FLOW_OK)) - return rflow; - - /* create the bitmap */ - kate_bitmap_init (kb); - kb->width = ke->spu_right - ke->spu_left + 1; - kb->height = ke->spu_bottom - ke->spu_top + 1; - kb->bpp = 2; - kb->type = kate_bitmap_type_paletted; - kb->pixels = (unsigned char *) g_malloc (kb->width * kb->height); - if (G_UNLIKELY (!kb->pixels)) { - GST_WARNING_OBJECT (ke, "Failed to allocate memory for pixel data"); - return GST_FLOW_ERROR; - } - - n = 0; - pixptr[0] = GST_BUFFER_DATA (buf) + ke->spu_pix_data[0]; - pixptr[1] = GST_BUFFER_DATA (buf) + ke->spu_pix_data[1]; - nybble_offset[0] = 0; - nybble_offset[1] = 0; - max_nybbles[0] = 2 * (packet_size - ke->spu_pix_data[0]); - max_nybbles[1] = 2 * (packet_size - ke->spu_pix_data[1]); - for (y = 0; y < kb->height; ++y) { - nybble_offset[y & 1] = GST_ROUND_UP_2 (nybble_offset[y & 1]); - for (x = 0; x < kb->width;) { - if (G_UNLIKELY (nybble_offset[y & 1] >= max_nybbles[y & 1])) { - GST_DEBUG_OBJECT (ke, "RLE overflow, clearing the remainder"); - memset (kb->pixels + n, 0, kb->width - x); - n += kb->width - x; - break; - } - code = gst_kate_enc_get_rle_code (pixptr[y & 1], &nybble_offset[y & 1]); - if (code == 0) { - memset (kb->pixels + n, 0, kb->width - x); - n += kb->width - x; - break; - } else { - guint16 npixels = code >> 2; - guint16 pixel = code & 3; - if (npixels > kb->width - x) { - npixels = kb->width - x; - } - memset (kb->pixels + n, pixel, npixels); - n += npixels; - x += npixels; - } - } - } - - GST_LOG_OBJECT (ke, "%u/%u bytes left in the data packet", - max_nybbles[0] - nybble_offset[0], max_nybbles[1] - nybble_offset[1]); - - /* some streams seem to have huge uncropped SPUs, fix those up */ - x = ke->spu_left; - y = ke->spu_top; - gst_kate_enc_crop_bitmap (ke, kb, &x, &y); - - /* create the region */ - kate_region_init (kr); - if (ke->original_canvas_width > 0 && ke->original_canvas_height > 0) { - /* prefer relative sizes in case we're encoding for a different resolution - that what the SPU was created for */ - kr->metric = kate_millionths; - kr->x = 1000000 * x / ke->original_canvas_width; - kr->y = 1000000 * y / ke->original_canvas_height; - kr->w = 1000000 * kb->width / ke->original_canvas_width; - kr->h = 1000000 * kb->height / ke->original_canvas_height; - } else { - kr->metric = kate_pixel; - kr->x = x; - kr->y = y; - kr->w = kb->width; - kr->h = kb->height; - } - - /* some SPUs have no hide time */ - if (ke->hide_time == 0) { - GST_INFO_OBJECT (ke, "SPU has no hide time"); - /* now, we don't know when the next SPU is scheduled to go, since we probably - haven't received it yet, so we'll just make it a 1 second delay, which is - probably going to end before the next one while being readable */ - //ke->hide_time = ke->show_time + (1000*90/1024); - } - - return GST_FLOW_OK; -} - -#undef IGNORE -#undef ADVANCE -#undef CHECK - static GstFlowReturn gst_kate_enc_chain_push_packet (GstKateEnc * ke, kate_packet * kp, GstClockTime start, GstClockTime duration) @@ -1308,7 +748,7 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf) return GST_FLOW_ERROR; } - rflow = gst_kate_enc_decode_spu (ke, buf, kregion, kbitmap, kpalette); + rflow = gst_kate_spu_decode_spu (ke, buf, kregion, kbitmap, kpalette); if (G_UNLIKELY (rflow != GST_FLOW_OK)) { GST_ERROR_OBJECT (ke, "Failed to decode incoming SPU"); #if 0 diff --git a/ext/kate/gstkatespu.c b/ext/kate/gstkatespu.c new file mode 100644 index 00000000..f05ae421 --- /dev/null +++ b/ext/kate/gstkatespu.c @@ -0,0 +1,865 @@ +/* GStreamer + * Copyright (C) 2009 Vincent Penquerc'h + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#include +#include +#include +#include +#include "gstkatespu.h" + +#define MAX_SPU_SIZE 53220 + +GST_DEBUG_CATEGORY_EXTERN (gst_kateenc_debug); +GST_DEBUG_CATEGORY_EXTERN (gst_katedec_debug); + +/* taken off the dvdsubdec element */ +const guint32 gst_kate_spu_default_clut[16] = { + 0xb48080, 0x248080, 0x628080, 0xd78080, + 0x808080, 0x808080, 0x808080, 0x808080, + 0x808080, 0x808080, 0x808080, 0x808080, + 0x808080, 0x808080, 0x808080, 0x808080 +}; + +#define GST_CAT_DEFAULT gst_kateenc_debug + +static void +gst_kate_spu_decode_colormap (GstKateEnc * ke, const guint8 * ptr) +{ + ke->spu_colormap[3] = ptr[0] >> 4; + ke->spu_colormap[2] = ptr[0] & 0x0f; + ke->spu_colormap[1] = ptr[1] >> 4; + ke->spu_colormap[0] = ptr[1] & 0x0f; +} + +static void +gst_kate_spu_decode_alpha (GstKateEnc * ke, const guint8 * ptr) +{ + ke->spu_alpha[3] = ptr[0] >> 4; + ke->spu_alpha[2] = ptr[0] & 0x0f; + ke->spu_alpha[1] = ptr[1] >> 4; + ke->spu_alpha[0] = ptr[1] & 0x0f; +} + +static void +gst_kate_spu_decode_area (GstKateEnc * ke, const guint8 * ptr) +{ + ke->spu_left = ((((guint16) ptr[0]) & 0x3f) << 4) | (ptr[1] >> 4); + ke->spu_top = ((((guint16) ptr[3]) & 0x3f) << 4) | (ptr[4] >> 4); + ke->spu_right = ((((guint16) ptr[1]) & 0x03) << 8) | ptr[2]; + ke->spu_bottom = ((((guint16) ptr[4]) & 0x03) << 8) | ptr[5]; + GST_DEBUG_OBJECT (ke, "SPU area %u %u -> %u %d", ke->spu_left, ke->spu_top, + ke->spu_right, ke->spu_bottom); +} + +static void +gst_kate_spu_decode_pixaddr (GstKateEnc * ke, const guint8 * ptr) +{ + ke->spu_pix_data[0] = GST_KATE_UINT16_BE (ptr + 0); + ke->spu_pix_data[1] = GST_KATE_UINT16_BE (ptr + 2); +} + +/* heavily inspired from dvdspudec */ +static guint16 +gst_kate_spu_decode_colcon (GstKateEnc * ke, const guint8 * ptr) +{ + guint16 nbytes = GST_KATE_UINT16_BE (ptr + 0); + guint16 nbytes_left = nbytes; + + GST_LOG_OBJECT (ke, "Number of bytes in color/contrast change command is %u", + nbytes); + if (G_UNLIKELY (nbytes < 2)) { + GST_WARNING_OBJECT (ke, + "Number of bytes in color/contrast change command is %u, should be at least 2", + nbytes); + return 0; + } + + ptr += 2; + nbytes_left -= 2; + + /* we will just skip that data for now */ + while (nbytes_left > 0) { + guint32 entry, nchanges, sz; + GST_LOG_OBJECT (ke, "Reading a color/contrast change entry, %u bytes left", + nbytes_left); + if (G_UNLIKELY (nbytes_left < 4)) { + GST_WARNING_OBJECT (ke, + "Not enough bytes to read a full color/contrast entry header"); + break; + } + entry = GST_READ_UINT32_BE (ptr); + GST_LOG_OBJECT (ke, "Color/contrast change entry header is %08x", entry); + nchanges = CLAMP ((ptr[2] >> 4), 1, 8); + ptr += 4; + nbytes_left -= 4; + if (entry == 0x0fffffff) { + GST_LOG_OBJECT (ke, + "Encountered color/contrast change termination code, breaking, %u bytes left", + nbytes_left); + break; + } + GST_LOG_OBJECT (ke, "Color/contrast change entry has %u changes", nchanges); + sz = 6 * nchanges; + if (G_UNLIKELY (sz > nbytes_left)) { + GST_WARNING_OBJECT (ke, + "Not enough bytes to read a full color/contrast entry"); + break; + } + ptr += sz; + nbytes_left -= sz; + } + return nbytes - nbytes_left; +} + +static inline guint8 +gst_kate_spu_get_nybble (const guint8 * nybbles, size_t * nybble_offset) +{ + guint8 ret; + + ret = nybbles[(*nybble_offset) / 2]; + + /* If the offset is even, we shift the answer down 4 bits, otherwise not */ + if ((*nybble_offset) & 0x01) + ret &= 0x0f; + else + ret = ret >> 4; + + (*nybble_offset)++; + + return ret; +} + +static guint16 +gst_kate_spu_get_rle_code (const guint8 * nybbles, size_t * nybble_offset) +{ + guint16 code; + + code = gst_kate_spu_get_nybble (nybbles, nybble_offset); + if (code < 0x4) { /* 4 .. f */ + code = (code << 4) | gst_kate_spu_get_nybble (nybbles, nybble_offset); + if (code < 0x10) { /* 1x .. 3x */ + code = (code << 4) | gst_kate_spu_get_nybble (nybbles, nybble_offset); + if (code < 0x40) { /* 04x .. 0fx */ + code = (code << 4) | gst_kate_spu_get_nybble (nybbles, nybble_offset); + } + } + } + return code; +} + +static void +gst_kate_spu_crop_bitmap (GstKateEnc * ke, kate_bitmap * kb, guint16 * dx, + guint16 * dy) +{ + int top, bottom, left, right; + guint8 zero = 0; + size_t n, x, y, w, h; + +#if 0 + /* find the zero */ + zero = kb->pixels[0]; + for (x = 0; x < kb->width; ++x) { + if (kb->pixels[x] != zero) { + GST_LOG_OBJECT (ke, "top line at %u is not zero: %u", x, kb->pixels[x]); + return; + } + } +#endif + + /* top */ + for (top = 0; top < kb->height; ++top) { + int empty = 1; + for (x = 0; x < kb->width; ++x) { + if (G_UNLIKELY (kb->pixels[x + top * kb->width] != zero)) { + empty = 0; + break; + } + } + if (!empty) + break; + } + + /* bottom */ + for (bottom = kb->height - 1; bottom >= top; --bottom) { + int empty = 1; + for (x = 0; x < kb->width; ++x) { + if (G_UNLIKELY (kb->pixels[x + bottom * kb->width] != zero)) { + empty = 0; + break; + } + } + if (!empty) + break; + } + + /* left */ + for (left = 0; left < kb->width; ++left) { + int empty = 1; + for (y = top; y <= bottom; ++y) { + if (G_UNLIKELY (kb->pixels[left + y * kb->width] != zero)) { + empty = 0; + break; + } + } + if (!empty) + break; + } + + /* right */ + for (right = kb->width - 1; right >= left; --right) { + int empty = 1; + for (y = top; y <= bottom; ++y) { + if (G_UNLIKELY (kb->pixels[right + y * kb->width] != zero)) { + empty = 0; + break; + } + } + if (!empty) + break; + } + + + w = right - left + 1; + h = bottom - top + 1; + GST_LOG_OBJECT (ke, "cropped from %zu %zu to %zu %zu", kb->width, kb->height, + w, h); + *dx += left; + *dy += top; + n = 0; + for (y = 0; y < h; ++y) { + memmove (kb->pixels + n, kb->pixels + kb->width * (y + top) + left, w); + n += w; + } + kb->width = w; + kb->height = h; +} + +#define CHECK(x) do { guint16 _ = (x); if (G_UNLIKELY((_) > sz)) { GST_WARNING_OBJECT (ke, "SPU overflow"); return GST_FLOW_ERROR; } } while (0) +#define ADVANCE(x) do { guint16 _ = (x); ptr += (_); sz -= (_); } while (0) +#define IGNORE(x) do { guint16 __ = (x); CHECK (__); ADVANCE (__); } while (0) + +static GstFlowReturn +gst_kate_spu_decode_command_sequence (GstKateEnc * ke, GstBuffer * buf, + guint16 command_sequence_offset) +{ + guint16 date; + guint16 next_command_sequence; + const guint8 *ptr; + guint16 sz; + + if (command_sequence_offset >= GST_BUFFER_SIZE (buf)) { + GST_WARNING_OBJECT (ke, "Command sequence offset %u is out of range %u", + command_sequence_offset, GST_BUFFER_SIZE (buf)); + return GST_FLOW_ERROR; + } + + ptr = GST_BUFFER_DATA (buf) + command_sequence_offset; + sz = GST_BUFFER_SIZE (buf) - command_sequence_offset; + + GST_DEBUG_OBJECT (ke, "Decoding command sequence at %u (%u bytes)", + command_sequence_offset, sz); + + CHECK (2); + date = GST_KATE_UINT16_BE (ptr); + ADVANCE (2); + GST_DEBUG_OBJECT (ke, "date %u", date); + + CHECK (2); + next_command_sequence = GST_KATE_UINT16_BE (ptr); + ADVANCE (2); + GST_DEBUG_OBJECT (ke, "next command sequence at %u", next_command_sequence); + + while (sz) { + guint8 cmd = *ptr++; + switch (cmd) { + case SPU_CMD_FSTA_DSP: /* 0x00 */ + GST_DEBUG_OBJECT (ke, "[0] DISPLAY"); + break; + case SPU_CMD_DSP: /* 0x01 */ + GST_DEBUG_OBJECT (ke, "[1] SHOW"); + ke->show_time = date; + break; + case SPU_CMD_STP_DSP: /* 0x02 */ + GST_DEBUG_OBJECT (ke, "[2] HIDE"); + ke->hide_time = date; + break; + case SPU_CMD_SET_COLOR: /* 0x03 */ + GST_DEBUG_OBJECT (ke, "[3] SET COLOR"); + CHECK (2); + gst_kate_spu_decode_colormap (ke, ptr); + ADVANCE (2); + break; + case SPU_CMD_SET_ALPHA: /* 0x04 */ + GST_DEBUG_OBJECT (ke, "[4] SET ALPHA"); + CHECK (2); + gst_kate_spu_decode_alpha (ke, ptr); + ADVANCE (2); + break; + case SPU_CMD_SET_DAREA: /* 0x05 */ + GST_DEBUG_OBJECT (ke, "[5] SET DISPLAY AREA"); + CHECK (6); + gst_kate_spu_decode_area (ke, ptr); + ADVANCE (6); + break; + case SPU_CMD_DSPXA: /* 0x06 */ + GST_DEBUG_OBJECT (ke, "[6] SET PIXEL ADDRESSES"); + CHECK (4); + gst_kate_spu_decode_pixaddr (ke, ptr); + GST_DEBUG_OBJECT (ke, " -> first pixel address %u", + ke->spu_pix_data[0]); + GST_DEBUG_OBJECT (ke, " -> second pixel address %u", + ke->spu_pix_data[1]); + ADVANCE (4); + break; + case SPU_CMD_CHG_COLCON: /* 0x07 */ + GST_DEBUG_OBJECT (ke, "[7] CHANGE COLOR/CONTRAST"); + CHECK (2); + ADVANCE (gst_kate_spu_decode_colcon (ke, ptr)); + break; + case SPU_CMD_END: /* 0xff */ + GST_DEBUG_OBJECT (ke, "[0xff] END"); + if (next_command_sequence != command_sequence_offset) { + GST_DEBUG_OBJECT (ke, "Jumping to next sequence at offset %u", + next_command_sequence); + return gst_kate_spu_decode_command_sequence (ke, buf, + next_command_sequence); + } else { + GST_DEBUG_OBJECT (ke, "No more sequences to decode"); + return GST_FLOW_OK; + } + break; + default: + GST_WARNING_OBJECT (ke, "invalid SPU command: %u", cmd); + return GST_FLOW_ERROR; + } + } + return GST_FLOW_ERROR; +} + +static inline int +gst_kate_spu_clamp (int value) +{ + if (value < 0) + return 0; + if (value > 255) + return 255; + return value; +} + +static void +gst_kate_spu_yuv2rgb (int y, int u, int v, int *r, int *g, int *b) +{ +#if 0 + *r = gst_kate_spu_clamp (y + 1.371 * v); + *g = gst_kate_spu_clamp (y - 0.698 * v - 0.336 * u); + *b = gst_kate_spu_clamp (y + 1.732 * u); +#elif 0 + *r = gst_kate_spu_clamp (y + u); + *g = gst_kate_spu_clamp (y - (76 * u - 26 * v) / 256); + *b = gst_kate_spu_clamp (y + v); +#else + y = (y - 16) * 255 / 219; + u = (u - 128) * 255 / 224; + v = (v - 128) * 255 / 224; + + *r = gst_kate_spu_clamp (y + 1.402 * v); + *g = gst_kate_spu_clamp (y - 0.34414 * u - 0.71414 * v); + *b = gst_kate_spu_clamp (y + 1.772 * u); +#endif +} + +static GstFlowReturn +gst_kate_spu_create_spu_palette (GstKateEnc * ke, kate_palette * kp) +{ + size_t n; + + kate_palette_init (kp); + kp->ncolors = 4; + kp->colors = (kate_color *) g_malloc (kp->ncolors * sizeof (kate_color)); + if (G_UNLIKELY (!kp->colors)) + return GST_FLOW_ERROR; + +#if 1 + for (n = 0; n < kp->ncolors; ++n) { + int idx = ke->spu_colormap[n]; + guint32 color = ke->spu_clut[idx]; + int y = (color >> 16) & 0xff; + int v = (color >> 8) & 0xff; + int u = color & 0xff; + int r, g, b; + gst_kate_spu_yuv2rgb (y, u, v, &r, &g, &b); + kp->colors[n].r = r; + kp->colors[n].g = g; + kp->colors[n].b = b; + kp->colors[n].a = ke->spu_alpha[n] * 17; + } +#else + /* just make a ramp from 0 to 255 for those non transparent colors */ + for (n = 0; n < kp->ncolors; ++n) + if (ke->spu_alpha[n] == 0) + ++ntrans; + + for (n = 0; n < kp->ncolors; ++n) { + kp->colors[n].r = luma; + kp->colors[n].g = luma; + kp->colors[n].b = luma; + kp->colors[n].a = ke->spu_alpha[n] * 17; + if (ke->spu_alpha[n]) + luma /= 2; + } +#endif + + return GST_FLOW_OK; +} + +GstFlowReturn +gst_kate_spu_decode_spu (GstKateEnc * ke, GstBuffer * buf, kate_region * kr, + kate_bitmap * kb, kate_palette * kp) +{ + const guint8 *ptr = GST_BUFFER_DATA (buf); + size_t sz = GST_BUFFER_SIZE (buf); + guint16 packet_size; + guint16 x, y; + size_t n; + guint8 *pixptr[2]; + size_t nybble_offset[2]; + size_t max_nybbles[2]; + GstFlowReturn rflow; + guint16 next_command_sequence; + guint16 code; + + /* before decoding anything, initialize to sensible defaults */ + memset (ke->spu_colormap, 0, sizeof (ke->spu_colormap)); + memset (ke->spu_alpha, 0, sizeof (ke->spu_alpha)); + ke->spu_top = ke->spu_left = 1; + ke->spu_bottom = ke->spu_right = 0; + ke->spu_pix_data[0] = ke->spu_pix_data[1] = 0; + ke->show_time = ke->hide_time = 0; + + /* read sizes and get to the start of the data */ + CHECK (2); + packet_size = GST_KATE_UINT16_BE (ptr); + ADVANCE (2); + GST_DEBUG_OBJECT (ke, "packet size %u (GstBuffer size %u)", packet_size, + GST_BUFFER_SIZE (buf)); + + CHECK (2); + next_command_sequence = GST_KATE_UINT16_BE (ptr); + ADVANCE (2); + ptr = GST_BUFFER_DATA (buf) + next_command_sequence; + sz = GST_BUFFER_SIZE (buf) - next_command_sequence; + GST_DEBUG_OBJECT (ke, "next command sequence at %u for %u", + next_command_sequence, sz); + + rflow = gst_kate_spu_decode_command_sequence (ke, buf, next_command_sequence); + if (G_UNLIKELY (rflow != GST_FLOW_OK)) + return rflow; + + /* if no addresses or sizes were given, or if they define an empty SPU, nothing more to do */ + if (G_UNLIKELY (ke->spu_right - ke->spu_left < 0 + || ke->spu_bottom - ke->spu_top < 0 || ke->spu_pix_data[0] == 0 + || ke->spu_pix_data[1] == 0)) { + GST_WARNING_OBJECT (ke, "SPU area is empty, nothing to encode"); + return GST_FLOW_ERROR; + } + + /* create the palette */ + rflow = gst_kate_spu_create_spu_palette (ke, kp); + if (G_UNLIKELY (rflow != GST_FLOW_OK)) + return rflow; + + /* create the bitmap */ + kate_bitmap_init (kb); + kb->width = ke->spu_right - ke->spu_left + 1; + kb->height = ke->spu_bottom - ke->spu_top + 1; + kb->bpp = 2; + kb->type = kate_bitmap_type_paletted; + kb->pixels = (unsigned char *) g_malloc (kb->width * kb->height); + if (G_UNLIKELY (!kb->pixels)) { + GST_WARNING_OBJECT (ke, "Failed to allocate memory for pixel data"); + return GST_FLOW_ERROR; + } + + n = 0; + pixptr[0] = GST_BUFFER_DATA (buf) + ke->spu_pix_data[0]; + pixptr[1] = GST_BUFFER_DATA (buf) + ke->spu_pix_data[1]; + nybble_offset[0] = 0; + nybble_offset[1] = 0; + max_nybbles[0] = 2 * (packet_size - ke->spu_pix_data[0]); + max_nybbles[1] = 2 * (packet_size - ke->spu_pix_data[1]); + for (y = 0; y < kb->height; ++y) { + nybble_offset[y & 1] = GST_ROUND_UP_2 (nybble_offset[y & 1]); + for (x = 0; x < kb->width;) { + if (G_UNLIKELY (nybble_offset[y & 1] >= max_nybbles[y & 1])) { + GST_DEBUG_OBJECT (ke, "RLE overflow, clearing the remainder"); + memset (kb->pixels + n, 0, kb->width - x); + n += kb->width - x; + break; + } + code = gst_kate_spu_get_rle_code (pixptr[y & 1], &nybble_offset[y & 1]); + if (code == 0) { + memset (kb->pixels + n, 0, kb->width - x); + n += kb->width - x; + break; + } else { + guint16 npixels = code >> 2; + guint16 pixel = code & 3; + if (npixels > kb->width - x) { + npixels = kb->width - x; + } + memset (kb->pixels + n, pixel, npixels); + n += npixels; + x += npixels; + } + } + } + + GST_LOG_OBJECT (ke, "%u/%u bytes left in the data packet", + max_nybbles[0] - nybble_offset[0], max_nybbles[1] - nybble_offset[1]); + + /* some streams seem to have huge uncropped SPUs, fix those up */ + x = ke->spu_left; + y = ke->spu_top; + gst_kate_spu_crop_bitmap (ke, kb, &x, &y); + + /* create the region */ + kate_region_init (kr); + if (ke->original_canvas_width > 0 && ke->original_canvas_height > 0) { + /* prefer relative sizes in case we're encoding for a different resolution + that what the SPU was created for */ + kr->metric = kate_millionths; + kr->x = 1000000 * x / ke->original_canvas_width; + kr->y = 1000000 * y / ke->original_canvas_height; + kr->w = 1000000 * kb->width / ke->original_canvas_width; + kr->h = 1000000 * kb->height / ke->original_canvas_height; + } else { + kr->metric = kate_pixel; + kr->x = x; + kr->y = y; + kr->w = kb->width; + kr->h = kb->height; + } + + /* some SPUs have no hide time */ + if (ke->hide_time == 0) { + GST_INFO_OBJECT (ke, "SPU has no hide time"); + /* now, we don't know when the next SPU is scheduled to go, since we probably + haven't received it yet, so we'll just make it a 1 second delay, which is + probably going to end before the next one while being readable */ + //ke->hide_time = ke->show_time + (1000 * 90 / 1024); + } + + return GST_FLOW_OK; +} + +#undef IGNORE +#undef ADVANCE +#undef CHECK + +#undef GST_CAT_DEFAULT +#define GST_CAT_DEFAULT gst_katedec_debug + +static void +gst_kate_spu_add_nybble (unsigned char *bytes, size_t nbytes, int nybble_offset, + unsigned char nybble) +{ + unsigned char *ptr = bytes + nbytes + nybble_offset / 2; + if (!(nybble_offset & 1)) { + *ptr = nybble << 4; + } else { + *ptr |= nybble; + } +} + +static void +gst_kate_spu_rgb2yuv (int r, int g, int b, int *y, int *u, int *v) +{ + *y = gst_kate_spu_clamp (r * 0.299 * 219 / 255 + g * 0.587 * 219 / 255 + + b * 0.114 * 219 / 255 + 16); + *u = gst_kate_spu_clamp (-r * 0.16874 * 224 / 255 - g * 0.33126 * 224 / 255 + + b * 0.5 * 224 / 255 + 128); + *v = gst_kate_spu_clamp (r * 0.5 * 224 / 255 - g * 0.41869 * 224 / 255 - + b * 0.08131 * 224 / 255 + 128); +} + +static void +gst_kate_spu_make_palette (GstKateDec * kd, int palette[4], + const kate_palette * kp) +{ + int n; + GstStructure *structure; + GstEvent *event; + char name[16]; + int y, u, v; + + palette[0] = 0; + palette[1] = 1; + palette[2] = 2; + palette[3] = 3; + + structure = gst_structure_new ("application/x-gst-dvd", + "event", G_TYPE_STRING, "dvd-spu-clut-change", NULL); + + /* Create a separate field for each value in the table. */ + for (n = 0; n < 16; n++) { + guint32 color = 0; + if (n < 4) { + gst_kate_spu_rgb2yuv (kp->colors[n].r, kp->colors[n].g, kp->colors[n].b, + &y, &u, &v); + color = (y << 16) | (v << 8) | u; + } + g_snprintf (name, sizeof (name), "clut%02d", n); + gst_structure_set (structure, name, G_TYPE_INT, (int) color, NULL); + } + + /* Create the DVD event and put the structure into it. */ + event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, structure); + + GST_LOG_OBJECT (kd, "preparing clut change event %" GST_PTR_FORMAT, event); + gst_pad_push_event (kd->srcpad, event); +} + +GstBuffer * +gst_kate_spu_encode_spu (GstKateDec * kd, const kate_event * ev) +{ + kate_tracker kin; + unsigned char *bytes = NULL; + size_t nbytes = 0; + GstBuffer *buffer = NULL; + int ret; + int ocw, och; + int top, left, right, bottom; + int pass, line, row; + int lines_offset[2]; + int first_commands_offset, second_commands_offset; + int nybble_count; + const kate_bitmap *kb; + const kate_palette *kp; + int palette[4]; + int delay; + + /* we need a region, a bitmap, and a palette */ + if (!ev || !ev->region || !ev->bitmap || !ev->palette) + return NULL; + + kb = ev->bitmap; + kp = ev->palette; + + /* these need particular properties */ + if (kb->type != kate_bitmap_type_paletted || kb->bpp != 2) + return NULL; + if (kp->ncolors != 4) + return NULL; + + ret = kate_tracker_init (&kin, ev->ki, ev); + if (ret < 0) { + GST_WARNING_OBJECT (kd, "Failed to initialize kate tracker"); + return NULL; + } + + ocw = ev->ki->original_canvas_width; + och = ev->ki->original_canvas_height; + ret = kate_tracker_update (&kin, (kate_float) 0, ocw, och, 0, 0, ocw, och); + if (ret < 0) + goto error; + + if (kin.has.region) { + top = (int) (kin.region_y + (kate_float) 0.5); + left = (int) (kin.region_x + (kate_float) 0.5); + } else { + GST_WARNING_OBJECT (kd, + "No region information to place SPU, placing at 0 0"); + top = left = 0; + } + right = left + kb->width - 1; + bottom = top + kb->height - 1; + + /* Allocate space to build the SPU */ + bytes = g_malloc (MAX_SPU_SIZE); + if (G_UNLIKELY (!bytes)) { + GST_WARNING_OBJECT (kd, "Failed to allocate %zu byte buffer", nbytes); + goto error; + } + nbytes = 4; + nybble_count = 0; + +#define CHKBUFSPC(nybbles) \ + do { \ + if ((nbytes + (nybbles + nybble_count + 1) / 2) > MAX_SPU_SIZE) { \ + GST_WARNING_OBJECT (kd, "Not enough space in SPU buffer"); \ + goto error; \ + } \ + } while(0) + + /* encode lines */ + for (pass = 0; pass <= 1; ++pass) { + lines_offset[pass] = nbytes; + for (line = pass; line < bottom - top + 1; line += 2) { + const unsigned char *ptr = kb->pixels + line * kb->width; + for (row = 0; row < kb->width;) { + int run = 1; + while (row + run < kb->width && run < 255 && ptr[row + run] == ptr[row]) + ++run; + if (run >= 63 && row + run == kb->width) { + /* special end of line marker */ + CHKBUFSPC (4); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, 0); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, 0); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, 0); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, ptr[row]); + } else if (run >= 1 && run <= 3) { + CHKBUFSPC (1); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, + (run << 2) | ptr[row]); + } else if (run <= 15) { + CHKBUFSPC (2); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, run >> 2); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, + ((run & 3) << 2) | ptr[row]); + } else if (run <= 63) { + CHKBUFSPC (3); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, 0); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, run >> 2); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, + ((run & 3) << 2) | ptr[row]); + } else { + CHKBUFSPC (4); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, 0); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, (run >> 6)); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, + (run >> 2) & 0xf); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, + ((run & 3) << 2) | ptr[row]); + } + row += run; + } + if (nybble_count & 1) { + CHKBUFSPC (1); + gst_kate_spu_add_nybble (bytes, nbytes, nybble_count++, 0); + } + nbytes += nybble_count / 2; + nybble_count = 0; + } + } + first_commands_offset = nbytes; + + gst_kate_spu_make_palette (kd, palette, kp); + + /* Commands header */ + CHKBUFSPC (4 * 2); + bytes[nbytes++] = 0; + bytes[nbytes++] = 0; + /* link to next command chunk will be filled later, when we know where it is */ + bytes[nbytes++] = 0; + bytes[nbytes++] = 0; + + CHKBUFSPC (3 * 2); + bytes[nbytes++] = SPU_CMD_SET_COLOR; + bytes[nbytes++] = (palette[3] << 4) | palette[2]; + bytes[nbytes++] = (palette[1] << 4) | palette[0]; + + CHKBUFSPC (3 * 2); + bytes[nbytes++] = SPU_CMD_SET_ALPHA; + bytes[nbytes++] = + ((kp->colors[palette[3]].a / 17) << 4) | (kp->colors[palette[2]].a / 17); + bytes[nbytes++] = + ((kp->colors[palette[1]].a / 17) << 4) | (kp->colors[palette[0]].a / 17); + +#if 0 + // move to top left - avoids a crash in dvdspu when overlaying on a small video :/ + right -= left; + bottom -= top; + left = 0; + top = 0; +#endif + + CHKBUFSPC (7 * 2); + bytes[nbytes++] = SPU_CMD_SET_DAREA; + bytes[nbytes++] = left >> 4; + bytes[nbytes++] = ((left & 0xf) << 4) | (right >> 8); + bytes[nbytes++] = right & 0xff; + bytes[nbytes++] = top >> 4; + bytes[nbytes++] = ((top & 0xf) << 4) | (bottom >> 8); + bytes[nbytes++] = bottom & 0xff; + + CHKBUFSPC (5 * 2); + bytes[nbytes++] = SPU_CMD_DSPXA; + bytes[nbytes++] = (lines_offset[0] >> 8) & 0xff; + bytes[nbytes++] = lines_offset[0] & 0xff; + bytes[nbytes++] = (lines_offset[1] >> 8) & 0xff; + bytes[nbytes++] = lines_offset[1] & 0xff; + + CHKBUFSPC (1 * 2); + bytes[nbytes++] = SPU_CMD_DSP; + + CHKBUFSPC (1 * 2); + bytes[nbytes++] = SPU_CMD_END; + + /* stop display chunk */ + CHKBUFSPC (4 * 2); + second_commands_offset = nbytes; + bytes[first_commands_offset + 2] = (second_commands_offset >> 8) & 0xff; + bytes[first_commands_offset + 3] = second_commands_offset & 0xff; + delay = GST_KATE_GST_TO_STM (ev->end_time - ev->start_time); + bytes[nbytes++] = (delay >> 8) & 0xff; + bytes[nbytes++] = delay & 0xff; + /* close the loop by linking back to self */ + bytes[nbytes++] = (second_commands_offset >> 8) & 0xff; + bytes[nbytes++] = second_commands_offset & 0xff; + + CHKBUFSPC (1 * 2); + bytes[nbytes++] = SPU_CMD_STP_DSP; + + CHKBUFSPC (1 * 2); + bytes[nbytes++] = SPU_CMD_END; + + /* Now that we know the size of the SPU, update the size and pointers */ + bytes[0] = (nbytes >> 8) & 0xff; + bytes[1] = nbytes & 0xff; + bytes[2] = (first_commands_offset >> 8) & 0xff; + bytes[3] = first_commands_offset & 0xff; + + /* Create a buffer with those values */ + buffer = gst_buffer_new (); + if (G_UNLIKELY (!buffer)) { + GST_WARNING_OBJECT (kd, "Failed to allocate %zu byte buffer", nbytes); + goto error; + } + GST_BUFFER_DATA (buffer) = bytes; + GST_BUFFER_MALLOCDATA (buffer) = bytes; + GST_BUFFER_SIZE (buffer) = nbytes; + GST_BUFFER_OFFSET_END (buffer) = GST_SECOND * (ev->end_time); + GST_BUFFER_OFFSET (buffer) = GST_SECOND * (ev->start_time); + GST_BUFFER_TIMESTAMP (buffer) = GST_SECOND * (ev->start_time); + GST_BUFFER_DURATION (buffer) = GST_SECOND * (ev->end_time - ev->start_time); + + GST_DEBUG_OBJECT (kd, "SPU uses %zu bytes", nbytes); + + kate_tracker_clear (&kin); + return buffer; + +error: + kate_tracker_clear (&kin); + if (bytes) + g_free (bytes); + return NULL; +} diff --git a/ext/kate/gstkatespu.h b/ext/kate/gstkatespu.h new file mode 100644 index 00000000..a9e841bd --- /dev/null +++ b/ext/kate/gstkatespu.h @@ -0,0 +1,65 @@ +/* -*- c-basic-offset: 2 -*- + * GStreamer + * Copyright (C) <2009> ogg.k.ogg.k + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef __GST_KATE_SPU_H__ +#define __GST_KATE_SPU_H__ + +#include +#include +#include "gstkateenc.h" +#include "gstkatedec.h" + +#define GST_KATE_UINT16_BE(ptr) ( ( ((guint16)((ptr)[0])) <<8) | ((ptr)[1]) ) + +/* taken off the DVD SPU decoder - now is time for today's WTF ???? */ +#define GST_KATE_STM_TO_GST(stm) ((1024 * (stm)) / 90000) +#define GST_KATE_GST_TO_STM(gst) ((int)(((gst) * 90000 ) / 1024)) + +#define GST_KATE_SPU_MIME_TYPE "video/x-dvd-subpicture" + +G_BEGIN_DECLS + +enum GstKateSpuCmd +{ + SPU_CMD_FSTA_DSP = 0x00, /* Forced Display */ + SPU_CMD_DSP = 0x01, /* Display Start */ + SPU_CMD_STP_DSP = 0x02, /* Display Off */ + SPU_CMD_SET_COLOR = 0x03, /* Set the color indexes for the palette */ + SPU_CMD_SET_ALPHA = 0x04, /* Set the alpha indexes for the palette */ + SPU_CMD_SET_DAREA = 0x05, /* Set the display area for the SPU */ + SPU_CMD_DSPXA = 0x06, /* Pixel data addresses */ + SPU_CMD_CHG_COLCON = 0x07, /* Change Color & Contrast */ + SPU_CMD_END = 0xff +}; + + +extern const guint32 gst_kate_spu_default_clut[16]; + +extern GstFlowReturn +gst_kate_spu_decode_spu (GstKateEnc * ke, GstBuffer * buf, kate_region * kr, + kate_bitmap * kb, kate_palette * kp); + +extern GstBuffer* +gst_kate_spu_encode_spu (GstKateDec * kd, const kate_event * ev); + +G_END_DECLS + +#endif /* __GST_KATE_SPU_H__ */ -- cgit v1.2.1 From b04587f4f772fc0a166b8a75314cd31a20a6f964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 21 Jul 2009 00:04:28 +0100 Subject: katedec: add comment why we dont' support application/x-kate here for now --- ext/kate/gstkatedec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/kate/gstkatedec.c b/ext/kate/gstkatedec.c index 32f31f9c..fe5ac51c 100644 --- a/ext/kate/gstkatedec.c +++ b/ext/kate/gstkatedec.c @@ -103,6 +103,10 @@ enum ARG_REMOVE_MARKUP = DECODER_BASE_ARG_COUNT }; +/* We don't accept application/x-kate here on purpose for now, since we're + * only really interested in subtitle-like things for playback purposes, not + * cracktastic complex overlays or presentation images etc. - those should be + * fed into a tiger overlay plugin directly */ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, -- cgit v1.2.1 From ced14a1ff7a0a7190be214848d3de5af2ab7b0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 21 Jul 2009 00:54:47 +0100 Subject: katedec: only put primary language tag in GST_TAG_LANGUAGE Only put primary language into GST_TAG_LANGUAGE, and convert to lower case, ie. only use "en" of "en_GB". This is per our tag documentation and hence what apps expect. Also add example to kateenc property description so people know a language code is wanted here. --- ext/kate/gstkateenc.c | 21 ++++++++++++--------- ext/kate/gstkateutil.c | 10 ++++++++-- tests/check/elements/kate.c | 2 +- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index 514a9bd0..80709eb3 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -69,6 +69,8 @@ */ /* FIXME: post appropriate GST_ELEMENT_ERROR when returning FLOW_ERROR */ +/* FIXME: should we automatically pick up the language code from the + * upstream event tags if none was set via the property? */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -176,44 +178,45 @@ gst_kate_enc_class_init (GstKateEncClass * klass) g_object_class_install_property (gobject_class, ARG_LANGUAGE, g_param_spec_string ("language", "Language", - "Set the language of the stream", "", G_PARAM_READWRITE)); + "The language of the stream (e.g. \"fr\" or \"fr_FR\" for French)", + "", G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_CATEGORY, g_param_spec_string ("category", "Category", - "Set the category of the stream", "", G_PARAM_READWRITE)); + "The category of the stream", "", G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_GRANULE_RATE_NUM, g_param_spec_int ("granule-rate-numerator", "Granule rate numerator", - "Set the numerator of the granule rate", + "The numerator of the granule rate", 1, G_MAXINT, 1, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_GRANULE_RATE_DEN, g_param_spec_int ("granule-rate-denominator", "Granule rate denominator", - "Set the denominator of the granule rate", + "The denominator of the granule rate", 1, G_MAXINT, 1000, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_GRANULE_SHIFT, g_param_spec_int ("granule-shift", "Granule shift", - "Set the granule shift", 0, 64, 32, G_PARAM_READWRITE)); + "The granule shift", 0, 64, 32, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_ORIGINAL_CANVAS_WIDTH, g_param_spec_int ("original-canvas-width", "Original canvas width", - "Set the width of the canvas this stream was authored for (0 is unspecified)", + "The width of the canvas this stream was authored for (0 is unspecified)", 0, G_MAXINT, 0, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_ORIGINAL_CANVAS_HEIGHT, g_param_spec_int ("original-canvas-height", "Original canvas height", - "Set the height of the canvas this stream was authored for (0 is unspecified)", + "The height of the canvas this stream was authored for (0 is unspecified)", 0, G_MAXINT, 0, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_KEEPALIVE_MIN_TIME, g_param_spec_float ("keepalive-min-time", "Keepalive mimimum time", - "Set minimum time to emit keepalive packets (0 disables keepalive packets)", + "Minimum time to emit keepalive packets (0 disables keepalive packets)", 0.0f, FLT_MAX, DEFAULT_KEEPALIVE_MIN_TIME, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_DEFAULT_SPU_DURATION, g_param_spec_float ("default-spu-duration", "Default SPU duration", - "Set the assumed max duration (in seconds) of SPUs with no duration specified", + "The assumed max duration (in seconds) of SPUs with no duration specified", 0.0f, FLT_MAX, DEFAULT_DEFAULT_SPU_DURATION, G_PARAM_READWRITE)); gstelement_class->change_state = diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c index b8915d70..3d5d3312 100644 --- a/ext/kate/gstkateutil.c +++ b/ext/kate/gstkateutil.c @@ -187,9 +187,15 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, if (decoder->k.ki->language && *decoder->k.ki->language) { GstTagList *old = decoder->tags, *tags = gst_tag_list_new (); if (tags) { + gchar *lang_code; + + /* en_GB -> en */ + lang_code = g_ascii_strdown (decoder->k.ki->language, -1); + g_strdelimit (lang_code, NULL, '\0'); gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_LANGUAGE_CODE, - decoder->k.ki->language, NULL); - // TODO: category - where should it go ? + lang_code, NULL); + g_free (lang_code); + /* TODO: category - where should it go ? */ decoder->tags = gst_tag_list_merge (decoder->tags, tags, GST_TAG_MERGE_REPLACE); gst_tag_list_free (tags); diff --git a/tests/check/elements/kate.c b/tests/check/elements/kate.c index 551d72a1..c848cc5c 100644 --- a/tests/check/elements/kate.c +++ b/tests/check/elements/kate.c @@ -356,7 +356,7 @@ GST_START_TEST (test_kate_identification_header) GST_TAG_LANGUAGE_CODE), 1); fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_LANGUAGE_CODE, &language)); - fail_unless_equals_string (language, "en_GB"); + fail_unless_equals_string (language, "en"); g_free (language); fail_unless_equals_int (gst_tag_list_get_tag_size (tag_list, "title"), 1); fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_TITLE, &title)); -- cgit v1.2.1 From af54a9afbad27627216e0b2b1f0a7553c8b18ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 21 Jul 2009 01:06:19 +0100 Subject: kate: use new GST_TAG_SUBITLE_CODEC tag instead of GST_TAG_CODEC --- ext/kate/gstkateutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c index 3d5d3312..ca245f99 100644 --- a/ext/kate/gstkateutil.c +++ b/ext/kate/gstkateutil.c @@ -238,8 +238,8 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, GST_TAG_ENCODER, encoder, NULL); g_free (encoder); } - gst_tag_list_add (decoder->tags, GST_TAG_MERGE_REPLACE, GST_TAG_CODEC, - "kate", NULL); + gst_tag_list_add (decoder->tags, GST_TAG_MERGE_REPLACE, + GST_TAG_SUBTITLE_CODEC, "Kate", NULL); gst_tag_list_add (decoder->tags, GST_TAG_MERGE_REPLACE, GST_TAG_ENCODER_VERSION, decoder->k.ki->bitstream_version_major, NULL); -- cgit v1.2.1 From 30469d45c0a9e3f6f0aa361ef0008e313fd07b3f Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Tue, 21 Jul 2009 10:49:37 +0200 Subject: start refactoring of dshowsrcwrapper -remove gst-libs/gst/dshow -fakesource is moved from gst-libs/gst/dshow to sys/dshowsrcwrapper -some minor changes (C/C++ check and includes) to make the plugin compile again. --- configure.ac | 1 - gst-libs/gst/Makefile.am | 2 +- gst-libs/gst/dshow/Makefile.am | 11 - gst-libs/gst/dshow/gstdshow.cpp | 355 ----------------------------- gst-libs/gst/dshow/gstdshow.h | 79 ------- gst-libs/gst/dshow/gstdshowfakesink.cpp | 126 ---------- gst-libs/gst/dshow/gstdshowfakesink.h | 50 ---- gst-libs/gst/dshow/gstdshowfakesrc.cpp | 205 ----------------- gst-libs/gst/dshow/gstdshowfakesrc.h | 72 ------ gst-libs/gst/dshow/gstdshowinterface.cpp | 35 --- gst-libs/gst/dshow/gstdshowinterface.h | 169 -------------- sys/dshowsrcwrapper/Makefile.am | 22 +- sys/dshowsrcwrapper/gstdshow.cpp | 346 ++++++++++++++++++++++++++++ sys/dshowsrcwrapper/gstdshow.h | 76 ++++++ sys/dshowsrcwrapper/gstdshowaudiosrc.c | 10 +- sys/dshowsrcwrapper/gstdshowaudiosrc.h | 3 +- sys/dshowsrcwrapper/gstdshowfakesink.cpp | 127 +++++++++++ sys/dshowsrcwrapper/gstdshowfakesink.h | 50 ++++ sys/dshowsrcwrapper/gstdshowinterface.h | 163 +++++++++++++ sys/dshowsrcwrapper/gstdshowsrcwrapper.c | 59 ----- sys/dshowsrcwrapper/gstdshowsrcwrapper.cpp | 66 ++++++ sys/dshowsrcwrapper/gstdshowsrcwrapper.h | 34 --- sys/dshowsrcwrapper/gstdshowvideosrc.c | 24 +- sys/dshowsrcwrapper/gstdshowvideosrc.h | 4 +- sys/dshowsrcwrapper/libgstdshow.def | 8 + win32/common/libgstdshow.def | 15 -- win32/vs6/gst_plugins_bad.dsw | 12 - win32/vs6/libdshowsrcwrapper.dsp | 137 ----------- win32/vs8/gst-plugins-bad.sln | 50 ++-- win32/vs8/libdshowsrcwrapper.vcproj | 280 +++++++++++++++++++++++ 30 files changed, 1177 insertions(+), 1414 deletions(-) delete mode 100644 gst-libs/gst/dshow/Makefile.am delete mode 100644 gst-libs/gst/dshow/gstdshow.cpp delete mode 100644 gst-libs/gst/dshow/gstdshow.h delete mode 100644 gst-libs/gst/dshow/gstdshowfakesink.cpp delete mode 100644 gst-libs/gst/dshow/gstdshowfakesink.h delete mode 100644 gst-libs/gst/dshow/gstdshowfakesrc.cpp delete mode 100644 gst-libs/gst/dshow/gstdshowfakesrc.h delete mode 100644 gst-libs/gst/dshow/gstdshowinterface.cpp delete mode 100644 gst-libs/gst/dshow/gstdshowinterface.h mode change 100644 => 100755 sys/dshowsrcwrapper/Makefile.am create mode 100755 sys/dshowsrcwrapper/gstdshow.cpp create mode 100755 sys/dshowsrcwrapper/gstdshow.h mode change 100644 => 100755 sys/dshowsrcwrapper/gstdshowaudiosrc.c mode change 100644 => 100755 sys/dshowsrcwrapper/gstdshowaudiosrc.h create mode 100755 sys/dshowsrcwrapper/gstdshowfakesink.cpp create mode 100755 sys/dshowsrcwrapper/gstdshowfakesink.h create mode 100755 sys/dshowsrcwrapper/gstdshowinterface.h delete mode 100644 sys/dshowsrcwrapper/gstdshowsrcwrapper.c create mode 100755 sys/dshowsrcwrapper/gstdshowsrcwrapper.cpp delete mode 100644 sys/dshowsrcwrapper/gstdshowsrcwrapper.h mode change 100644 => 100755 sys/dshowsrcwrapper/gstdshowvideosrc.c mode change 100644 => 100755 sys/dshowsrcwrapper/gstdshowvideosrc.h create mode 100755 sys/dshowsrcwrapper/libgstdshow.def delete mode 100644 win32/common/libgstdshow.def mode change 100644 => 100755 win32/vs6/gst_plugins_bad.dsw delete mode 100644 win32/vs6/libdshowsrcwrapper.dsp mode change 100644 => 100755 win32/vs8/gst-plugins-bad.sln create mode 100755 win32/vs8/libdshowsrcwrapper.vcproj diff --git a/configure.ac b/configure.ac index 5834cbd8..1f180beb 100644 --- a/configure.ac +++ b/configure.ac @@ -1673,7 +1673,6 @@ gst/vmnc/Makefile gst/xdgmime/Makefile gst-libs/Makefile gst-libs/gst/Makefile -gst-libs/gst/dshow/Makefile gst-libs/gst/interfaces/Makefile gst-libs/gst/signalprocessor/Makefile gst-libs/gst/video/Makefile diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am index b123a4c6..e48cdd80 100644 --- a/gst-libs/gst/Makefile.am +++ b/gst-libs/gst/Makefile.am @@ -2,4 +2,4 @@ SUBDIRS = interfaces signalprocessor video noinst_HEADERS = gst-i18n-plugin.h gettext.h -DIST_SUBDIRS = dshow interfaces signalprocessor video +DIST_SUBDIRS = interfaces signalprocessor video diff --git a/gst-libs/gst/dshow/Makefile.am b/gst-libs/gst/dshow/Makefile.am deleted file mode 100644 index 04d84c31..00000000 --- a/gst-libs/gst/dshow/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -lib_LTLIBRARIES = libgstdshow-@GST_MAJORMINOR@.la - -libgstdshow_@GST_MAJORMINOR@_la_SOURCES = gstdshow.cpp gstdshowfakesink.cpp gstdshowfakesrc.cpp gstdshowinterface.cpp -libgstdshow_@GST_MAJORMINOR@_la_CXXFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) -DLIBDSHOW_EXPORTS -libgstdshow_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS) -libgstdshow_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_ALL_LDFLAGS) -libgstdshow_@GST_MAJORMINOR@_la_LIBTOOLFLAGS = --tag=disable-static - -libgstdshow_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/dshow -libgstdshow_@GST_MAJORMINOR@include_HEADERS = gstdshow.h gstdshowfakesink.h gstdshowfakesrc.h gstdshowinterface.h diff --git a/gst-libs/gst/dshow/gstdshow.cpp b/gst-libs/gst/dshow/gstdshow.cpp deleted file mode 100644 index 4d419d16..00000000 --- a/gst-libs/gst/dshow/gstdshow.cpp +++ /dev/null @@ -1,355 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshow.cpp: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "gstdshow.h" -#include "gstdshowfakesink.h" -#include "gstdshowfakesrc.h" - -CFactoryTemplate g_Templates[]= -{ - { - L"DSHOW fake sink filter" - , &CLSID_DshowFakeSink - , CDshowFakeSink::CreateInstance - , NULL - , NULL - }, - { - L"DSHOW fake src filter" - , &CLSID_DshowFakeSrc - , CDshowFakeSrc::CreateInstance - , NULL - , NULL - }, - -}; - -int g_cTemplates = sizeof(g_Templates)/sizeof(g_Templates[0]); -static HINSTANCE g_hModule = NULL; - -extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID); -BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved) -{ - if (!g_hModule) - g_hModule = (HINSTANCE)hModule; - - return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved); -} - -STDAPI DllRegisterServer() -{ - return AMovieDllRegisterServer2 (TRUE); -} - -STDAPI DllUnregisterServer() -{ - return AMovieDllRegisterServer2 (FALSE); -} - -BOOL gst_dshow_register_fakefilters () -{ - return (DllRegisterServer() == S_OK) ? TRUE : FALSE; -} - -void -gst_dshow_free_mediatype (AM_MEDIA_TYPE *pmt) -{ - if (pmt != NULL) { - if (pmt->cbFormat != 0) { - CoTaskMemFree((PVOID)pmt->pbFormat); - pmt->cbFormat = 0; - pmt->pbFormat = NULL; - } - if (pmt->pUnk != NULL) { - /* Unecessary because pUnk should not be used, but safest. */ - pmt->pUnk->Release(); - pmt->pUnk = NULL; - } - - CoTaskMemFree(pmt); - } -} - -void -gst_dshow_free_pin_mediatype (gpointer pt) -{ - GstCapturePinMediaType * pin_mediatype = (GstCapturePinMediaType *) pt; - if (pin_mediatype) { - if (pin_mediatype->capture_pin) { - pin_mediatype->capture_pin->Release(); - pin_mediatype->capture_pin = NULL; - } - if (pin_mediatype->mediatype) { - gst_dshow_free_mediatype (pin_mediatype->mediatype); - pin_mediatype->mediatype = NULL; - } - } -} - - -void -gst_dshow_free_pins_mediatypes (GList *pins_mediatypes) -{ - guint i = 0; - for (; i < g_list_length (pins_mediatypes); i++) { - GList *mylist = g_list_nth (pins_mediatypes, i); - if (mylist && mylist->data) - gst_dshow_free_pin_mediatype ((GstCapturePinMediaType *)mylist->data); - } - g_list_free (pins_mediatypes); -} - -gboolean -gst_dshow_get_pin_from_filter (IBaseFilter *filter, PIN_DIRECTION pindir, IPin **pin) -{ - gboolean ret = FALSE; - IEnumPins *enumpins = NULL; - IPin *pintmp = NULL; - HRESULT hres; - *pin = NULL; - - hres = filter->EnumPins (&enumpins); - if (FAILED(hres)) { - return ret; - } - - while (enumpins->Next (1, &pintmp, NULL) == S_OK) - { - PIN_DIRECTION pindirtmp; - hres = pintmp->QueryDirection (&pindirtmp); - if (hres == S_OK && pindir == pindirtmp) { - *pin = pintmp; - ret = TRUE; - break; - } - pintmp->Release (); - } - enumpins->Release (); - - return ret; -} - -gboolean gst_dshow_find_filter(CLSID input_majortype, CLSID input_subtype, - CLSID output_majortype, CLSID output_subtype, - gchar * prefered_filter_name, IBaseFilter **filter) -{ - gboolean ret = FALSE; - HRESULT hres; - GUID arrayInTypes[2]; - GUID arrayOutTypes[2]; - IFilterMapper2 *mapper = NULL; - IEnumMoniker *enum_moniker = NULL; - IMoniker *moniker = NULL; - ULONG fetched; - gchar *prefered_filter_upper = NULL; - gboolean exit = FALSE; - - /* initialize output parameter */ - if (filter) - *filter = NULL; - - /* create a private copy of prefered filter substring in upper case */ - if (prefered_filter_name) { - prefered_filter_upper = g_strdup (prefered_filter_name); - strupr (prefered_filter_upper); - } - - hres = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC, - IID_IFilterMapper2, (void **) &mapper); - if (FAILED(hres)) - goto clean; - - memcpy(&arrayInTypes[0], &input_majortype, sizeof (CLSID)); - memcpy(&arrayInTypes[1], &input_subtype, sizeof (CLSID)); - memcpy(&arrayOutTypes[0], &output_majortype, sizeof (CLSID)); - memcpy(&arrayOutTypes[1], &output_subtype, sizeof (CLSID)); - - hres = mapper->EnumMatchingFilters (&enum_moniker, 0, FALSE, MERIT_DO_NOT_USE+1, - TRUE, 1, arrayInTypes, NULL, NULL, FALSE, - TRUE, 1, arrayOutTypes, NULL, NULL); - if (FAILED(hres)) - goto clean; - - enum_moniker->Reset (); - - while(hres = enum_moniker->Next (1, &moniker, &fetched),hres == S_OK - && !exit) { - IBaseFilter *filter_temp = NULL; - IPropertyBag *property_bag = NULL; - gchar * friendly_name = NULL; - - hres = moniker->BindToStorage (NULL, NULL, IID_IPropertyBag, (void **)&property_bag); - if(SUCCEEDED(hres) && property_bag) { - VARIANT varFriendlyName; - VariantInit (&varFriendlyName); - - hres = property_bag->Read (L"FriendlyName", &varFriendlyName, NULL); - if(hres == S_OK && varFriendlyName.bstrVal) { - friendly_name = g_utf16_to_utf8((const gunichar2*)varFriendlyName.bstrVal, - wcslen(varFriendlyName.bstrVal), NULL, NULL, NULL); - if (friendly_name) - strupr (friendly_name); - SysFreeString (varFriendlyName.bstrVal); - } - property_bag->Release (); - } - - hres = moniker->BindToObject(NULL, NULL, IID_IBaseFilter, (void**)&filter_temp); - if(SUCCEEDED(hres) && filter_temp) { - ret = TRUE; - if (filter) { - if (*filter) - (*filter)->Release (); - - *filter = filter_temp; - (*filter)->AddRef (); - - if (prefered_filter_upper && friendly_name && - strstr(friendly_name, prefered_filter_upper)) - exit = TRUE; - } - - /* if we just want to know if the formats are supported OR - if we don't care about what will be the filter used - => we can stop enumeration */ - if (!filter || !prefered_filter_upper) - exit = TRUE; - - filter_temp->Release (); - } - - if (friendly_name) - g_free (friendly_name); - moniker->Release (); - } - -clean: - if (prefered_filter_upper) - g_free (prefered_filter_upper); - if (enum_moniker) - enum_moniker->Release (); - if (mapper) - mapper->Release (); - - return ret; -} - - -gchar * -gst_dshow_getdevice_from_devicename (GUID *device_category, gchar **device_name) -{ - gchar *ret = NULL; - ICreateDevEnum *devices_enum = NULL; - IEnumMoniker *enum_moniker = NULL; - IMoniker *moniker = NULL; - HRESULT hres = S_FALSE; - ULONG fetched; - gboolean bfound = FALSE; - - hres = CoCreateInstance (CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, - IID_ICreateDevEnum, (void**)&devices_enum); - if(hres != S_OK) { - /*error*/ - goto clean; - } - - hres = devices_enum->CreateClassEnumerator (*device_category, - &enum_moniker, 0); - if (hres != S_OK || !enum_moniker) { - /*error*/ - goto clean; - } - - enum_moniker->Reset (); - - while(hres = enum_moniker->Next (1, &moniker, &fetched),hres == S_OK - && !bfound) { - IPropertyBag *property_bag = NULL; - hres = moniker->BindToStorage(NULL, NULL, IID_IPropertyBag, (void **)&property_bag); - if(SUCCEEDED(hres) && property_bag) { - VARIANT varFriendlyName; - VariantInit (&varFriendlyName); - - hres = property_bag->Read (L"FriendlyName", &varFriendlyName, NULL); - if(hres == S_OK && varFriendlyName.bstrVal) { - gchar * friendly_name = g_utf16_to_utf8((const gunichar2*)varFriendlyName.bstrVal, - wcslen(varFriendlyName.bstrVal), NULL, NULL, NULL); - - if (!*device_name) { - *device_name = g_strdup (friendly_name); - } - - if (_stricmp(*device_name, friendly_name) == 0) { - WCHAR *wszDisplayName = NULL; - hres = moniker->GetDisplayName (NULL, NULL, &wszDisplayName); - if(hres == S_OK && wszDisplayName) { - ret = g_utf16_to_utf8((const gunichar2*)wszDisplayName, - wcslen(wszDisplayName), NULL, NULL, NULL); - CoTaskMemFree (wszDisplayName); - } - bfound = TRUE; - } - SysFreeString (varFriendlyName.bstrVal); - } - property_bag->Release (); - } - moniker->Release (); - } - -clean: - if (enum_moniker) { - enum_moniker->Release (); - } - - if (devices_enum) { - devices_enum->Release (); - } - - return ret; -} - -gboolean -gst_dshow_show_propertypage (IBaseFilter *base_filter) -{ - gboolean ret = FALSE; - ISpecifyPropertyPages *pProp = NULL; - HRESULT hres = base_filter->QueryInterface (IID_ISpecifyPropertyPages, (void **)&pProp); - if (SUCCEEDED(hres)) - { - /* Get the filter's name and IUnknown pointer.*/ - FILTER_INFO FilterInfo; - CAUUID caGUID; - IUnknown *pFilterUnk = NULL; - hres = base_filter->QueryFilterInfo (&FilterInfo); - base_filter->QueryInterface (IID_IUnknown, (void **)&pFilterUnk); - - /* Show the page. */ - pProp->GetPages (&caGUID); - pProp->Release (); - OleCreatePropertyFrame(GetDesktopWindow(), 0, 0, FilterInfo.achName, - 1, &pFilterUnk, caGUID.cElems, caGUID.pElems, 0, 0, NULL); - - pFilterUnk->Release (); - FilterInfo.pGraph->Release (); - CoTaskMemFree(caGUID.pElems); - } - return ret; -} diff --git a/gst-libs/gst/dshow/gstdshow.h b/gst-libs/gst/dshow/gstdshow.h deleted file mode 100644 index 3d1520d5..00000000 --- a/gst-libs/gst/dshow/gstdshow.h +++ /dev/null @@ -1,79 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshow.h: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef _GSTDSHOW_ -#define _GSTDSHOW_ - -#include - -#include - -#ifdef LIBDSHOW_EXPORTS -#include -#include -#define DSHOW_API __declspec(dllexport) -#else -#define DSHOW_API __declspec(dllimport) -#endif - -typedef struct _GstCapturePinMediaType -{ - AM_MEDIA_TYPE *mediatype; - IPin *capture_pin; -} GstCapturePinMediaType; - -#ifdef __cplusplus -extern "C" { -#endif - -/* register fake filters as COM object and as Direct Show filters in the registry */ -BOOL gst_dshow_register_fakefilters (); - -/* free memory of the input pin mediatype */ -void gst_dshow_free_pin_mediatype (gpointer pt); - -/* free memory of the input dshow mediatype */ -void gst_dshow_free_mediatype (AM_MEDIA_TYPE *pmt); - -/* free the memory of all mediatypes of the input list if pin mediatype */ -void gst_dshow_free_pins_mediatypes (GList *mediatypes); - -/* get a pin from directshow filter */ -gboolean gst_dshow_get_pin_from_filter (IBaseFilter *filter, PIN_DIRECTION pindir, IPin **pin); - -/* find and return a filter according to the input and output types */ -gboolean gst_dshow_find_filter(CLSID input_majortype, CLSID input_subtype, - CLSID output_majortype, CLSID output_subtype, - gchar * prefered_filter_name, IBaseFilter **filter); - -/* get the dshow device path from device friendly name. -If friendly name is not set, it will return the first available device */ -gchar *gst_dshow_getdevice_from_devicename (GUID *device_category, gchar **device_name); - -/* show the capture filter property page (generally used to setup the device). the page is modal*/ -gboolean gst_dshow_show_propertypage (IBaseFilter *base_filter); - - -#ifdef __cplusplus -} -#endif - -#endif /* _GSTDSHOW_ */ \ No newline at end of file diff --git a/gst-libs/gst/dshow/gstdshowfakesink.cpp b/gst-libs/gst/dshow/gstdshowfakesink.cpp deleted file mode 100644 index e3a5f0b9..00000000 --- a/gst-libs/gst/dshow/gstdshowfakesink.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowfakesink.cpp: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "gstdshowfakesink.h" - - -CDshowFakeSink::CDshowFakeSink() - : m_hres(S_OK), CBaseRenderer(CLSID_DshowFakeSink, "DshowFakeSink", NULL, &m_hres) -{ - m_callback = NULL; -} - -CDshowFakeSink::~CDshowFakeSink() -{ - -} - -//Object creation. -CUnknown* WINAPI CDshowFakeSink::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr) -{ - CDshowFakeSink *pNewObject = new CDshowFakeSink(); - if (pNewObject == NULL) { - *pHr = E_OUTOFMEMORY; - } - return pNewObject; -} - -STDMETHODIMP CDshowFakeSink::QueryInterface(REFIID riid, void **ppvObject) -{ - if (riid == IID_IGstDshowInterface) { - *ppvObject = (IGstDshowInterface*) this; - AddRef(); - return S_OK; - } - else - return CBaseRenderer::QueryInterface (riid, ppvObject); -} - -ULONG STDMETHODCALLTYPE CDshowFakeSink::AddRef() -{ - return CBaseRenderer::AddRef(); -} - -ULONG STDMETHODCALLTYPE CDshowFakeSink::Release() -{ - return CBaseRenderer::Release(); -} - - -STDMETHODIMP CDshowFakeSink::gst_set_media_type (AM_MEDIA_TYPE *pmt) -{ - m_MediaType.Set (*pmt); - return S_OK; -} - -STDMETHODIMP CDshowFakeSink::gst_set_buffer_callback (push_buffer_func push, byte *data) -{ - m_callback = push; - m_data = data; - return S_OK; -} - -STDMETHODIMP CDshowFakeSink::gst_push_buffer (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount) -{ - return E_NOTIMPL; -} - -STDMETHODIMP CDshowFakeSink::gst_flush () -{ - return E_NOTIMPL; -} - -STDMETHODIMP CDshowFakeSink::gst_set_sample_size(unsigned int size) -{ - return E_NOTIMPL; -} - -HRESULT CDshowFakeSink::CheckMediaType(const CMediaType *pmt) -{ - VIDEOINFOHEADER *p1; - VIDEOINFOHEADER *p2; - if(pmt != NULL) - { - p1 = (VIDEOINFOHEADER *)pmt->Format(); - p2 = (VIDEOINFOHEADER *)m_MediaType.Format(); - if (*pmt == m_MediaType) - return S_OK; - } - - return S_FALSE; -} - -HRESULT CDshowFakeSink::DoRenderSample(IMediaSample *pMediaSample) -{ - if(pMediaSample && m_callback) - { - BYTE *pBuffer = NULL; - LONGLONG lStart = 0, lStop = 0; - pMediaSample->GetPointer(&pBuffer); - long size = pMediaSample->GetActualDataLength(); - pMediaSample->GetTime(&lStart, &lStop); - lStart*=100; - lStop*=100; - m_callback(pBuffer, size, m_data, lStart, lStop); - } - - return S_OK; -} diff --git a/gst-libs/gst/dshow/gstdshowfakesink.h b/gst-libs/gst/dshow/gstdshowfakesink.h deleted file mode 100644 index 7f419b27..00000000 --- a/gst-libs/gst/dshow/gstdshowfakesink.h +++ /dev/null @@ -1,50 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowfakesink.h: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "gstdshowinterface.h" - -class CDshowFakeSink : public CBaseRenderer, - public IGstDshowInterface -{ -public: - CDshowFakeSink (); - virtual ~CDshowFakeSink (); - - static CUnknown * WINAPI CreateInstance (LPUNKNOWN pUnk, HRESULT *pHr); - - virtual HRESULT CheckMediaType (const CMediaType *pmt); - virtual HRESULT DoRenderSample (IMediaSample *pMediaSample); - - STDMETHOD (QueryInterface)(REFIID riid, void **ppvObject); - ULONG STDMETHODCALLTYPE AddRef(); - ULONG STDMETHODCALLTYPE Release(); - STDMETHOD (gst_set_media_type) (AM_MEDIA_TYPE *pmt); - STDMETHOD (gst_set_buffer_callback) (push_buffer_func push, byte *data); - STDMETHOD (gst_push_buffer) (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount); - STDMETHOD (gst_flush) (); - STDMETHOD (gst_set_sample_size) (unsigned int size); - -protected: - HRESULT m_hres; - CMediaType m_MediaType; - push_buffer_func m_callback; - byte *m_data; -}; \ No newline at end of file diff --git a/gst-libs/gst/dshow/gstdshowfakesrc.cpp b/gst-libs/gst/dshow/gstdshowfakesrc.cpp deleted file mode 100644 index 2c6bcc88..00000000 --- a/gst-libs/gst/dshow/gstdshowfakesrc.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowfakesrc.cpp: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "gstdshowfakesrc.h" - -static CCritSec g_pCriticSec; - -/* output pin*/ -CDshowFakeOutputPin::CDshowFakeOutputPin (CBaseFilter *pFilter, CCritSec *sec): - CBaseOutputPin("FakeOutputPin", pFilter, sec, &m_hres, L"output") -{ -} - -CDshowFakeOutputPin::~CDshowFakeOutputPin() -{ - -} - -HRESULT CDshowFakeOutputPin::GetMediaType(int iPosition, CMediaType *pMediaType) -{ - if(iPosition == 0) { - *pMediaType = m_MediaType; - return S_OK; - } - - return VFW_S_NO_MORE_ITEMS; -} - -HRESULT CDshowFakeOutputPin::CheckMediaType(const CMediaType *pmt) -{ - if (m_MediaType == *pmt) { - return S_OK; - } - - return S_FALSE; -} - -HRESULT CDshowFakeOutputPin::DecideBufferSize (IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) -{ - ALLOCATOR_PROPERTIES properties; - ppropInputRequest->cbBuffer = m_SampleSize; - ppropInputRequest->cBuffers = 1; - HRESULT hres = pAlloc->SetProperties(ppropInputRequest, &properties); - pAlloc->Commit(); - - return S_OK; -} - -STDMETHODIMP CDshowFakeOutputPin::SetMediaType (AM_MEDIA_TYPE *pmt) -{ - m_MediaType.Set (*pmt); - m_SampleSize = m_MediaType.GetSampleSize(); - return S_OK; -} - -STDMETHODIMP CDshowFakeOutputPin::PushBuffer(byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount) -{ - IMediaSample *pSample = NULL; - - if (start != -1) { - start /= 100; - stop /= 100; - } - - HRESULT hres = GetDeliveryBuffer(&pSample, NULL, NULL, 0); - if (hres == S_OK && pSample) - { - BYTE *sample_buffer; - pSample->GetPointer(&sample_buffer); - if(sample_buffer) - { - memcpy (sample_buffer, buffer, size); - pSample->SetActualDataLength(size); - } - if (discount) - pSample->SetDiscontinuity(TRUE); - else - pSample->SetDiscontinuity(FALSE); - - pSample->SetSyncPoint(TRUE); - pSample->SetPreroll(FALSE); - - if (start != -1) - pSample->SetTime(&start, &stop); - - hres = Deliver(pSample); - pSample->Release(); - } - - return S_OK; -} - -STDMETHODIMP CDshowFakeOutputPin::Flush () -{ - DeliverBeginFlush(); - DeliverEndFlush(); - return S_OK; -} - -STDMETHODIMP CDshowFakeOutputPin::SetSampleSize (unsigned int size) -{ - m_SampleSize = size; - return S_OK; -} - -/* filter */ -CDshowFakeSrc::CDshowFakeSrc():CBaseFilter("DshowFakeSink", NULL, &g_pCriticSec, CLSID_DshowFakeSrc) -{ - m_pOutputPin = new CDshowFakeOutputPin((CSource *)this, m_pLock); -} - -CDshowFakeSrc::~CDshowFakeSrc() -{ - if (m_pOutputPin) - delete m_pOutputPin; -} - -//Object creation. -CUnknown* WINAPI CDshowFakeSrc::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr) -{ - CDshowFakeSrc *pNewObject = new CDshowFakeSrc(); - if (pNewObject == NULL) { - *pHr = E_OUTOFMEMORY; - } - return pNewObject; -} - -int CDshowFakeSrc::GetPinCount() -{ - return 1; -} - -CBasePin *CDshowFakeSrc::GetPin(int n) -{ - return (CBasePin *)m_pOutputPin; -} - - -STDMETHODIMP CDshowFakeSrc::QueryInterface(REFIID riid, void **ppvObject) -{ - if (riid == IID_IGstDshowInterface) { - *ppvObject = (IGstDshowInterface*) this; - AddRef(); - return S_OK; - } - else - return CBaseFilter::QueryInterface (riid, ppvObject); -} - -ULONG STDMETHODCALLTYPE CDshowFakeSrc::AddRef() -{ - return CBaseFilter::AddRef(); -} - -ULONG STDMETHODCALLTYPE CDshowFakeSrc::Release() -{ - return CBaseFilter::Release(); -} - -STDMETHODIMP CDshowFakeSrc::gst_set_media_type (AM_MEDIA_TYPE *pmt) -{ - m_pOutputPin->SetMediaType(pmt); - return S_OK; -} - -STDMETHODIMP CDshowFakeSrc::gst_set_buffer_callback (push_buffer_func push, byte *data) -{ - return E_NOTIMPL; -} - -STDMETHODIMP CDshowFakeSrc::gst_push_buffer (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount) -{ - m_pOutputPin->PushBuffer(buffer, start, stop, size, discount); - return S_OK; -} - -STDMETHODIMP CDshowFakeSrc::gst_flush () -{ - m_pOutputPin->Flush(); - return S_OK; -} - -STDMETHODIMP CDshowFakeSrc::gst_set_sample_size(unsigned int size) -{ - m_pOutputPin->SetSampleSize(size); - return S_OK; -} \ No newline at end of file diff --git a/gst-libs/gst/dshow/gstdshowfakesrc.h b/gst-libs/gst/dshow/gstdshowfakesrc.h deleted file mode 100644 index 06884313..00000000 --- a/gst-libs/gst/dshow/gstdshowfakesrc.h +++ /dev/null @@ -1,72 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowfakesrc.h: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "gstdshowinterface.h" -#include - -class CDshowFakeOutputPin : public CBaseOutputPin -{ -protected: -/* members */ - HRESULT m_hres; - CMediaType m_MediaType; - unsigned int m_SampleSize; - -public: -/* methods */ - CDshowFakeOutputPin (CBaseFilter *pFilter, CCritSec *sec); - ~CDshowFakeOutputPin (); - - virtual HRESULT CheckMediaType(const CMediaType *pmt); - HRESULT GetMediaType(int iPosition, CMediaType *pMediaType); - virtual HRESULT DecideBufferSize (IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest); - STDMETHOD (SetMediaType) (AM_MEDIA_TYPE *pmt); - STDMETHOD (PushBuffer) (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount); - STDMETHOD (Flush) (); - STDMETHOD (SetSampleSize) (unsigned int size); -}; - -class CDshowFakeSrc : public CBaseFilter, - public IGstDshowInterface -{ -public: -/* members */ - CDshowFakeOutputPin *m_pOutputPin; - -/* methods */ - CDshowFakeSrc (); - virtual ~CDshowFakeSrc (); - - static CUnknown * WINAPI CreateInstance (LPUNKNOWN pUnk, HRESULT *pHr); - - virtual int GetPinCount(); - virtual CBasePin *GetPin(int n); - - STDMETHOD (QueryInterface)(REFIID riid, void **ppvObject); - ULONG STDMETHODCALLTYPE AddRef(); - ULONG STDMETHODCALLTYPE Release(); - - STDMETHOD (gst_set_media_type) (AM_MEDIA_TYPE *pmt); - STDMETHOD (gst_set_buffer_callback) (push_buffer_func push, byte *data); - STDMETHOD (gst_push_buffer) (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount); - STDMETHOD (gst_flush) (); - STDMETHOD (gst_set_sample_size) (unsigned int size); -}; \ No newline at end of file diff --git a/gst-libs/gst/dshow/gstdshowinterface.cpp b/gst-libs/gst/dshow/gstdshowinterface.cpp deleted file mode 100644 index 3dba7c25..00000000 --- a/gst-libs/gst/dshow/gstdshowinterface.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowinterface.cpp: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "gstdshowinterface.h" - - -//{6A780808-9725-4d0b-8695-A4DD8D210773} -const GUID CLSID_DshowFakeSink - = { 0x6a780808, 0x9725, 0x4d0b, { 0x86, 0x95, 0xa4, 0xdd, 0x8d, 0x21, 0x7, 0x73 } }; - -// {1E38DAED-8A6E-4DEA-A482-A878761D11CB} -const GUID CLSID_DshowFakeSrc = -{ 0x1e38daed, 0x8a6e, 0x4dea, { 0xa4, 0x82, 0xa8, 0x78, 0x76, 0x1d, 0x11, 0xcb } }; - -// {FC36764C-6CD4-4C73-900F-3F40BF3F191A} -static const GUID IID_IGstDshowInterface = -{ 0xfc36764c, 0x6cd4, 0x4c73, { 0x90, 0xf, 0x3f, 0x40, 0xbf, 0x3f, 0x19, 0x1a } }; diff --git a/gst-libs/gst/dshow/gstdshowinterface.h b/gst-libs/gst/dshow/gstdshowinterface.h deleted file mode 100644 index 1a19a611..00000000 --- a/gst-libs/gst/dshow/gstdshowinterface.h +++ /dev/null @@ -1,169 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowinterface.h: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GST_DHOW_INTERFACE_H__ -#define __GST_DHOW_INTERFACE_H__ - -#include "gstdshow.h" - -#ifdef LIBDSHOW_EXPORTS -typedef bool (*push_buffer_func) (byte *buffer, long size, byte *src_object, UINT64 start, UINT64 stop); -#endif /* LIBDSHOW_EXPORTS */ - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 440 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __RPCNDR_H_VERSION__ -#error this stub requires an updated version of -#endif // __RPCNDR_H_VERSION__ - -#ifndef COM_NO_WINDOWS_H -#include "windows.h" -#include "ole2.h" -#endif /*COM_NO_WINDOWS_H*/ - -#ifdef __cplusplus -extern "C"{ -#endif - - -extern DSHOW_API const GUID CLSID_DshowFakeSink; -extern DSHOW_API const GUID CLSID_DshowFakeSrc; -extern DSHOW_API const GUID IID_IGstDshowInterface; - -#define CLSID_DSHOWFAKESINK_STRING "{6A780808-9725-4d0b-8695-A4DD8D210773}" -#define CLSID_DSHOWFAKESRC_STRING "{1E38DAED-8A6E-4DEA-A482-A878761D11CB}" - -typedef interface IGstDshowInterface IGstDshowInterface; - -/* header files for imported files */ -#include "oaidl.h" -#include "ocidl.h" - -void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); -void __RPC_USER MIDL_user_free( void __RPC_FAR * ); - -#ifndef __IGstDshowInterface_INTERFACE_DEFINED__ -#define __IGstDshowInterface_INTERFACE_DEFINED__ - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("542C0A24-8BD1-46cb-AA57-3E46D006D2F3") - IGstDshowInterface : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE gst_set_media_type( - AM_MEDIA_TYPE __RPC_FAR *pmt) = 0; - - virtual HRESULT STDMETHODCALLTYPE gst_set_buffer_callback( - push_buffer_func push, byte *data) = 0; - - virtual HRESULT STDMETHODCALLTYPE gst_push_buffer( - byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount) = 0; - - virtual HRESULT STDMETHODCALLTYPE gst_flush() = 0; - - virtual HRESULT STDMETHODCALLTYPE gst_set_sample_size(unsigned int size) = 0; - }; - -#else /* C style interface */ - - typedef struct IGstDshowInterfaceVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( - IGstDshowInterface __RPC_FAR * This, - REFIID riid, - void __RPC_FAR *__RPC_FAR *ppvObject); - - ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( - IGstDshowInterface __RPC_FAR * This); - - ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( - IGstDshowInterface __RPC_FAR * This); - - HRESULT (STDMETHODCALLTYPE *gst_set_media_type )( - IGstDshowInterface __RPC_FAR * This, - AM_MEDIA_TYPE *pmt); - - HRESULT (STDMETHODCALLTYPE *gst_set_buffer_callback) ( - IGstDshowInterface __RPC_FAR * This, - byte * push, byte *data); - - HRESULT (STDMETHODCALLTYPE *gst_push_buffer) ( - IGstDshowInterface __RPC_FAR * This, - byte *buffer, __int64 start, __int64 stop, - unsigned int size, boolean discount); - - HRESULT (STDMETHODCALLTYPE *gst_flush) ( - IGstDshowInterface __RPC_FAR * This); - - HRESULT (STDMETHODCALLTYPE *gst_set_sample_size) ( - IGstDshowInterface __RPC_FAR * This, - unsigned int size); - - END_INTERFACE - } IGstDshowInterfaceVtbl; - - interface IGstDshowInterface - { - CONST_VTBL struct IGstDshowInterfaceVtbl __RPC_FAR *lpVtbl; - }; - -#define IGstDshowInterface_QueryInterface(This,riid,ppvObject) \ - (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) - -#define IGstDshowInterface_AddRef(This) \ - (This)->lpVtbl -> AddRef(This) - -#define IGstDshowInterface_Release(This) \ - (This)->lpVtbl -> Release(This) - -#define IGstDshowInterface_gst_set_media_type(This, mediatype) \ - (This)->lpVtbl -> gst_set_media_type(This, mediatype) - -#define IGstDshowInterface_gst_set_buffer_callback(This, push, data) \ - (This)->lpVtbl -> gst_set_buffer_callback(This, push, data) - -#define IGstDshowInterface_gst_push_buffer(This, buffer, start, stop, size, discount) \ - (This)->lpVtbl -> gst_push_buffer(This, buffer, start, stop, size, discount) - -#define IGstDshowInterface_gst_flush(This) \ - (This)->lpVtbl -> gst_flush(This) - -#define IGstDshowInterface_gst_set_sample_size(This, size) \ - (This)->lpVtbl -> gst_set_sample_size(This, size) - -#endif /* C style interface */ - -#endif /* __IGstDshowInterface_INTERFACE_DEFINED__ */ - -#ifdef __cplusplus -} -#endif - -#endif /* __GST_DSHOW_INTERFACE_H__ */ \ No newline at end of file diff --git a/sys/dshowsrcwrapper/Makefile.am b/sys/dshowsrcwrapper/Makefile.am old mode 100644 new mode 100755 index 38895a1e..3ec4d64a --- a/sys/dshowsrcwrapper/Makefile.am +++ b/sys/dshowsrcwrapper/Makefile.am @@ -1,10 +1,14 @@ -plugin_LTLIBRARIES = libgstdshowsrcwrapper.la +# This plugin isn't buildable with autotools at this point in time, so just +# ensure everything's listed in EXTRA_DIST -libgstdshowsrcwrapper_la_SOURCES = gstdshowaudiosrc.c gstdshowsrcwrapper.c gstdshowvideosrc.c - -libgstdshowsrcwrapper_la_CFLAGS = $(GST_CFLAGS) -libgstdshowsrcwrapper_la_LIBADD = $(GST_LIBS) -libgstdshowsrcwrapper_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstdshowsrcwrapper_la_LIBTOOLFLAGS = --tag=disable-static - -noinst_HEADERS = gstdshowaudiosrc.h gstdshowsrcwrapper.h gstdshowvideosrc.h +EXTRA_DIST = \ + gstdshowaudiosrc.c \ + gstdshowaudiosrc.h \ + gstdshow.cpp \ + gstdshowfakesink.cpp \ + gstdshowfakesink.h \ + gstdshow.h \ + gstdshowinterface.h \ + gstdshowsrcwrapper.cpp \ + gstdshowvideosrc.c \ + gstdshowvideosrc.h diff --git a/sys/dshowsrcwrapper/gstdshow.cpp b/sys/dshowsrcwrapper/gstdshow.cpp new file mode 100755 index 00000000..ed27d631 --- /dev/null +++ b/sys/dshowsrcwrapper/gstdshow.cpp @@ -0,0 +1,346 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshow.cpp: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "gstdshow.h" +#include "gstdshowfakesink.h" + +CFactoryTemplate g_Templates[]= +{ + { + L"DSHOW fake sink filter" + , &CLSID_DshowFakeSink + , CDshowFakeSink::CreateInstance + , NULL + , NULL + } +}; + +int g_cTemplates = sizeof(g_Templates)/sizeof(g_Templates[0]); +static HINSTANCE g_hModule = NULL; + +extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID); +BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved) +{ + if (!g_hModule) + g_hModule = (HINSTANCE)hModule; + + return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved); +} + +STDAPI DllRegisterServer() +{ + return AMovieDllRegisterServer2 (TRUE); +} + +STDAPI DllUnregisterServer() +{ + return AMovieDllRegisterServer2 (FALSE); +} + +HRESULT gst_dshow_register_fakefilters () +{ + return DllRegisterServer(); +} + +void +gst_dshow_free_mediatype (AM_MEDIA_TYPE *pmt) +{ + if (pmt != NULL) { + if (pmt->cbFormat != 0) { + CoTaskMemFree((PVOID)pmt->pbFormat); + pmt->cbFormat = 0; + pmt->pbFormat = NULL; + } + if (pmt->pUnk != NULL) { + /* Unecessary because pUnk should not be used, but safest. */ + pmt->pUnk->Release(); + pmt->pUnk = NULL; + } + + CoTaskMemFree(pmt); + } +} + +void +gst_dshow_free_pin_mediatype (gpointer pt) +{ + GstCapturePinMediaType * pin_mediatype = (GstCapturePinMediaType *) pt; + if (pin_mediatype) { + if (pin_mediatype->capture_pin) { + pin_mediatype->capture_pin->Release(); + pin_mediatype->capture_pin = NULL; + } + if (pin_mediatype->mediatype) { + gst_dshow_free_mediatype (pin_mediatype->mediatype); + pin_mediatype->mediatype = NULL; + } + } +} + + +void +gst_dshow_free_pins_mediatypes (GList *pins_mediatypes) +{ + guint i = 0; + for (; i < g_list_length (pins_mediatypes); i++) { + GList *mylist = g_list_nth (pins_mediatypes, i); + if (mylist && mylist->data) + gst_dshow_free_pin_mediatype ((GstCapturePinMediaType *)mylist->data); + } + g_list_free (pins_mediatypes); +} + +gboolean +gst_dshow_get_pin_from_filter (IBaseFilter *filter, PIN_DIRECTION pindir, IPin **pin) +{ + gboolean ret = FALSE; + IEnumPins *enumpins = NULL; + IPin *pintmp = NULL; + HRESULT hres; + *pin = NULL; + + hres = filter->EnumPins (&enumpins); + if (FAILED(hres)) { + return ret; + } + + while (enumpins->Next (1, &pintmp, NULL) == S_OK) + { + PIN_DIRECTION pindirtmp; + hres = pintmp->QueryDirection (&pindirtmp); + if (hres == S_OK && pindir == pindirtmp) { + *pin = pintmp; + ret = TRUE; + break; + } + pintmp->Release (); + } + enumpins->Release (); + + return ret; +} + +gboolean gst_dshow_find_filter(CLSID input_majortype, CLSID input_subtype, + CLSID output_majortype, CLSID output_subtype, + gchar * prefered_filter_name, IBaseFilter **filter) +{ + gboolean ret = FALSE; + HRESULT hres; + GUID arrayInTypes[2]; + GUID arrayOutTypes[2]; + IFilterMapper2 *mapper = NULL; + IEnumMoniker *enum_moniker = NULL; + IMoniker *moniker = NULL; + ULONG fetched; + gchar *prefered_filter_upper = NULL; + gboolean exit = FALSE; + + /* initialize output parameter */ + if (filter) + *filter = NULL; + + /* create a private copy of prefered filter substring in upper case */ + if (prefered_filter_name) { + prefered_filter_upper = g_strdup (prefered_filter_name); + _strupr (prefered_filter_upper); + } + + hres = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC, + IID_IFilterMapper2, (void **) &mapper); + if (FAILED(hres)) + goto clean; + + memcpy(&arrayInTypes[0], &input_majortype, sizeof (CLSID)); + memcpy(&arrayInTypes[1], &input_subtype, sizeof (CLSID)); + memcpy(&arrayOutTypes[0], &output_majortype, sizeof (CLSID)); + memcpy(&arrayOutTypes[1], &output_subtype, sizeof (CLSID)); + + hres = mapper->EnumMatchingFilters (&enum_moniker, 0, FALSE, MERIT_DO_NOT_USE+1, + TRUE, 1, arrayInTypes, NULL, NULL, FALSE, + TRUE, 1, arrayOutTypes, NULL, NULL); + if (FAILED(hres)) + goto clean; + + enum_moniker->Reset (); + + while(hres = enum_moniker->Next (1, &moniker, &fetched),hres == S_OK + && !exit) { + IBaseFilter *filter_temp = NULL; + IPropertyBag *property_bag = NULL; + gchar * friendly_name = NULL; + + hres = moniker->BindToStorage (NULL, NULL, IID_IPropertyBag, (void **)&property_bag); + if(SUCCEEDED(hres) && property_bag) { + VARIANT varFriendlyName; + VariantInit (&varFriendlyName); + + hres = property_bag->Read (L"FriendlyName", &varFriendlyName, NULL); + if(hres == S_OK && varFriendlyName.bstrVal) { + friendly_name = g_utf16_to_utf8((const gunichar2*)varFriendlyName.bstrVal, + wcslen(varFriendlyName.bstrVal), NULL, NULL, NULL); + if (friendly_name) + _strupr (friendly_name); + SysFreeString (varFriendlyName.bstrVal); + } + property_bag->Release (); + } + + hres = moniker->BindToObject(NULL, NULL, IID_IBaseFilter, (void**)&filter_temp); + if(SUCCEEDED(hres) && filter_temp) { + ret = TRUE; + if (filter) { + if (*filter) + (*filter)->Release (); + + *filter = filter_temp; + (*filter)->AddRef (); + + if (prefered_filter_upper && friendly_name && + strstr(friendly_name, prefered_filter_upper)) + exit = TRUE; + } + + /* if we just want to know if the formats are supported OR + if we don't care about what will be the filter used + => we can stop enumeration */ + if (!filter || !prefered_filter_upper) + exit = TRUE; + + filter_temp->Release (); + } + + if (friendly_name) + g_free (friendly_name); + moniker->Release (); + } + +clean: + if (prefered_filter_upper) + g_free (prefered_filter_upper); + if (enum_moniker) + enum_moniker->Release (); + if (mapper) + mapper->Release (); + + return ret; +} + + +gchar * +gst_dshow_getdevice_from_devicename (const GUID *device_category, gchar **device_name) +{ + gchar *ret = NULL; + ICreateDevEnum *devices_enum = NULL; + IEnumMoniker *enum_moniker = NULL; + IMoniker *moniker = NULL; + HRESULT hres = S_FALSE; + ULONG fetched; + gboolean bfound = FALSE; + + hres = CoCreateInstance (CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, + IID_ICreateDevEnum, (void**)&devices_enum); + if(hres != S_OK) { + /*error*/ + goto clean; + } + + hres = devices_enum->CreateClassEnumerator (*device_category, + &enum_moniker, 0); + if (hres != S_OK || !enum_moniker) { + /*error*/ + goto clean; + } + + enum_moniker->Reset (); + + while(hres = enum_moniker->Next (1, &moniker, &fetched),hres == S_OK + && !bfound) { + IPropertyBag *property_bag = NULL; + hres = moniker->BindToStorage(NULL, NULL, IID_IPropertyBag, (void **)&property_bag); + if(SUCCEEDED(hres) && property_bag) { + VARIANT varFriendlyName; + VariantInit (&varFriendlyName); + + hres = property_bag->Read (L"FriendlyName", &varFriendlyName, NULL); + if(hres == S_OK && varFriendlyName.bstrVal) { + gchar * friendly_name = g_utf16_to_utf8((const gunichar2*)varFriendlyName.bstrVal, + wcslen(varFriendlyName.bstrVal), NULL, NULL, NULL); + + if (!*device_name) { + *device_name = g_strdup (friendly_name); + } + + if (_stricmp(*device_name, friendly_name) == 0) { + WCHAR *wszDisplayName = NULL; + hres = moniker->GetDisplayName (NULL, NULL, &wszDisplayName); + if(hres == S_OK && wszDisplayName) { + ret = g_utf16_to_utf8((const gunichar2*)wszDisplayName, + wcslen(wszDisplayName), NULL, NULL, NULL); + CoTaskMemFree (wszDisplayName); + } + bfound = TRUE; + } + SysFreeString (varFriendlyName.bstrVal); + } + property_bag->Release (); + } + moniker->Release (); + } + +clean: + if (enum_moniker) { + enum_moniker->Release (); + } + + if (devices_enum) { + devices_enum->Release (); + } + + return ret; +} + +gboolean +gst_dshow_show_propertypage (IBaseFilter *base_filter) +{ + gboolean ret = FALSE; + ISpecifyPropertyPages *pProp = NULL; + HRESULT hres = base_filter->QueryInterface (IID_ISpecifyPropertyPages, (void **)&pProp); + if (SUCCEEDED(hres)) + { + /* Get the filter's name and IUnknown pointer.*/ + FILTER_INFO FilterInfo; + CAUUID caGUID; + IUnknown *pFilterUnk = NULL; + hres = base_filter->QueryFilterInfo (&FilterInfo); + base_filter->QueryInterface (IID_IUnknown, (void **)&pFilterUnk); + + /* Show the page. */ + pProp->GetPages (&caGUID); + pProp->Release (); + OleCreatePropertyFrame(GetDesktopWindow(), 0, 0, FilterInfo.achName, + 1, &pFilterUnk, caGUID.cElems, caGUID.pElems, 0, 0, NULL); + + pFilterUnk->Release (); + FilterInfo.pGraph->Release (); + CoTaskMemFree(caGUID.pElems); + } + return ret; +} diff --git a/sys/dshowsrcwrapper/gstdshow.h b/sys/dshowsrcwrapper/gstdshow.h new file mode 100755 index 00000000..ec360b32 --- /dev/null +++ b/sys/dshowsrcwrapper/gstdshow.h @@ -0,0 +1,76 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshow.h: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef _GSTDSHOW_ +#define _GSTDSHOW_ + +#ifdef __cplusplus +#include +#endif +#include +#include +#include +#include + +#include + +typedef struct _GstCapturePinMediaType +{ + AM_MEDIA_TYPE *mediatype; + IPin *capture_pin; +} GstCapturePinMediaType; + +#ifdef __cplusplus +extern "C" { +#endif + +/* register fake filters as COM object and as Direct Show filters in the registry */ +HRESULT gst_dshow_register_fakefilters (); + +/* free memory of the input pin mediatype */ +void gst_dshow_free_pin_mediatype (gpointer pt); + +/* free memory of the input dshow mediatype */ +void gst_dshow_free_mediatype (AM_MEDIA_TYPE *pmt); + +/* free the memory of all mediatypes of the input list if pin mediatype */ +void gst_dshow_free_pins_mediatypes (GList *mediatypes); + +/* get a pin from directshow filter */ +gboolean gst_dshow_get_pin_from_filter (IBaseFilter *filter, PIN_DIRECTION pindir, IPin **pin); + +/* find and return a filter according to the input and output types */ +gboolean gst_dshow_find_filter(CLSID input_majortype, CLSID input_subtype, + CLSID output_majortype, CLSID output_subtype, + gchar * prefered_filter_name, IBaseFilter **filter); + +/* get the dshow device path from device friendly name. +If friendly name is not set, it will return the first available device */ +gchar *gst_dshow_getdevice_from_devicename (const GUID *device_category, gchar **device_name); + +/* show the capture filter property page (generally used to setup the device). the page is modal*/ +gboolean gst_dshow_show_propertypage (IBaseFilter *base_filter); + +#ifdef __cplusplus +} +#endif + +#endif /* _GSTDSHOW_ */ \ No newline at end of file diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.c b/sys/dshowsrcwrapper/gstdshowaudiosrc.c old mode 100644 new mode 100755 index d6edf47d..dcc4e385 --- a/sys/dshowsrcwrapper/gstdshowaudiosrc.c +++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.c @@ -19,12 +19,12 @@ * Boston, MA 02111-1307, USA. */ -#include "gstdshowaudiosrc.h" - #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "gstdshowaudiosrc.h" + static const GstElementDetails gst_dshowaudiosrc_details = GST_ELEMENT_DETAILS ("Directshow audio capture source", "Source/Audio", @@ -451,7 +451,7 @@ gst_dshowaudiosrc_get_caps (GstBaseSrc * basesrc) &cbReturned); /* we only want capture pins */ - if (UuidCompare (&pin_category, &PIN_CATEGORY_CAPTURE, + if (UuidCompare (&pin_category, (UUID *) &PIN_CATEGORY_CAPTURE, &rpcstatus) == 0) { IAMStreamConfig *streamcaps = NULL; @@ -825,10 +825,10 @@ gst_dshowaudiosrc_getcaps_from_streamcaps (GstDshowAudioSrc * src, IPin * pin, if (!caps) caps = gst_caps_new_empty (); - if ((UuidCompare (&pin_mediatype->mediatype->subtype, &MEDIASUBTYPE_PCM, + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_PCM, &rpcstatus) == 0 && rpcstatus == RPC_S_OK) && (UuidCompare (&pin_mediatype->mediatype->formattype, - &FORMAT_WaveFormatEx, &rpcstatus) == 0 + (UUID *) &FORMAT_WaveFormatEx, &rpcstatus) == 0 && rpcstatus == RPC_S_OK)) { WAVEFORMATEX *wavformat = (WAVEFORMATEX *) pin_mediatype->mediatype->pbFormat; diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.h b/sys/dshowsrcwrapper/gstdshowaudiosrc.h old mode 100644 new mode 100755 index fb571015..b8147011 --- a/sys/dshowsrcwrapper/gstdshowaudiosrc.h +++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.h @@ -27,7 +27,8 @@ #include #include -#include "gstdshowsrcwrapper.h" +#include "gstdshow.h" +#include "gstdshowinterface.h" G_BEGIN_DECLS #define GST_TYPE_DSHOWAUDIOSRC (gst_dshowaudiosrc_get_type()) diff --git a/sys/dshowsrcwrapper/gstdshowfakesink.cpp b/sys/dshowsrcwrapper/gstdshowfakesink.cpp new file mode 100755 index 00000000..afc0a5ef --- /dev/null +++ b/sys/dshowsrcwrapper/gstdshowfakesink.cpp @@ -0,0 +1,127 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshowfakesink.cpp: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "gstdshowfakesink.h" + + +CDshowFakeSink::CDshowFakeSink() + : m_hres(S_OK), CBaseRenderer(CLSID_DshowFakeSink, "DshowFakeSink", NULL, &m_hres) +{ + m_callback = NULL; +} + +CDshowFakeSink::~CDshowFakeSink() +{ + +} + +//Object creation. +CUnknown* WINAPI CDshowFakeSink::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr) +{ + CDshowFakeSink *pNewObject = new CDshowFakeSink(); + g_print ("CDshowFakeSink::CreateInstance\n"); + if (pNewObject == NULL) { + *pHr = E_OUTOFMEMORY; + } + return pNewObject; +} + +STDMETHODIMP CDshowFakeSink::QueryInterface(REFIID riid, void **ppvObject) +{ + if (riid == IID_IGstDshowInterface) { + *ppvObject = (IGstDshowInterface*) this; + AddRef(); + return S_OK; + } + else + return CBaseRenderer::QueryInterface (riid, ppvObject); +} + +ULONG STDMETHODCALLTYPE CDshowFakeSink::AddRef() +{ + return CBaseRenderer::AddRef(); +} + +ULONG STDMETHODCALLTYPE CDshowFakeSink::Release() +{ + return CBaseRenderer::Release(); +} + + +STDMETHODIMP CDshowFakeSink::gst_set_media_type (AM_MEDIA_TYPE *pmt) +{ + m_MediaType.Set (*pmt); + return S_OK; +} + +STDMETHODIMP CDshowFakeSink::gst_set_buffer_callback (push_buffer_func push, byte *data) +{ + m_callback = push; + m_data = data; + return S_OK; +} + +STDMETHODIMP CDshowFakeSink::gst_push_buffer (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CDshowFakeSink::gst_flush () +{ + return E_NOTIMPL; +} + +STDMETHODIMP CDshowFakeSink::gst_set_sample_size(unsigned int size) +{ + return E_NOTIMPL; +} + +HRESULT CDshowFakeSink::CheckMediaType(const CMediaType *pmt) +{ + VIDEOINFOHEADER *p1; + VIDEOINFOHEADER *p2; + if(pmt != NULL) + { + p1 = (VIDEOINFOHEADER *)pmt->Format(); + p2 = (VIDEOINFOHEADER *)m_MediaType.Format(); + if (*pmt == m_MediaType) + return S_OK; + } + + return S_FALSE; +} + +HRESULT CDshowFakeSink::DoRenderSample(IMediaSample *pMediaSample) +{ + if(pMediaSample && m_callback) + { + BYTE *pBuffer = NULL; + LONGLONG lStart = 0, lStop = 0; + pMediaSample->GetPointer(&pBuffer); + long size = pMediaSample->GetActualDataLength(); + pMediaSample->GetTime(&lStart, &lStop); + lStart*=100; + lStop*=100; + m_callback(pBuffer, size, m_data, lStart, lStop); + } + + return S_OK; +} diff --git a/sys/dshowsrcwrapper/gstdshowfakesink.h b/sys/dshowsrcwrapper/gstdshowfakesink.h new file mode 100755 index 00000000..7f419b27 --- /dev/null +++ b/sys/dshowsrcwrapper/gstdshowfakesink.h @@ -0,0 +1,50 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshowfakesink.h: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "gstdshowinterface.h" + +class CDshowFakeSink : public CBaseRenderer, + public IGstDshowInterface +{ +public: + CDshowFakeSink (); + virtual ~CDshowFakeSink (); + + static CUnknown * WINAPI CreateInstance (LPUNKNOWN pUnk, HRESULT *pHr); + + virtual HRESULT CheckMediaType (const CMediaType *pmt); + virtual HRESULT DoRenderSample (IMediaSample *pMediaSample); + + STDMETHOD (QueryInterface)(REFIID riid, void **ppvObject); + ULONG STDMETHODCALLTYPE AddRef(); + ULONG STDMETHODCALLTYPE Release(); + STDMETHOD (gst_set_media_type) (AM_MEDIA_TYPE *pmt); + STDMETHOD (gst_set_buffer_callback) (push_buffer_func push, byte *data); + STDMETHOD (gst_push_buffer) (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount); + STDMETHOD (gst_flush) (); + STDMETHOD (gst_set_sample_size) (unsigned int size); + +protected: + HRESULT m_hres; + CMediaType m_MediaType; + push_buffer_func m_callback; + byte *m_data; +}; \ No newline at end of file diff --git a/sys/dshowsrcwrapper/gstdshowinterface.h b/sys/dshowsrcwrapper/gstdshowinterface.h new file mode 100755 index 00000000..68328b95 --- /dev/null +++ b/sys/dshowsrcwrapper/gstdshowinterface.h @@ -0,0 +1,163 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshowinterface.h: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_DHOW_INTERFACE_H__ +#define __GST_DHOW_INTERFACE_H__ + +#include "gstdshow.h" + +#ifdef __cplusplus +typedef bool (*push_buffer_func) (byte *buffer, long size, byte *src_object, UINT64 start, UINT64 stop); +#endif + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +//{6A780808-9725-4d0b-8695-A4DD8D210773} +static const GUID CLSID_DshowFakeSink + = { 0x6a780808, 0x9725, 0x4d0b, { 0x86, 0x95, 0xa4, 0xdd, 0x8d, 0x21, 0x7, 0x73 } }; + +// {FC36764C-6CD4-4C73-900F-3F40BF3F191A} +static const GUID IID_IGstDshowInterface = + { 0xfc36764c, 0x6cd4, 0x4c73, { 0x90, 0xf, 0x3f, 0x40, 0xbf, 0x3f, 0x19, 0x1a } }; + +#define CLSID_DSHOWFAKESINK_STRING "{6A780808-9725-4d0b-8695-A4DD8D210773}" + +typedef interface IGstDshowInterface IGstDshowInterface; + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +#ifndef __IGstDshowInterface_INTERFACE_DEFINED__ +#define __IGstDshowInterface_INTERFACE_DEFINED__ + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("542C0A24-8BD1-46cb-AA57-3E46D006D2F3") + IGstDshowInterface : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE gst_set_media_type( + AM_MEDIA_TYPE __RPC_FAR *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE gst_set_buffer_callback( + push_buffer_func push, byte *data) = 0; + + virtual HRESULT STDMETHODCALLTYPE gst_push_buffer( + byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discount) = 0; + + virtual HRESULT STDMETHODCALLTYPE gst_flush() = 0; + + virtual HRESULT STDMETHODCALLTYPE gst_set_sample_size(unsigned int size) = 0; + }; + +#else /* C style interface */ + + typedef struct IGstDshowInterfaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IGstDshowInterface __RPC_FAR * This, + REFIID riid, + void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IGstDshowInterface __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IGstDshowInterface __RPC_FAR * This); + + HRESULT (STDMETHODCALLTYPE *gst_set_media_type )( + IGstDshowInterface __RPC_FAR * This, + AM_MEDIA_TYPE *pmt); + + HRESULT (STDMETHODCALLTYPE *gst_set_buffer_callback) ( + IGstDshowInterface __RPC_FAR * This, + byte * push, byte *data); + + HRESULT (STDMETHODCALLTYPE *gst_push_buffer) ( + IGstDshowInterface __RPC_FAR * This, + byte *buffer, __int64 start, __int64 stop, + unsigned int size, boolean discount); + + HRESULT (STDMETHODCALLTYPE *gst_flush) ( + IGstDshowInterface __RPC_FAR * This); + + HRESULT (STDMETHODCALLTYPE *gst_set_sample_size) ( + IGstDshowInterface __RPC_FAR * This, + unsigned int size); + + END_INTERFACE + } IGstDshowInterfaceVtbl; + + interface IGstDshowInterface + { + CONST_VTBL struct IGstDshowInterfaceVtbl __RPC_FAR *lpVtbl; + }; + +#define IGstDshowInterface_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IGstDshowInterface_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IGstDshowInterface_Release(This) \ + (This)->lpVtbl -> Release(This) + +#define IGstDshowInterface_gst_set_media_type(This, mediatype) \ + (This)->lpVtbl -> gst_set_media_type(This, mediatype) + +#define IGstDshowInterface_gst_set_buffer_callback(This, push, data) \ + (This)->lpVtbl -> gst_set_buffer_callback(This, push, data) + +#define IGstDshowInterface_gst_push_buffer(This, buffer, start, stop, size, discount) \ + (This)->lpVtbl -> gst_push_buffer(This, buffer, start, stop, size, discount) + +#define IGstDshowInterface_gst_flush(This) \ + (This)->lpVtbl -> gst_flush(This) + +#define IGstDshowInterface_gst_set_sample_size(This, size) \ + (This)->lpVtbl -> gst_set_sample_size(This, size) + +#endif /* C style interface */ + +#endif /* __IGstDshowInterface_INTERFACE_DEFINED__ */ + +#endif /* __GST_DSHOW_INTERFACE_H__ */ \ No newline at end of file diff --git a/sys/dshowsrcwrapper/gstdshowsrcwrapper.c b/sys/dshowsrcwrapper/gstdshowsrcwrapper.c deleted file mode 100644 index 803fd807..00000000 --- a/sys/dshowsrcwrapper/gstdshowsrcwrapper.c +++ /dev/null @@ -1,59 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowsrcwrapper.c: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gstdshowaudiosrc.h" -#include "gstdshowvideosrc.h" - -const GUID CLSID_GstreamerSrcFilter - = - { 0x6a780808, 0x9725, 0x4d0b, {0x86, 0x95, 0xa4, 0xdd, 0x8d, 0x21, 0x7, - 0x73} }; - -const GUID IID_IGstSrcInterface = - { 0x542c0a24, 0x8bd1, 0x46cb, {0xaa, 0x57, 0x3e, 0x46, 0xd0, 0x6, 0xd2, - 0xf3} }; - - -static gboolean -plugin_init (GstPlugin * plugin) -{ - /* register fake filters */ - gst_dshow_register_fakefilters (); - - if (!gst_element_register (plugin, "dshowaudiosrc", - GST_RANK_NONE, - GST_TYPE_DSHOWAUDIOSRC) || - !gst_element_register (plugin, "dshowvideosrc", - GST_RANK_NONE, GST_TYPE_DSHOWVIDEOSRC)) - return FALSE; - - return TRUE; -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "dshowsrcwrapper", - "DirectShow sources wrapper plugin", - plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/sys/dshowsrcwrapper/gstdshowsrcwrapper.cpp b/sys/dshowsrcwrapper/gstdshowsrcwrapper.cpp new file mode 100755 index 00000000..1e9a8aa2 --- /dev/null +++ b/sys/dshowsrcwrapper/gstdshowsrcwrapper.cpp @@ -0,0 +1,66 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshowsrcwrapper.c: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstdshowaudiosrc.h" +#include "gstdshowvideosrc.h" + +const GUID CLSID_GstreamerSrcFilter + = + { 0x6a780808, 0x9725, 0x4d0b, {0x86, 0x95, 0xa4, 0xdd, 0x8d, 0x21, 0x7, + 0x73} }; + +const GUID IID_IGstSrcInterface = + { 0x542c0a24, 0x8bd1, 0x46cb, {0xaa, 0x57, 0x3e, 0x46, 0xd0, 0x6, 0xd2, + 0xf3} }; + +static gboolean +plugin_init (GstPlugin * plugin) +{ + /* register fake filters */ + HRESULT hr = gst_dshow_register_fakefilters (); + if (FAILED (hr)) { + g_warning ("failed to register directshow fakesink filter: 0x%x\n", hr); + return FALSE; + } + + if (!gst_element_register (plugin, "dshowaudiosrc", + GST_RANK_NONE, + GST_TYPE_DSHOWAUDIOSRC) || + !gst_element_register (plugin, "dshowvideosrc", + GST_RANK_NONE, GST_TYPE_DSHOWVIDEOSRC)) + return FALSE; + + return TRUE; +} + +extern "C" { + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + "dshowsrcwrapper", + "DirectShow sources wrapper plugin", + plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) + +} diff --git a/sys/dshowsrcwrapper/gstdshowsrcwrapper.h b/sys/dshowsrcwrapper/gstdshowsrcwrapper.h deleted file mode 100644 index d94d49f7..00000000 --- a/sys/dshowsrcwrapper/gstdshowsrcwrapper.h +++ /dev/null @@ -1,34 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowsrcwrapper.h: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __GST_DSHOW_H__ -#define __GST_DSHOW_H__ - -#include -#include -#include -#include - -#include - -#pragma warning( disable : 4090 4024) - -#endif /* __GST_DSHOW_H__ */ diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.c b/sys/dshowsrcwrapper/gstdshowvideosrc.c old mode 100644 new mode 100755 index 4a37778c..a54751b7 --- a/sys/dshowsrcwrapper/gstdshowvideosrc.c +++ b/sys/dshowsrcwrapper/gstdshowvideosrc.c @@ -19,12 +19,12 @@ * Boston, MA 02111-1307, USA. */ -#include "gstdshowvideosrc.h" - #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "gstdshowvideosrc.h" + static const GstElementDetails gst_dshowvideosrc_details = GST_ELEMENT_DETAILS ("DirectShow video capture source", "Source/Video", @@ -520,7 +520,7 @@ gst_dshowvideosrc_get_caps (GstBaseSrc * basesrc) &cbReturned); /* we only want capture pins */ - if (UuidCompare (&pin_category, &PIN_CATEGORY_CAPTURE, + if (UuidCompare (&pin_category, (UUID *) &PIN_CATEGORY_CAPTURE, &rpcstatus) == 0) { IAMStreamConfig *streamcaps = NULL; @@ -625,7 +625,7 @@ gst_dshowvideosrc_start (GstBaseSrc * bsrc) &IID_IBaseFilter, (LPVOID *) & src->dshow_fakesink); if (hres != S_OK || !src->dshow_fakesink) { GST_CAT_ERROR (dshowvideosrc_debug, - "Can't create an instance of our dshow fakesink filter (error=%d)", + "Can't create an instance of our dshow fakesink filter (error=0x%x)", hres); goto error; } @@ -898,10 +898,10 @@ gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * src, IPin * pin, caps = gst_caps_new_empty (); /* I420 */ - if ((UuidCompare (&pin_mediatype->mediatype->subtype, &MEDIASUBTYPE_I420, + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_I420, &rpcstatus) == 0 && rpcstatus == RPC_S_OK) && (UuidCompare (&pin_mediatype->mediatype->formattype, - &FORMAT_VideoInfo, &rpcstatus) == 0 + (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 && rpcstatus == RPC_S_OK)) { video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; @@ -923,10 +923,10 @@ gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * src, IPin * pin, } /* RGB24 */ - if ((UuidCompare (&pin_mediatype->mediatype->subtype, &MEDIASUBTYPE_RGB24, + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_RGB24, &rpcstatus) == 0 && rpcstatus == RPC_S_OK) && (UuidCompare (&pin_mediatype->mediatype->formattype, - &FORMAT_VideoInfo, &rpcstatus) == 0 + (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 && rpcstatus == RPC_S_OK)) { video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; @@ -952,10 +952,10 @@ gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * src, IPin * pin, } /* DVSD */ - if ((UuidCompare (&pin_mediatype->mediatype->subtype, &MEDIASUBTYPE_dvsd, + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_dvsd, &rpcstatus) == 0 && rpcstatus == RPC_S_OK) && (UuidCompare (&pin_mediatype->mediatype->formattype, - &FORMAT_VideoInfo, &rpcstatus) == 0 + (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 && rpcstatus == RPC_S_OK)) { video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; @@ -978,10 +978,10 @@ gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * src, IPin * pin, } /* DV stream */ - if ((UuidCompare (&pin_mediatype->mediatype->subtype, &MEDIASUBTYPE_dvsd, + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_dvsd, &rpcstatus) == 0 && rpcstatus == RPC_S_OK) && (UuidCompare (&pin_mediatype->mediatype->formattype, - &FORMAT_DvInfo, &rpcstatus) == 0 && rpcstatus == RPC_S_OK)) { + (UUID *) &FORMAT_DvInfo, &rpcstatus) == 0 && rpcstatus == RPC_S_OK)) { mediacaps = gst_caps_new_simple ("video/x-dv", "systemstream", G_TYPE_BOOLEAN, TRUE, NULL); diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.h b/sys/dshowsrcwrapper/gstdshowvideosrc.h old mode 100644 new mode 100755 index 8bc52fa9..b7bfbb19 --- a/sys/dshowsrcwrapper/gstdshowvideosrc.h +++ b/sys/dshowsrcwrapper/gstdshowvideosrc.h @@ -22,11 +22,13 @@ #ifndef __GST_DSHOWVIDEOSRC_H__ #define __GST_DSHOWVIDEOSRC_H__ +#include #include #include #include -#include "gstdshowsrcwrapper.h" +#include "gstdshow.h" +#include "gstdshowinterface.h" // 30323449-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_I420 DEFINE_GUID(MEDIASUBTYPE_I420, 0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); diff --git a/sys/dshowsrcwrapper/libgstdshow.def b/sys/dshowsrcwrapper/libgstdshow.def new file mode 100755 index 00000000..ee8586c9 --- /dev/null +++ b/sys/dshowsrcwrapper/libgstdshow.def @@ -0,0 +1,8 @@ +EXPORTS + DllMain PRIVATE + DllGetClassObject PRIVATE + DllCanUnloadNow PRIVATE + DllRegisterServer PRIVATE + DllUnregisterServer PRIVATE + + diff --git a/win32/common/libgstdshow.def b/win32/common/libgstdshow.def deleted file mode 100644 index d5e6d57a..00000000 --- a/win32/common/libgstdshow.def +++ /dev/null @@ -1,15 +0,0 @@ -EXPORTS - DllMain PRIVATE - DllGetClassObject PRIVATE - DllCanUnloadNow PRIVATE - DllRegisterServer PRIVATE - DllUnregisterServer PRIVATE - - gst_dshow_find_filter - gst_dshow_free_mediatype - gst_dshow_free_pin_mediatype - gst_dshow_free_pins_mediatypes - gst_dshow_get_pin_from_filter - gst_dshow_getdevice_from_devicename - gst_dshow_register_fakefilters - diff --git a/win32/vs6/gst_plugins_bad.dsw b/win32/vs6/gst_plugins_bad.dsw old mode 100644 new mode 100755 index ba3fd2f8..388fd822 --- a/win32/vs6/gst_plugins_bad.dsw +++ b/win32/vs6/gst_plugins_bad.dsw @@ -39,18 +39,6 @@ Package=<4> ############################################################################### -Project: "libgstdshowsrcwrapper"=".\libdshowsrcwrapper.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - Project: "libgstflv"=".\libgstflv.dsp" - Package Owner=<4> Package=<5> diff --git a/win32/vs6/libdshowsrcwrapper.dsp b/win32/vs6/libdshowsrcwrapper.dsp deleted file mode 100644 index 6486f95f..00000000 --- a/win32/vs6/libdshowsrcwrapper.dsp +++ /dev/null @@ -1,137 +0,0 @@ -# Microsoft Developer Studio Project File - Name="libgstdshowsrcwrapper" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=libgstdshowsrcwrapper - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "libdshowsrcwrapper.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "libdshowsrcwrapper.mak" CFG="libgstdshowsrcwrapper - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libgstdshowsrcwrapper - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libgstdshowsrcwrapper - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "libgstdshowsrcwrapper - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDSHOWSRCWRAPPER_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../gst-libs" /I "../../../gst-plugins-base/gst-libs" /I "../../../gstreamer/libs" /I "../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DSHOWSRCWRAPPER_EXPORTS" /D "HAVE_CONFIG_H" /D "COBJMACROS" /D "_WIN32_DCOM" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 libgstdshow-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstaudio-0.10.lib libgstinterfaces-0.10.lib glib-2.0.lib gobject-2.0.lib ole32.lib oleaut32.lib Rpcrt4.lib Strmiids.lib user32.lib /nologo /dll /machine:I386 /out:"Release/libgstdshowsrcwrapper.dll" /libpath:"../../../dshowfakefilters/release" /libpath:"../gstreamer/win32/vs6/release" /libpath:"../gst-plugins-base/win32/vs6/release" /libpath:"./release" -# Begin Special Build Tool -TargetPath=.\Release\libgstdshowsrcwrapper.dll -SOURCE="$(InputPath)" -PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\lib\gstreamer-0.10 -# End Special Build Tool - -!ELSEIF "$(CFG)" == "libgstdshowsrcwrapper - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTDSHOWSRCWRAPPER_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../gst-libs" /I "../../../gst-plugins-base/gst-libs" /I "../../../gstreamer/libs" /I "../common" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DSHOWSRCWRAPPER_EXPORTS" /D "HAVE_CONFIG_H" /D "COBJMACROS" /D "_WIN32_DCOM" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libgstdshow-0.10.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstaudio-0.10.lib libgstinterfaces-0.10.lib glib-2.0D.lib gobject-2.0D.lib ole32.lib oleaut32.lib Rpcrt4.lib user32.lib strmiids.lib /nologo /dll /debug /machine:I386 /out:"Debug/libgstdshowsrcwrapper.dll" /pdbtype:sept /libpath:"../gstreamer/win32/vs6/debug" /libpath:"../gst-plugins-base/win32/vs6/debug" /libpath:"./debug" -# Begin Special Build Tool -TargetPath=.\Debug\libgstdshowsrcwrapper.dll -SOURCE="$(InputPath)" -PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\debug\lib\gstreamer-0.10 -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "libgstdshowsrcwrapper - Win32 Release" -# Name "libgstdshowsrcwrapper - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\sys\dshowsrcwrapper\gstdshowaudiosrc.c -# End Source File -# Begin Source File - -SOURCE=..\..\sys\dshowsrcwrapper\gstdshowsrcwrapper.c -# End Source File -# Begin Source File - -SOURCE=..\..\sys\dshowsrcwrapper\gstdshowvideosrc.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\sys\dshowsrcwrapper\gstdshowaudiosrc.h -# End Source File -# Begin Source File - -SOURCE=..\..\sys\dshowsrcwrapper\gstdshowsrcwrapper.h -# End Source File -# Begin Source File - -SOURCE=..\..\sys\dshowsrcwrapper\gstdshowvideosrc.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/win32/vs8/gst-plugins-bad.sln b/win32/vs8/gst-plugins-bad.sln old mode 100644 new mode 100755 index 13386d27..109210c9 --- a/win32/vs8/gst-plugins-bad.sln +++ b/win32/vs8/gst-plugins-bad.sln @@ -1,25 +1,25 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgstdirectsound", "libgstdirectsound.vcproj", "{566A2EB9-984C-4027-86DD-EDC7B390C679}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgstdirectdraw", "libgstdirectdraw.vcproj", "{1594A623-5529-4B86-BD4A-694CF0BDB5C4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {566A2EB9-984C-4027-86DD-EDC7B390C679}.Debug|Win32.ActiveCfg = Debug|Win32 - {566A2EB9-984C-4027-86DD-EDC7B390C679}.Debug|Win32.Build.0 = Debug|Win32 - {566A2EB9-984C-4027-86DD-EDC7B390C679}.Release|Win32.ActiveCfg = Release|Win32 - {566A2EB9-984C-4027-86DD-EDC7B390C679}.Release|Win32.Build.0 = Release|Win32 - {1594A623-5529-4B86-BD4A-694CF0BDB5C4}.Debug|Win32.ActiveCfg = Debug|Win32 - {1594A623-5529-4B86-BD4A-694CF0BDB5C4}.Debug|Win32.Build.0 = Debug|Win32 - {1594A623-5529-4B86-BD4A-694CF0BDB5C4}.Release|Win32.ActiveCfg = Release|Win32 - {1594A623-5529-4B86-BD4A-694CF0BDB5C4}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgstdirectdraw", "libgstdirectdraw.vcproj", "{1594A623-5529-4B86-BD4A-694CF0BDB5C4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgstdshowsrcwrapper", "libdshowsrcwrapper.vcproj", "{42EC1484-5031-4962-9E45-C990BB77EB37}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1594A623-5529-4B86-BD4A-694CF0BDB5C4}.Debug|Win32.ActiveCfg = Debug|Win32 + {1594A623-5529-4B86-BD4A-694CF0BDB5C4}.Debug|Win32.Build.0 = Debug|Win32 + {1594A623-5529-4B86-BD4A-694CF0BDB5C4}.Release|Win32.ActiveCfg = Release|Win32 + {1594A623-5529-4B86-BD4A-694CF0BDB5C4}.Release|Win32.Build.0 = Release|Win32 + {42EC1484-5031-4962-9E45-C990BB77EB37}.Debug|Win32.ActiveCfg = Debug|Win32 + {42EC1484-5031-4962-9E45-C990BB77EB37}.Debug|Win32.Build.0 = Debug|Win32 + {42EC1484-5031-4962-9E45-C990BB77EB37}.Release|Win32.ActiveCfg = Release|Win32 + {42EC1484-5031-4962-9E45-C990BB77EB37}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/vs8/libdshowsrcwrapper.vcproj b/win32/vs8/libdshowsrcwrapper.vcproj new file mode 100755 index 00000000..826c4337 --- /dev/null +++ b/win32/vs8/libdshowsrcwrapper.vcproj @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1 From 0dd755bca315090564ac4c7b56760846dce598df Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Tue, 21 Jul 2009 11:10:49 +0200 Subject: dshowsrcwrapper: fix relative path --- win32/vs8/libdshowsrcwrapper.vcproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/vs8/libdshowsrcwrapper.vcproj b/win32/vs8/libdshowsrcwrapper.vcproj index 826c4337..a69db243 100755 --- a/win32/vs8/libdshowsrcwrapper.vcproj +++ b/win32/vs8/libdshowsrcwrapper.vcproj @@ -78,7 +78,7 @@ LinkIncremental="1" SuppressStartupBanner="true" AdditionalLibraryDirectories="C:\msys\1.0\local\lib;"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib";"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses\XP32_RETAIL"" - ModuleDefinitionFile="..\..\sys\libgstdshow.def" + ModuleDefinitionFile="..\..\sys\dshowsrcwrapper\libgstdshow.def" ProgramDatabaseFile=".\Release/libgstdshowsrcwrapper.pdb" ImportLibrary=".\Release/libgstdshowsrcwrapper.lib" TargetMachine="1" @@ -177,7 +177,7 @@ LinkIncremental="2" SuppressStartupBanner="true" AdditionalLibraryDirectories="C:\msys\1.0\local\lib;"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib";"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses\XP32_DEBUG"" - ModuleDefinitionFile="..\..\sys\libgstdshow.def" + ModuleDefinitionFile="..\..\sys\dshowsrcwrapper\libgstdshow.def" GenerateDebugInformation="true" ProgramDatabaseFile=".\Debug/libgstdshowsrcwrapper.pdb" ImportLibrary=".\Debug/libgstdshowsrcwrapper.lib" @@ -240,7 +240,7 @@ > -- cgit v1.2.1 From 6233d1c9500410773b5bb796535963f361c7dbfe Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 21 Jul 2009 13:14:00 +0200 Subject: mpegtsparse: Remove old PES PIDs when receiving PAT tables Fixes bug #583470. --- gst/mpegdemux/mpegtsparse.c | 54 +++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/gst/mpegdemux/mpegtsparse.c b/gst/mpegdemux/mpegtsparse.c index 976935f2..f947cc50 100644 --- a/gst/mpegdemux/mpegtsparse.c +++ b/gst/mpegdemux/mpegtsparse.c @@ -553,6 +553,35 @@ mpegts_parse_program_remove_stream (MpegTSParse * parse, g_hash_table_remove (program->streams, GINT_TO_POINTER ((gint) pid)); } +static void +mpegts_parse_deactivate_pmt (MpegTSParse * parse, MpegTSParseProgram * program) +{ + gint i; + guint pid; + guint stream_type; + GstStructure *stream; + const GValue *streams; + const GValue *value; + + if (program->pmt_info) { + streams = gst_structure_get_value (program->pmt_info, "streams"); + + for (i = 0; i < gst_value_list_get_size (streams); ++i) { + value = gst_value_list_get_value (streams, i); + stream = g_value_get_boxed (value); + gst_structure_get_uint (stream, "pid", &pid); + gst_structure_get_uint (stream, "stream-type", &stream_type); + mpegts_parse_program_remove_stream (parse, program, (guint16) pid); + g_hash_table_remove (parse->pes_pids, GINT_TO_POINTER ((gint) pid)); + } + + /* remove pcr stream */ + mpegts_parse_program_remove_stream (parse, program, program->pcr_pid); + g_hash_table_remove (parse->pes_pids, + GINT_TO_POINTER ((gint) program->pcr_pid)); + } +} + static MpegTSParsePad * mpegts_parse_create_tspad (MpegTSParse * parse, const gchar * pad_name) { @@ -940,6 +969,7 @@ mpegts_parse_apply_pat (MpegTSParse * parse, GstStructure * pat_info) parse->pads_to_remove = g_list_append (parse->pads_to_remove, mpegts_parse_deactivate_program (parse, program)); + mpegts_parse_deactivate_pmt (parse, program); mpegts_parse_remove_program (parse, program_number); g_hash_table_remove (parse->psi_pids, GINT_TO_POINTER ((gint) pid)); mpegts_packetizer_remove_stream (parse->packetizer, pid); @@ -964,7 +994,6 @@ mpegts_parse_apply_pmt (MpegTSParse * parse, guint stream_type; GstStructure *stream; gint i; - const GValue *old_streams; const GValue *new_streams; const GValue *value; @@ -975,27 +1004,8 @@ mpegts_parse_apply_pmt (MpegTSParse * parse, GST_OBJECT_LOCK (parse); program = mpegts_parse_get_program (parse, program_number); if (program) { - if (program->pmt_info) { - /* deactivate old pmt */ - old_streams = gst_structure_get_value (program->pmt_info, "streams"); - - for (i = 0; i < gst_value_list_get_size (old_streams); ++i) { - value = gst_value_list_get_value (old_streams, i); - stream = g_value_get_boxed (value); - gst_structure_get_uint (stream, "pid", &pid); - gst_structure_get_uint (stream, "stream-type", &stream_type); - mpegts_parse_program_remove_stream (parse, program, (guint16) pid); - g_hash_table_remove (parse->pes_pids, GINT_TO_POINTER ((gint) pid)); - } - - /* remove pcr stream */ - mpegts_parse_program_remove_stream (parse, program, program->pcr_pid); - g_hash_table_remove (parse->pes_pids, - GINT_TO_POINTER ((gint) program->pcr_pid)); - - gst_structure_free (program->pmt_info); - program->pmt_info = NULL; - } + /* deactivate old pmt */ + mpegts_parse_deactivate_pmt (parse, program); } else { /* no PAT?? */ g_hash_table_insert (parse->psi_pids, -- cgit v1.2.1 From e3f08983aadac760320f50da1d82769645689470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 21 Jul 2009 13:17:06 +0200 Subject: mpegtsparse: Free the PMT before setting a new one --- gst/mpegdemux/mpegtsparse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/mpegdemux/mpegtsparse.c b/gst/mpegdemux/mpegtsparse.c index f947cc50..90a8ea3b 100644 --- a/gst/mpegdemux/mpegtsparse.c +++ b/gst/mpegdemux/mpegtsparse.c @@ -1006,6 +1006,9 @@ mpegts_parse_apply_pmt (MpegTSParse * parse, if (program) { /* deactivate old pmt */ mpegts_parse_deactivate_pmt (parse, program); + if (program->pmt_info) + gst_structure_free (program->pmt_info); + program->pmt_info = NULL; } else { /* no PAT?? */ g_hash_table_insert (parse->psi_pids, -- cgit v1.2.1 From 1f88ceeba8c908360d508cab5ee439eaff89309f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 21 Jul 2009 13:33:58 +0200 Subject: mpegtsdemux: Implement SEEKING query Partially fixes bug #588944. --- gst/mpegdemux/gstmpegtsdemux.c | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index 65539d0a..8de7cc75 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -2778,9 +2778,54 @@ gst_mpegts_demux_src_pad_query (GstPad * pad, GstQuery * query) } break; } + case GST_QUERY_SEEKING:{ + GstFormat fmt; + + gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL); + if (fmt == GST_FORMAT_BYTES) { + /* Seeking in BYTES format not supported at all */ + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + } else { + GstQuery *peerquery; + gboolean seekable; + + /* Then ask upstream */ + res = gst_pad_peer_query (demux->sinkpad, query); + if (res) { + /* If upstream can handle seeks we're done, if it + * can't we still have our TIME->BYTES conversion seek + */ + gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); + if (seekable || fmt != GST_FORMAT_TIME) + goto beach; + } + + /* We can seek if upstream supports BYTES seeks and we + * have a bitrate + */ + peerquery = gst_query_new_seeking (GST_FORMAT_BYTES); + res = gst_pad_peer_query (demux->sinkpad, query); + if (!res || demux->bitrate == -1) { + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + } else { + gst_query_parse_seeking (peerquery, NULL, &seekable, NULL, NULL); + if (seekable) + gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, -1); + else + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + } + + gst_query_unref (peerquery); + res = TRUE; + } + break; + } default: res = gst_pad_query_default (pad, query); + break; } + +beach: gst_object_unref (demux); return res; -- cgit v1.2.1 From 95e50d3598397a1248e756231a69114229a032e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 21 Jul 2009 13:39:21 +0200 Subject: mpegpsdemux: Implement SEEKING query Fixes bug #588944. --- gst/mpegdemux/gstmpegdemux.c | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index 51b1ff1b..dbf1567a 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -1383,11 +1383,66 @@ gst_flups_demux_src_query (GstPad * pad, GstQuery * query) res = TRUE; break; } + case GST_QUERY_SEEKING:{ + GstFormat fmt; + + gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL); + + res = TRUE; + if (demux->random_access) { + /* In pull mode we can seek in TIME format if we have the SCR */ + if (fmt != GST_FORMAT_TIME || demux->scr_rate_n == G_MAXUINT64 + || demux->scr_rate_d == G_MAXUINT64) + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + else + gst_query_set_seeking (query, fmt, TRUE, 0, -1); + } else { + if (fmt == GST_FORMAT_BYTES) { + /* Seeking in BYTES format not supported at all */ + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + } else { + GstQuery *peerquery; + gboolean seekable; + + /* Then ask upstream */ + res = gst_pad_peer_query (demux->sinkpad, query); + if (res) { + /* If upstream can handle seeks we're done, if it + * can't we still have our TIME->BYTES conversion seek + */ + gst_query_parse_seeking (query, NULL, &seekable, NULL, NULL); + if (seekable || fmt != GST_FORMAT_TIME) + goto beach; + } + + /* We can seek if upstream supports BYTES seeks and we + * have the SCR + */ + peerquery = gst_query_new_seeking (GST_FORMAT_BYTES); + res = gst_pad_peer_query (demux->sinkpad, query); + if (!res || demux->scr_rate_n == G_MAXUINT64 + || demux->scr_rate_d == G_MAXUINT64) { + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + } else { + gst_query_parse_seeking (peerquery, NULL, &seekable, NULL, NULL); + if (seekable) + gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, -1); + else + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + } + + gst_query_unref (peerquery); + res = TRUE; + } + } + break; + } default: res = gst_pad_query_default (pad, query); break; } +beach: gst_object_unref (demux); return res; -- cgit v1.2.1 From 86af4924cca30c2887cece5ffb7608c4a1667589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 21 Jul 2009 13:51:20 +0200 Subject: mxfdemux: Implement SEEKING query --- gst/mxf/mxfdemux.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 5abd37ff..e646be8c 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -3453,6 +3453,7 @@ gst_mxf_demux_src_query_type (GstPad * pad) static const GstQueryType types[] = { GST_QUERY_POSITION, GST_QUERY_DURATION, + GST_QUERY_SEEKING, 0 }; @@ -3545,6 +3546,33 @@ gst_mxf_demux_src_query (GstPad * pad, GstQuery * query) ret = TRUE; break; } + case GST_QUERY_SEEKING:{ + GstFormat fmt; + + ret = TRUE; + gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL); + if (fmt != GST_FORMAT_TIME) { + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + goto done; + } + + if (demux->random_access) { + gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, -1); + } else { + GstQuery *peerquery = gst_query_new_seeking (GST_FORMAT_BYTES); + gboolean seekable; + + seekable = gst_pad_peer_query (demux->sinkpad, peerquery); + if (seekable) + gst_query_parse_seeking (peerquery, NULL, &seekable, NULL, NULL); + if (seekable) + gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, -1); + else + gst_query_set_seeking (query, GST_FORMAT_TIME, FALSE, -1, -1); + } + + break; + } default: /* else forward upstream */ ret = gst_pad_peer_query (demux->sinkpad, query); @@ -3806,6 +3834,33 @@ gst_mxf_demux_query (GstElement * element, GstQuery * query) ret = TRUE; break; } + case GST_QUERY_SEEKING:{ + GstFormat fmt; + + ret = TRUE; + gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL); + if (fmt != GST_FORMAT_TIME) { + gst_query_set_seeking (query, fmt, FALSE, -1, -1); + goto done; + } + + if (demux->random_access) { + gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, -1); + } else { + GstQuery *peerquery = gst_query_new_seeking (GST_FORMAT_BYTES); + gboolean seekable; + + seekable = gst_pad_peer_query (demux->sinkpad, peerquery); + if (seekable) + gst_query_parse_seeking (peerquery, NULL, &seekable, NULL, NULL); + if (seekable) + gst_query_set_seeking (query, GST_FORMAT_TIME, TRUE, 0, -1); + else + gst_query_set_seeking (query, GST_FORMAT_TIME, FALSE, -1, -1); + } + + break; + } default: /* else forward upstream */ ret = gst_pad_peer_query (demux->sinkpad, query); -- cgit v1.2.1 From 65b873df34fcd35d5719da4aeacc69fc46af6628 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Tue, 21 Jul 2009 12:42:33 +0100 Subject: kate: fix time conversion from DVD style timestamps. --- ext/kate/gstkatespu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/kate/gstkatespu.h b/ext/kate/gstkatespu.h index a9e841bd..b89e7934 100644 --- a/ext/kate/gstkatespu.h +++ b/ext/kate/gstkatespu.h @@ -30,7 +30,7 @@ #define GST_KATE_UINT16_BE(ptr) ( ( ((guint16)((ptr)[0])) <<8) | ((ptr)[1]) ) /* taken off the DVD SPU decoder - now is time for today's WTF ???? */ -#define GST_KATE_STM_TO_GST(stm) ((1024 * (stm)) / 90000) +#define GST_KATE_STM_TO_GST(stm) ((GST_MSECOND * 1024 * (stm)) / 90) #define GST_KATE_GST_TO_STM(gst) ((int)(((gst) * 90000 ) / 1024)) #define GST_KATE_SPU_MIME_TYPE "video/x-dvd-subpicture" -- cgit v1.2.1 From 60fa2e2cced543f730bf8ff2e0b6a4d665f8debd Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 21 Jul 2009 11:28:20 +0300 Subject: make: remove whitespace after trailing backslash --- ext/lv2/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/lv2/Makefile.am b/ext/lv2/Makefile.am index 18fe6481..28a8f1fe 100644 --- a/ext/lv2/Makefile.am +++ b/ext/lv2/Makefile.am @@ -3,7 +3,7 @@ plugin_LTLIBRARIES = libgstlv2.la libgstlv2_la_SOURCES = gstlv2.c libgstlv2_la_CFLAGS = \ -I$(top_builddir)/gst-libs \ - $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS) $(SLV2_CFLAGS) libgstlv2_la_LIBADD = \ $(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor.la \ -- cgit v1.2.1 From b3753116d22f90a992f6ec8b4a876faca3a3ebfc Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 21 Jul 2009 16:48:26 +0300 Subject: camerabin: we need to copy the data in the example gdk_pixbuf_new_from_data does not copy the data. --- tests/examples/camerabin/gst-camera-perf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/examples/camerabin/gst-camera-perf.c b/tests/examples/camerabin/gst-camera-perf.c index 2337321d..ba8ff6a6 100644 --- a/tests/examples/camerabin/gst-camera-perf.c +++ b/tests/examples/camerabin/gst-camera-perf.c @@ -435,16 +435,18 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) GstBuffer *buf = gst_value_get_buffer (value); GstCaps *caps = GST_BUFFER_CAPS (buf); GstStructure *buf_st = gst_caps_get_structure (caps, 0); - guchar *data = GST_BUFFER_DATA (buf); gint width, height, rowstride; GdkPixbuf *pixbuf; + guchar *data; GST_INFO ("preview : buf=%p, size=%d, format=%" GST_PTR_FORMAT, buf, GST_BUFFER_SIZE (buf), caps); + + data = g_memdup (GST_BUFFER_DATA (buff), GST_BUFFER_SIZE (buff)); gst_structure_get_int (buf_st, "width", &width); gst_structure_get_int (buf_st, "height", &height); rowstride = GST_ROUND_UP_4 (width * 3); - //GST_INFO ("rowstride : %d, %d", rowstride, width*3); + pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, FALSE, 8, width, height, rowstride, NULL, NULL); gdk_pixbuf_save (pixbuf, "/tmp/gst-camerabin-preview.png", "png", -- cgit v1.2.1 From 43657ef1f3aa85f7e5dbce57681181da4c049b96 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 21 Jul 2009 17:48:33 +0300 Subject: camerabin: small speedup in software zoom Force crop on even pixel position to avoid slowpath in crop & scale. --- gst/camerabin/gstcamerabin.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 50f863d3..22a33477 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -1031,6 +1031,10 @@ gst_camerabin_set_element_zoom (GstCameraBin * camera, gint zoom) if (zoom != ZOOM_1X) { w2_crop = (camera->width - (camera->width * ZOOM_1X / zoom)) / 2; h2_crop = (camera->height - (camera->height * ZOOM_1X / zoom)) / 2; + + /* force number of pixels cropped from left to be even, to avoid slow code + * path on videoscale */ + w2_crop &= 0xFFFE; } pad_zoom_sink = gst_element_get_static_pad (camera->src_zoom_crop, "sink"); -- cgit v1.2.1 From 5e6edd7e7beadaf7e0a345f16a700d8824980c97 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 22 Jul 2009 00:33:22 +0300 Subject: mpegdemux: don't add a base_time==-1 to segment positions Fixes assertion about newsegment with start=-1. --- gst/mpegdemux/gstmpegdemux.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index dbf1567a..75d5960f 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -845,6 +845,7 @@ gst_flups_demux_close_segment (GstFluPSDemux * demux) { gint id; GstEvent *event = NULL; + guint64 base_time; #if POST_10_10 GST_INFO_OBJECT (demux, "closing running segment %" GST_SEGMENT_FORMAT, @@ -855,14 +856,17 @@ gst_flups_demux_close_segment (GstFluPSDemux * demux) * last_seg_start != clock_time_none, as that indicates a sparse-stream * event was sent there */ + if ((base_time = demux->base_time) == (guint64) - 1) + base_time = 0; + + /* Close the current segment for a linear playback */ if (demux->src_segment.rate >= 0) { /* for forward playback, we played from start to last_stop */ event = gst_event_new_new_segment (TRUE, demux->src_segment.rate, demux->src_segment.format, - demux->src_segment.start + demux->base_time, - demux->src_segment.last_stop + demux->base_time, - demux->src_segment.time); + demux->src_segment.start + base_time, + demux->src_segment.last_stop + base_time, demux->src_segment.time); } else { gint64 stop; @@ -872,8 +876,8 @@ gst_flups_demux_close_segment (GstFluPSDemux * demux) /* for reverse playback, we played from stop to last_stop. */ event = gst_event_new_new_segment (TRUE, demux->src_segment.rate, demux->src_segment.format, - demux->src_segment.last_stop + demux->base_time, - stop + demux->base_time, demux->src_segment.last_stop); + demux->src_segment.last_stop + base_time, + stop + base_time, demux->src_segment.last_stop); } if (event) { -- cgit v1.2.1 From 779ac0d98e77253daa6f09f1b73b67cad6a25447 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Wed, 22 Jul 2009 11:01:49 +0200 Subject: dshowvideosrc: converts code to C++ --- sys/dshowsrcwrapper/gstdshowvideosrc.c | 1064 ------------------------------ sys/dshowsrcwrapper/gstdshowvideosrc.cpp | 1047 +++++++++++++++++++++++++++++ win32/vs8/libdshowsrcwrapper.vcproj | 2 +- 3 files changed, 1048 insertions(+), 1065 deletions(-) delete mode 100755 sys/dshowsrcwrapper/gstdshowvideosrc.c create mode 100755 sys/dshowsrcwrapper/gstdshowvideosrc.cpp diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.c b/sys/dshowsrcwrapper/gstdshowvideosrc.c deleted file mode 100755 index a54751b7..00000000 --- a/sys/dshowsrcwrapper/gstdshowvideosrc.c +++ /dev/null @@ -1,1064 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowvideosrc.c: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gstdshowvideosrc.h" - -static const GstElementDetails gst_dshowvideosrc_details = -GST_ELEMENT_DETAILS ("DirectShow video capture source", - "Source/Video", - "Receive data from a directshow video capture graph", - "Sebastien Moutte "); - -GST_DEBUG_CATEGORY_STATIC (dshowvideosrc_debug); -#define GST_CAT_DEFAULT dshowvideosrc_debug - -const GUID MEDIASUBTYPE_I420 - = { 0x30323449, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, - 0x71} -}; - -static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-raw-rgb," - "bpp = (int) 24," - "depth = (int) 24," - "width = (int) [ 1, MAX ]," - "height = (int) [ 1, MAX ]," - "framerate = (fraction) [ 0, MAX ];" - "video/x-dv," - "systemstream = (boolean) FALSE," - "width = (int) [ 1, MAX ]," - "height = (int) [ 1, MAX ]," - "framerate = (fraction) [ 0, MAX ]," - "format = (fourcc) dvsd;" - "video/x-dv," - "systemstream = (boolean) TRUE;" - "video/x-raw-yuv," - "width = (int) [ 1, MAX ]," - "height = (int) [ 1, MAX ]," - "framerate = (fraction) [ 0, MAX ]," "format = (fourcc) I420") - ); - -static void gst_dshowvideosrc_init_interfaces (GType type); - -GST_BOILERPLATE_FULL (GstDshowVideoSrc, gst_dshowvideosrc, GstPushSrc, - GST_TYPE_PUSH_SRC, gst_dshowvideosrc_init_interfaces); - -enum -{ - PROP_0, - PROP_DEVICE, - PROP_DEVICE_NAME -}; - -static void gst_dshowvideosrc_probe_interface_init (GstPropertyProbeInterface * - iface); -static const GList *gst_dshowvideosrc_probe_get_properties (GstPropertyProbe * - probe); -static GValueArray *gst_dshowvideosrc_probe_get_values (GstPropertyProbe * - probe, guint prop_id, const GParamSpec * pspec); -static GValueArray *gst_dshowvideosrc_get_device_name_values (GstDshowVideoSrc * - src); -static gboolean gst_dshowvideosrc_probe_needs_probe (GstPropertyProbe * probe, - guint prop_id, const GParamSpec * pspec); -static void gst_dshowvideosrc_probe_probe_property (GstPropertyProbe * probe, - guint prop_id, const GParamSpec * pspec); - - -static void gst_dshowvideosrc_dispose (GObject * gobject); -static void gst_dshowvideosrc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_dshowvideosrc_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); -static GstCaps *gst_dshowvideosrc_get_caps (GstBaseSrc * src); -static GstStateChangeReturn gst_dshowvideosrc_change_state (GstElement * - element, GstStateChange transition); - - -static gboolean gst_dshowvideosrc_start (GstBaseSrc * bsrc); -static gboolean gst_dshowvideosrc_stop (GstBaseSrc * bsrc); -static gboolean gst_dshowvideosrc_unlock (GstBaseSrc * bsrc); -static gboolean gst_dshowvideosrc_unlock_stop (GstBaseSrc * bsrc); -static gboolean gst_dshowvideosrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps); -static GstCaps *gst_dshowvideosrc_get_caps (GstBaseSrc * bsrc); -static GstFlowReturn gst_dshowvideosrc_create (GstPushSrc * psrc, - GstBuffer ** buf); - -/*utils*/ -static GstCaps *gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * - src, IPin * pin, IAMStreamConfig * streamcaps); -static gboolean gst_dshowvideosrc_push_buffer (byte * buffer, long size, - byte * src_object, UINT64 start, UINT64 stop); - -static void -gst_dshowvideosrc_init_interfaces (GType type) -{ - static const GInterfaceInfo dshowvideosrc_info = { - (GInterfaceInitFunc) gst_dshowvideosrc_probe_interface_init, - NULL, - NULL, - }; - - g_type_add_interface_static (type, - GST_TYPE_PROPERTY_PROBE, &dshowvideosrc_info); -} - -static void -gst_dshowvideosrc_probe_interface_init (GstPropertyProbeInterface * iface) -{ - iface->get_properties = gst_dshowvideosrc_probe_get_properties; - iface->needs_probe = gst_dshowvideosrc_probe_needs_probe; - iface->probe_property = gst_dshowvideosrc_probe_probe_property; - iface->get_values = gst_dshowvideosrc_probe_get_values; -} - -static void -gst_dshowvideosrc_base_init (gpointer klass) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - - gst_element_class_set_details (element_class, &gst_dshowvideosrc_details); -} - -static void -gst_dshowvideosrc_class_init (GstDshowVideoSrcClass * klass) -{ - GObjectClass *gobject_class; - GstElementClass *gstelement_class; - GstBaseSrcClass *gstbasesrc_class; - GstPushSrcClass *gstpushsrc_class; - - gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; - gstbasesrc_class = (GstBaseSrcClass *) klass; - gstpushsrc_class = (GstPushSrcClass *) klass; - - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_dispose); - gobject_class->set_property = - GST_DEBUG_FUNCPTR (gst_dshowvideosrc_set_property); - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_dshowvideosrc_get_property); - - gstelement_class->change_state = - GST_DEBUG_FUNCPTR (gst_dshowvideosrc_change_state); - - gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_get_caps); - gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_set_caps); - gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_start); - gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_stop); - gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_unlock); - gstbasesrc_class->unlock_stop = - GST_DEBUG_FUNCPTR (gst_dshowvideosrc_unlock_stop); - - gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_create); - - g_object_class_install_property - (gobject_class, PROP_DEVICE, - g_param_spec_string ("device", "Device", - "Directshow device path (@..classID/name)", NULL, G_PARAM_READWRITE)); - - g_object_class_install_property - (gobject_class, PROP_DEVICE_NAME, - g_param_spec_string ("device-name", "Device name", - "Human-readable name of the sound device", NULL, G_PARAM_READWRITE)); - - GST_DEBUG_CATEGORY_INIT (dshowvideosrc_debug, "dshowvideosrc", 0, - "Directshow video source"); - -} - -static void -gst_dshowvideosrc_init (GstDshowVideoSrc * src, GstDshowVideoSrcClass * klass) -{ - src->device = NULL; - src->device_name = NULL; - src->video_cap_filter = NULL; - src->dshow_fakesink = NULL; - src->media_filter = NULL; - src->filter_graph = NULL; - src->caps = NULL; - src->pins_mediatypes = NULL; - src->is_rgb = FALSE; - - src->buffer_cond = g_cond_new (); - src->buffer_mutex = g_mutex_new (); - src->buffer = NULL; - src->stop_requested = FALSE; - - CoInitializeEx (NULL, COINIT_MULTITHREADED); - - gst_base_src_set_live (GST_BASE_SRC (src), TRUE); -} - -static void -gst_dshowvideosrc_dispose (GObject * gobject) -{ - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (gobject); - - if (src->device) { - g_free (src->device); - src->device = NULL; - } - - if (src->device_name) { - g_free (src->device_name); - src->device_name = NULL; - } - - if (src->caps) { - gst_caps_unref (src->caps); - src->caps = NULL; - } - - if (src->pins_mediatypes) { - gst_dshow_free_pins_mediatypes (src->pins_mediatypes); - src->pins_mediatypes = NULL; - } - - /* clean dshow */ - if (src->video_cap_filter) { - IBaseFilter_Release (src->video_cap_filter); - src->video_cap_filter = NULL; - } - - if (src->buffer_mutex) { - g_mutex_free (src->buffer_mutex); - src->buffer_mutex = NULL; - } - - if (src->buffer_cond) { - g_cond_free (src->buffer_cond); - src->buffer_cond = NULL; - } - - if (src->buffer) { - gst_buffer_unref (src->buffer); - src->buffer = NULL; - } - - CoUninitialize (); - - G_OBJECT_CLASS (parent_class)->dispose (gobject); -} - -static gboolean -gst_dshowvideosrc_probe_needs_probe (GstPropertyProbe * probe, - guint prop_id, const GParamSpec * pspec) -{ - static gboolean init = FALSE; - gboolean ret = FALSE; - - if (!init) { - ret = TRUE; - init = TRUE; - } - - return ret; -} - -static void -gst_dshowvideosrc_probe_probe_property (GstPropertyProbe * probe, - guint prop_id, const GParamSpec * pspec) -{ - GObjectClass *klass = G_OBJECT_GET_CLASS (probe); - - switch (prop_id) { - case PROP_DEVICE_NAME: - //gst_v4l_class_probe_devices (klass, FALSE); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec); - break; - } -} - -static const GList * -gst_dshowvideosrc_probe_get_properties (GstPropertyProbe * probe) -{ - GObjectClass *klass = G_OBJECT_GET_CLASS (probe); - static GList *props = NULL; - - if (!props) { - GParamSpec *pspec; - - pspec = g_object_class_find_property (klass, "device-name"); - props = g_list_append (props, pspec); - } - - return props; -} - -static GValueArray * -gst_dshowvideosrc_get_device_name_values (GstDshowVideoSrc * src) -{ - GValueArray *array = g_value_array_new (0); - GValue value = { 0 }; - ICreateDevEnum *devices_enum = NULL; - IEnumMoniker *moniker_enum = NULL; - IMoniker *moniker = NULL; - HRESULT hres = S_FALSE; - ULONG fetched; - - g_value_init (&value, G_TYPE_STRING); - - hres = CoCreateInstance (&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, - &IID_ICreateDevEnum, (void **) &devices_enum); - if (hres != S_OK) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't create an instance of the system device enumerator (error=%d)", - hres); - array = NULL; - goto clean; - } - - hres = - ICreateDevEnum_CreateClassEnumerator (devices_enum, - &CLSID_VideoInputDeviceCategory, &moniker_enum, 0); - if (hres != S_OK || !moniker_enum) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't get enumeration of video devices (error=%d)", hres); - array = NULL; - goto clean; - } - - IEnumMoniker_Reset (moniker_enum); - - while (hres = IEnumMoniker_Next (moniker_enum, 1, &moniker, &fetched), - hres == S_OK) { - IPropertyBag *property_bag = NULL; - - hres = - IMoniker_BindToStorage (moniker, NULL, NULL, &IID_IPropertyBag, - (void **) &property_bag); - if (SUCCEEDED (hres) && property_bag) { - VARIANT varFriendlyName; - - VariantInit (&varFriendlyName); - hres = - IPropertyBag_Read (property_bag, L"FriendlyName", &varFriendlyName, - NULL); - if (hres == S_OK && varFriendlyName.bstrVal) { - gchar *friendly_name = - g_utf16_to_utf8 ((const gunichar2 *) varFriendlyName.bstrVal, - wcslen (varFriendlyName.bstrVal), NULL, NULL, NULL); - - g_value_set_string (&value, friendly_name); - g_value_array_append (array, &value); - g_value_unset (&value); - g_free (friendly_name); - SysFreeString (varFriendlyName.bstrVal); - } - IPropertyBag_Release (property_bag); - } - IMoniker_Release (moniker); - } - -clean: - if (moniker_enum) { - IEnumMoniker_Release (moniker_enum); - } - - if (devices_enum) { - ICreateDevEnum_Release (devices_enum); - } - - return array; -} - -static GValueArray * -gst_dshowvideosrc_probe_get_values (GstPropertyProbe * probe, - guint prop_id, const GParamSpec * pspec) -{ - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (probe); - GValueArray *array = NULL; - - switch (prop_id) { - case PROP_DEVICE_NAME: - array = gst_dshowvideosrc_get_device_name_values (src); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec); - break; - } - - return array; -} - -static void -gst_dshowvideosrc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (object); - - switch (prop_id) { - case PROP_DEVICE: - { - if (src->device) { - g_free (src->device); - src->device = NULL; - } - if (g_value_get_string (value)) { - src->device = g_strdup (g_value_get_string (value)); - } - break; - } - case PROP_DEVICE_NAME: - { - if (src->device_name) { - g_free (src->device_name); - src->device_name = NULL; - } - if (g_value_get_string (value)) { - src->device_name = g_strdup (g_value_get_string (value)); - } - break; - } - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_dshowvideosrc_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - -} - -static GstCaps * -gst_dshowvideosrc_get_caps (GstBaseSrc * basesrc) -{ - HRESULT hres = S_OK; - IBindCtx *lpbc = NULL; - IMoniker *videom; - DWORD dwEaten; - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (basesrc); - gunichar2 *unidevice = NULL; - - if (src->device) { - g_free (src->device); - src->device = NULL; - } - - src->device = - gst_dshow_getdevice_from_devicename (&CLSID_VideoInputDeviceCategory, - &src->device_name); - if (!src->device) { - GST_CAT_ERROR (dshowvideosrc_debug, "No video device found."); - return NULL; - } - unidevice = - g_utf8_to_utf16 (src->device, strlen (src->device), NULL, NULL, NULL); - - if (!src->video_cap_filter) { - hres = CreateBindCtx (0, &lpbc); - if (SUCCEEDED (hres)) { - hres = MkParseDisplayName (lpbc, unidevice, &dwEaten, &videom); - if (SUCCEEDED (hres)) { - hres = - IMoniker_BindToObject (videom, lpbc, NULL, &IID_IBaseFilter, - &src->video_cap_filter); - IMoniker_Release (videom); - } - IBindCtx_Release (lpbc); - } - } - - if (!src->caps) { - src->caps = gst_caps_new_empty (); - } - - if (src->video_cap_filter && gst_caps_is_empty (src->caps)) { - /* get the capture pins supported types */ - IPin *capture_pin = NULL; - IEnumPins *enumpins = NULL; - HRESULT hres; - - hres = IBaseFilter_EnumPins (src->video_cap_filter, &enumpins); - if (SUCCEEDED (hres)) { - while (IEnumPins_Next (enumpins, 1, &capture_pin, NULL) == S_OK) { - IKsPropertySet *pKs = NULL; - - hres = - IPin_QueryInterface (capture_pin, &IID_IKsPropertySet, - (void **) &pKs); - if (SUCCEEDED (hres) && pKs) { - DWORD cbReturned; - GUID pin_category; - RPC_STATUS rpcstatus; - - hres = - IKsPropertySet_Get (pKs, &ROPSETID_Pin, - AMPROPERTY_PIN_CATEGORY, NULL, 0, &pin_category, sizeof (GUID), - &cbReturned); - - /* we only want capture pins */ - if (UuidCompare (&pin_category, (UUID *) &PIN_CATEGORY_CAPTURE, - &rpcstatus) == 0) { - IAMStreamConfig *streamcaps = NULL; - - if (SUCCEEDED (IPin_QueryInterface (capture_pin, - &IID_IAMStreamConfig, (void **) &streamcaps))) { - GstCaps *caps = - gst_dshowvideosrc_getcaps_from_streamcaps (src, capture_pin, - streamcaps); - - if (caps) { - gst_caps_append (src->caps, caps); - } - IAMStreamConfig_Release (streamcaps); - } - } - - IKsPropertySet_Release (pKs); - } - - IPin_Release (capture_pin); - } - IEnumPins_Release (enumpins); - } - } - - if (unidevice) { - g_free (unidevice); - } - - if (src->caps) { - GST_CAT_LOG (dshowvideosrc_debug, "getcaps returned %s", - gst_caps_to_string (src->caps)); - return gst_caps_ref (src->caps); - } - - return NULL; -} - -static GstStateChangeReturn -gst_dshowvideosrc_change_state (GstElement * element, GstStateChange transition) -{ - HRESULT hres = S_FALSE; - IAMVfwCaptureDialogs *dialog = NULL; - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (element); - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_PLAYING: - if (src->media_filter) - hres = IMediaFilter_Run (src->media_filter, 0); - if (hres != S_OK) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't RUN the directshow capture graph (error=%d)", hres); - return GST_STATE_CHANGE_FAILURE; - } - break; - case GST_STATE_CHANGE_PLAYING_TO_PAUSED: - if (src->media_filter) - hres = IMediaFilter_Stop (src->media_filter); - if (hres != S_OK) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't STOP the directshow capture graph (error=%d)", hres); - return GST_STATE_CHANGE_FAILURE; - } - break; - case GST_STATE_CHANGE_PAUSED_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - } - - return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); -} - -static gboolean -gst_dshowvideosrc_start (GstBaseSrc * bsrc) -{ - HRESULT hres = S_FALSE; - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); - - hres = CoCreateInstance (&CLSID_FilterGraph, NULL, CLSCTX_INPROC, - &IID_IFilterGraph, (LPVOID *) & src->filter_graph); - if (hres != S_OK || !src->filter_graph) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't create an instance of the dshow graph manager (error=%d)", hres); - goto error; - } - - hres = IFilterGraph_QueryInterface (src->filter_graph, &IID_IMediaFilter, - (void **) &src->media_filter); - if (hres != S_OK || !src->media_filter) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't get IMediacontrol interface from the graph manager (error=%d)", - hres); - goto error; - } - - hres = CoCreateInstance (&CLSID_DshowFakeSink, NULL, CLSCTX_INPROC, - &IID_IBaseFilter, (LPVOID *) & src->dshow_fakesink); - if (hres != S_OK || !src->dshow_fakesink) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't create an instance of our dshow fakesink filter (error=0x%x)", - hres); - goto error; - } - - hres = - IFilterGraph_AddFilter (src->filter_graph, src->video_cap_filter, - L"capture"); - if (hres != S_OK) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't add video capture filter to the graph (error=%d)", hres); - goto error; - } - - hres = - IFilterGraph_AddFilter (src->filter_graph, src->dshow_fakesink, L"sink"); - if (hres != S_OK) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't add our fakesink filter to the graph (error=%d)", hres); - goto error; - } - - return TRUE; - -error: - if (src->dshow_fakesink) { - IBaseFilter_Release (src->dshow_fakesink); - src->dshow_fakesink = NULL; - } - - if (src->media_filter) { - IMediaFilter_Release (src->media_filter); - src->media_filter = NULL; - } - if (src->filter_graph) { - IFilterGraph_Release (src->filter_graph); - src->filter_graph = NULL; - } - - return FALSE; -} - -static gboolean -gst_dshowvideosrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps) -{ - HRESULT hres; - IGstDshowInterface *srcinterface = NULL; - IPin *input_pin = NULL; - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); - GstStructure *s = gst_caps_get_structure (caps, 0); - - /* search the negociated caps in our caps list to get its index and the corresponding mediatype */ - if (gst_caps_is_subset (caps, src->caps)) { - guint i = 0; - gint res = -1; - - for (; i < gst_caps_get_size (src->caps) && res == -1; i++) { - GstCaps *capstmp = gst_caps_copy_nth (src->caps, i); - - if (gst_caps_is_subset (caps, capstmp)) { - res = i; - } - gst_caps_unref (capstmp); - } - - if (res != -1 && src->pins_mediatypes) { - /* get the corresponding media type and build the dshow graph */ - GstCapturePinMediaType *pin_mediatype = NULL; - gchar *caps_string = NULL; - GList *type = g_list_nth (src->pins_mediatypes, res); - - if (type) { - pin_mediatype = (GstCapturePinMediaType *) type->data; - - hres = - IBaseFilter_QueryInterface (src->dshow_fakesink, - &IID_IGstDshowInterface, (void **) &srcinterface); - - if (hres != S_OK || !srcinterface) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't get IGstDshowInterface interface from our dshow fakesink filter (error=%d)", - hres); - goto error; - } - - IGstDshowInterface_gst_set_media_type (srcinterface, - pin_mediatype->mediatype); - IGstDshowInterface_gst_set_buffer_callback (srcinterface, - (byte *) gst_dshowvideosrc_push_buffer, (byte *) src); - - if (srcinterface) { - IGstDshowInterface_Release (srcinterface); - } - - gst_dshow_get_pin_from_filter (src->dshow_fakesink, PINDIR_INPUT, - &input_pin); - if (!input_pin) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't get input pin from our dshow fakesink"); - goto error; - } - - hres = - IFilterGraph_ConnectDirect (src->filter_graph, - pin_mediatype->capture_pin, input_pin, NULL); - IPin_Release (input_pin); - - if (hres != S_OK) { - GST_CAT_ERROR (dshowvideosrc_debug, - "Can't connect capture filter with fakesink filter (error=%d)", - hres); - goto error; - } - - /* save width and height negociated */ - gst_structure_get_int (s, "width", &src->width); - gst_structure_get_int (s, "height", &src->height); - - src->is_rgb = FALSE; - caps_string = gst_caps_to_string (caps); - if (caps_string) { - if (strstr (caps_string, "video/x-raw-rgb")) { - src->is_rgb = TRUE; - } else { - src->is_rgb = FALSE; - } - g_free (caps_string); - } - } - } - } - - return TRUE; - -error: - if (srcinterface) { - IGstDshowInterface_Release (srcinterface); - } - - return FALSE; -} - -static gboolean -gst_dshowvideosrc_stop (GstBaseSrc * bsrc) -{ - IPin *input_pin = NULL, *output_pin = NULL; - HRESULT hres = S_FALSE; - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); - - if (!src->filter_graph) - return TRUE; - - /* disconnect filters */ - gst_dshow_get_pin_from_filter (src->video_cap_filter, PINDIR_OUTPUT, - &output_pin); - if (output_pin) { - hres = IFilterGraph_Disconnect (src->filter_graph, output_pin); - IPin_Release (output_pin); - } - - gst_dshow_get_pin_from_filter (src->dshow_fakesink, PINDIR_INPUT, &input_pin); - if (input_pin) { - hres = IFilterGraph_Disconnect (src->filter_graph, input_pin); - IPin_Release (input_pin); - } - - /*remove filters from the graph */ - IFilterGraph_RemoveFilter (src->filter_graph, src->video_cap_filter); - IFilterGraph_RemoveFilter (src->filter_graph, src->dshow_fakesink); - - /*release our gstreamer dshow sink */ - IBaseFilter_Release (src->dshow_fakesink); - src->dshow_fakesink = NULL; - - /*release media filter interface */ - IMediaFilter_Release (src->media_filter); - src->media_filter = NULL; - - /*release the filter graph manager */ - IFilterGraph_Release (src->filter_graph); - src->filter_graph = NULL; - - return TRUE; -} - -static gboolean -gst_dshowvideosrc_unlock (GstBaseSrc * bsrc) -{ - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); - - g_mutex_lock (src->buffer_mutex); - src->stop_requested = TRUE; - g_cond_signal (src->buffer_cond); - g_mutex_unlock (src->buffer_mutex); - - return TRUE; -} - -static gboolean -gst_dshowvideosrc_unlock_stop (GstBaseSrc * bsrc) -{ - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); - - src->stop_requested = FALSE; - - return TRUE; -} - -static GstFlowReturn -gst_dshowvideosrc_create (GstPushSrc * psrc, GstBuffer ** buf) -{ - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (psrc); - - g_mutex_lock (src->buffer_mutex); - while (src->buffer == NULL && !src->stop_requested) - g_cond_wait (src->buffer_cond, src->buffer_mutex); - *buf = src->buffer; - src->buffer = NULL; - g_mutex_unlock (src->buffer_mutex); - - if (src->stop_requested) { - if (*buf != NULL) { - gst_buffer_unref (*buf); - *buf = NULL; - } - return GST_FLOW_WRONG_STATE; - } - - GST_CAT_DEBUG (dshowvideosrc_debug, - "dshowvideosrc_create => pts %" GST_TIME_FORMAT " duration %" - GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (*buf)), - GST_TIME_ARGS (GST_BUFFER_DURATION (*buf))); - - return GST_FLOW_OK; -} - -static GstCaps * -gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * src, IPin * pin, - IAMStreamConfig * streamcaps) -{ - GstCaps *caps = NULL; - HRESULT hres = S_OK; - RPC_STATUS rpcstatus; - int icount = 0; - int isize = 0; - VIDEO_STREAM_CONFIG_CAPS vscc; - int i = 0; - - if (!streamcaps) - return NULL; - - IAMStreamConfig_GetNumberOfCapabilities (streamcaps, &icount, &isize); - - if (isize != sizeof (vscc)) - return NULL; - - for (; i < icount; i++) { - GstCapturePinMediaType *pin_mediatype = g_new0 (GstCapturePinMediaType, 1); - - IPin_AddRef (pin); - pin_mediatype->capture_pin = pin; - - hres = - IAMStreamConfig_GetStreamCaps (streamcaps, i, &pin_mediatype->mediatype, - (BYTE *) & vscc); - if (hres == S_OK && pin_mediatype->mediatype) { - VIDEOINFOHEADER *video_info; - GstCaps *mediacaps = NULL; - - if (!caps) - caps = gst_caps_new_empty (); - - /* I420 */ - if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_I420, - &rpcstatus) == 0 && rpcstatus == RPC_S_OK) - && (UuidCompare (&pin_mediatype->mediatype->formattype, - (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 - && rpcstatus == RPC_S_OK)) { - video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; - - mediacaps = gst_caps_new_simple ("video/x-raw-yuv", - "width", G_TYPE_INT, video_info->bmiHeader.biWidth, - "height", G_TYPE_INT, video_info->bmiHeader.biHeight, - "framerate", GST_TYPE_FRACTION, - (int) (10000000 / video_info->AvgTimePerFrame), 1, "format", - GST_TYPE_FOURCC, MAKEFOURCC ('I', '4', '2', '0'), NULL); - - if (mediacaps) { - src->pins_mediatypes = - g_list_append (src->pins_mediatypes, pin_mediatype); - gst_caps_append (caps, mediacaps); - } else { - gst_dshow_free_pin_mediatype (pin_mediatype); - } - continue; - } - - /* RGB24 */ - if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_RGB24, - &rpcstatus) == 0 && rpcstatus == RPC_S_OK) - && (UuidCompare (&pin_mediatype->mediatype->formattype, - (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 - && rpcstatus == RPC_S_OK)) { - video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; - - /* ffmpegcolorspace handles RGB24 in BIG_ENDIAN */ - mediacaps = gst_caps_new_simple ("video/x-raw-rgb", - "bpp", G_TYPE_INT, 24, - "depth", G_TYPE_INT, 24, - "width", G_TYPE_INT, video_info->bmiHeader.biWidth, - "height", G_TYPE_INT, video_info->bmiHeader.biHeight, - "framerate", GST_TYPE_FRACTION, - (int) (10000000 / video_info->AvgTimePerFrame), 1, "endianness", - G_TYPE_INT, G_BIG_ENDIAN, "red_mask", G_TYPE_INT, 255, "green_mask", - G_TYPE_INT, 65280, "blue_mask", G_TYPE_INT, 16711680, NULL); - - if (mediacaps) { - src->pins_mediatypes = - g_list_append (src->pins_mediatypes, pin_mediatype); - gst_caps_append (caps, mediacaps); - } else { - gst_dshow_free_pin_mediatype (pin_mediatype); - } - continue; - } - - /* DVSD */ - if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_dvsd, - &rpcstatus) == 0 && rpcstatus == RPC_S_OK) - && (UuidCompare (&pin_mediatype->mediatype->formattype, - (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 - && rpcstatus == RPC_S_OK)) { - video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; - - mediacaps = gst_caps_new_simple ("video/x-dv", - "systemstream", G_TYPE_BOOLEAN, FALSE, - "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('d', 'v', 's', 'd'), - "framerate", GST_TYPE_FRACTION, - (int) (10000000 / video_info->AvgTimePerFrame), 1, "width", - G_TYPE_INT, video_info->bmiHeader.biWidth, "height", G_TYPE_INT, - video_info->bmiHeader.biHeight, NULL); - - if (mediacaps) { - src->pins_mediatypes = - g_list_append (src->pins_mediatypes, pin_mediatype); - gst_caps_append (caps, mediacaps); - } else { - gst_dshow_free_pin_mediatype (pin_mediatype); - } - continue; - } - - /* DV stream */ - if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_dvsd, - &rpcstatus) == 0 && rpcstatus == RPC_S_OK) - && (UuidCompare (&pin_mediatype->mediatype->formattype, - (UUID *) &FORMAT_DvInfo, &rpcstatus) == 0 && rpcstatus == RPC_S_OK)) { - - mediacaps = gst_caps_new_simple ("video/x-dv", - "systemstream", G_TYPE_BOOLEAN, TRUE, NULL); - - if (mediacaps) { - src->pins_mediatypes = - g_list_append (src->pins_mediatypes, pin_mediatype); - gst_caps_append (caps, mediacaps); - } else { - gst_dshow_free_pin_mediatype (pin_mediatype); - } - continue; - } - } else { - gst_dshow_free_pin_mediatype (pin_mediatype); - } - } - - if (caps && gst_caps_is_empty (caps)) { - gst_caps_unref (caps); - caps = NULL; - } - - return caps; -} - -static gboolean -gst_dshowvideosrc_push_buffer (byte * buffer, long size, byte * src_object, - UINT64 start, UINT64 stop) -{ - GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (src_object); - GstBuffer *buf; - IPin *pPin = NULL; - HRESULT hres = S_FALSE; - AM_MEDIA_TYPE *pMediaType = NULL; - - if (!buffer || size == 0 || !src) { - return FALSE; - } - - /* create a new buffer assign to it the clock time as timestamp */ - buf = gst_buffer_new_and_alloc (size); - - GST_BUFFER_SIZE (buf) = size; - GST_BUFFER_TIMESTAMP (buf) = gst_clock_get_time (GST_ELEMENT (src)->clock); - GST_BUFFER_TIMESTAMP (buf) -= GST_ELEMENT (src)->base_time; - GST_BUFFER_DURATION (buf) = stop - start; - - if (src->is_rgb) { - /* FOR RGB directshow decoder will return bottom-up BITMAP - * There is probably a way to get top-bottom video frames from - * the decoder... - */ - gint line = 0; - gint stride = size / src->height; - - for (; line < src->height; line++) { - memcpy (GST_BUFFER_DATA (buf) + (line * stride), - buffer + (size - ((line + 1) * (stride))), stride); - } - } else { - memcpy (GST_BUFFER_DATA (buf), buffer, size); - } - - GST_CAT_DEBUG (dshowvideosrc_debug, - "push_buffer => pts %" GST_TIME_FORMAT "duration %" GST_TIME_FORMAT, - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_TIME_ARGS (stop - start)); - - /* the negotiate() method already set caps on the source pad */ - gst_buffer_set_caps (buf, GST_PAD_CAPS (GST_BASE_SRC_PAD (src))); - - g_mutex_lock (src->buffer_mutex); - if (src->buffer != NULL) - gst_buffer_unref (src->buffer); - src->buffer = buf; - g_cond_signal (src->buffer_cond); - g_mutex_unlock (src->buffer_mutex); - - return TRUE; -} diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp new file mode 100755 index 00000000..67e70d96 --- /dev/null +++ b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp @@ -0,0 +1,1047 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshowvideosrc.c: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstdshowvideosrc.h" + +static const GstElementDetails gst_dshowvideosrc_details = +GST_ELEMENT_DETAILS ("DirectShow video capture source", + "Source/Video", + "Receive data from a directshow video capture graph", + "Sebastien Moutte "); + +GST_DEBUG_CATEGORY_STATIC (dshowvideosrc_debug); +#define GST_CAT_DEFAULT dshowvideosrc_debug + +const GUID MEDIASUBTYPE_I420 + = { 0x30323449, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, + 0x71} +}; + +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("video/x-raw-rgb," + "bpp = (int) 24," + "depth = (int) 24," + "width = (int) [ 1, MAX ]," + "height = (int) [ 1, MAX ]," + "framerate = (fraction) [ 0, MAX ];" + "video/x-dv," + "systemstream = (boolean) FALSE," + "width = (int) [ 1, MAX ]," + "height = (int) [ 1, MAX ]," + "framerate = (fraction) [ 0, MAX ]," + "format = (fourcc) dvsd;" + "video/x-dv," + "systemstream = (boolean) TRUE;" + "video/x-raw-yuv," + "width = (int) [ 1, MAX ]," + "height = (int) [ 1, MAX ]," + "framerate = (fraction) [ 0, MAX ]," "format = (fourcc) I420") + ); + +static void gst_dshowvideosrc_init_interfaces (GType type); + +GST_BOILERPLATE_FULL (GstDshowVideoSrc, gst_dshowvideosrc, GstPushSrc, + GST_TYPE_PUSH_SRC, gst_dshowvideosrc_init_interfaces); + +enum +{ + PROP_0, + PROP_DEVICE, + PROP_DEVICE_NAME +}; + +static void gst_dshowvideosrc_probe_interface_init (GstPropertyProbeInterface * + iface); +static const GList *gst_dshowvideosrc_probe_get_properties (GstPropertyProbe * + probe); +static GValueArray *gst_dshowvideosrc_probe_get_values (GstPropertyProbe * + probe, guint prop_id, const GParamSpec * pspec); +static GValueArray *gst_dshowvideosrc_get_device_name_values (GstDshowVideoSrc * + src); +static gboolean gst_dshowvideosrc_probe_needs_probe (GstPropertyProbe * probe, + guint prop_id, const GParamSpec * pspec); +static void gst_dshowvideosrc_probe_probe_property (GstPropertyProbe * probe, + guint prop_id, const GParamSpec * pspec); + + +static void gst_dshowvideosrc_dispose (GObject * gobject); +static void gst_dshowvideosrc_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_dshowvideosrc_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); +static GstCaps *gst_dshowvideosrc_get_caps (GstBaseSrc * src); +static GstStateChangeReturn gst_dshowvideosrc_change_state (GstElement * + element, GstStateChange transition); + + +static gboolean gst_dshowvideosrc_start (GstBaseSrc * bsrc); +static gboolean gst_dshowvideosrc_stop (GstBaseSrc * bsrc); +static gboolean gst_dshowvideosrc_unlock (GstBaseSrc * bsrc); +static gboolean gst_dshowvideosrc_unlock_stop (GstBaseSrc * bsrc); +static gboolean gst_dshowvideosrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps); +static GstCaps *gst_dshowvideosrc_get_caps (GstBaseSrc * bsrc); +static GstFlowReturn gst_dshowvideosrc_create (GstPushSrc * psrc, + GstBuffer ** buf); + +/*utils*/ +static GstCaps *gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * + src, IPin * pin, IAMStreamConfig * streamcaps); +static gboolean gst_dshowvideosrc_push_buffer (byte * buffer, long size, + byte * src_object, UINT64 start, UINT64 stop); + +static void +gst_dshowvideosrc_init_interfaces (GType type) +{ + static const GInterfaceInfo dshowvideosrc_info = { + (GInterfaceInitFunc) gst_dshowvideosrc_probe_interface_init, + NULL, + NULL, + }; + + g_type_add_interface_static (type, + GST_TYPE_PROPERTY_PROBE, &dshowvideosrc_info); +} + +static void +gst_dshowvideosrc_probe_interface_init (GstPropertyProbeInterface * iface) +{ + iface->get_properties = gst_dshowvideosrc_probe_get_properties; + iface->needs_probe = gst_dshowvideosrc_probe_needs_probe; + iface->probe_property = gst_dshowvideosrc_probe_probe_property; + iface->get_values = gst_dshowvideosrc_probe_get_values; +} + +static void +gst_dshowvideosrc_base_init (gpointer klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&src_template)); + + gst_element_class_set_details (element_class, &gst_dshowvideosrc_details); +} + +static void +gst_dshowvideosrc_class_init (GstDshowVideoSrcClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + GstBaseSrcClass *gstbasesrc_class; + GstPushSrcClass *gstpushsrc_class; + + gobject_class = (GObjectClass *) klass; + gstelement_class = (GstElementClass *) klass; + gstbasesrc_class = (GstBaseSrcClass *) klass; + gstpushsrc_class = (GstPushSrcClass *) klass; + + gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_dispose); + gobject_class->set_property = + GST_DEBUG_FUNCPTR (gst_dshowvideosrc_set_property); + gobject_class->get_property = + GST_DEBUG_FUNCPTR (gst_dshowvideosrc_get_property); + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_dshowvideosrc_change_state); + + gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_get_caps); + gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_set_caps); + gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_start); + gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_stop); + gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_unlock); + gstbasesrc_class->unlock_stop = + GST_DEBUG_FUNCPTR (gst_dshowvideosrc_unlock_stop); + + gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_dshowvideosrc_create); + + g_object_class_install_property + (gobject_class, PROP_DEVICE, + g_param_spec_string ("device", "Device", + "Directshow device path (@..classID/name)", NULL, + static_cast(G_PARAM_READWRITE))); + + g_object_class_install_property + (gobject_class, PROP_DEVICE_NAME, + g_param_spec_string ("device-name", "Device name", + "Human-readable name of the sound device", NULL, + static_cast(G_PARAM_READWRITE))); + + GST_DEBUG_CATEGORY_INIT (dshowvideosrc_debug, "dshowvideosrc", 0, + "Directshow video source"); + +} + +static void +gst_dshowvideosrc_init (GstDshowVideoSrc * src, GstDshowVideoSrcClass * klass) +{ + src->device = NULL; + src->device_name = NULL; + src->video_cap_filter = NULL; + src->dshow_fakesink = NULL; + src->media_filter = NULL; + src->filter_graph = NULL; + src->caps = NULL; + src->pins_mediatypes = NULL; + src->is_rgb = FALSE; + + src->buffer_cond = g_cond_new (); + src->buffer_mutex = g_mutex_new (); + src->buffer = NULL; + src->stop_requested = FALSE; + + CoInitializeEx (NULL, COINIT_MULTITHREADED); + + gst_base_src_set_live (GST_BASE_SRC (src), TRUE); +} + +static void +gst_dshowvideosrc_dispose (GObject * gobject) +{ + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (gobject); + + if (src->device) { + g_free (src->device); + src->device = NULL; + } + + if (src->device_name) { + g_free (src->device_name); + src->device_name = NULL; + } + + if (src->caps) { + gst_caps_unref (src->caps); + src->caps = NULL; + } + + if (src->pins_mediatypes) { + gst_dshow_free_pins_mediatypes (src->pins_mediatypes); + src->pins_mediatypes = NULL; + } + + /* clean dshow */ + if (src->video_cap_filter) { + src->video_cap_filter->Release(); + src->video_cap_filter = NULL; + } + + if (src->buffer_mutex) { + g_mutex_free (src->buffer_mutex); + src->buffer_mutex = NULL; + } + + if (src->buffer_cond) { + g_cond_free (src->buffer_cond); + src->buffer_cond = NULL; + } + + if (src->buffer) { + gst_buffer_unref (src->buffer); + src->buffer = NULL; + } + + CoUninitialize (); + + G_OBJECT_CLASS (parent_class)->dispose (gobject); +} + +static gboolean +gst_dshowvideosrc_probe_needs_probe (GstPropertyProbe * probe, + guint prop_id, const GParamSpec * pspec) +{ + static gboolean init = FALSE; + gboolean ret = FALSE; + + if (!init) { + ret = TRUE; + init = TRUE; + } + + return ret; +} + +static void +gst_dshowvideosrc_probe_probe_property (GstPropertyProbe * probe, + guint prop_id, const GParamSpec * pspec) +{ + GObjectClass *klass = G_OBJECT_GET_CLASS (probe); + + switch (prop_id) { + case PROP_DEVICE_NAME: + //gst_v4l_class_probe_devices (klass, FALSE); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec); + break; + } +} + +static const GList * +gst_dshowvideosrc_probe_get_properties (GstPropertyProbe * probe) +{ + GObjectClass *klass = G_OBJECT_GET_CLASS (probe); + static GList *props = NULL; + + if (!props) { + GParamSpec *pspec; + + pspec = g_object_class_find_property (klass, "device-name"); + props = g_list_append (props, pspec); + } + + return props; +} + +static GValueArray * +gst_dshowvideosrc_get_device_name_values (GstDshowVideoSrc * src) +{ + GValueArray *array = g_value_array_new (0); + GValue value = { 0 }; + ICreateDevEnum *devices_enum = NULL; + IEnumMoniker *moniker_enum = NULL; + IMoniker *moniker = NULL; + HRESULT hres = S_FALSE; + ULONG fetched; + + g_value_init (&value, G_TYPE_STRING); + + hres = CoCreateInstance (CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, + IID_ICreateDevEnum, (LPVOID *) &devices_enum); + if (hres != S_OK) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't create an instance of the system device enumerator (error=%d)", + hres); + array = NULL; + goto clean; + } + + hres = devices_enum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, + &moniker_enum, 0); + if (hres != S_OK || !moniker_enum) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't get enumeration of video devices (error=%d)", hres); + array = NULL; + goto clean; + } + + moniker_enum->Reset(); + + while (hres = moniker_enum->Next(1, &moniker, &fetched), + hres == S_OK) { + IPropertyBag *property_bag = NULL; + + hres = + moniker->BindToStorage(NULL, NULL, IID_IPropertyBag, + (LPVOID *) &property_bag); + if (SUCCEEDED (hres) && property_bag) { + VARIANT varFriendlyName; + + VariantInit (&varFriendlyName); + hres = property_bag->Read(L"FriendlyName", &varFriendlyName, NULL); + if (hres == S_OK && varFriendlyName.bstrVal) { + gchar *friendly_name = + g_utf16_to_utf8 ((const gunichar2 *) varFriendlyName.bstrVal, + wcslen (varFriendlyName.bstrVal), NULL, NULL, NULL); + + g_value_set_string (&value, friendly_name); + g_value_array_append (array, &value); + g_value_unset (&value); + g_free (friendly_name); + SysFreeString (varFriendlyName.bstrVal); + } + property_bag->Release(); + } + moniker->Release(); + } + +clean: + if (moniker_enum) + moniker_enum->Release(); + + if (devices_enum) + devices_enum->Release(); + + return array; +} + +static GValueArray * +gst_dshowvideosrc_probe_get_values (GstPropertyProbe * probe, + guint prop_id, const GParamSpec * pspec) +{ + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (probe); + GValueArray *array = NULL; + + switch (prop_id) { + case PROP_DEVICE_NAME: + array = gst_dshowvideosrc_get_device_name_values (src); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec); + break; + } + + return array; +} + +static void +gst_dshowvideosrc_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (object); + + switch (prop_id) { + case PROP_DEVICE: + { + if (src->device) { + g_free (src->device); + src->device = NULL; + } + if (g_value_get_string (value)) { + src->device = g_strdup (g_value_get_string (value)); + } + break; + } + case PROP_DEVICE_NAME: + { + if (src->device_name) { + g_free (src->device_name); + src->device_name = NULL; + } + if (g_value_get_string (value)) { + src->device_name = g_strdup (g_value_get_string (value)); + } + break; + } + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_dshowvideosrc_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + +} + +static GstCaps * +gst_dshowvideosrc_get_caps (GstBaseSrc * basesrc) +{ + HRESULT hres = S_OK; + IBindCtx *lpbc = NULL; + IMoniker *videom; + DWORD dwEaten; + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (basesrc); + gunichar2 *unidevice = NULL; + + if (src->device) { + g_free (src->device); + src->device = NULL; + } + + src->device = + gst_dshow_getdevice_from_devicename (&CLSID_VideoInputDeviceCategory, + &src->device_name); + if (!src->device) { + GST_CAT_ERROR (dshowvideosrc_debug, "No video device found."); + return NULL; + } + unidevice = + g_utf8_to_utf16 (src->device, strlen (src->device), NULL, NULL, NULL); + + if (!src->video_cap_filter) { + hres = CreateBindCtx (0, &lpbc); + if (SUCCEEDED (hres)) { + hres = MkParseDisplayName (lpbc, (LPCOLESTR) unidevice, &dwEaten, &videom); + if (SUCCEEDED (hres)) { + hres = videom->BindToObject(lpbc, NULL, IID_IBaseFilter, + (LPVOID *) &src->video_cap_filter); + videom->Release(); + } + lpbc->Release(); + } + } + + if (!src->caps) { + src->caps = gst_caps_new_empty (); + } + + if (src->video_cap_filter && gst_caps_is_empty (src->caps)) { + /* get the capture pins supported types */ + IPin *capture_pin = NULL; + IEnumPins *enumpins = NULL; + HRESULT hres; + + hres = src->video_cap_filter->EnumPins(&enumpins); + if (SUCCEEDED (hres)) { + while (enumpins->Next(1, &capture_pin, NULL) == S_OK) { + IKsPropertySet *pKs = NULL; + hres = capture_pin->QueryInterface(IID_IKsPropertySet, (LPVOID *) &pKs); + if (SUCCEEDED (hres) && pKs) { + DWORD cbReturned; + GUID pin_category; + RPC_STATUS rpcstatus; + + hres = + pKs->Get(AMPROPSETID_Pin, + AMPROPERTY_PIN_CATEGORY, NULL, 0, &pin_category, sizeof (GUID), + &cbReturned); + + /* we only want capture pins */ + if (UuidCompare (&pin_category, (UUID *) &PIN_CATEGORY_CAPTURE, + &rpcstatus) == 0) { + IAMStreamConfig *streamcaps = NULL; + + if (SUCCEEDED (capture_pin->QueryInterface( + IID_IAMStreamConfig, (LPVOID *) &streamcaps))) { + GstCaps *caps = + gst_dshowvideosrc_getcaps_from_streamcaps (src, capture_pin, + streamcaps); + + if (caps) { + gst_caps_append (src->caps, caps); + } + streamcaps->Release(); + } + } + + pKs->Release(); + } + + capture_pin->Release(); + } + enumpins->Release(); + } + } + + if (unidevice) { + g_free (unidevice); + } + + if (src->caps) { + GST_CAT_LOG (dshowvideosrc_debug, "getcaps returned %s", + gst_caps_to_string (src->caps)); + return gst_caps_ref (src->caps); + } + + return NULL; +} + +static GstStateChangeReturn +gst_dshowvideosrc_change_state (GstElement * element, GstStateChange transition) +{ + HRESULT hres = S_FALSE; + IAMVfwCaptureDialogs *dialog = NULL; + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (element); + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + if (src->media_filter) + hres = src->media_filter->Run(0); + if (hres != S_OK) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't RUN the directshow capture graph (error=%d)", hres); + return GST_STATE_CHANGE_FAILURE; + } + break; + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + if (src->media_filter) + hres = src->media_filter->Stop(); + if (hres != S_OK) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't STOP the directshow capture graph (error=%d)", hres); + return GST_STATE_CHANGE_FAILURE; + } + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + } + + return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); +} + +static gboolean +gst_dshowvideosrc_start (GstBaseSrc * bsrc) +{ + HRESULT hres = S_FALSE; + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); + + hres = CoCreateInstance (CLSID_FilterGraph, NULL, CLSCTX_INPROC, + IID_IFilterGraph, (LPVOID *) & src->filter_graph); + if (hres != S_OK || !src->filter_graph) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't create an instance of the dshow graph manager (error=%d)", hres); + goto error; + } + + hres = src->filter_graph->QueryInterface(IID_IMediaFilter, + (LPVOID *) &src->media_filter); + if (hres != S_OK || !src->media_filter) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't get IMediacontrol interface from the graph manager (error=%d)", + hres); + goto error; + } + + hres = CoCreateInstance (CLSID_DshowFakeSink, NULL, CLSCTX_INPROC, + IID_IBaseFilter, (LPVOID *) & src->dshow_fakesink); + if (hres != S_OK || !src->dshow_fakesink) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't create an instance of our dshow fakesink filter (error=0x%x)", + hres); + goto error; + } + + hres = src->filter_graph->AddFilter(src->video_cap_filter, L"capture"); + if (hres != S_OK) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't add video capture filter to the graph (error=%d)", hres); + goto error; + } + + hres = src->filter_graph->AddFilter(src->dshow_fakesink, L"sink"); + if (hres != S_OK) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't add our fakesink filter to the graph (error=%d)", hres); + goto error; + } + + return TRUE; + +error: + if (src->dshow_fakesink) { + src->dshow_fakesink->Release(); + src->dshow_fakesink = NULL; + } + + if (src->media_filter) { + src->media_filter->Release(); + src->media_filter = NULL; + } + if (src->filter_graph) { + src->filter_graph->Release(); + src->filter_graph = NULL; + } + + return FALSE; +} + +static gboolean +gst_dshowvideosrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps) +{ + HRESULT hres; + IGstDshowInterface *srcinterface = NULL; + IPin *input_pin = NULL; + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); + GstStructure *s = gst_caps_get_structure (caps, 0); + + /* search the negociated caps in our caps list to get its index and the corresponding mediatype */ + if (gst_caps_is_subset (caps, src->caps)) { + guint i = 0; + gint res = -1; + + for (; i < gst_caps_get_size (src->caps) && res == -1; i++) { + GstCaps *capstmp = gst_caps_copy_nth (src->caps, i); + + if (gst_caps_is_subset (caps, capstmp)) { + res = i; + } + gst_caps_unref (capstmp); + } + + if (res != -1 && src->pins_mediatypes) { + /* get the corresponding media type and build the dshow graph */ + GstCapturePinMediaType *pin_mediatype = NULL; + gchar *caps_string = NULL; + GList *type = g_list_nth (src->pins_mediatypes, res); + + if (type) { + pin_mediatype = (GstCapturePinMediaType *) type->data; + + hres = src->dshow_fakesink->QueryInterface( + IID_IGstDshowInterface, (LPVOID *) &srcinterface); + + if (hres != S_OK || !srcinterface) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't get IGstDshowInterface interface from our dshow fakesink filter (error=%d)", + hres); + goto error; + } + + srcinterface->gst_set_media_type(pin_mediatype->mediatype); + srcinterface->gst_set_buffer_callback( + (push_buffer_func) gst_dshowvideosrc_push_buffer, (byte *) src); + + if (srcinterface) + srcinterface->Release(); + + gst_dshow_get_pin_from_filter (src->dshow_fakesink, PINDIR_INPUT, + &input_pin); + if (!input_pin) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't get input pin from our dshow fakesink"); + goto error; + } + + hres = src->filter_graph->ConnectDirect(pin_mediatype->capture_pin, + input_pin, NULL); + input_pin->Release(); + + if (hres != S_OK) { + GST_CAT_ERROR (dshowvideosrc_debug, + "Can't connect capture filter with fakesink filter (error=%d)", + hres); + goto error; + } + + /* save width and height negociated */ + gst_structure_get_int (s, "width", &src->width); + gst_structure_get_int (s, "height", &src->height); + + src->is_rgb = FALSE; + caps_string = gst_caps_to_string (caps); + if (caps_string) { + if (strstr (caps_string, "video/x-raw-rgb")) { + src->is_rgb = TRUE; + } else { + src->is_rgb = FALSE; + } + g_free (caps_string); + } + } + } + } + + return TRUE; + +error: + if (srcinterface) + srcinterface->Release(); + + return FALSE; +} + +static gboolean +gst_dshowvideosrc_stop (GstBaseSrc * bsrc) +{ + IPin *input_pin = NULL, *output_pin = NULL; + HRESULT hres = S_FALSE; + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); + + if (!src->filter_graph) + return TRUE; + + /* disconnect filters */ + gst_dshow_get_pin_from_filter (src->video_cap_filter, PINDIR_OUTPUT, + &output_pin); + if (output_pin) { + hres = src->filter_graph->Disconnect(output_pin); + output_pin->Release(); + } + + gst_dshow_get_pin_from_filter (src->dshow_fakesink, PINDIR_INPUT, &input_pin); + if (input_pin) { + hres = src->filter_graph->Disconnect(input_pin); + input_pin->Release(); + } + + /*remove filters from the graph */ + src->filter_graph->RemoveFilter(src->video_cap_filter); + src->filter_graph->RemoveFilter(src->dshow_fakesink); + + /*release our gstreamer dshow sink */ + src->dshow_fakesink->Release(); + src->dshow_fakesink = NULL; + + /*release media filter interface */ + src->media_filter->Release(); + src->media_filter = NULL; + + /*release the filter graph manager */ + src->filter_graph->Release(); + src->filter_graph = NULL; + + return TRUE; +} + +static gboolean +gst_dshowvideosrc_unlock (GstBaseSrc * bsrc) +{ + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); + + g_mutex_lock (src->buffer_mutex); + src->stop_requested = TRUE; + g_cond_signal (src->buffer_cond); + g_mutex_unlock (src->buffer_mutex); + + return TRUE; +} + +static gboolean +gst_dshowvideosrc_unlock_stop (GstBaseSrc * bsrc) +{ + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (bsrc); + + src->stop_requested = FALSE; + + return TRUE; +} + +static GstFlowReturn +gst_dshowvideosrc_create (GstPushSrc * psrc, GstBuffer ** buf) +{ + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (psrc); + + g_mutex_lock (src->buffer_mutex); + while (src->buffer == NULL && !src->stop_requested) + g_cond_wait (src->buffer_cond, src->buffer_mutex); + *buf = src->buffer; + src->buffer = NULL; + g_mutex_unlock (src->buffer_mutex); + + if (src->stop_requested) { + if (*buf != NULL) { + gst_buffer_unref (*buf); + *buf = NULL; + } + return GST_FLOW_WRONG_STATE; + } + + GST_CAT_DEBUG (dshowvideosrc_debug, + "dshowvideosrc_create => pts %" GST_TIME_FORMAT " duration %" + GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (*buf)), + GST_TIME_ARGS (GST_BUFFER_DURATION (*buf))); + + return GST_FLOW_OK; +} + +static GstCaps * +gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * src, IPin * pin, + IAMStreamConfig * streamcaps) +{ + GstCaps *caps = NULL; + HRESULT hres = S_OK; + RPC_STATUS rpcstatus; + int icount = 0; + int isize = 0; + VIDEO_STREAM_CONFIG_CAPS vscc; + int i = 0; + + if (!streamcaps) + return NULL; + + streamcaps->GetNumberOfCapabilities(&icount, &isize); + + if (isize != sizeof (vscc)) + return NULL; + + for (; i < icount; i++) { + GstCapturePinMediaType *pin_mediatype = g_new0 (GstCapturePinMediaType, 1); + + pin->AddRef(); + pin_mediatype->capture_pin = pin; + + hres = streamcaps->GetStreamCaps(i, &pin_mediatype->mediatype, (BYTE *) & vscc); + if (hres == S_OK && pin_mediatype->mediatype) { + VIDEOINFOHEADER *video_info; + GstCaps *mediacaps = NULL; + + if (!caps) + caps = gst_caps_new_empty (); + + /* I420 */ + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_I420, + &rpcstatus) == 0 && rpcstatus == RPC_S_OK) + && (UuidCompare (&pin_mediatype->mediatype->formattype, + (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 + && rpcstatus == RPC_S_OK)) { + video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; + + mediacaps = gst_caps_new_simple ("video/x-raw-yuv", + "width", G_TYPE_INT, video_info->bmiHeader.biWidth, + "height", G_TYPE_INT, video_info->bmiHeader.biHeight, + "framerate", GST_TYPE_FRACTION, + (int) (10000000 / video_info->AvgTimePerFrame), 1, "format", + GST_TYPE_FOURCC, MAKEFOURCC ('I', '4', '2', '0'), NULL); + + if (mediacaps) { + src->pins_mediatypes = + g_list_append (src->pins_mediatypes, pin_mediatype); + gst_caps_append (caps, mediacaps); + } else { + gst_dshow_free_pin_mediatype (pin_mediatype); + } + continue; + } + + /* RGB24 */ + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_RGB24, + &rpcstatus) == 0 && rpcstatus == RPC_S_OK) + && (UuidCompare (&pin_mediatype->mediatype->formattype, + (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 + && rpcstatus == RPC_S_OK)) { + video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; + + /* ffmpegcolorspace handles RGB24 in BIG_ENDIAN */ + mediacaps = gst_caps_new_simple ("video/x-raw-rgb", + "bpp", G_TYPE_INT, 24, + "depth", G_TYPE_INT, 24, + "width", G_TYPE_INT, video_info->bmiHeader.biWidth, + "height", G_TYPE_INT, video_info->bmiHeader.biHeight, + "framerate", GST_TYPE_FRACTION, + (int) (10000000 / video_info->AvgTimePerFrame), 1, "endianness", + G_TYPE_INT, G_BIG_ENDIAN, "red_mask", G_TYPE_INT, 255, "green_mask", + G_TYPE_INT, 65280, "blue_mask", G_TYPE_INT, 16711680, NULL); + + if (mediacaps) { + src->pins_mediatypes = + g_list_append (src->pins_mediatypes, pin_mediatype); + gst_caps_append (caps, mediacaps); + } else { + gst_dshow_free_pin_mediatype (pin_mediatype); + } + continue; + } + + /* DVSD */ + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_dvsd, + &rpcstatus) == 0 && rpcstatus == RPC_S_OK) + && (UuidCompare (&pin_mediatype->mediatype->formattype, + (UUID *) &FORMAT_VideoInfo, &rpcstatus) == 0 + && rpcstatus == RPC_S_OK)) { + video_info = (VIDEOINFOHEADER *) pin_mediatype->mediatype->pbFormat; + + mediacaps = gst_caps_new_simple ("video/x-dv", + "systemstream", G_TYPE_BOOLEAN, FALSE, + "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('d', 'v', 's', 'd'), + "framerate", GST_TYPE_FRACTION, + (int) (10000000 / video_info->AvgTimePerFrame), 1, "width", + G_TYPE_INT, video_info->bmiHeader.biWidth, "height", G_TYPE_INT, + video_info->bmiHeader.biHeight, NULL); + + if (mediacaps) { + src->pins_mediatypes = + g_list_append (src->pins_mediatypes, pin_mediatype); + gst_caps_append (caps, mediacaps); + } else { + gst_dshow_free_pin_mediatype (pin_mediatype); + } + continue; + } + + /* DV stream */ + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_dvsd, + &rpcstatus) == 0 && rpcstatus == RPC_S_OK) + && (UuidCompare (&pin_mediatype->mediatype->formattype, + (UUID *) &FORMAT_DvInfo, &rpcstatus) == 0 && rpcstatus == RPC_S_OK)) { + + mediacaps = gst_caps_new_simple ("video/x-dv", + "systemstream", G_TYPE_BOOLEAN, TRUE, NULL); + + if (mediacaps) { + src->pins_mediatypes = + g_list_append (src->pins_mediatypes, pin_mediatype); + gst_caps_append (caps, mediacaps); + } else { + gst_dshow_free_pin_mediatype (pin_mediatype); + } + continue; + } + } else { + gst_dshow_free_pin_mediatype (pin_mediatype); + } + } + + if (caps && gst_caps_is_empty (caps)) { + gst_caps_unref (caps); + caps = NULL; + } + + return caps; +} + +static gboolean +gst_dshowvideosrc_push_buffer (byte * buffer, long size, byte * src_object, + UINT64 start, UINT64 stop) +{ + GstDshowVideoSrc *src = GST_DSHOWVIDEOSRC (src_object); + GstBuffer *buf; + IPin *pPin = NULL; + HRESULT hres = S_FALSE; + AM_MEDIA_TYPE *pMediaType = NULL; + + if (!buffer || size == 0 || !src) { + return FALSE; + } + + /* create a new buffer assign to it the clock time as timestamp */ + buf = gst_buffer_new_and_alloc (size); + + GST_BUFFER_SIZE (buf) = size; + GST_BUFFER_TIMESTAMP (buf) = gst_clock_get_time (GST_ELEMENT (src)->clock); + GST_BUFFER_TIMESTAMP (buf) -= GST_ELEMENT (src)->base_time; + GST_BUFFER_DURATION (buf) = stop - start; + + if (src->is_rgb) { + /* FOR RGB directshow decoder will return bottom-up BITMAP + * There is probably a way to get top-bottom video frames from + * the decoder... + */ + gint line = 0; + gint stride = size / src->height; + + for (; line < src->height; line++) { + memcpy (GST_BUFFER_DATA (buf) + (line * stride), + buffer + (size - ((line + 1) * (stride))), stride); + } + } else { + memcpy (GST_BUFFER_DATA (buf), buffer, size); + } + + GST_CAT_DEBUG (dshowvideosrc_debug, + "push_buffer => pts %" GST_TIME_FORMAT "duration %" GST_TIME_FORMAT, + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_TIME_ARGS (stop - start)); + + /* the negotiate() method already set caps on the source pad */ + gst_buffer_set_caps (buf, GST_PAD_CAPS (GST_BASE_SRC_PAD (src))); + + g_mutex_lock (src->buffer_mutex); + if (src->buffer != NULL) + gst_buffer_unref (src->buffer); + src->buffer = buf; + g_cond_signal (src->buffer_cond); + g_mutex_unlock (src->buffer_mutex); + + return TRUE; +} diff --git a/win32/vs8/libdshowsrcwrapper.vcproj b/win32/vs8/libdshowsrcwrapper.vcproj index a69db243..e42be9b2 100755 --- a/win32/vs8/libdshowsrcwrapper.vcproj +++ b/win32/vs8/libdshowsrcwrapper.vcproj @@ -236,7 +236,7 @@ > Date: Wed, 22 Jul 2009 12:24:46 +0200 Subject: dshowaudiosrc: converts code to C++ --- sys/dshowsrcwrapper/gstdshowaudiosrc.c | 881 ------------------------------- sys/dshowsrcwrapper/gstdshowaudiosrc.cpp | 859 ++++++++++++++++++++++++++++++ win32/vs8/libdshowsrcwrapper.vcproj | 2 +- 3 files changed, 860 insertions(+), 882 deletions(-) delete mode 100755 sys/dshowsrcwrapper/gstdshowaudiosrc.c create mode 100755 sys/dshowsrcwrapper/gstdshowaudiosrc.cpp diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.c b/sys/dshowsrcwrapper/gstdshowaudiosrc.c deleted file mode 100755 index dcc4e385..00000000 --- a/sys/dshowsrcwrapper/gstdshowaudiosrc.c +++ /dev/null @@ -1,881 +0,0 @@ -/* GStreamer - * Copyright (C) 2007 Sebastien Moutte - * - * gstdshowaudiosrc.c: - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gstdshowaudiosrc.h" - -static const GstElementDetails gst_dshowaudiosrc_details = -GST_ELEMENT_DETAILS ("Directshow audio capture source", - "Source/Audio", - "Receive data from a directshow audio capture graph", - "Sebastien Moutte "); - -GST_DEBUG_CATEGORY_STATIC (dshowaudiosrc_debug); -#define GST_CAT_DEFAULT dshowaudiosrc_debug - -static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-raw-int, " - "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, " - "signed = (boolean) { TRUE, FALSE }, " - "width = (int) 16, " - "depth = (int) 16, " - "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]; " - "audio/x-raw-int, " - "signed = (boolean) { TRUE, FALSE }, " - "width = (int) 8, " - "depth = (int) 8, " - "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]") - ); - -static void gst_dshowaudiosrc_init_interfaces (GType type); - -GST_BOILERPLATE_FULL (GstDshowAudioSrc, gst_dshowaudiosrc, GstAudioSrc, - GST_TYPE_AUDIO_SRC, gst_dshowaudiosrc_init_interfaces); - -enum -{ - PROP_0, - PROP_DEVICE, - PROP_DEVICE_NAME -}; - -static void gst_dshowaudiosrc_probe_interface_init (GstPropertyProbeInterface * - iface); -static const GList *gst_dshowaudiosrc_probe_get_properties (GstPropertyProbe * - probe); -static GValueArray *gst_dshowaudiosrc_probe_get_values (GstPropertyProbe * - probe, guint prop_id, const GParamSpec * pspec); -static GValueArray *gst_dshowaudiosrc_get_device_name_values (GstDshowAudioSrc * - src); - - -static void gst_dshowaudiosrc_dispose (GObject * gobject); -static void gst_dshowaudiosrc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_dshowaudiosrc_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); -static GstCaps *gst_dshowaudiosrc_get_caps (GstBaseSrc * src); -static GstStateChangeReturn gst_dshowaudiosrc_change_state (GstElement * - element, GstStateChange transition); - -static gboolean gst_dshowaudiosrc_open (GstAudioSrc * asrc); -static gboolean gst_dshowaudiosrc_prepare (GstAudioSrc * asrc, - GstRingBufferSpec * spec); -static gboolean gst_dshowaudiosrc_unprepare (GstAudioSrc * asrc); -static gboolean gst_dshowaudiosrc_close (GstAudioSrc * asrc); -static guint gst_dshowaudiosrc_read (GstAudioSrc * asrc, gpointer data, - guint length); -static guint gst_dshowaudiosrc_delay (GstAudioSrc * asrc); -static void gst_dshowaudiosrc_reset (GstAudioSrc * asrc); - -/* utils */ -static GstCaps *gst_dshowaudiosrc_getcaps_from_streamcaps (GstDshowAudioSrc * - src, IPin * pin, IAMStreamConfig * streamcaps); -static gboolean gst_dshowaudiosrc_push_buffer (byte * buffer, long size, - byte * src_object, UINT64 start, UINT64 stop); - -static void -gst_dshowaudiosrc_init_interfaces (GType type) -{ - static const GInterfaceInfo dshowaudiosrc_info = { - (GInterfaceInitFunc) gst_dshowaudiosrc_probe_interface_init, - NULL, - NULL, - }; - - g_type_add_interface_static (type, - GST_TYPE_PROPERTY_PROBE, &dshowaudiosrc_info); -} - -static void -gst_dshowaudiosrc_probe_interface_init (GstPropertyProbeInterface * iface) -{ - iface->get_properties = gst_dshowaudiosrc_probe_get_properties; -/* iface->needs_probe = gst_dshowaudiosrc_probe_needs_probe; - iface->probe_property = gst_dshowaudiosrc_probe_probe_property;*/ - iface->get_values = gst_dshowaudiosrc_probe_get_values; -} - -static void -gst_dshowaudiosrc_base_init (gpointer klass) -{ - GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_template)); - - gst_element_class_set_details (element_class, &gst_dshowaudiosrc_details); -} - -static void -gst_dshowaudiosrc_class_init (GstDshowAudioSrcClass * klass) -{ - GObjectClass *gobject_class; - GstElementClass *gstelement_class; - GstBaseSrcClass *gstbasesrc_class; - GstAudioSrcClass *gstaudiosrc_class; - - gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; - gstbasesrc_class = (GstBaseSrcClass *) klass; - gstaudiosrc_class = (GstAudioSrcClass *) klass; - - gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_dispose); - gobject_class->set_property = - GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_set_property); - gobject_class->get_property = - GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_get_property); - - gstelement_class->change_state = - GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_change_state); - - gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_get_caps); - - gstaudiosrc_class->open = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_open); - gstaudiosrc_class->prepare = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_prepare); - gstaudiosrc_class->unprepare = - GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_unprepare); - gstaudiosrc_class->close = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_close); - gstaudiosrc_class->read = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_read); - gstaudiosrc_class->delay = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_delay); - gstaudiosrc_class->reset = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_reset); - - g_object_class_install_property - (gobject_class, PROP_DEVICE, - g_param_spec_string ("device", "Device", - "Directshow device reference (classID/name)", - NULL, G_PARAM_READWRITE)); - - g_object_class_install_property - (gobject_class, PROP_DEVICE_NAME, - g_param_spec_string ("device-name", "Device name", - "Human-readable name of the sound device", NULL, G_PARAM_READWRITE)); - - GST_DEBUG_CATEGORY_INIT (dshowaudiosrc_debug, "dshowaudiosrc", 0, - "Directshow audio source"); -} - -static void -gst_dshowaudiosrc_init (GstDshowAudioSrc * src, GstDshowAudioSrcClass * klass) -{ - src->device = NULL; - src->device_name = NULL; - src->audio_cap_filter = NULL; - src->dshow_fakesink = NULL; - src->media_filter = NULL; - src->filter_graph = NULL; - src->caps = NULL; - src->pins_mediatypes = NULL; - - src->gbarray = g_byte_array_new (); - src->gbarray_lock = g_mutex_new (); - - src->is_running = FALSE; - - CoInitializeEx (NULL, COINIT_MULTITHREADED); -} - -static void -gst_dshowaudiosrc_dispose (GObject * gobject) -{ - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (gobject); - - if (src->device) { - g_free (src->device); - src->device = NULL; - } - - if (src->device_name) { - g_free (src->device_name); - src->device_name = NULL; - } - - if (src->caps) { - gst_caps_unref (src->caps); - src->caps = NULL; - } - - if (src->pins_mediatypes) { - gst_dshow_free_pins_mediatypes (src->pins_mediatypes); - src->pins_mediatypes = NULL; - } - - if (src->gbarray) { - g_byte_array_free (src->gbarray, TRUE); - src->gbarray = NULL; - } - - if (src->gbarray_lock) { - g_mutex_free (src->gbarray_lock); - src->gbarray_lock = NULL; - } - - /* clean dshow */ - if (src->audio_cap_filter) { - IBaseFilter_Release (src->audio_cap_filter); - } - - CoUninitialize (); - - G_OBJECT_CLASS (parent_class)->dispose (gobject); -} - - -static const GList * -gst_dshowaudiosrc_probe_get_properties (GstPropertyProbe * probe) -{ - GObjectClass *klass = G_OBJECT_GET_CLASS (probe); - static GList *props = NULL; - - if (!props) { - GParamSpec *pspec; - - pspec = g_object_class_find_property (klass, "device-name"); - props = g_list_append (props, pspec); - } - - return props; -} - -static GValueArray * -gst_dshowaudiosrc_get_device_name_values (GstDshowAudioSrc * src) -{ - GValueArray *array = g_value_array_new (0); - GValue value = { 0 }; - ICreateDevEnum *devices_enum = NULL; - IEnumMoniker *moniker_enum = NULL; - IMoniker *moniker = NULL; - HRESULT hres = S_FALSE; - ULONG fetched; - - g_value_init (&value, G_TYPE_STRING); - - hres = CoCreateInstance (&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, - &IID_ICreateDevEnum, (void **) &devices_enum); - if (hres != S_OK) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't create an instance of the system device enumerator (error=%d)", - hres); - array = NULL; - goto clean; - } - - hres = - ICreateDevEnum_CreateClassEnumerator (devices_enum, - &CLSID_AudioInputDeviceCategory, &moniker_enum, 0); - if (hres != S_OK || !moniker_enum) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't get enumeration of audio devices (error=%d)", hres); - array = NULL; - goto clean; - } - - IEnumMoniker_Reset (moniker_enum); - - while (hres = IEnumMoniker_Next (moniker_enum, 1, &moniker, &fetched), - hres == S_OK) { - IPropertyBag *property_bag = NULL; - - hres = - IMoniker_BindToStorage (moniker, NULL, NULL, &IID_IPropertyBag, - (void **) &property_bag); - if (SUCCEEDED (hres) && property_bag) { - VARIANT varFriendlyName; - - VariantInit (&varFriendlyName); - hres = - IPropertyBag_Read (property_bag, L"FriendlyName", &varFriendlyName, - NULL); - if (hres == S_OK && varFriendlyName.bstrVal) { - gchar *friendly_name = - g_utf16_to_utf8 ((const gunichar2 *) varFriendlyName.bstrVal, - wcslen (varFriendlyName.bstrVal), NULL, NULL, NULL); - - g_value_set_string (&value, friendly_name); - g_value_array_append (array, &value); - g_value_unset (&value); - g_free (friendly_name); - SysFreeString (varFriendlyName.bstrVal); - } - IPropertyBag_Release (property_bag); - } - IMoniker_Release (moniker); - } - -clean: - if (moniker_enum) { - IEnumMoniker_Release (moniker_enum); - } - - if (devices_enum) { - ICreateDevEnum_Release (devices_enum); - } - - return array; -} - -static GValueArray * -gst_dshowaudiosrc_probe_get_values (GstPropertyProbe * probe, - guint prop_id, const GParamSpec * pspec) -{ - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (probe); - GValueArray *array = NULL; - - switch (prop_id) { - case PROP_DEVICE_NAME: - array = gst_dshowaudiosrc_get_device_name_values (src); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec); - break; - } - - return array; -} - -static void -gst_dshowaudiosrc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (object); - - switch (prop_id) { - case PROP_DEVICE: - { - if (src->device) { - g_free (src->device); - src->device = NULL; - } - if (g_value_get_string (value)) { - src->device = g_strdup (g_value_get_string (value)); - } - break; - } - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_dshowaudiosrc_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - -} - -static GstCaps * -gst_dshowaudiosrc_get_caps (GstBaseSrc * basesrc) -{ - HRESULT hres = S_OK; - IBindCtx *lpbc = NULL; - IMoniker *audiom = NULL; - DWORD dwEaten; - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (basesrc); - gunichar2 *unidevice = NULL; - - if (src->device) { - g_free (src->device); - src->device = NULL; - } - - src->device = - gst_dshow_getdevice_from_devicename (&CLSID_AudioInputDeviceCategory, - &src->device_name); - if (!src->device) { - GST_CAT_ERROR (dshowaudiosrc_debug, "No audio device found."); - return NULL; - } - unidevice = - g_utf8_to_utf16 (src->device, strlen (src->device), NULL, NULL, NULL); - - if (!src->audio_cap_filter) { - hres = CreateBindCtx (0, &lpbc); - if (SUCCEEDED (hres)) { - hres = MkParseDisplayName (lpbc, unidevice, &dwEaten, &audiom); - if (SUCCEEDED (hres)) { - hres = - IMoniker_BindToObject (audiom, lpbc, NULL, &IID_IBaseFilter, - &src->audio_cap_filter); - IMoniker_Release (audiom); - } - IBindCtx_Release (lpbc); - } - } - - if (src->audio_cap_filter && !src->caps) { - /* get the capture pins supported types */ - IPin *capture_pin = NULL; - IEnumPins *enumpins = NULL; - HRESULT hres; - - hres = IBaseFilter_EnumPins (src->audio_cap_filter, &enumpins); - if (SUCCEEDED (hres)) { - while (IEnumPins_Next (enumpins, 1, &capture_pin, NULL) == S_OK) { - IKsPropertySet *pKs = NULL; - - hres = - IPin_QueryInterface (capture_pin, &IID_IKsPropertySet, - (void **) &pKs); - if (SUCCEEDED (hres) && pKs) { - DWORD cbReturned; - GUID pin_category; - RPC_STATUS rpcstatus; - - hres = - IKsPropertySet_Get (pKs, &ROPSETID_Pin, - AMPROPERTY_PIN_CATEGORY, NULL, 0, &pin_category, sizeof (GUID), - &cbReturned); - - /* we only want capture pins */ - if (UuidCompare (&pin_category, (UUID *) &PIN_CATEGORY_CAPTURE, - &rpcstatus) == 0) { - IAMStreamConfig *streamcaps = NULL; - - if (SUCCEEDED (IPin_QueryInterface (capture_pin, - &IID_IAMStreamConfig, (void **) &streamcaps))) { - src->caps = - gst_dshowaudiosrc_getcaps_from_streamcaps (src, capture_pin, - streamcaps); - IAMStreamConfig_Release (streamcaps); - } - } - IKsPropertySet_Release (pKs); - } - IPin_Release (capture_pin); - } - IEnumPins_Release (enumpins); - } - } - - if (unidevice) { - g_free (unidevice); - } - - if (src->caps) { - return gst_caps_ref (src->caps); - } - - return NULL; -} - -static GstStateChangeReturn -gst_dshowaudiosrc_change_state (GstElement * element, GstStateChange transition) -{ - HRESULT hres = S_FALSE; - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (element); - - switch (transition) { - case GST_STATE_CHANGE_NULL_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_PAUSED: - break; - case GST_STATE_CHANGE_PAUSED_TO_PLAYING: - if (src->media_filter) - hres = IMediaFilter_Run (src->media_filter, 0); - if (hres != S_OK) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't RUN the directshow capture graph (error=%d)", hres); - src->is_running = FALSE; - return GST_STATE_CHANGE_FAILURE; - } else { - src->is_running = TRUE; - } - break; - case GST_STATE_CHANGE_PLAYING_TO_PAUSED: - if (src->media_filter) - hres = IMediaFilter_Stop (src->media_filter); - if (hres != S_OK) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't STOP the directshow capture graph (error=%d)", hres); - return GST_STATE_CHANGE_FAILURE; - } - src->is_running = FALSE; - - break; - case GST_STATE_CHANGE_PAUSED_TO_READY: - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - default: - break; - } - - return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); -} - -static gboolean -gst_dshowaudiosrc_open (GstAudioSrc * asrc) -{ - HRESULT hres = S_FALSE; - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); - - hres = CoCreateInstance (&CLSID_FilterGraph, NULL, CLSCTX_INPROC, - &IID_IFilterGraph, (LPVOID *) & src->filter_graph); - if (hres != S_OK || !src->filter_graph) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't create an instance of the directshow graph manager (error=%d)", - hres); - goto error; - } - - hres = IFilterGraph_QueryInterface (src->filter_graph, &IID_IMediaFilter, - (void **) &src->media_filter); - if (hres != S_OK || !src->media_filter) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't get IMediacontrol interface from the graph manager (error=%d)", - hres); - goto error; - } - - hres = CoCreateInstance (&CLSID_DshowFakeSink, NULL, CLSCTX_INPROC, - &IID_IBaseFilter, (LPVOID *) & src->dshow_fakesink); - if (hres != S_OK || !src->dshow_fakesink) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't create an instance of the directshow fakesink (error=%d)", hres); - goto error; - } - - hres = - IFilterGraph_AddFilter (src->filter_graph, src->audio_cap_filter, - L"capture"); - if (hres != S_OK) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't add the directshow capture filter to the graph (error=%d)", - hres); - goto error; - } - - hres = - IFilterGraph_AddFilter (src->filter_graph, src->dshow_fakesink, - L"fakesink"); - if (hres != S_OK) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't add our fakesink filter to the graph (error=%d)", hres); - goto error; - } - - return TRUE; - -error: - if (src->dshow_fakesink) { - IBaseFilter_Release (src->dshow_fakesink); - src->dshow_fakesink = NULL; - } - - if (src->media_filter) { - IMediaFilter_Release (src->media_filter); - src->media_filter = NULL; - } - if (src->filter_graph) { - IFilterGraph_Release (src->filter_graph); - src->filter_graph = NULL; - } - - return FALSE; -} - -static gboolean -gst_dshowaudiosrc_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec) -{ - HRESULT hres; - IGstDshowInterface *srcinterface = NULL; - IPin *input_pin = NULL; - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); - - /* search the negociated caps in our caps list to get its index and the corresponding mediatype */ - if (gst_caps_is_subset (spec->caps, src->caps)) { - guint i = 0; - gint res = -1; - - for (; i < gst_caps_get_size (src->caps) && res == -1; i++) { - GstCaps *capstmp = gst_caps_copy_nth (src->caps, i); - - if (gst_caps_is_subset (spec->caps, capstmp)) { - res = i; - } - gst_caps_unref (capstmp); - } - - if (res != -1 && src->pins_mediatypes) { - /*get the corresponding media type and build the dshow graph */ - GstCapturePinMediaType *pin_mediatype = NULL; - GList *type = g_list_nth (src->pins_mediatypes, res); - - if (type) { - pin_mediatype = (GstCapturePinMediaType *) type->data; - - hres = - IBaseFilter_QueryInterface (src->dshow_fakesink, - &IID_IGstDshowInterface, (void **) &srcinterface); - if (hres != S_OK || !srcinterface) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't get IGstDshowInterface interface from our dshow fakesink filter (error=%d)", - hres); - goto error; - } - - IGstDshowInterface_gst_set_media_type (srcinterface, - pin_mediatype->mediatype); - IGstDshowInterface_gst_set_buffer_callback (srcinterface, - (byte *) gst_dshowaudiosrc_push_buffer, (byte *) src); - - if (srcinterface) { - IGstDshowInterface_Release (srcinterface); - } - - gst_dshow_get_pin_from_filter (src->dshow_fakesink, PINDIR_INPUT, - &input_pin); - if (!input_pin) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't get input pin from our directshow fakesink filter"); - goto error; - } - - hres = - IFilterGraph_ConnectDirect (src->filter_graph, - pin_mediatype->capture_pin, input_pin, NULL); - IPin_Release (input_pin); - - if (hres != S_OK) { - GST_CAT_ERROR (dshowaudiosrc_debug, - "Can't connect capture filter with fakesink filter (error=%d)", - hres); - goto error; - } - - spec->segsize = spec->rate * spec->channels; - spec->segtotal = 1; - } - } - } - - return TRUE; - -error: - if (srcinterface) { - IGstDshowInterface_Release (srcinterface); - } - - return FALSE; -} - -static gboolean -gst_dshowaudiosrc_unprepare (GstAudioSrc * asrc) -{ - IPin *input_pin = NULL, *output_pin = NULL; - HRESULT hres = S_FALSE; - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); - - /* disconnect filters */ - gst_dshow_get_pin_from_filter (src->audio_cap_filter, PINDIR_OUTPUT, - &output_pin); - if (output_pin) { - hres = IFilterGraph_Disconnect (src->filter_graph, output_pin); - IPin_Release (output_pin); - } - - gst_dshow_get_pin_from_filter (src->dshow_fakesink, PINDIR_INPUT, &input_pin); - if (input_pin) { - hres = IFilterGraph_Disconnect (src->filter_graph, input_pin); - IPin_Release (input_pin); - } - - return TRUE; -} - -static gboolean -gst_dshowaudiosrc_close (GstAudioSrc * asrc) -{ - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); - - if (!src->filter_graph) - return TRUE; - - /*remove filters from the graph */ - IFilterGraph_RemoveFilter (src->filter_graph, src->audio_cap_filter); - IFilterGraph_RemoveFilter (src->filter_graph, src->dshow_fakesink); - - /*release our gstreamer dshow sink */ - IBaseFilter_Release (src->dshow_fakesink); - src->dshow_fakesink = NULL; - - /*release media filter interface */ - IMediaFilter_Release (src->media_filter); - src->media_filter = NULL; - - /*release the filter graph manager */ - IFilterGraph_Release (src->filter_graph); - src->filter_graph = NULL; - - return TRUE; -} - -static guint -gst_dshowaudiosrc_read (GstAudioSrc * asrc, gpointer data, guint length) -{ - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); - guint ret = 0; - - if (!src->is_running) - return -1; - - if (src->gbarray) { - test: - if (src->gbarray->len >= length) { - g_mutex_lock (src->gbarray_lock); - memcpy (data, src->gbarray->data + (src->gbarray->len - length), length); - g_byte_array_remove_range (src->gbarray, src->gbarray->len - length, - length); - ret = length; - g_mutex_unlock (src->gbarray_lock); - } else { - if (src->is_running) { - Sleep (100); - goto test; - } - } - } - - return ret; -} - -static guint -gst_dshowaudiosrc_delay (GstAudioSrc * asrc) -{ - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); - guint ret = 0; - - if (src->gbarray) { - g_mutex_lock (src->gbarray_lock); - if (src->gbarray->len) { - ret = src->gbarray->len / 4; - } - g_mutex_unlock (src->gbarray_lock); - } - - return ret; -} - -static void -gst_dshowaudiosrc_reset (GstAudioSrc * asrc) -{ - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); - - g_mutex_lock (src->gbarray_lock); - g_byte_array_remove_range (src->gbarray, 0, src->gbarray->len); - g_mutex_unlock (src->gbarray_lock); -} - -static GstCaps * -gst_dshowaudiosrc_getcaps_from_streamcaps (GstDshowAudioSrc * src, IPin * pin, - IAMStreamConfig * streamcaps) -{ - GstCaps *caps = NULL; - HRESULT hres = S_OK; - RPC_STATUS rpcstatus; - int icount = 0; - int isize = 0; - AUDIO_STREAM_CONFIG_CAPS ascc; - int i = 0; - - if (!streamcaps) - return NULL; - - IAMStreamConfig_GetNumberOfCapabilities (streamcaps, &icount, &isize); - - if (isize != sizeof (ascc)) - return NULL; - - for (; i < icount; i++) { - GstCapturePinMediaType *pin_mediatype = g_new0 (GstCapturePinMediaType, 1); - - IPin_AddRef (pin); - pin_mediatype->capture_pin = pin; - - hres = - IAMStreamConfig_GetStreamCaps (streamcaps, i, &pin_mediatype->mediatype, - (BYTE *) & ascc); - if (hres == S_OK && pin_mediatype->mediatype) { - GstCaps *mediacaps = NULL; - - if (!caps) - caps = gst_caps_new_empty (); - - if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_PCM, - &rpcstatus) == 0 && rpcstatus == RPC_S_OK) - && (UuidCompare (&pin_mediatype->mediatype->formattype, - (UUID *) &FORMAT_WaveFormatEx, &rpcstatus) == 0 - && rpcstatus == RPC_S_OK)) { - WAVEFORMATEX *wavformat = - (WAVEFORMATEX *) pin_mediatype->mediatype->pbFormat; - mediacaps = - gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, - wavformat->wBitsPerSample, "depth", G_TYPE_INT, - wavformat->wBitsPerSample, "endianness", G_TYPE_INT, G_BYTE_ORDER, - "signed", G_TYPE_BOOLEAN, TRUE, "channels", G_TYPE_INT, - wavformat->nChannels, "rate", G_TYPE_INT, wavformat->nSamplesPerSec, - NULL); - - if (mediacaps) { - src->pins_mediatypes = - g_list_append (src->pins_mediatypes, pin_mediatype); - gst_caps_append (caps, mediacaps); - } else { - gst_dshow_free_pin_mediatype (pin_mediatype); - } - } else { - gst_dshow_free_pin_mediatype (pin_mediatype); - } - } else { - gst_dshow_free_pin_mediatype (pin_mediatype); - } - } - - if (caps && gst_caps_is_empty (caps)) { - gst_caps_unref (caps); - caps = NULL; - } - - return caps; -} - -static gboolean -gst_dshowaudiosrc_push_buffer (byte * buffer, long size, byte * src_object, - UINT64 start, UINT64 stop) -{ - GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (src_object); - - if (!buffer || size == 0 || !src) { - return FALSE; - } - - g_mutex_lock (src->gbarray_lock); - g_byte_array_prepend (src->gbarray, (guint8 *) buffer, size); - g_mutex_unlock (src->gbarray_lock); - - return TRUE; -} diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp new file mode 100755 index 00000000..8961c96d --- /dev/null +++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp @@ -0,0 +1,859 @@ +/* GStreamer + * Copyright (C) 2007 Sebastien Moutte + * + * gstdshowaudiosrc.c: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gstdshowaudiosrc.h" + +static const GstElementDetails gst_dshowaudiosrc_details = +GST_ELEMENT_DETAILS ("Directshow audio capture source", + "Source/Audio", + "Receive data from a directshow audio capture graph", + "Sebastien Moutte "); + +GST_DEBUG_CATEGORY_STATIC (dshowaudiosrc_debug); +#define GST_CAT_DEFAULT dshowaudiosrc_debug + +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("audio/x-raw-int, " + "endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, " + "signed = (boolean) { TRUE, FALSE }, " + "width = (int) 16, " + "depth = (int) 16, " + "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]; " + "audio/x-raw-int, " + "signed = (boolean) { TRUE, FALSE }, " + "width = (int) 8, " + "depth = (int) 8, " + "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]") + ); + +static void gst_dshowaudiosrc_init_interfaces (GType type); + +GST_BOILERPLATE_FULL (GstDshowAudioSrc, gst_dshowaudiosrc, GstAudioSrc, + GST_TYPE_AUDIO_SRC, gst_dshowaudiosrc_init_interfaces); + +enum +{ + PROP_0, + PROP_DEVICE, + PROP_DEVICE_NAME +}; + +static void gst_dshowaudiosrc_probe_interface_init (GstPropertyProbeInterface * + iface); +static const GList *gst_dshowaudiosrc_probe_get_properties (GstPropertyProbe * + probe); +static GValueArray *gst_dshowaudiosrc_probe_get_values (GstPropertyProbe * + probe, guint prop_id, const GParamSpec * pspec); +static GValueArray *gst_dshowaudiosrc_get_device_name_values (GstDshowAudioSrc * + src); + + +static void gst_dshowaudiosrc_dispose (GObject * gobject); +static void gst_dshowaudiosrc_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_dshowaudiosrc_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); +static GstCaps *gst_dshowaudiosrc_get_caps (GstBaseSrc * src); +static GstStateChangeReturn gst_dshowaudiosrc_change_state (GstElement * + element, GstStateChange transition); + +static gboolean gst_dshowaudiosrc_open (GstAudioSrc * asrc); +static gboolean gst_dshowaudiosrc_prepare (GstAudioSrc * asrc, + GstRingBufferSpec * spec); +static gboolean gst_dshowaudiosrc_unprepare (GstAudioSrc * asrc); +static gboolean gst_dshowaudiosrc_close (GstAudioSrc * asrc); +static guint gst_dshowaudiosrc_read (GstAudioSrc * asrc, gpointer data, + guint length); +static guint gst_dshowaudiosrc_delay (GstAudioSrc * asrc); +static void gst_dshowaudiosrc_reset (GstAudioSrc * asrc); + +/* utils */ +static GstCaps *gst_dshowaudiosrc_getcaps_from_streamcaps (GstDshowAudioSrc * + src, IPin * pin, IAMStreamConfig * streamcaps); +static gboolean gst_dshowaudiosrc_push_buffer (byte * buffer, long size, + byte * src_object, UINT64 start, UINT64 stop); + +static void +gst_dshowaudiosrc_init_interfaces (GType type) +{ + static const GInterfaceInfo dshowaudiosrc_info = { + (GInterfaceInitFunc) gst_dshowaudiosrc_probe_interface_init, + NULL, + NULL, + }; + + g_type_add_interface_static (type, + GST_TYPE_PROPERTY_PROBE, &dshowaudiosrc_info); +} + +static void +gst_dshowaudiosrc_probe_interface_init (GstPropertyProbeInterface * iface) +{ + iface->get_properties = gst_dshowaudiosrc_probe_get_properties; +/* iface->needs_probe = gst_dshowaudiosrc_probe_needs_probe; + iface->probe_property = gst_dshowaudiosrc_probe_probe_property;*/ + iface->get_values = gst_dshowaudiosrc_probe_get_values; +} + +static void +gst_dshowaudiosrc_base_init (gpointer klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&src_template)); + + gst_element_class_set_details (element_class, &gst_dshowaudiosrc_details); +} + +static void +gst_dshowaudiosrc_class_init (GstDshowAudioSrcClass * klass) +{ + GObjectClass *gobject_class; + GstElementClass *gstelement_class; + GstBaseSrcClass *gstbasesrc_class; + GstAudioSrcClass *gstaudiosrc_class; + + gobject_class = (GObjectClass *) klass; + gstelement_class = (GstElementClass *) klass; + gstbasesrc_class = (GstBaseSrcClass *) klass; + gstaudiosrc_class = (GstAudioSrcClass *) klass; + + gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_dispose); + gobject_class->set_property = + GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_set_property); + gobject_class->get_property = + GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_get_property); + + gstelement_class->change_state = + GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_change_state); + + gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_get_caps); + + gstaudiosrc_class->open = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_open); + gstaudiosrc_class->prepare = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_prepare); + gstaudiosrc_class->unprepare = + GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_unprepare); + gstaudiosrc_class->close = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_close); + gstaudiosrc_class->read = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_read); + gstaudiosrc_class->delay = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_delay); + gstaudiosrc_class->reset = GST_DEBUG_FUNCPTR (gst_dshowaudiosrc_reset); + + g_object_class_install_property + (gobject_class, PROP_DEVICE, + g_param_spec_string ("device", "Device", + "Directshow device reference (classID/name)", NULL, + static_cast(G_PARAM_READWRITE))); + + g_object_class_install_property + (gobject_class, PROP_DEVICE_NAME, + g_param_spec_string ("device-name", "Device name", + "Human-readable name of the sound device", NULL, + static_cast(G_PARAM_READWRITE))); + + GST_DEBUG_CATEGORY_INIT (dshowaudiosrc_debug, "dshowaudiosrc", 0, + "Directshow audio source"); +} + +static void +gst_dshowaudiosrc_init (GstDshowAudioSrc * src, GstDshowAudioSrcClass * klass) +{ + src->device = NULL; + src->device_name = NULL; + src->audio_cap_filter = NULL; + src->dshow_fakesink = NULL; + src->media_filter = NULL; + src->filter_graph = NULL; + src->caps = NULL; + src->pins_mediatypes = NULL; + + src->gbarray = g_byte_array_new (); + src->gbarray_lock = g_mutex_new (); + + src->is_running = FALSE; + + CoInitializeEx (NULL, COINIT_MULTITHREADED); +} + +static void +gst_dshowaudiosrc_dispose (GObject * gobject) +{ + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (gobject); + + if (src->device) { + g_free (src->device); + src->device = NULL; + } + + if (src->device_name) { + g_free (src->device_name); + src->device_name = NULL; + } + + if (src->caps) { + gst_caps_unref (src->caps); + src->caps = NULL; + } + + if (src->pins_mediatypes) { + gst_dshow_free_pins_mediatypes (src->pins_mediatypes); + src->pins_mediatypes = NULL; + } + + if (src->gbarray) { + g_byte_array_free (src->gbarray, TRUE); + src->gbarray = NULL; + } + + if (src->gbarray_lock) { + g_mutex_free (src->gbarray_lock); + src->gbarray_lock = NULL; + } + + /* clean dshow */ + if (src->audio_cap_filter) + src->audio_cap_filter->Release(); + + CoUninitialize (); + + G_OBJECT_CLASS (parent_class)->dispose (gobject); +} + + +static const GList * +gst_dshowaudiosrc_probe_get_properties (GstPropertyProbe * probe) +{ + GObjectClass *klass = G_OBJECT_GET_CLASS (probe); + static GList *props = NULL; + + if (!props) { + GParamSpec *pspec; + + pspec = g_object_class_find_property (klass, "device-name"); + props = g_list_append (props, pspec); + } + + return props; +} + +static GValueArray * +gst_dshowaudiosrc_get_device_name_values (GstDshowAudioSrc * src) +{ + GValueArray *array = g_value_array_new (0); + GValue value = { 0 }; + ICreateDevEnum *devices_enum = NULL; + IEnumMoniker *moniker_enum = NULL; + IMoniker *moniker = NULL; + HRESULT hres = S_FALSE; + ULONG fetched; + + g_value_init (&value, G_TYPE_STRING); + + hres = CoCreateInstance (CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, + IID_ICreateDevEnum, (LPVOID *) &devices_enum); + if (hres != S_OK) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't create an instance of the system device enumerator (error=%d)", + hres); + array = NULL; + goto clean; + } + + hres = devices_enum->CreateClassEnumerator(CLSID_AudioInputDeviceCategory, + &moniker_enum, 0); + if (hres != S_OK || !moniker_enum) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't get enumeration of audio devices (error=%d)", hres); + array = NULL; + goto clean; + } + + moniker_enum->Reset(); + + while (hres = moniker_enum->Next(1, &moniker, &fetched), + hres == S_OK) { + IPropertyBag *property_bag = NULL; + + hres = moniker->BindToStorage(NULL, NULL, IID_IPropertyBag, + (LPVOID *) &property_bag); + if (SUCCEEDED (hres) && property_bag) { + VARIANT varFriendlyName; + + VariantInit (&varFriendlyName); + hres = property_bag->Read(L"FriendlyName", &varFriendlyName, NULL); + if (hres == S_OK && varFriendlyName.bstrVal) { + gchar *friendly_name = + g_utf16_to_utf8 ((const gunichar2 *) varFriendlyName.bstrVal, + wcslen (varFriendlyName.bstrVal), NULL, NULL, NULL); + + g_value_set_string (&value, friendly_name); + g_value_array_append (array, &value); + g_value_unset (&value); + g_free (friendly_name); + SysFreeString (varFriendlyName.bstrVal); + } + property_bag->Release(); + } + moniker->Release(); + } + +clean: + if (moniker_enum) + moniker_enum->Release(); + + if (devices_enum) + devices_enum->Release(); + + return array; +} + +static GValueArray * +gst_dshowaudiosrc_probe_get_values (GstPropertyProbe * probe, + guint prop_id, const GParamSpec * pspec) +{ + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (probe); + GValueArray *array = NULL; + + switch (prop_id) { + case PROP_DEVICE_NAME: + array = gst_dshowaudiosrc_get_device_name_values (src); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (probe, prop_id, pspec); + break; + } + + return array; +} + +static void +gst_dshowaudiosrc_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (object); + + switch (prop_id) { + case PROP_DEVICE: + { + if (src->device) { + g_free (src->device); + src->device = NULL; + } + if (g_value_get_string (value)) { + src->device = g_strdup (g_value_get_string (value)); + } + break; + } + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_dshowaudiosrc_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) +{ + +} + +static GstCaps * +gst_dshowaudiosrc_get_caps (GstBaseSrc * basesrc) +{ + HRESULT hres = S_OK; + IBindCtx *lpbc = NULL; + IMoniker *audiom = NULL; + DWORD dwEaten; + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (basesrc); + gunichar2 *unidevice = NULL; + + if (src->device) { + g_free (src->device); + src->device = NULL; + } + + src->device = + gst_dshow_getdevice_from_devicename (&CLSID_AudioInputDeviceCategory, + &src->device_name); + if (!src->device) { + GST_CAT_ERROR (dshowaudiosrc_debug, "No audio device found."); + return NULL; + } + unidevice = + g_utf8_to_utf16 (src->device, strlen (src->device), NULL, NULL, NULL); + + if (!src->audio_cap_filter) { + hres = CreateBindCtx (0, &lpbc); + if (SUCCEEDED (hres)) { + hres = MkParseDisplayName (lpbc, (LPCOLESTR) unidevice, &dwEaten, &audiom); + if (SUCCEEDED (hres)) { + hres = audiom->BindToObject(lpbc, NULL, IID_IBaseFilter, + (LPVOID *) &src->audio_cap_filter); + audiom->Release(); + } + lpbc->Release(); + } + } + + if (src->audio_cap_filter && !src->caps) { + /* get the capture pins supported types */ + IPin *capture_pin = NULL; + IEnumPins *enumpins = NULL; + HRESULT hres; + + hres = src->audio_cap_filter->EnumPins(&enumpins); + if (SUCCEEDED (hres)) { + while (enumpins->Next(1, &capture_pin, NULL) == S_OK) { + IKsPropertySet *pKs = NULL; + + hres = capture_pin->QueryInterface(IID_IKsPropertySet, (LPVOID *) &pKs); + if (SUCCEEDED (hres) && pKs) { + DWORD cbReturned; + GUID pin_category; + RPC_STATUS rpcstatus; + + hres = + pKs->Get(AMPROPSETID_Pin, + AMPROPERTY_PIN_CATEGORY, NULL, 0, &pin_category, sizeof (GUID), + &cbReturned); + + /* we only want capture pins */ + if (UuidCompare (&pin_category, (UUID *) &PIN_CATEGORY_CAPTURE, + &rpcstatus) == 0) { + IAMStreamConfig *streamcaps = NULL; + + if (SUCCEEDED (capture_pin->QueryInterface(IID_IAMStreamConfig, (LPVOID *) &streamcaps))) { + src->caps = + gst_dshowaudiosrc_getcaps_from_streamcaps (src, capture_pin, + streamcaps); + streamcaps->Release(); + } + } + pKs->Release(); + } + capture_pin->Release(); + } + enumpins->Release(); + } + } + + if (unidevice) { + g_free (unidevice); + } + + if (src->caps) { + return gst_caps_ref (src->caps); + } + + return NULL; +} + +static GstStateChangeReturn +gst_dshowaudiosrc_change_state (GstElement * element, GstStateChange transition) +{ + HRESULT hres = S_FALSE; + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (element); + + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_PAUSED: + break; + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + if (src->media_filter) + hres = src->media_filter->Run(0); + if (hres != S_OK) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't RUN the directshow capture graph (error=%d)", hres); + src->is_running = FALSE; + return GST_STATE_CHANGE_FAILURE; + } else { + src->is_running = TRUE; + } + break; + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + if (src->media_filter) + hres = src->media_filter->Stop(); + if (hres != S_OK) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't STOP the directshow capture graph (error=%d)", hres); + return GST_STATE_CHANGE_FAILURE; + } + src->is_running = FALSE; + + break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + break; + case GST_STATE_CHANGE_READY_TO_NULL: + break; + default: + break; + } + + return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); +} + +static gboolean +gst_dshowaudiosrc_open (GstAudioSrc * asrc) +{ + HRESULT hres = S_FALSE; + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); + + hres = CoCreateInstance (CLSID_FilterGraph, NULL, CLSCTX_INPROC, + IID_IFilterGraph, (LPVOID *) & src->filter_graph); + if (hres != S_OK || !src->filter_graph) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't create an instance of the directshow graph manager (error=%d)", + hres); + goto error; + } + + hres = src->filter_graph->QueryInterface(IID_IMediaFilter, (LPVOID *) &src->media_filter); + if (hres != S_OK || !src->media_filter) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't get IMediacontrol interface from the graph manager (error=%d)", + hres); + goto error; + } + + hres = CoCreateInstance (CLSID_DshowFakeSink, NULL, CLSCTX_INPROC, + IID_IBaseFilter, (LPVOID *) & src->dshow_fakesink); + if (hres != S_OK || !src->dshow_fakesink) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't create an instance of the directshow fakesink (error=%d)", hres); + goto error; + } + + hres = src->filter_graph->AddFilter(src->audio_cap_filter, L"capture"); + if (hres != S_OK) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't add the directshow capture filter to the graph (error=%d)", + hres); + goto error; + } + + hres = src->filter_graph->AddFilter(src->dshow_fakesink, L"fakesink"); + if (hres != S_OK) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't add our fakesink filter to the graph (error=%d)", hres); + goto error; + } + + return TRUE; + +error: + if (src->dshow_fakesink) { + src->dshow_fakesink->Release(); + src->dshow_fakesink = NULL; + } + + if (src->media_filter) { + src->media_filter->Release(); + src->media_filter = NULL; + } + if (src->filter_graph) { + src->filter_graph->Release(); + src->filter_graph = NULL; + } + + return FALSE; +} + +static gboolean +gst_dshowaudiosrc_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec) +{ + HRESULT hres; + IGstDshowInterface *srcinterface = NULL; + IPin *input_pin = NULL; + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); + + /* search the negociated caps in our caps list to get its index and the corresponding mediatype */ + if (gst_caps_is_subset (spec->caps, src->caps)) { + guint i = 0; + gint res = -1; + + for (; i < gst_caps_get_size (src->caps) && res == -1; i++) { + GstCaps *capstmp = gst_caps_copy_nth (src->caps, i); + + if (gst_caps_is_subset (spec->caps, capstmp)) { + res = i; + } + gst_caps_unref (capstmp); + } + + if (res != -1 && src->pins_mediatypes) { + /*get the corresponding media type and build the dshow graph */ + GstCapturePinMediaType *pin_mediatype = NULL; + GList *type = g_list_nth (src->pins_mediatypes, res); + + if (type) { + pin_mediatype = (GstCapturePinMediaType *) type->data; + + hres = src->dshow_fakesink->QueryInterface(IID_IGstDshowInterface, (LPVOID *) &srcinterface); + if (hres != S_OK || !srcinterface) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't get IGstDshowInterface interface from our dshow fakesink filter (error=%d)", + hres); + goto error; + } + + srcinterface->gst_set_media_type(pin_mediatype->mediatype); + srcinterface->gst_set_buffer_callback( + (push_buffer_func) gst_dshowaudiosrc_push_buffer, (byte *) src); + + if (srcinterface) + srcinterface->Release(); + + gst_dshow_get_pin_from_filter (src->dshow_fakesink, PINDIR_INPUT, + &input_pin); + if (!input_pin) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't get input pin from our directshow fakesink filter"); + goto error; + } + + hres = src->filter_graph->ConnectDirect(pin_mediatype->capture_pin, + input_pin, NULL); + input_pin->Release(); + + if (hres != S_OK) { + GST_CAT_ERROR (dshowaudiosrc_debug, + "Can't connect capture filter with fakesink filter (error=%d)", + hres); + goto error; + } + + spec->segsize = spec->rate * spec->channels; + spec->segtotal = 1; + } + } + } + + return TRUE; + +error: + if (srcinterface) + srcinterface->Release(); + + return FALSE; +} + +static gboolean +gst_dshowaudiosrc_unprepare (GstAudioSrc * asrc) +{ + IPin *input_pin = NULL, *output_pin = NULL; + HRESULT hres = S_FALSE; + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); + + /* disconnect filters */ + gst_dshow_get_pin_from_filter (src->audio_cap_filter, PINDIR_OUTPUT, + &output_pin); + if (output_pin) { + hres = src->filter_graph->Disconnect(output_pin); + output_pin->Release(); + } + + gst_dshow_get_pin_from_filter (src->dshow_fakesink, PINDIR_INPUT, &input_pin); + if (input_pin) { + hres = src->filter_graph->Disconnect(input_pin); + input_pin->Release(); + } + + return TRUE; +} + +static gboolean +gst_dshowaudiosrc_close (GstAudioSrc * asrc) +{ + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); + + if (!src->filter_graph) + return TRUE; + + /*remove filters from the graph */ + src->filter_graph->RemoveFilter(src->audio_cap_filter); + src->filter_graph->RemoveFilter(src->dshow_fakesink); + + /*release our gstreamer dshow sink */ + src->dshow_fakesink->Release(); + src->dshow_fakesink = NULL; + + /*release media filter interface */ + src->media_filter->Release(); + src->media_filter = NULL; + + /*release the filter graph manager */ + src->filter_graph->Release(); + src->filter_graph = NULL; + + return TRUE; +} + +static guint +gst_dshowaudiosrc_read (GstAudioSrc * asrc, gpointer data, guint length) +{ + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); + guint ret = 0; + + if (!src->is_running) + return -1; + + if (src->gbarray) { + test: + if (src->gbarray->len >= length) { + g_mutex_lock (src->gbarray_lock); + memcpy (data, src->gbarray->data + (src->gbarray->len - length), length); + g_byte_array_remove_range (src->gbarray, src->gbarray->len - length, + length); + ret = length; + g_mutex_unlock (src->gbarray_lock); + } else { + if (src->is_running) { + Sleep (100); + goto test; + } + } + } + + return ret; +} + +static guint +gst_dshowaudiosrc_delay (GstAudioSrc * asrc) +{ + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); + guint ret = 0; + + if (src->gbarray) { + g_mutex_lock (src->gbarray_lock); + if (src->gbarray->len) { + ret = src->gbarray->len / 4; + } + g_mutex_unlock (src->gbarray_lock); + } + + return ret; +} + +static void +gst_dshowaudiosrc_reset (GstAudioSrc * asrc) +{ + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); + + g_mutex_lock (src->gbarray_lock); + g_byte_array_remove_range (src->gbarray, 0, src->gbarray->len); + g_mutex_unlock (src->gbarray_lock); +} + +static GstCaps * +gst_dshowaudiosrc_getcaps_from_streamcaps (GstDshowAudioSrc * src, IPin * pin, + IAMStreamConfig * streamcaps) +{ + GstCaps *caps = NULL; + HRESULT hres = S_OK; + RPC_STATUS rpcstatus; + int icount = 0; + int isize = 0; + AUDIO_STREAM_CONFIG_CAPS ascc; + int i = 0; + + if (!streamcaps) + return NULL; + + streamcaps->GetNumberOfCapabilities(&icount, &isize); + + if (isize != sizeof (ascc)) + return NULL; + + for (; i < icount; i++) { + GstCapturePinMediaType *pin_mediatype = g_new0 (GstCapturePinMediaType, 1); + + pin->AddRef(); + pin_mediatype->capture_pin = pin; + + hres = streamcaps->GetStreamCaps(i, &pin_mediatype->mediatype, + (BYTE *) & ascc); + if (hres == S_OK && pin_mediatype->mediatype) { + GstCaps *mediacaps = NULL; + + if (!caps) + caps = gst_caps_new_empty (); + + if ((UuidCompare (&pin_mediatype->mediatype->subtype, (UUID *) &MEDIASUBTYPE_PCM, + &rpcstatus) == 0 && rpcstatus == RPC_S_OK) + && (UuidCompare (&pin_mediatype->mediatype->formattype, + (UUID *) &FORMAT_WaveFormatEx, &rpcstatus) == 0 + && rpcstatus == RPC_S_OK)) { + WAVEFORMATEX *wavformat = + (WAVEFORMATEX *) pin_mediatype->mediatype->pbFormat; + mediacaps = + gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, + wavformat->wBitsPerSample, "depth", G_TYPE_INT, + wavformat->wBitsPerSample, "endianness", G_TYPE_INT, G_BYTE_ORDER, + "signed", G_TYPE_BOOLEAN, TRUE, "channels", G_TYPE_INT, + wavformat->nChannels, "rate", G_TYPE_INT, wavformat->nSamplesPerSec, + NULL); + + if (mediacaps) { + src->pins_mediatypes = + g_list_append (src->pins_mediatypes, pin_mediatype); + gst_caps_append (caps, mediacaps); + } else { + gst_dshow_free_pin_mediatype (pin_mediatype); + } + } else { + gst_dshow_free_pin_mediatype (pin_mediatype); + } + } else { + gst_dshow_free_pin_mediatype (pin_mediatype); + } + } + + if (caps && gst_caps_is_empty (caps)) { + gst_caps_unref (caps); + caps = NULL; + } + + return caps; +} + +static gboolean +gst_dshowaudiosrc_push_buffer (byte * buffer, long size, byte * src_object, + UINT64 start, UINT64 stop) +{ + GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (src_object); + + if (!buffer || size == 0 || !src) { + return FALSE; + } + + g_mutex_lock (src->gbarray_lock); + g_byte_array_prepend (src->gbarray, (guint8 *) buffer, size); + g_mutex_unlock (src->gbarray_lock); + + return TRUE; +} diff --git a/win32/vs8/libdshowsrcwrapper.vcproj b/win32/vs8/libdshowsrcwrapper.vcproj index e42be9b2..d18e66f8 100755 --- a/win32/vs8/libdshowsrcwrapper.vcproj +++ b/win32/vs8/libdshowsrcwrapper.vcproj @@ -224,7 +224,7 @@ > Date: Wed, 22 Jul 2009 12:34:36 +0200 Subject: dshowaudiosrc: do not remove a range of length 0 --- sys/dshowsrcwrapper/gstdshowaudiosrc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp index 8961c96d..c213aae5 100755 --- a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp +++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp @@ -765,7 +765,9 @@ gst_dshowaudiosrc_reset (GstAudioSrc * asrc) GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (asrc); g_mutex_lock (src->gbarray_lock); - g_byte_array_remove_range (src->gbarray, 0, src->gbarray->len); + GST_DEBUG ("byte array size= %d", src->gbarray->len); + if (src->gbarray->len > 0) + g_byte_array_remove_range (src->gbarray, 0, src->gbarray->len); g_mutex_unlock (src->gbarray_lock); } -- cgit v1.2.1 From 277327e4e5ee677bfd6ddd9e04f8135205f16f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 21 Jul 2009 13:37:20 +0100 Subject: docs: add pcapparse to docs --- docs/plugins/Makefile.am | 1 + docs/plugins/gst-plugins-bad-plugins-docs.sgml | 2 ++ docs/plugins/gst-plugins-bad-plugins-sections.txt | 15 +++++++++++++++ gst/pcapparse/gstpcapparse.h | 7 +++++++ 4 files changed, 25 insertions(+) diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 98598b17..a39a56bd 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -140,6 +140,7 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/mxf/mxfdemux.h \ $(top_srcdir)/gst/mxf/mxfmux.h \ $(top_srcdir)/gst/nuvdemux/gstnuvdemux.h \ + $(top_srcdir)/gst/pcapparse/gstpcapparse.h \ $(top_srcdir)/gst/rawparse/gstaudioparse.h \ $(top_srcdir)/gst/rawparse/gstvideoparse.h \ $(top_srcdir)/gst/rtpmanager/gstrtpbin.h \ diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index 8d1dba41..08ccb543 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -68,6 +68,7 @@ + @@ -145,6 +146,7 @@ + diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index c220f0ca..ec0c0b7b 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -719,6 +719,21 @@ GST_TYPE_OUTPUT_SELECTOR gst_output_selector_get_type
+
+element-pcapparse +pcapparse +GstPcapParse + +GstPcapParseClass +GST_PCAP_PARSE +GST_PCAP_PARSE_CLASS +GST_IS_PCAP_PARSE +GST_IS_PCAP_PARSE_CLASS +GST_TYPE_PCAP_PARSE +GstPcapParseState +gst_pcap_parse_get_type +
+
element-rtpdtmfdepay rtpdtmfdepay diff --git a/gst/pcapparse/gstpcapparse.h b/gst/pcapparse/gstpcapparse.h index 8e45f8b2..cc1b55f6 100644 --- a/gst/pcapparse/gstpcapparse.h +++ b/gst/pcapparse/gstpcapparse.h @@ -45,10 +45,17 @@ typedef enum PCAP_PARSE_STATE_PARSING, } GstPcapParseState; +/** + * GstPcapParse: + * + * GstPcapParse element. + */ + struct _GstPcapParse { GstElement element; + /*< private >*/ GstPad * sink_pad; GstPad * src_pad; -- cgit v1.2.1 From 021f66d6ce84370803d436a954286da70872a4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 22 Jul 2009 11:45:21 +0100 Subject: dshowsrcwrapper: update Makefile.am for source file renames as well --- sys/dshowsrcwrapper/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dshowsrcwrapper/Makefile.am b/sys/dshowsrcwrapper/Makefile.am index 3ec4d64a..74bf83ed 100755 --- a/sys/dshowsrcwrapper/Makefile.am +++ b/sys/dshowsrcwrapper/Makefile.am @@ -2,7 +2,7 @@ # ensure everything's listed in EXTRA_DIST EXTRA_DIST = \ - gstdshowaudiosrc.c \ + gstdshowaudiosrc.cpp \ gstdshowaudiosrc.h \ gstdshow.cpp \ gstdshowfakesink.cpp \ @@ -10,5 +10,5 @@ EXTRA_DIST = \ gstdshow.h \ gstdshowinterface.h \ gstdshowsrcwrapper.cpp \ - gstdshowvideosrc.c \ + gstdshowvideosrc.cpp \ gstdshowvideosrc.h -- cgit v1.2.1 From 7e7c63737ecb9b54f16a6d651ece7c3c716b9f16 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 22 Jul 2009 17:05:29 +0300 Subject: camerabin: more perf-test cleanups Remove some obsolete exmaples. Add video-width/height. Use proper api for setting still image resolution. Fix stopping random tests on bin-state-changes. Remove the memdup in snapshot again, as its not needed (pixbuf goes out of scope with the buffer). --- tests/examples/camerabin/gst-camera-perf.c | 63 +++++++++++++++++++----------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/tests/examples/camerabin/gst-camera-perf.c b/tests/examples/camerabin/gst-camera-perf.c index ba8ff6a6..8aa62e9c 100644 --- a/tests/examples/camerabin/gst-camera-perf.c +++ b/tests/examples/camerabin/gst-camera-perf.c @@ -32,15 +32,12 @@ * gcc `pkg-config --cflags --libs gstreamer-0.10` gst-camera-perf.c -ogst-camera-perf * * plain linux: - * ./gst-camera-perf --src-colorspace=YUY2 --image-width=640 --image-height=480 --view-framerate-num=15 --view-framerate-den=1 + * ./gst-camera-perf --src-colorspace=YUY2 --image-width=640 --image-height=480 --video-width=640 --video-height=480 --view-framerate-num=15 --view-framerate-den=1 * * maemo: - * ./gst-camera-perf --src-colorspace=UYVY --image-width=640 --image-height=480 --view-framerate-num=1491 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux - * ./gst-camera-perf --src-colorspace=UYVY --image-width=640 --image-height=480 --view-framerate-num=2999 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux - * ./gst-camera-perf --src-colorspace=UYVY --image-width=2592 --image-height=1968 --view-framerate-num=399 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux - * ./gst-camera-perf --src-colorspace=UYVY --image-width=2592 --image-height=1968 --view-framerate-num=325 --view-framerate-den=25 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux --image-enc=dspjpegenc - * ./gst-camera-perf --src-colorspace=UYVY --image-width=640 --image-height=480 --view-framerate-num=1491 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=dspmpeg4enc --video-mux=hantromp4mux --image-enc=dspjpegenc --target-times=1000,1500,1500,2000,500,2000,3500,1000,1000 - * ./gst-camera-perf --src-colorspace=UYVY --image-width=2576 --image-height=1936 --view-framerate-num=1491 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=omx_mpeg4enc --video-mux=hantromp4mux + * ./gst-camera-perf --src-colorspace=UYVY --image-width=640 --image-height=480 --video-width=640 --video-height=480 --view-framerate-num=1491 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=dspmpeg4enc --video-mux=hantromp4mux --image-enc=dspjpegenc --target-times=1000,1500,1500,2000,500,2000,3500,1000,1000 + * ./gst-camera-perf --src-colorspace=UYVY --image-width=2576 --image-height=1936 --video-width=640 --video-height=480 --view-framerate-num=2999 --view-framerate-den=100 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=dspmpeg4enc --video-mux=hantromp4mux + * ./gst-camera-perf --src-colorspace=UYVY --image-width=2576 --image-height=1936 --video-width=640 --video-height=480 --view-framerate-num=126 --view-framerate-den=5 --video-src=v4l2camsrc --audio-enc=nokiaaacenc --video-enc=dspmpeg4enc --video-mux=hantromp4mux --image-enc=dspjpegenc */ /* @@ -108,6 +105,8 @@ static gchar *videomux_name = NULL; static gchar *src_csp = NULL; static gint image_width = 0; static gint image_height = 0; +static gint video_width = 0; +static gint video_height = 0; static gint view_framerate_num = 0; static gint view_framerate_den = 0; @@ -188,15 +187,15 @@ pad_has_buffer (GstPad * pad, GstBuffer * buf, gpointer user_data) GET_TIME (t_final[0]); GST_DEBUG_OBJECT (pad, "%2d pad has buffer", test_ix); switch (test_ix) { - case 5: + case 5: // shutter lag DIFF_TIME (t_final[num_pics_cont], t_initial, diff); result.avg = result.min = result.max = diff; print_and_restart = TRUE; break; - case 8: + case 8: // video recording start DIFF_TIME (t_final[num_pics_cont], t_initial, diff); result.avg = result.min = result.max = diff; - g_signal_emit_by_name (camera_bin, "user-stop", 0); + //g_signal_emit_by_name (camera_bin, "user-stop", 0); print_and_restart = TRUE; break; default: @@ -207,7 +206,6 @@ pad_has_buffer (GstPad * pad, GstBuffer * buf, gpointer user_data) if (print_and_restart) { print_result (); g_idle_add ((GSourceFunc) run_test, NULL); - return FALSE; } return TRUE; } @@ -382,12 +380,16 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) if (GST_MESSAGE_SRC (message) == GST_OBJECT (camera_bin)) { if (GST_STATE_TRANSITION (oldstate, newstate) == GST_STATE_CHANGE_PAUSED_TO_PLAYING) { - GET_TIME (t_final[0]); - DIFF_TIME (t_final[0], t_initial, diff); - - result.avg = result.min = result.max = diff; - print_result (); - g_idle_add ((GSourceFunc) run_test, NULL); + switch (test_ix) { + case 0: // camera on + GET_TIME (t_final[0]); + DIFF_TIME (t_final[0], t_initial, diff); + + result.avg = result.min = result.max = diff; + print_result (); + g_idle_add ((GSourceFunc) run_test, NULL); + break; + } } } } @@ -442,7 +444,7 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) GST_INFO ("preview : buf=%p, size=%d, format=%" GST_PTR_FORMAT, buf, GST_BUFFER_SIZE (buf), caps); - data = g_memdup (GST_BUFFER_DATA (buff), GST_BUFFER_SIZE (buff)); + data = GST_BUFFER_DATA (buff); gst_structure_get_int (buf_st, "width", &width); gst_structure_get_int (buf_st, "height", &height); rowstride = GST_ROUND_UP_4 (width * 3); @@ -621,10 +623,15 @@ setup_pipeline (void) } GST_INFO_OBJECT (camera_bin, "probe signals connected"); - /* configure a resolution and framerate */ - if (image_width && image_height && view_framerate_num && view_framerate_den) { - g_signal_emit_by_name (camera_bin, "user-res-fps", image_width, - image_height, view_framerate_num, view_framerate_den, NULL); + /* configure a resolution and framerate for video and viewfinder */ + if (image_width && image_height) { + g_signal_emit_by_name (camera_bin, "user-image-res", image_width, + image_height, NULL); + } + /* configure a resolution and framerate for video and viewfinder */ + if (video_width && video_height && view_framerate_num && view_framerate_den) { + g_signal_emit_by_name (camera_bin, "user-res-fps", video_width, + video_height, view_framerate_num, view_framerate_den, NULL); } if (GST_STATE_CHANGE_FAILURE == @@ -866,7 +873,11 @@ static test_case test_cases[TEST_CASES] = { static void print_result (void) { - printf ("| %6.02f%% ", 100.0f * (float) result.max / (float) target[test_ix]); + if (test_ix >= TEST_CASES) { + GST_WARNING ("text case index overrun"); + return; + } + printf ("| %6.02f%% ", 100.0f * (float) result.avg / (float) target[test_ix]); printf ("|%5u ms ", (guint) GST_TIME_AS_MSECONDS (target[test_ix])); printf ("|%5u ms ", (guint) GST_TIME_AS_MSECONDS (result.avg)); printf ("|%5u ms ", (guint) GST_TIME_AS_MSECONDS (result.min)); @@ -889,6 +900,7 @@ run_test (gpointer user_data) } printf ("| %02d ", test_ix + 1); + fflush (stdout); if (test_cases[test_ix]) { if (target[test_ix]) { memset (&result, 0, sizeof (ResultType)); @@ -908,6 +920,7 @@ run_test (gpointer user_data) printf ("| %-19s |\n", test_names[test_ix]); test_ix++; } + fflush (stdout); if (old_test_ix == 0 && ret == TRUE && !camera_bin) { GST_INFO ("done (camerabin creation failed)"); @@ -949,6 +962,10 @@ main (int argc, char *argv[]) "width for image capture", NULL}, {"image-height", '\0', 0, G_OPTION_ARG_INT, &image_height, "height for image capture", NULL}, + {"video-width", '\0', 0, G_OPTION_ARG_INT, &video_width, + "width for image capture", NULL}, + {"video-height", '\0', 0, G_OPTION_ARG_INT, &video_height, + "height for image capture", NULL}, {"view-framerate-num", '\0', 0, G_OPTION_ARG_INT, &view_framerate_num, "framerate numerator for viewfinder", NULL}, {"view-framerate-den", '\0', 0, G_OPTION_ARG_INT, &view_framerate_den, -- cgit v1.2.1 From 87a97e24d4b4e63dc2fa3a3a12f9b30bfbe54368 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 22 Jul 2009 18:01:12 +0300 Subject: docs: add docs for ladspa and update plugin docs Add also inspect files for lv2 and frei0r (no docs yet). --- docs/plugins/Makefile.am | 1 + docs/plugins/gst-plugins-bad-plugins-docs.sgml | 3 + docs/plugins/gst-plugins-bad-plugins-sections.txt | 8 + docs/plugins/gst-plugins-bad-plugins.args | 3095 ++++++- docs/plugins/gst-plugins-bad-plugins.hierarchy | 576 +- docs/plugins/gst-plugins-bad-plugins.interfaces | 38 +- docs/plugins/gst-plugins-bad-plugins.prerequisites | 12 +- docs/plugins/inspect/plugin-aacparse.xml | 6 +- docs/plugins/inspect/plugin-adpcmdec.xml | 6 +- docs/plugins/inspect/plugin-aiffparse.xml | 6 +- docs/plugins/inspect/plugin-alsaspdif.xml | 6 +- docs/plugins/inspect/plugin-amrparse.xml | 6 +- docs/plugins/inspect/plugin-amrwb.xml | 4 +- docs/plugins/inspect/plugin-apex.xml | 6 +- docs/plugins/inspect/plugin-autoconvert.xml | 6 +- docs/plugins/inspect/plugin-bayer.xml | 6 +- docs/plugins/inspect/plugin-bz2.xml | 6 +- docs/plugins/inspect/plugin-camerabin.xml | 6 +- docs/plugins/inspect/plugin-cdaudio.xml | 6 +- docs/plugins/inspect/plugin-cdxaparse.xml | 6 +- docs/plugins/inspect/plugin-celt.xml | 6 +- docs/plugins/inspect/plugin-dc1394.xml | 6 +- docs/plugins/inspect/plugin-dccp.xml | 2 +- docs/plugins/inspect/plugin-debugutilsbad.xml | 6 +- docs/plugins/inspect/plugin-dfbvideosink.xml | 6 +- docs/plugins/inspect/plugin-dtmf.xml | 6 +- docs/plugins/inspect/plugin-dtsdec.xml | 6 +- docs/plugins/inspect/plugin-dvb.xml | 6 +- docs/plugins/inspect/plugin-dvdspu.xml | 6 +- docs/plugins/inspect/plugin-faac.xml | 6 +- docs/plugins/inspect/plugin-faad.xml | 6 +- docs/plugins/inspect/plugin-fbdevsink.xml | 6 +- docs/plugins/inspect/plugin-festival.xml | 6 +- docs/plugins/inspect/plugin-freeze.xml | 6 +- docs/plugins/inspect/plugin-frei0r.xml | 14 + docs/plugins/inspect/plugin-gsm.xml | 6 +- docs/plugins/inspect/plugin-gstrtpmanager.xml | 33 +- docs/plugins/inspect/plugin-gstsiren.xml | 6 +- docs/plugins/inspect/plugin-h264parse.xml | 6 +- docs/plugins/inspect/plugin-hdvparse.xml | 2 +- docs/plugins/inspect/plugin-id3tag.xml | 6 +- docs/plugins/inspect/plugin-jack.xml | 6 +- docs/plugins/inspect/plugin-ladspa.xml | 8580 +++++++++++++++++++- docs/plugins/inspect/plugin-legacyresample.xml | 6 +- docs/plugins/inspect/plugin-liveadder.xml | 6 +- docs/plugins/inspect/plugin-lv2.xml | 352 + docs/plugins/inspect/plugin-metadata.xml | 6 +- docs/plugins/inspect/plugin-mms.xml | 6 +- docs/plugins/inspect/plugin-modplug.xml | 8 +- docs/plugins/inspect/plugin-mpeg2enc.xml | 6 +- docs/plugins/inspect/plugin-mpeg4videoparse.xml | 6 +- docs/plugins/inspect/plugin-mpegdemux2.xml | 6 +- docs/plugins/inspect/plugin-mpegtsmux.xml | 6 +- docs/plugins/inspect/plugin-mpegvideoparse.xml | 6 +- docs/plugins/inspect/plugin-mplex.xml | 6 +- docs/plugins/inspect/plugin-musepack.xml | 6 +- docs/plugins/inspect/plugin-musicbrainz.xml | 6 +- docs/plugins/inspect/plugin-mve.xml | 6 +- docs/plugins/inspect/plugin-mxf.xml | 6 +- docs/plugins/inspect/plugin-mythtv.xml | 6 +- docs/plugins/inspect/plugin-nas.xml | 6 +- docs/plugins/inspect/plugin-neon.xml | 6 +- docs/plugins/inspect/plugin-nsfdec.xml | 6 +- docs/plugins/inspect/plugin-nuvdemux.xml | 6 +- docs/plugins/inspect/plugin-oss4.xml | 6 +- docs/plugins/inspect/plugin-pcapparse.xml | 2 +- docs/plugins/inspect/plugin-qtmux.xml | 2 +- docs/plugins/inspect/plugin-rawparse.xml | 6 +- docs/plugins/inspect/plugin-real.xml | 6 +- docs/plugins/inspect/plugin-resindvd.xml | 2 +- docs/plugins/inspect/plugin-rfbsrc.xml | 6 +- docs/plugins/inspect/plugin-rtpmux.xml | 6 +- docs/plugins/inspect/plugin-scaletempo.xml | 2 +- docs/plugins/inspect/plugin-sdl.xml | 6 +- docs/plugins/inspect/plugin-sdp.xml | 6 +- docs/plugins/inspect/plugin-selector.xml | 6 +- docs/plugins/inspect/plugin-shapewipe.xml | 10 +- docs/plugins/inspect/plugin-sndfile.xml | 6 +- docs/plugins/inspect/plugin-soundtouch.xml | 6 +- docs/plugins/inspect/plugin-spcdec.xml | 6 +- docs/plugins/inspect/plugin-speed.xml | 6 +- docs/plugins/inspect/plugin-stereo.xml | 6 +- docs/plugins/inspect/plugin-subenc.xml | 6 +- docs/plugins/inspect/plugin-timidity.xml | 4 +- docs/plugins/inspect/plugin-tta.xml | 6 +- docs/plugins/inspect/plugin-valve.xml | 6 +- docs/plugins/inspect/plugin-vcdsrc.xml | 6 +- docs/plugins/inspect/plugin-videosignal.xml | 6 +- docs/plugins/inspect/plugin-vmnc.xml | 6 +- docs/plugins/inspect/plugin-wildmidi.xml | 6 +- docs/plugins/inspect/plugin-xdgmime.xml | 6 +- docs/plugins/inspect/plugin-xvid.xml | 8 +- ext/ladspa/gstladspa.c | 11 +- 93 files changed, 12473 insertions(+), 716 deletions(-) create mode 100644 docs/plugins/inspect/plugin-frei0r.xml create mode 100644 docs/plugins/inspect/plugin-lv2.xml diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index a39a56bd..0a43f4ca 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -105,6 +105,7 @@ EXTRA_HFILES = \ $(top_srcdir)/ext/kate/gstkateparse.h \ $(top_srcdir)/ext/kate/gstkatetag.h \ $(top_srcdir)/ext/kate/gstkatetiger.h \ + $(top_srcdir)/ext/ladspa/gstladspa.h \ $(top_srcdir)/ext/musicbrainz/gsttrm.h \ $(top_srcdir)/ext/metadata/gstbasemetadata.h \ $(top_srcdir)/ext/metadata/gstmetadatademux.h \ diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index 08ccb543..f1a36d70 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -54,6 +54,7 @@ + @@ -122,6 +123,7 @@ + @@ -129,6 +131,7 @@ + diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index ec0c0b7b..09e0e3fc 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -541,6 +541,14 @@ GST_TYPE_KATE_TIGER gst_kate_tiger_get_type
+
+element-ladspa +ladspa +GstLADSPA + +GstLADSPAClass +
+
gstbasemetadata GstBaseMetadata diff --git a/docs/plugins/gst-plugins-bad-plugins.args b/docs/plugins/gst-plugins-bad-plugins.args index 82bcfd30..f25241fe 100644 --- a/docs/plugins/gst-plugins-bad-plugins.args +++ b/docs/plugins/gst-plugins-bad-plugins.args @@ -11,7 +11,7 @@ GstPitch::pitch gfloat -[0.1,10] +[0,1,10] rw Pitch Audio stream pitch. @@ -21,7 +21,7 @@ GstPitch::rate gfloat -[0.1,10] +[0,1,10] rw Rate Audio stream rate. @@ -31,7 +31,7 @@ GstPitch::tempo gfloat -[0.1,10] +[0,1,10] rw Tempo Audio stream tempo. @@ -1341,7 +1341,7 @@ GstSpeed::speed gfloat -[0.1,40] +[0,1,40] rwx speed speed. @@ -7585,7 +7585,7 @@ rwx B B. --3.40282e+38 +-3,40282e+38 @@ -7615,7 +7615,7 @@ rwx Threshold Threshold. --3.40282e+38 +-3,40282e+38 @@ -7645,7 +7645,7 @@ rwx Base Base. --3.40282e+38 +-3,40282e+38 @@ -7655,7 +7655,7 @@ rwx Exponent Exponent. --3.40282e+38 +-3,40282e+38 @@ -7665,7 +7665,7 @@ r Result Result. --3.40282e+38 +-3,40282e+38 @@ -7675,7 +7675,7 @@ rwx Off Off. --3.40282e+38 +-3,40282e+38 @@ -7685,7 +7685,7 @@ rwx On On. --3.40282e+38 +-3,40282e+38 @@ -7695,7 +7695,7 @@ r Output Output. --3.40282e+38 +-3,40282e+38 @@ -7721,11 +7721,11 @@ ladspa-wg-mesh-cr::Tension gfloat -[1e-04,0.22] +[0,0001,0,22] rwx Tension Tension. -0.11005 +0,11005 @@ -8215,7 +8215,7 @@ rwx Fall-time Fall-time. --3.40282e+38 +-3,40282e+38 @@ -8225,7 +8225,7 @@ rwx Rise-time Rise-time. --3.40282e+38 +-3,40282e+38 @@ -8245,7 +8245,7 @@ rwx Fall-rate Fall-rate. --3.40282e+38 +-3,40282e+38 @@ -8255,7 +8255,7 @@ rwx Rise-rate Rise-rate. --3.40282e+38 +-3,40282e+38 @@ -8505,7 +8505,7 @@ rwx Input Input. --3.40282e+38 +-3,40282e+38 @@ -8515,7 +8515,7 @@ r Output Output. --3.40282e+38 +-3,40282e+38 @@ -8571,11 +8571,11 @@ ladspa-tap-tubewarmth::Drive gfloat -[0.1,10] +[0,1,10] rwx Drive Drive. -2.575 +2,575 @@ -8675,7 +8675,7 @@ rwx Rotor-Horn-Mix Rotor-Horn-Mix. -0.5 +0,5 @@ -8855,7 +8855,7 @@ rwx Fractal-Dimension Fractal-Dimension. -0.5 +0,5 @@ -8901,17 +8901,17 @@ ladspa-tap-limiter::latency gfloat -[0,2500.1] +[0,2500,1] r latency latency. -2500.1 +2500,1 ladspa-tap-equalizer-bw::Band-1-Bandwidth--octaves- gfloat -[0.1,5] +[0,1,5] rwx Band-1-Bandwidth--octaves- Band-1-Bandwidth--octaves-. @@ -8941,7 +8941,7 @@ ladspa-tap-equalizer-bw::Band-2-Bandwidth--octaves- gfloat -[0.1,5] +[0,1,5] rwx Band-2-Bandwidth--octaves- Band-2-Bandwidth--octaves-. @@ -8971,7 +8971,7 @@ ladspa-tap-equalizer-bw::Band-3-Bandwidth--octaves- gfloat -[0.1,5] +[0,1,5] rwx Band-3-Bandwidth--octaves- Band-3-Bandwidth--octaves-. @@ -9001,7 +9001,7 @@ ladspa-tap-equalizer-bw::Band-4-Bandwidth--octaves- gfloat -[0.1,5] +[0,1,5] rwx Band-4-Bandwidth--octaves- Band-4-Bandwidth--octaves-. @@ -9031,7 +9031,7 @@ ladspa-tap-equalizer-bw::Band-5-Bandwidth--octaves- gfloat -[0.1,5] +[0,1,5] rwx Band-5-Bandwidth--octaves- Band-5-Bandwidth--octaves-. @@ -9061,7 +9061,7 @@ ladspa-tap-equalizer-bw::Band-6-Bandwidth--octaves- gfloat -[0.1,5] +[0,1,5] rwx Band-6-Bandwidth--octaves- Band-6-Bandwidth--octaves-. @@ -9091,7 +9091,7 @@ ladspa-tap-equalizer-bw::Band-7-Bandwidth--octaves- gfloat -[0.1,5] +[0,1,5] rwx Band-7-Bandwidth--octaves- Band-7-Bandwidth--octaves-. @@ -9121,7 +9121,7 @@ ladspa-tap-equalizer-bw::Band-8-Bandwidth--octaves- gfloat -[0.1,5] +[0,1,5] rwx Band-8-Bandwidth--octaves- Band-8-Bandwidth--octaves-. @@ -9555,7 +9555,7 @@ rwx Pitch-Tracking Pitch-Tracking. -0.5 +0,5 @@ -9565,7 +9565,7 @@ rwx Time-Tracking Time-Tracking. -0.5 +0,5 @@ -9785,13 +9785,13 @@ r latency latency. --3.40282e+38 +-3,40282e+38 ladspa-pitchScaleHQ::Pitch-co-efficient gfloat -[0.5,2] +[0,5,2] rwx Pitch-co-efficient Pitch-co-efficient. @@ -9805,7 +9805,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -9855,7 +9855,7 @@ rwx Frequency--Hz- Frequency--Hz-. -1.25 +1,25 @@ -9885,7 +9885,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -10051,11 +10051,11 @@ ladspa-sc4m::Attack-time gfloat -[1.5,400] +[1,5,400] rwx Attack-time Attack-time. -101.125 +101,125 @@ -10075,7 +10075,7 @@ rwx Knee-radius Knee-radius. -3.25 +3,25 @@ -10165,13 +10165,13 @@ r latency latency. --3.40282e+38 +-3,40282e+38 ladspa-pitchScale::Pitch-co-efficient gfloat -[0.5,2] +[0,5,2] rwx Pitch-co-efficient Pitch-co-efficient. @@ -10185,7 +10185,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -10201,17 +10201,17 @@ ladspa-pointerCastDistortion::Effect-cutoff-freq gfloat -[4.41,13230] +[4,41,13230] rwx Effect-cutoff-freq Effect-cutoff-freq. -32.6376 +32,6377 ladspa-const::Signal-amplitude gfloat -[-1,1.1] +[-1,1,1] rwx Signal-amplitude Signal-amplitude. @@ -10221,11 +10221,11 @@ ladspa-lsFilter::Cutoff-frequency gfloat -[88.2,22050] +[88,2,22050] rwx Cutoff-frequency Cutoff-frequency. -1394.56 +1394,56 @@ -10611,61 +10611,61 @@ ladspa-butthigh-iir::Cutoff-Frequency gfloat -[4.41,19845] +[4,41,19845] rwx Cutoff-Frequency Cutoff-Frequency. -36.1195 +36,1195 ladspa-butthigh-iir::Resonance gfloat -[0.1,1.41] +[0,1,1,41] rwx Resonance Resonance. -0.755 +0,755 ladspa-buttlow-iir::Cutoff-Frequency gfloat -[4.41,19845] +[4,41,19845] rwx Cutoff-Frequency Cutoff-Frequency. -36.1195 +36,1195 ladspa-buttlow-iir::Resonance gfloat -[0.1,1.41] +[0,1,1,41] rwx Resonance Resonance. -0.755 +0,755 ladspa-bwxover-iir::Cutoff-Frequency gfloat -[4.41,19845] +[4,41,19845] rwx Cutoff-Frequency Cutoff-Frequency. -36.1195 +36,1195 ladspa-bwxover-iir::Resonance gfloat -[0.1,1.41] +[0,1,1,41] rwx Resonance Resonance. -0.755 +0,755 @@ -10705,7 +10705,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -10745,27 +10745,27 @@ r latency latency. --3.40282e+38 +-3,40282e+38 ladspa-notch-iir::Bandwidth gfloat -[4.41,19845] +[4,41,19845] rwx Bandwidth Bandwidth. -295.832 +295,832 ladspa-notch-iir::Center-Frequency gfloat -[4.41,19845] +[4,41,19845] rwx Center-Frequency Center-Frequency. -295.832 +295,832 @@ -10781,11 +10781,11 @@ ladspa-lowpass-iir::Cutoff-Frequency gfloat -[4.41,19845] +[4,41,19845] rwx Cutoff-Frequency Cutoff-Frequency. -2422.97 +2422,97 @@ -10801,11 +10801,11 @@ ladspa-highpass-iir::Cutoff-Frequency gfloat -[4.41,19845] +[4,41,19845] rwx Cutoff-Frequency Cutoff-Frequency. -36.1195 +36,1195 @@ -10821,21 +10821,21 @@ ladspa-bandpass-iir::Bandwidth gfloat -[4.41,19845] +[4,41,19845] rwx Bandwidth Bandwidth. -295.832 +295,832 ladspa-bandpass-iir::Center-Frequency gfloat -[4.41,19845] +[4,41,19845] rwx Center-Frequency Center-Frequency. -295.832 +295,832 @@ -10851,21 +10851,21 @@ ladspa-bandpass-a-iir::Bandwidth gfloat -[4.41,19845] +[4,41,19845] rwx Bandwidth Bandwidth. -295.832 +295,832 ladspa-bandpass-a-iir::Center-Frequency gfloat -[4.41,19845] +[4,41,19845] rwx Center-Frequency Center-Frequency. -36.1195 +36,1195 @@ -10881,11 +10881,11 @@ ladspa-se4::Attack-time gfloat -[1.5,400] +[1,5,400] rwx Attack-time Attack-time. -101.125 +101,125 @@ -10915,7 +10915,7 @@ rwx Knee-radius Knee-radius. -3.25 +3,25 @@ -10961,7 +10961,7 @@ ladspa-sinCos::Base-frequency gfloat -[0.0441,22050] +[0,0441,22050] rwx Base-frequency Base-frequency. @@ -10985,7 +10985,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -11001,11 +11001,11 @@ ladspa-gongBeater::Strike-duration gfloat -[0.001,0.2] +[0,001,0,2] rwx Strike-duration Strike-duration. -0.1005 +0,1005 @@ -11041,7 +11041,7 @@ ladspa-djFlanger::LFO-period gfloat -[0.1,32] +[0,1,32] rwx LFO-period LFO-period. @@ -11055,23 +11055,23 @@ rwx LFO-sync LFO-sync. --3.40282e+38 +-3,40282e+38 ladspa-giantFlange::Delay-1-range gfloat -[0,10.5] +[0,10,5] rwx Delay-1-range Delay-1-range. -2.625 +2,625 ladspa-giantFlange::Delay-2-range gfloat -[0,10.5] +[0,10,5] rwx Delay-2-range Delay-2-range. @@ -11085,7 +11085,7 @@ rwx Double-delay Double-delay. --3.40282e+38 +-3,40282e+38 @@ -11251,11 +11251,11 @@ ladspa-sc4::Attack-time gfloat -[1.5,400] +[1,5,400] rwx Attack-time Attack-time. -101.125 +101,125 @@ -11275,7 +11275,7 @@ rwx Knee-radius Knee-radius. -3.25 +3,25 @@ -11341,7 +11341,7 @@ ladspa-amPitchshift::Pitch-shift gfloat -[0.25,4] +[0,25,4] rwx Pitch-shift Pitch-shift. @@ -11355,7 +11355,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -11395,7 +11395,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -11415,7 +11415,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -11435,7 +11435,7 @@ rwx Attack-time Attack-time. -101.5 +101,5 @@ -11455,7 +11455,7 @@ rwx Knee-radius Knee-radius. -3.25 +3,25 @@ -11505,7 +11505,7 @@ rwx Attack-time Attack-time. -101.5 +101,5 @@ -11515,7 +11515,7 @@ rwx Knee-radius Knee-radius. -3.25 +3,25 @@ -11565,7 +11565,7 @@ rwx Attack-time Attack-time. -101.5 +101,5 @@ -11575,7 +11575,7 @@ rwx Knee-radius Knee-radius. -3.25 +3,25 @@ -11625,7 +11625,7 @@ rwx Inner-damping Inner-damping. -0.5 +0,5 @@ -11635,7 +11635,7 @@ rwx Inner-size-1 Inner-size-1. -0.5 +0,5 @@ -11645,7 +11645,7 @@ rwx Inner-size-2 Inner-size-2. -0.5 +0,5 @@ -11655,7 +11655,7 @@ rwx Inner-size-3 Inner-size-3. -0.5 +0,5 @@ -11665,7 +11665,7 @@ rwx Inner-size-4 Inner-size-4. -0.5 +0,5 @@ -11675,7 +11675,7 @@ rwx Inner-stiffness-1-- Inner-stiffness-1--. -0.5 +0,5 @@ -11685,7 +11685,7 @@ rwx Inner-stiffness-1---1 Inner-stiffness-1---1. -0.5 +0,5 @@ -11695,7 +11695,7 @@ rwx Inner-stiffness-2-- Inner-stiffness-2--. -0.5 +0,5 @@ -11705,7 +11705,7 @@ rwx Inner-stiffness-2---1 Inner-stiffness-2---1. -0.5 +0,5 @@ -11715,7 +11715,7 @@ rwx Inner-stiffness-3-- Inner-stiffness-3--. -0.5 +0,5 @@ -11725,7 +11725,7 @@ rwx Inner-stiffness-3---1 Inner-stiffness-3---1. -0.5 +0,5 @@ -11735,7 +11735,7 @@ rwx Inner-stiffness-4-- Inner-stiffness-4--. -0.5 +0,5 @@ -11745,7 +11745,7 @@ rwx Inner-stiffness-4---1 Inner-stiffness-4---1. -0.5 +0,5 @@ -11755,7 +11755,7 @@ rwx Mic-position Mic-position. -0.25 +0,25 @@ -11765,7 +11765,7 @@ rwx Outer-damping Outer-damping. -0.5 +0,5 @@ -11775,7 +11775,7 @@ rwx Outer-size-1 Outer-size-1. -0.5 +0,5 @@ -11785,7 +11785,7 @@ rwx Outer-size-2 Outer-size-2. -0.5 +0,5 @@ -11795,7 +11795,7 @@ rwx Outer-size-3 Outer-size-3. -0.5 +0,5 @@ -11805,7 +11805,7 @@ rwx Outer-size-4 Outer-size-4. -0.5 +0,5 @@ -11815,7 +11815,7 @@ rwx Outer-stiffness-1-- Outer-stiffness-1--. -0.5 +0,5 @@ -11825,7 +11825,7 @@ rwx Outer-stiffness-1---1 Outer-stiffness-1---1. -0.5 +0,5 @@ -11835,7 +11835,7 @@ rwx Outer-stiffness-2-- Outer-stiffness-2--. -0.5 +0,5 @@ -11845,7 +11845,7 @@ rwx Outer-stiffness-2---1 Outer-stiffness-2---1. -0.5 +0,5 @@ -11855,7 +11855,7 @@ rwx Outer-stiffness-3-- Outer-stiffness-3--. -0.5 +0,5 @@ -11865,7 +11865,7 @@ rwx Outer-stiffness-3---1 Outer-stiffness-3---1. -0.5 +0,5 @@ -11875,7 +11875,7 @@ rwx Outer-stiffness-4-- Outer-stiffness-4--. -0.5 +0,5 @@ -11885,7 +11885,7 @@ rwx Outer-stiffness-4---1 Outer-stiffness-4---1. -0.5 +0,5 @@ -11895,7 +11895,7 @@ rwx Damping Damping. -0.25 +0,25 @@ -11905,17 +11905,17 @@ rwx Dry-wet-mix Dry-wet-mix. -0.25 +0,25 ladspa-plate::Reverb-time gfloat -[0.01,8.5] +[0,01,8,5] rwx Reverb-time Reverb-time. -4.255 +4,255 @@ -11955,7 +11955,7 @@ rwx Tracking-speed Tracking-speed. -0.5 +0,5 @@ -11971,7 +11971,7 @@ ladspa-analogueOsc::Frequency gfloat -[0.0441,22005.9] +[0,0441,22005,9] rwx Frequency Frequency. @@ -12081,11 +12081,11 @@ ladspa-gate::Attack gfloat -[0.01,1000] +[0,01,1000] rwx Attack Attack. -250.008 +250,008 @@ -12101,7 +12101,7 @@ ladspa-gate::HF-key-filter gfloat -[220.5,21609] +[220,5,21609] rwx HF-key-filter HF-key-filter. @@ -12115,23 +12115,23 @@ rwx Hold Hold. -1500.5 +1500,5 ladspa-gate::LF-key-filter gfloat -[30.87,4410] +[30,87,4410] rwx LF-key-filter LF-key-filter. -30.87 +30,87 ladspa-gate::Output-select gint -[G_MAXULONG,1] +[-1,1] rwx Output-select Output-select. @@ -12221,7 +12221,7 @@ ladspa-crossoverDist::Crossover-amplitude gfloat -[0,0.1] +[0,0,1] rwx Crossover-amplitude Crossover-amplitude. @@ -12245,7 +12245,7 @@ rwx Compression-ratio Compression-ratio. -0.5 +0,5 @@ -12255,7 +12255,7 @@ rwx Fast-compression-ratio Fast-compression-ratio. -0.5 +0,5 @@ -12275,13 +12275,13 @@ rwx Release-time Release-time. -0.25 +0,25 ladspa-delayorama::Amplitude-change gfloat -[0.2,5] +[0,2,5] rwx Amplitude-change Amplitude-change. @@ -12301,7 +12301,7 @@ ladspa-delayorama::Delay-change gfloat -[0.2,5] +[0,2,5] rwx Delay-change Delay-change. @@ -12321,7 +12321,7 @@ ladspa-delayorama::Delay-range gfloat -[0.0001,6] +[0,0001,6] rwx Delay-range Delay-range. @@ -12495,7 +12495,7 @@ rwx Attack-time Attack-time. -0.25 +0,25 @@ -12505,7 +12505,7 @@ rwx Decay-time Decay-time. -0.25 +0,25 @@ -12525,7 +12525,7 @@ rwx Modulation-depth Modulation-depth. -0.25 +0,25 @@ -12585,7 +12585,7 @@ rwx Frequency-1 Frequency-1. -5000.75 +5000,75 @@ -12595,7 +12595,7 @@ rwx Frequency-2 Frequency-2. -10000.5 +10000,5 @@ -12605,7 +12605,7 @@ rwx Frequency-3 Frequency-3. -15000.2 +15000,2 @@ -12635,7 +12635,7 @@ rwx LFO-depth LFO-depth. -0.25 +0,25 @@ -12665,7 +12665,7 @@ rwx Damping Damping. -0.5 +0,5 @@ -12695,17 +12695,17 @@ rwx Input-bandwidth Input-bandwidth. -0.75 +0,75 ladspa-gverb::Reverb-time gfloat -[0.1,30] +[0,1,30] rwx Reverb-time Reverb-time. -7.575 +7,575 @@ -12715,7 +12715,7 @@ rwx Roomsize Roomsize. -75.75 +75,75 @@ -12725,7 +12725,7 @@ rwx Tail-level Tail-level. --17.5 +-17,5 @@ -12765,7 +12765,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -12775,7 +12775,7 @@ rwx Filter-Q Filter-Q. -0.25 +0,25 @@ -12975,13 +12975,13 @@ rwx Average-stall Average-stall. -2.5 +2,5 ladspa-retroFlange::Flange-frequency gfloat -[0.5,8] +[0,5,8] rwx Flange-frequency Flange-frequency. @@ -12991,7 +12991,7 @@ ladspa-fadDelay::Delay gfloat -[0.1,10] +[0,1,10] rwx Delay Delay. @@ -13041,11 +13041,11 @@ ladspa-triplePara::Band-1-frequency gfloat -[4.41,21609] +[4,41,21609] rwx Band-1-frequency Band-1-frequency. -36.8967 +36,8967 @@ -13071,11 +13071,11 @@ ladspa-triplePara::Band-2-frequency gfloat -[4.41,21609] +[4,41,21609] rwx Band-2-frequency Band-2-frequency. -308.7 +308,7 @@ -13101,11 +13101,11 @@ ladspa-triplePara::Band-3-frequency gfloat -[4.41,21609] +[4,41,21609] rwx Band-3-frequency Band-3-frequency. -2582.77 +2582,77 @@ -13121,7 +13121,7 @@ ladspa-triplePara::High-shelving-frequency gfloat -[4.41,21609] +[4,41,21609] rwx High-shelving-frequency High-shelving-frequency. @@ -13145,17 +13145,17 @@ rwx High-shelving-slope High-shelving-slope. -0.5 +0,5 ladspa-triplePara::Low-shelving-frequency gfloat -[4.41,21609] +[4,41,21609] rwx Low-shelving-frequency Low-shelving-frequency. -4.41 +4,41 @@ -13175,7 +13175,7 @@ rwx Low-shelving-slope Low-shelving-slope. -0.5 +0,5 @@ -13221,7 +13221,7 @@ ladspa-decimator::Sample-rate gfloat -[44.1,44100] +[44,1,44100] rwx Sample-rate Sample-rate. @@ -13231,11 +13231,11 @@ ladspa-flanger::Delay-base gfloat -[0.1,25] +[0,1,25] rwx Delay-base Delay-base. -6.325 +6,325 @@ -13251,11 +13251,11 @@ ladspa-flanger::LFO-frequency gfloat -[0.05,100] +[0,05,100] rwx LFO-frequency LFO-frequency. -0.33437 +0,33437 @@ -13265,7 +13265,7 @@ rwx Max-slowdown Max-slowdown. -2.5 +2,5 @@ -13325,7 +13325,7 @@ rwx Voice-separation Voice-separation. -0.5 +0,5 @@ -13835,7 +13835,7 @@ rwx Xover-lower-freq Xover-lower-freq. -1537.5 +1537,5 @@ -13891,11 +13891,11 @@ ladspa-fastLookaheadLimiter::Release-time gfloat -[0.01,2] +[0,01,2] rwx Release-time Release-time. -0.5075 +0,5075 @@ -13905,7 +13905,7 @@ r latency latency. --3.40282e+38 +-3,40282e+38 @@ -13921,7 +13921,7 @@ ladspa-comb::Feedback gfloat -[-0.99,0.99] +[-0,99,0,99] rwx Feedback Feedback. @@ -14361,11 +14361,11 @@ ladspa-Phaser1+LFO::LFO-frequency gfloat -[0.01,30] +[0,01,30] rwx LFO-frequency LFO-frequency. -0.01 +0,01 @@ -14491,7 +14491,7 @@ ladspa-Parametric1::Bandwidth-1 gfloat -[0.125,8] +[0,125,8] rwx Bandwidth-1 Bandwidth-1. @@ -14501,7 +14501,7 @@ ladspa-Parametric1::Bandwidth-2 gfloat -[0.125,8] +[0,125,8] rwx Bandwidth-2 Bandwidth-2. @@ -14511,7 +14511,7 @@ ladspa-Parametric1::Bandwidth-3 gfloat -[0.125,8] +[0,125,8] rwx Bandwidth-3 Bandwidth-3. @@ -14521,7 +14521,7 @@ ladspa-Parametric1::Bandwidth-4 gfloat -[0.125,8] +[0,125,8] rwx Bandwidth-4 Bandwidth-4. @@ -16761,21 +16761,21 @@ ladspa-Chorus2::Mod-Frequency-1 gfloat -[0.003,10] +[0,003,10] rwx Mod-Frequency-1 Mod-Frequency-1. -0.003 +0,003 ladspa-Chorus2::Mod-Frequency-2 gfloat -[0.01,30] +[0,01,30] rwx Mod-Frequency-2 Mod-Frequency-2. -0.01 +0,01 @@ -16811,21 +16811,21 @@ ladspa-Chorus1::Mod-Frequency-1 gfloat -[0.003,10] +[0,003,10] rwx Mod-Frequency-1 Mod-Frequency-1. -0.003 +0,003 ladspa-Chorus1::Mod-Frequency-2 gfloat -[0.01,30] +[0,01,30] rwx Mod-Frequency-2 Mod-Frequency-2. -0.01 +0,01 @@ -16865,7 +16865,7 @@ rwx Dry-Wet-Balance Dry-Wet-Balance. -0.5 +0,5 @@ -17845,7 +17845,7 @@ rwx Pattern sensitivity The sensitivity around the center for detecting the markers (0.0 = lowest, 1.0 highest). -0.3 +0,3 @@ -17885,7 +17885,7 @@ rwx Pattern center The center of the black/white separation (0.0 = lowest, 1.0 highest). -0.5 +0,5 @@ -18035,7 +18035,7 @@ rw stereo stereo. -0.1 +0,1 @@ -18238,6 +18238,16 @@ + +GstRtpSession::sdes +GstStructure* + +rw +SDES +The SDES items of this session. + + + GstRtpJitterBuffer::drop-on-latency gboolean @@ -18368,6 +18378,16 @@ FALSE + +GstRtpBin::sdes +GstStructure* + +rw +SDES +The SDES items of this session. + + + GstGioSrc::location gchar* @@ -20690,7 +20710,7 @@ rwx LP-filter LP-filter. -0.5 +0,5 @@ -20740,7 +20760,7 @@ rwx LP-filter LP-filter. -0.5 +0,5 @@ -20810,7 +20830,7 @@ rwx LP-filter LP-filter. -0.5 +0,5 @@ -21290,7 +21310,7 @@ rwx Frequency Frequency. -10 +2990,7 @@ -21300,13 +21320,13 @@ rwx Inertia Inertia. -5 +22,3607 ladspa-Filter::Mode gint -[0,5] +[0,11] rwx Mode Mode. @@ -21316,7 +21336,7 @@ ladspa-Filter::Resonance gfloat -[0,707,20] +[0,707,32] rwx Resonance Resonance. @@ -21326,11 +21346,11 @@ ladspa-Flanger::Amount gfloat -[0,2] +[0,4] rwx Amount Amount. -0 +1 @@ -21340,7 +21360,7 @@ rwx Feedback Feedback. --0,99 +0,99 @@ -21360,7 +21380,7 @@ rwx Modulation-depth Modulation-depth. -0,1 +0,316228 @@ -21370,7 +21390,7 @@ rwx Modulation-rate Modulation-rate. -0,01 +0,447214 @@ -21393,6 +21413,16 @@ 0 + +ladspa-Flanger::Dry-Amount +gfloat +[0,4] +rwx +Dry-Amount +Dry-Amount. +1 + + ladspa-Reverb::Amount gfloat @@ -21406,11 +21436,11 @@ ladspa-Reverb::Decay-time gfloat -[0,5,15] +[0,4,15] rwx Decay-time Decay-time. -0,5 +0,989846 @@ -21420,7 +21450,7 @@ rwx Diffusion Diffusion. -0 +0,5 @@ -21430,13 +21460,13 @@ rwx High-Frq-Damp High-Frq-Damp. -2000 +6324,56 ladspa-Reverb::Room-size gint -[0,3] +[0,5] rwx Room-size Room-size. @@ -21444,10 +21474,60 @@ -ladspa-VintageDelay::Amount +ladspa-Reverb::Bass-Cut +gfloat +[20,20000] +rwx +Bass-Cut +Bass-Cut. +632,456 + + + +ladspa-Reverb::Dry-Amount +gfloat +[0,2] +rwx +Dry-Amount +Dry-Amount. +1 + + + +ladspa-Reverb::Pre-Delay +gfloat +[0,50] +rwx +Pre-Delay +Pre-Delay. +0 + + + +ladspa-Reverb::Treble-Cut +gfloat +[20,20000] +rwx +Treble-Cut +Treble-Cut. +3556,56 + + + +ladspa-Reverb::Wet-Amount gfloat [0,2] rwx +Wet-Amount +Wet-Amount. +0,5 + + + +ladspa-VintageDelay::Amount +gfloat +[0,4] +rwx Amount Amount. 0 @@ -21460,7 +21540,7 @@ rwx Feedback Feedback. -0 +0,5 @@ -21470,7 +21550,7 @@ rwx Medium Medium. -0 +1 @@ -21480,7 +21560,7 @@ rwx Mix-mode Mix-mode. -0 +1 @@ -21500,7 +21580,7 @@ rwx Tempo Tempo. -30 +97,5 @@ -21523,6 +21603,16 @@ 1 + +ladspa-VintageDelay::Dry-Amount +gfloat +[0,4] +rwx +Dry-Amount +Dry-Amount. +1 + + ladspa-RotarySpeaker::Mod-Depth gfloat @@ -21536,7 +21626,7 @@ ladspa-RotarySpeaker::Speed-Mode gint -[0,4] +[0,5] rwx Speed-Mode Speed-Mode. @@ -21550,7 +21640,7 @@ rwx Tap-Offset Tap-Offset. -0 +0,5 @@ -21560,17 +21650,57 @@ rwx Tap-Spacing Tap-Spacing. -0 +0,5 + + + +ladspa-RotarySpeaker::Bass-Motor +gfloat +[10,600] +rwx +Bass-Motor +Bass-Motor. +600 + + + +ladspa-RotarySpeaker::Mic-Distance +gfloat +[0,1] +rwx +Mic-Distance +Mic-Distance. +0,75 + + + +ladspa-RotarySpeaker::Reflection +gfloat +[0,1] +rwx +Reflection +Reflection. +0,25 + + + +ladspa-RotarySpeaker::Treble-Motor +gfloat +[10,600] +rwx +Treble-Motor +Treble-Motor. +600 ladspa-Phaser::Amount gfloat -[0,2] +[0,4] rwx Amount Amount. -0 +1 @@ -21580,7 +21710,7 @@ rwx Center-Freq Center-Freq. -20 +632,456 @@ -21590,7 +21720,7 @@ rwx Feedback Feedback. --0,99 +0 @@ -21600,7 +21730,7 @@ rwx Modulation-depth Modulation-depth. -0 +5400 @@ -21610,7 +21740,7 @@ rwx Modulation-rate Modulation-rate. -0,01 +0,447214 @@ -21630,7 +21760,7 @@ rwx Stereo-phase Stereo-phase. -0 +180 @@ -21643,6 +21773,16 @@ 1 + +ladspa-Phaser::Dry-Amount +gfloat +[0,4] +rwx +Dry-Amount +Dry-Amount. +1 + + ladspa-Eq2x2::param-1-kHz gfloat @@ -22630,13 +22770,13 @@ rw Overlap Length Percentage of stride to overlap. -0.2 +0,2 GstScaletempo::rate gdouble -[-2.14748e+09,2.14748e+09] +[-2,14748e+09,2,14748e+09] r Playback Rate Current playback rate. @@ -22800,7 +22940,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -600 +1000 @@ -22850,7 +22990,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -600 +1000 @@ -22900,7 +23040,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -600 +1000 @@ -22950,7 +23090,7 @@ rwx Movie timescale Timescale to use in the movie (units per second). -600 +1000 @@ -23532,3 +23672,2454 @@ Drop fields of incoming caps. FALSE + + +ladspa-Filterclavier::Detune +gint +[-100,100] +rwx +Detune +Detune. +0 + + + +ladspa-Filterclavier::Max--Resonance +gfloat +[0,707,32] +rwx +Max--Resonance +Max--Resonance. +32 + + + +ladspa-Filterclavier::Mode +gint +[0,11] +rwx +Mode +Mode. +0 + + + +ladspa-Filterclavier::Portamento-time +gfloat +[1,2000] +rwx +Portamento-time +Portamento-time. +44,7214 + + + +ladspa-Filterclavier::Transpose +gint +[-48,48] +rwx +Transpose +Transpose. +0 + + + +ladspa-MultiChorus::Amount +gfloat +[0,4] +rwx +Amount +Amount. +2 + + + +ladspa-MultiChorus::Center-Frq-1 +gfloat +[10,20000] +rwx +Center-Frq-1 +Center-Frq-1. +100 + + + +ladspa-MultiChorus::Center-Frq-2 +gfloat +[10,20000] +rwx +Center-Frq-2 +Center-Frq-2. +2990,7 + + + +ladspa-MultiChorus::Dry-Amount +gfloat +[0,4] +rwx +Dry-Amount +Dry-Amount. +1 + + + +ladspa-MultiChorus::Inter-voice-phase +gfloat +[0,360] +rwx +Inter-voice-phase +Inter-voice-phase. +90 + + + +ladspa-MultiChorus::Minimum-delay +gfloat +[0,1,10] +rwx +Minimum-delay +Minimum-delay. +3,16228 + + + +ladspa-MultiChorus::Modulation-depth +gfloat +[0,1,10] +rwx +Modulation-depth +Modulation-depth. +10 + + + +ladspa-MultiChorus::Modulation-rate +gfloat +[0,01,20] +rwx +Modulation-rate +Modulation-rate. +0,447214 + + + +ladspa-MultiChorus::Q +gfloat +[0,125,8] +rwx +Q +Q. +0,125 + + + +ladspa-MultiChorus::Stereo-phase +gfloat +[0,360] +rwx +Stereo-phase +Stereo-phase. +180 + + + +ladspa-MultiChorus::Voices +gint +[1,8] +rwx +Voices +Voices. +1 + + + +ladspa-Compressor::A-weighting +gboolean + +rwx +A-weighting +A-weighting. +FALSE + + + +ladspa-Compressor::Attack +gfloat +[0,01,2000] +rwx +Attack +Attack. +4,47214 + + + +ladspa-Compressor::Bypass +gboolean + +rwx +Bypass +Bypass. +FALSE + + + +ladspa-Compressor::Compression +gfloat +[0,03125,1] +r +Compression +Compression. +0,03125 + + + +ladspa-Compressor::Detection +gint +[0,1] +rwx +Detection +Detection. +0 + + + +ladspa-Compressor::Knee +gfloat +[1,8] +rwx +Knee +Knee. +2,75 + + + +ladspa-Compressor::Makeup-Gain +gfloat +[1,64] +rwx +Makeup-Gain +Makeup-Gain. +1 + + + +ladspa-Compressor::Peak-Output +gfloat +[0,1] +r +Peak-Output +Peak-Output. +0 + + + +ladspa-Compressor::Ratio +gfloat +[1,20] +rwx +Ratio +Ratio. +1 + + + +ladspa-Compressor::Release +gfloat +[0,01,2000] +rwx +Release +Release. +94,5742 + + + +ladspa-Compressor::Stereo-Link +gint +[0,1] +rwx +Stereo-Link +Stereo-Link. +0 + + + +ladspa-Compressor::Threshold +gfloat +[0,000976563,1] +rwx +Threshold +Threshold. +0,250732 + + + +ladspa-Compressor::param-0dB +gboolean + +r +param-0dB +param-0dB. +FALSE + + + +http---calf-sourceforge-net-plugins-Compressor::attack +gfloat +[0,01,2000] +rwx +attack +attack. +20 + + + +http---calf-sourceforge-net-plugins-Compressor::aweighting +gboolean + +rwx +aweighting +aweighting. +FALSE + + + +http---calf-sourceforge-net-plugins-Compressor::bypass +gboolean + +rwx +bypass +bypass. +FALSE + + + +http---calf-sourceforge-net-plugins-Compressor::clip +gboolean + +r +clip +clip. +FALSE + + + +http---calf-sourceforge-net-plugins-Compressor::compression +gfloat +[0,1] +r +compression +compression. +0 + + + +http---calf-sourceforge-net-plugins-Compressor::detection +gint +[0,1] +rwx +detection +detection. +0 + + + +http---calf-sourceforge-net-plugins-Compressor::knee +gfloat +[1,8] +rwx +knee +knee. +2,82843 + + + +http---calf-sourceforge-net-plugins-Compressor::makeup +gfloat +[1,64] +rwx +makeup +makeup. +2 + + + +http---calf-sourceforge-net-plugins-Compressor::peak +gfloat +[0,1] +r +peak +peak. +0 + + + +http---calf-sourceforge-net-plugins-Compressor::ratio +gfloat +[1,20] +rwx +ratio +ratio. +2 + + + +http---calf-sourceforge-net-plugins-Compressor::release +gfloat +[0,01,2000] +rwx +release +release. +250 + + + +http---calf-sourceforge-net-plugins-Compressor::stereo-link +gint +[0,1] +rwx +stereo_link +stereo_link. +0 + + + +http---calf-sourceforge-net-plugins-Compressor::threshold +gfloat +[0,000976563,1] +rwx +threshold +threshold. +0,125 + + + +http---calf-sourceforge-net-plugins-Filter::freq +gfloat +[10,20000] +rwx +freq +freq. +2000 + + + +http---calf-sourceforge-net-plugins-Filter::inertia +gfloat +[5,100] +rwx +inertia +inertia. +20 + + + +http---calf-sourceforge-net-plugins-Filter::mode +gint +[0,11] +rwx +mode +mode. +0 + + + +http---calf-sourceforge-net-plugins-Filter::res +gfloat +[0,707,32] +rwx +res +res. +0,707 + + + +http---calf-sourceforge-net-plugins-Filterclavier::detune +gint +[-100,100] +rwx +detune +detune. +0 + + + +http---calf-sourceforge-net-plugins-Filterclavier::inertia +gfloat +[1,2000] +rwx +inertia +inertia. +20 + + + +http---calf-sourceforge-net-plugins-Filterclavier::maxres +gfloat +[0,707,32] +rwx +maxres +maxres. +32 + + + +http---calf-sourceforge-net-plugins-Filterclavier::mode +gint +[0,11] +rwx +mode +mode. +6 + + + +http---calf-sourceforge-net-plugins-Filterclavier::transpose +gint +[-48,48] +rwx +transpose +transpose. +0 + + + +http---calf-sourceforge-net-plugins-Flanger::amount +gfloat +[0,4] +rwx +amount +amount. +1 + + + +http---calf-sourceforge-net-plugins-Flanger::dry +gfloat +[0,4] +rwx +dry +dry. +1 + + + +http---calf-sourceforge-net-plugins-Flanger::feedback +gfloat +[-0,99,0,99] +rwx +feedback +feedback. +0,9 + + + +http---calf-sourceforge-net-plugins-Flanger::min-delay +gfloat +[0,1,10] +rwx +min_delay +min_delay. +0,1 + + + +http---calf-sourceforge-net-plugins-Flanger::mod-depth +gfloat +[0,1,10] +rwx +mod_depth +mod_depth. +0,5 + + + +http---calf-sourceforge-net-plugins-Flanger::mod-rate +gfloat +[0,01,20] +rwx +mod_rate +mod_rate. +0,25 + + + +http---calf-sourceforge-net-plugins-Flanger::reset +gboolean + +rwx +reset +reset. +FALSE + + + +http---calf-sourceforge-net-plugins-Flanger::stereo +gfloat +[0,360] +rwx +stereo +stereo. +0 + + + +http---calf-sourceforge-net-plugins-Monosynth::adsr-a +gfloat +[1,20000] +rwx +adsr_a +adsr_a. +1 + + + +http---calf-sourceforge-net-plugins-Monosynth::adsr-d +gfloat +[10,20000] +rwx +adsr_d +adsr_d. +350 + + + +http---calf-sourceforge-net-plugins-Monosynth::adsr-r +gfloat +[10,20000] +rwx +adsr_r +adsr_r. +50 + + + +http---calf-sourceforge-net-plugins-Monosynth::adsr-s +gfloat +[0,1] +rwx +adsr_s +adsr_s. +0,5 + + + +http---calf-sourceforge-net-plugins-Monosynth::cutoff +gfloat +[10,16000] +rwx +cutoff +cutoff. +33 + + + +http---calf-sourceforge-net-plugins-Monosynth::env2amp +gfloat +[0,1] +rwx +env2amp +env2amp. +1 + + + +http---calf-sourceforge-net-plugins-Monosynth::env2cutoff +gfloat +[-10800,10800] +rwx +env2cutoff +env2cutoff. +8000 + + + +http---calf-sourceforge-net-plugins-Monosynth::env2res +gfloat +[0,1] +rwx +env2res +env2res. +1 + + + +http---calf-sourceforge-net-plugins-Monosynth::filter +gint +[0,7] +rwx +filter +filter. +1 + + + +http---calf-sourceforge-net-plugins-Monosynth::filter-sep +gfloat +[-2400,2400] +rwx +filter_sep +filter_sep. +0 + + + +http---calf-sourceforge-net-plugins-Monosynth::key-follow +gfloat +[0,2] +rwx +key_follow +key_follow. +0 + + + +http---calf-sourceforge-net-plugins-Monosynth::legato +gint +[0,3] +rwx +legato +legato. +0 + + + +http---calf-sourceforge-net-plugins-Monosynth::master +gfloat +[0,1] +rwx +master +master. +0,5 + + + +http---calf-sourceforge-net-plugins-Monosynth::o1-wave +gint +[0,15] +rwx +o1_wave +o1_wave. +0 + + + +http---calf-sourceforge-net-plugins-Monosynth::o12-detune +gfloat +[0,100] +rwx +o12_detune +o12_detune. +10 + + + +http---calf-sourceforge-net-plugins-Monosynth::o12-mix +gfloat +[0,1] +rwx +o12_mix +o12_mix. +0,5 + + + +http---calf-sourceforge-net-plugins-Monosynth::o2-wave +gint +[0,15] +rwx +o2_wave +o2_wave. +1 + + + +http---calf-sourceforge-net-plugins-Monosynth::o2-xpose +gint +[-24,24] +rwx +o2_xpose +o2_xpose. +12 + + + +http---calf-sourceforge-net-plugins-Monosynth::phase-mode +gint +[0,5] +rwx +phase_mode +phase_mode. +0 + + + +http---calf-sourceforge-net-plugins-Monosynth::portamento +gfloat +[1,2000] +rwx +portamento +portamento. +1 + + + +http---calf-sourceforge-net-plugins-Monosynth::res +gfloat +[0,7,8] +rwx +res +res. +2 + + + +http---calf-sourceforge-net-plugins-Monosynth::vel2amp +gfloat +[0,1] +rwx +vel2amp +vel2amp. +0 + + + +http---calf-sourceforge-net-plugins-Monosynth::vel2filter +gfloat +[0,1] +rwx +vel2filter +vel2filter. +0,5 + + + +http---calf-sourceforge-net-plugins-MultiChorus::amount +gfloat +[0,4] +rwx +amount +amount. +2 + + + +http---calf-sourceforge-net-plugins-MultiChorus::dry +gfloat +[0,4] +rwx +dry +dry. +1 + + + +http---calf-sourceforge-net-plugins-MultiChorus::freq +gfloat +[10,20000] +rwx +freq +freq. +100 + + + +http---calf-sourceforge-net-plugins-MultiChorus::freq2 +gfloat +[10,20000] +rwx +freq2 +freq2. +5000 + + + +http---calf-sourceforge-net-plugins-MultiChorus::min-delay +gfloat +[0,1,10] +rwx +min_delay +min_delay. +5 + + + +http---calf-sourceforge-net-plugins-MultiChorus::mod-depth +gfloat +[0,1,10] +rwx +mod_depth +mod_depth. +6 + + + +http---calf-sourceforge-net-plugins-MultiChorus::mod-rate +gfloat +[0,01,20] +rwx +mod_rate +mod_rate. +0,5 + + + +http---calf-sourceforge-net-plugins-MultiChorus::q +gfloat +[0,125,8] +rwx +q +q. +0,125 + + + +http---calf-sourceforge-net-plugins-MultiChorus::stereo +gfloat +[0,360] +rwx +stereo +stereo. +180 + + + +http---calf-sourceforge-net-plugins-MultiChorus::voices +gint +[1,8] +rwx +voices +voices. +4 + + + +http---calf-sourceforge-net-plugins-MultiChorus::vphase +gfloat +[0,360] +rwx +vphase +vphase. +64 + + + +http---calf-sourceforge-net-plugins-Organ::adsr-a +gfloat +[1,20000] +rwx +adsr_a +adsr_a. +1 + + + +http---calf-sourceforge-net-plugins-Organ::adsr-d +gfloat +[10,20000] +rwx +adsr_d +adsr_d. +350 + + + +http---calf-sourceforge-net-plugins-Organ::adsr-r +gfloat +[10,20000] +rwx +adsr_r +adsr_r. +50 + + + +http---calf-sourceforge-net-plugins-Organ::adsr-s +gfloat +[0,1] +rwx +adsr_s +adsr_s. +0,5 + + + +http---calf-sourceforge-net-plugins-Organ::adsr-v +gfloat +[0,1] +rwx +adsr_v +adsr_v. +0 + + + +http---calf-sourceforge-net-plugins-Organ::adsr2-a +gfloat +[1,20000] +rwx +adsr2_a +adsr2_a. +1 + + + +http---calf-sourceforge-net-plugins-Organ::adsr2-d +gfloat +[10,20000] +rwx +adsr2_d +adsr2_d. +350 + + + +http---calf-sourceforge-net-plugins-Organ::adsr2-r +gfloat +[10,20000] +rwx +adsr2_r +adsr2_r. +50 + + + +http---calf-sourceforge-net-plugins-Organ::adsr2-s +gfloat +[0,1] +rwx +adsr2_s +adsr2_s. +0,5 + + + +http---calf-sourceforge-net-plugins-Organ::adsr2-v +gfloat +[0,1] +rwx +adsr2_v +adsr2_v. +0 + + + +http---calf-sourceforge-net-plugins-Organ::adsr3-a +gfloat +[1,20000] +rwx +adsr3_a +adsr3_a. +1 + + + +http---calf-sourceforge-net-plugins-Organ::adsr3-d +gfloat +[10,20000] +rwx +adsr3_d +adsr3_d. +350 + + + +http---calf-sourceforge-net-plugins-Organ::adsr3-r +gfloat +[10,20000] +rwx +adsr3_r +adsr3_r. +50 + + + +http---calf-sourceforge-net-plugins-Organ::adsr3-s +gfloat +[0,1] +rwx +adsr3_s +adsr3_s. +0,5 + + + +http---calf-sourceforge-net-plugins-Organ::adsr3-v +gfloat +[0,1] +rwx +adsr3_v +adsr3_v. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune +gfloat +[-100,100] +rwx +detune +detune. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune1 +gfloat +[-100,100] +rwx +detune1 +detune1. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune2 +gfloat +[-100,100] +rwx +detune2 +detune2. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune3 +gfloat +[-100,100] +rwx +detune3 +detune3. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune4 +gfloat +[-100,100] +rwx +detune4 +detune4. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune5 +gfloat +[-100,100] +rwx +detune5 +detune5. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune6 +gfloat +[-100,100] +rwx +detune6 +detune6. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune7 +gfloat +[-100,100] +rwx +detune7 +detune7. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune8 +gfloat +[-100,100] +rwx +detune8 +detune8. +0 + + + +http---calf-sourceforge-net-plugins-Organ::detune9 +gfloat +[-100,100] +rwx +detune9 +detune9. +0 + + + +http---calf-sourceforge-net-plugins-Organ::eg1-amp-ctl +gint +[0,4] +rwx +eg1_amp_ctl +eg1_amp_ctl. +0 + + + +http---calf-sourceforge-net-plugins-Organ::eg2-amp-ctl +gint +[0,4] +rwx +eg2_amp_ctl +eg2_amp_ctl. +0 + + + +http---calf-sourceforge-net-plugins-Organ::eg3-amp-ctl +gint +[0,4] +rwx +eg3_amp_ctl +eg3_amp_ctl. +0 + + + +http---calf-sourceforge-net-plugins-Organ::f1 +gint +[1,32] +rwx +f1 +f1. +1 + + + +http---calf-sourceforge-net-plugins-Organ::f1-cutoff +gfloat +[20,20000] +rwx +f1_cutoff +f1_cutoff. +2000 + + + +http---calf-sourceforge-net-plugins-Organ::f1-env1 +gfloat +[-10800,10800] +rwx +f1_env1 +f1_env1. +8000 + + + +http---calf-sourceforge-net-plugins-Organ::f1-env2 +gfloat +[-10800,10800] +rwx +f1_env2 +f1_env2. +0 + + + +http---calf-sourceforge-net-plugins-Organ::f1-env3 +gfloat +[-10800,10800] +rwx +f1_env3 +f1_env3. +0 + + + +http---calf-sourceforge-net-plugins-Organ::f1-keyf +gfloat +[0,2] +rwx +f1_keyf +f1_keyf. +0 + + + +http---calf-sourceforge-net-plugins-Organ::f1-res +gfloat +[0,7,8] +rwx +f1_res +f1_res. +2 + + + +http---calf-sourceforge-net-plugins-Organ::f2 +gint +[1,32] +rwx +f2 +f2. +3 + + + +http---calf-sourceforge-net-plugins-Organ::f2-cutoff +gfloat +[20,20000] +rwx +f2_cutoff +f2_cutoff. +2000 + + + +http---calf-sourceforge-net-plugins-Organ::f2-env1 +gfloat +[-10800,10800] +rwx +f2_env1 +f2_env1. +0 + + + +http---calf-sourceforge-net-plugins-Organ::f2-env2 +gfloat +[-10800,10800] +rwx +f2_env2 +f2_env2. +8000 + + + +http---calf-sourceforge-net-plugins-Organ::f2-env3 +gfloat +[-10800,10800] +rwx +f2_env3 +f2_env3. +0 + + + +http---calf-sourceforge-net-plugins-Organ::f2-keyf +gfloat +[0,2] +rwx +f2_keyf +f2_keyf. +0 + + + +http---calf-sourceforge-net-plugins-Organ::f2-res +gfloat +[0,7,8] +rwx +f2_res +f2_res. +2 + + + +http---calf-sourceforge-net-plugins-Organ::f3 +gint +[1,32] +rwx +f3 +f3. +2 + + + +http---calf-sourceforge-net-plugins-Organ::f4 +gint +[1,32] +rwx +f4 +f4. +4 + + + +http---calf-sourceforge-net-plugins-Organ::f5 +gint +[1,32] +rwx +f5 +f5. +6 + + + +http---calf-sourceforge-net-plugins-Organ::f6 +gint +[1,32] +rwx +f6 +f6. +8 + + + +http---calf-sourceforge-net-plugins-Organ::f7 +gint +[1,32] +rwx +f7 +f7. +10 + + + +http---calf-sourceforge-net-plugins-Organ::f8 +gint +[1,32] +rwx +f8 +f8. +12 + + + +http---calf-sourceforge-net-plugins-Organ::f9 +gint +[1,32] +rwx +f9 +f9. +16 + + + +http---calf-sourceforge-net-plugins-Organ::filter-chain +gboolean + +rwx +filter_chain +filter_chain. +FALSE + + + +http---calf-sourceforge-net-plugins-Organ::foldnote +gint +[0,127] +rwx +foldnote +foldnote. +96 + + + +http---calf-sourceforge-net-plugins-Organ::l1 +gfloat +[0,8] +rwx +l1 +l1. +8 + + + +http---calf-sourceforge-net-plugins-Organ::l2 +gfloat +[0,8] +rwx +l2 +l2. +8 + + + +http---calf-sourceforge-net-plugins-Organ::l3 +gfloat +[0,8] +rwx +l3 +l3. +8 + + + +http---calf-sourceforge-net-plugins-Organ::l4 +gfloat +[0,8] +rwx +l4 +l4. +0 + + + +http---calf-sourceforge-net-plugins-Organ::l5 +gfloat +[0,8] +rwx +l5 +l5. +0 + + + +http---calf-sourceforge-net-plugins-Organ::l6 +gfloat +[0,8] +rwx +l6 +l6. +0 + + + +http---calf-sourceforge-net-plugins-Organ::l7 +gfloat +[0,8] +rwx +l7 +l7. +0 + + + +http---calf-sourceforge-net-plugins-Organ::l8 +gfloat +[0,8] +rwx +l8 +l8. +0 + + + +http---calf-sourceforge-net-plugins-Organ::l9 +gfloat +[0,8] +rwx +l9 +l9. +8 + + + +http---calf-sourceforge-net-plugins-Organ::master +gfloat +[0,1] +rwx +master +master. +0,1 + + + +http---calf-sourceforge-net-plugins-Organ::pan1 +gfloat +[-1,1] +rwx +pan1 +pan1. +0 + + + +http---calf-sourceforge-net-plugins-Organ::pan2 +gfloat +[-1,1] +rwx +pan2 +pan2. +0 + + + +http---calf-sourceforge-net-plugins-Organ::pan3 +gfloat +[-1,1] +rwx +pan3 +pan3. +0 + + + +http---calf-sourceforge-net-plugins-Organ::pan4 +gfloat +[-1,1] +rwx +pan4 +pan4. +0 + + + +http---calf-sourceforge-net-plugins-Organ::pan5 +gfloat +[-1,1] +rwx +pan5 +pan5. +0 + + + +http---calf-sourceforge-net-plugins-Organ::pan6 +gfloat +[-1,1] +rwx +pan6 +pan6. +0 + + + +http---calf-sourceforge-net-plugins-Organ::pan7 +gfloat +[-1,1] +rwx +pan7 +pan7. +0 + + + +http---calf-sourceforge-net-plugins-Organ::pan8 +gfloat +[-1,1] +rwx +pan8 +pan8. +0 + + + +http---calf-sourceforge-net-plugins-Organ::pan9 +gfloat +[-1,1] +rwx +pan9 +pan9. +0 + + + +http---calf-sourceforge-net-plugins-Organ::perc-decay +gfloat +[10,3000] +rwx +perc_decay +perc_decay. +200 + + + +http---calf-sourceforge-net-plugins-Organ::perc-fm-decay +gfloat +[10,3000] +rwx +perc_fm_decay +perc_fm_decay. +200 + + + +http---calf-sourceforge-net-plugins-Organ::perc-fm-depth +gfloat +[0,4] +rwx +perc_fm_depth +perc_fm_depth. +0 + + + +http---calf-sourceforge-net-plugins-Organ::perc-fm-harmonic +gint +[1,32] +rwx +perc_fm_harmonic +perc_fm_harmonic. +6 + + + +http---calf-sourceforge-net-plugins-Organ::perc-fm-waveform +gint +[0,27] +rwx +perc_fm_waveform +perc_fm_waveform. +0 + + + +http---calf-sourceforge-net-plugins-Organ::perc-harmonic +gint +[1,32] +rwx +perc_harmonic +perc_harmonic. +6 + + + +http---calf-sourceforge-net-plugins-Organ::perc-level +gfloat +[0,1] +rwx +perc_level +perc_level. +0,25 + + + +http---calf-sourceforge-net-plugins-Organ::perc-stereo +gfloat +[0,360] +rwx +perc_stereo +perc_stereo. +90 + + + +http---calf-sourceforge-net-plugins-Organ::perc-trigger +gint +[0,3] +rwx +perc_trigger +perc_trigger. +0 + + + +http---calf-sourceforge-net-plugins-Organ::perc-vel2amp +gfloat +[0,1] +rwx +perc_vel2amp +perc_vel2amp. +0 + + + +http---calf-sourceforge-net-plugins-Organ::perc-vel2fm +gfloat +[0,1] +rwx +perc_vel2fm +perc_vel2fm. +0 + + + +http---calf-sourceforge-net-plugins-Organ::perc-waveform +gint +[0,27] +rwx +perc_waveform +perc_waveform. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase1 +gfloat +[0,360] +rwx +phase1 +phase1. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase2 +gfloat +[0,360] +rwx +phase2 +phase2. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase3 +gfloat +[0,360] +rwx +phase3 +phase3. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase4 +gfloat +[0,360] +rwx +phase4 +phase4. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase5 +gfloat +[0,360] +rwx +phase5 +phase5. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase6 +gfloat +[0,360] +rwx +phase6 +phase6. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase7 +gfloat +[0,360] +rwx +phase7 +phase7. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase8 +gfloat +[0,360] +rwx +phase8 +phase8. +0 + + + +http---calf-sourceforge-net-plugins-Organ::phase9 +gfloat +[0,360] +rwx +phase9 +phase9. +0 + + + +http---calf-sourceforge-net-plugins-Organ::polyphony +gint +[1,32] +rwx +polyphony +polyphony. +16 + + + +http---calf-sourceforge-net-plugins-Organ::quad-env +gboolean + +rwx +quad_env +quad_env. +FALSE + + + +http---calf-sourceforge-net-plugins-Organ::routing1 +gint +[0,2] +rwx +routing1 +routing1. +0 + + + +http---calf-sourceforge-net-plugins-Organ::routing2 +gint +[0,2] +rwx +routing2 +routing2. +0 + + + +http---calf-sourceforge-net-plugins-Organ::routing3 +gint +[0,2] +rwx +routing3 +routing3. +0 + + + +http---calf-sourceforge-net-plugins-Organ::routing4 +gint +[0,2] +rwx +routing4 +routing4. +0 + + + +http---calf-sourceforge-net-plugins-Organ::routing5 +gint +[0,2] +rwx +routing5 +routing5. +0 + + + +http---calf-sourceforge-net-plugins-Organ::routing6 +gint +[0,2] +rwx +routing6 +routing6. +0 + + + +http---calf-sourceforge-net-plugins-Organ::routing7 +gint +[0,2] +rwx +routing7 +routing7. +0 + + + +http---calf-sourceforge-net-plugins-Organ::routing8 +gint +[0,2] +rwx +routing8 +routing8. +0 + + + +http---calf-sourceforge-net-plugins-Organ::routing9 +gint +[0,2] +rwx +routing9 +routing9. +0 + + + +http---calf-sourceforge-net-plugins-Organ::transpose +gint +[-24,24] +rwx +transpose +transpose. +-12 + + + +http---calf-sourceforge-net-plugins-Organ::vib-amt +gfloat +[0,1] +rwx +vib_amt +vib_amt. +0,5 + + + +http---calf-sourceforge-net-plugins-Organ::vib-mode +gint +[0,5] +rwx +vib_mode +vib_mode. +5 + + + +http---calf-sourceforge-net-plugins-Organ::vib-phase +gfloat +[0,360] +rwx +vib_phase +vib_phase. +180 + + + +http---calf-sourceforge-net-plugins-Organ::vib-rate +gfloat +[0,01,80] +rwx +vib_rate +vib_rate. +6,6 + + + +http---calf-sourceforge-net-plugins-Organ::vib-wet +gfloat +[0,1] +rwx +vib_wet +vib_wet. +0,5 + + + +http---calf-sourceforge-net-plugins-Organ::w1 +gint +[0,35] +rwx +w1 +w1. +0 + + + +http---calf-sourceforge-net-plugins-Organ::w2 +gint +[0,35] +rwx +w2 +w2. +0 + + + +http---calf-sourceforge-net-plugins-Organ::w3 +gint +[0,35] +rwx +w3 +w3. +0 + + + +http---calf-sourceforge-net-plugins-Organ::w4 +gint +[0,35] +rwx +w4 +w4. +0 + + + +http---calf-sourceforge-net-plugins-Organ::w5 +gint +[0,35] +rwx +w5 +w5. +0 + + + +http---calf-sourceforge-net-plugins-Organ::w6 +gint +[0,35] +rwx +w6 +w6. +0 + + + +http---calf-sourceforge-net-plugins-Organ::w7 +gint +[0,35] +rwx +w7 +w7. +0 + + + +http---calf-sourceforge-net-plugins-Organ::w8 +gint +[0,35] +rwx +w8 +w8. +0 + + + +http---calf-sourceforge-net-plugins-Organ::w9 +gint +[0,35] +rwx +w9 +w9. +0 + + + +http---calf-sourceforge-net-plugins-Phaser::amount +gfloat +[0,4] +rwx +amount +amount. +1 + + + +http---calf-sourceforge-net-plugins-Phaser::base-freq +gfloat +[20,20000] +rwx +base_freq +base_freq. +1000 + + + +http---calf-sourceforge-net-plugins-Phaser::dry +gfloat +[0,4] +rwx +dry +dry. +1 + + + +http---calf-sourceforge-net-plugins-Phaser::feedback +gfloat +[-0,99,0,99] +rwx +feedback +feedback. +0,25 + + + +http---calf-sourceforge-net-plugins-Phaser::mod-depth +gfloat +[0,10800] +rwx +mod_depth +mod_depth. +4000 + + + +http---calf-sourceforge-net-plugins-Phaser::mod-rate +gfloat +[0,01,20] +rwx +mod_rate +mod_rate. +0,25 + + + +http---calf-sourceforge-net-plugins-Phaser::reset +gboolean + +rwx +reset +reset. +FALSE + + + +http---calf-sourceforge-net-plugins-Phaser::stages +gint +[1,12] +rwx +stages +stages. +6 + + + +http---calf-sourceforge-net-plugins-Phaser::stereo +gfloat +[0,360] +rwx +stereo +stereo. +180 + + + +http---calf-sourceforge-net-plugins-Reverb::amount +gfloat +[0,2] +rwx +amount +amount. +0,25 + + + +http---calf-sourceforge-net-plugins-Reverb::bass-cut +gfloat +[20,20000] +rwx +bass_cut +bass_cut. +300 + + + +http---calf-sourceforge-net-plugins-Reverb::decay-time +gfloat +[0,4,15] +rwx +decay_time +decay_time. +1,5 + + + +http---calf-sourceforge-net-plugins-Reverb::diffusion +gfloat +[0,1] +rwx +diffusion +diffusion. +0,5 + + + +http---calf-sourceforge-net-plugins-Reverb::dry +gfloat +[0,2] +rwx +dry +dry. +1 + + + +http---calf-sourceforge-net-plugins-Reverb::hf-damp +gfloat +[2000,20000] +rwx +hf_damp +hf_damp. +5000 + + + +http---calf-sourceforge-net-plugins-Reverb::predelay +gfloat +[0,50] +rwx +predelay +predelay. +0 + + + +http---calf-sourceforge-net-plugins-Reverb::room-size +gint +[0,5] +rwx +room_size +room_size. +2 + + + +http---calf-sourceforge-net-plugins-Reverb::treble-cut +gfloat +[20,20000] +rwx +treble_cut +treble_cut. +5000 + + + +http---calf-sourceforge-net-plugins-RotarySpeaker::bass-speed +gfloat +[10,600] +rwx +bass_speed +bass_speed. +410 + + + +http---calf-sourceforge-net-plugins-RotarySpeaker::mic-distance +gfloat +[0,1] +rwx +mic_distance +mic_distance. +0,7 + + + +http---calf-sourceforge-net-plugins-RotarySpeaker::mod-depth +gfloat +[0,1] +rwx +mod_depth +mod_depth. +0,1 + + + +http---calf-sourceforge-net-plugins-RotarySpeaker::reflection +gfloat +[0,1] +rwx +reflection +reflection. +0,3 + + + +http---calf-sourceforge-net-plugins-RotarySpeaker::shift +gfloat +[0,1] +rwx +shift +shift. +0,5 + + + +http---calf-sourceforge-net-plugins-RotarySpeaker::spacing +gfloat +[0,1] +rwx +spacing +spacing. +0,5 + + + +http---calf-sourceforge-net-plugins-RotarySpeaker::treble-speed +gfloat +[10,600] +rwx +treble_speed +treble_speed. +390 + + + +http---calf-sourceforge-net-plugins-RotarySpeaker::vib-speed +gint +[0,5] +rwx +vib_speed +vib_speed. +2 + + + +http---calf-sourceforge-net-plugins-VintageDelay::amount +gfloat +[0,4] +rwx +amount +amount. +0,25 + + + +http---calf-sourceforge-net-plugins-VintageDelay::bpm +gfloat +[30,300] +rwx +bpm +bpm. +120 + + + +http---calf-sourceforge-net-plugins-VintageDelay::dry +gfloat +[0,4] +rwx +dry +dry. +1 + + + +http---calf-sourceforge-net-plugins-VintageDelay::feedback +gfloat +[0,1] +rwx +feedback +feedback. +0,5 + + + +http---calf-sourceforge-net-plugins-VintageDelay::medium +gint +[0,2] +rwx +medium +medium. +1 + + + +http---calf-sourceforge-net-plugins-VintageDelay::mix-mode +gint +[0,1] +rwx +mix_mode +mix_mode. +1 + + + +http---calf-sourceforge-net-plugins-VintageDelay::subdiv +gint +[1,16] +rwx +subdiv +subdiv. +4 + + + +http---calf-sourceforge-net-plugins-VintageDelay::time-l +gint +[1,16] +rwx +time_l +time_l. +3 + + + +http---calf-sourceforge-net-plugins-VintageDelay::time-r +gint +[1,16] +rwx +time_r +time_r. +5 + + diff --git a/docs/plugins/gst-plugins-bad-plugins.hierarchy b/docs/plugins/gst-plugins-bad-plugins.hierarchy index daf967df..2c755d23 100644 --- a/docs/plugins/gst-plugins-bad-plugins.hierarchy +++ b/docs/plugins/gst-plugins-bad-plugins.hierarchy @@ -13,185 +13,527 @@ GObject GstCameraBin RsnDvdBin DvbBaseBin + GstFPSDisplaySink GstAutoConvert - GstRtpBin - GstRtpClient GstSDPDemux - GstFPSDisplaySink - GstBz2enc - GstBz2dec - GstMplex + GstRtpBin + GstSignalProcessor + http---calf-sourceforge-net-plugins-Compressor + http---calf-sourceforge-net-plugins-Filter + http---calf-sourceforge-net-plugins-Filterclavier + http---calf-sourceforge-net-plugins-Flanger + http---calf-sourceforge-net-plugins-Monosynth + http---calf-sourceforge-net-plugins-MultiChorus + http---calf-sourceforge-net-plugins-Organ + http---calf-sourceforge-net-plugins-Phaser + http---calf-sourceforge-net-plugins-Reverb + http---calf-sourceforge-net-plugins-RotarySpeaker + http---calf-sourceforge-net-plugins-VintageDelay + ladspa-delay-5s + ladspa-amp-mono + ladspa-amp-stereo + ladspa-adsr + ladspa-lpf + ladspa-hpf + ladspa-noise-white + ladspa-sine-faaa + ladspa-sine-faac + ladspa-sine-fcaa + ladspa-sine-fcac + ladspa-difference-iama-oa + ladspa-difference-iamc-oa + ladspa-difference-icma-oa + ladspa-difference-icmc-oc + ladspa-adsr-g+t + ladspa-amp-gaia-oa + ladspa-amp-gcia-oa + ladspa-branch-ia-oaoa + ladspa-branch-ic-ococ + ladspa-dahdsr-g+t-audio + ladspa-dahdsr-g+t-control + ladspa-dahdsr-cg+t-control + ladspa-interpolator + ladspa-fmod-fama-oa + ladspa-fmod-famc-oa + ladspa-fmod-fcma-oa + ladspa-fmod-fcmc-oc + ladspa-quantiser20 + ladspa-lp4pole-faraia-oa + ladspa-lp4pole-fcrcia-oa + ladspa-product-iaia-oa + ladspa-product-iaic-oa + ladspa-product-icic-oc + ladspa-pulse-fapa-oa + ladspa-pulse-fapc-oa + ladspa-pulse-fcpa-oa + ladspa-pulse-fcpc-oa + ladspa-quantiser100 + ladspa-quantiser50 + ladspa-sawtooth-fa-oa + ladspa-sawtooth-fc-oa + ladspa-random-fasa-oa + ladspa-random-fasc-oa + ladspa-random-fcsa-oa + ladspa-random-fcsc-oa + ladspa-ratio-nada-oa + ladspa-ratio-nadc-oa + ladspa-ratio-ncda-oa + ladspa-ratio-ncdc-oc + ladspa-sinusWavewrapper + ladspa-sequencer64 + ladspa-sequencer32 + ladspa-sequencer16 + ladspa-square-fa-oa + ladspa-square-fc-oa + ladspa-sum-iaia-oa + ladspa-sum-iaic-oa + ladspa-sum-icic-oc + ladspa-syncpulse-fapaga-oa + ladspa-syncpulse-fcpcga-oa + ladspa-syncsquare-faga-oa + ladspa-syncsquare-fcga-oa + ladspa-tracker-gaaadaia-oa + ladspa-tracker-gaacdcia-oa + ladspa-triangle-fasa-oa + ladspa-triangle-fasc-oa + ladspa-triangle-fcsa-oa + ladspa-triangle-fcsc-oa + ladspa-bf2cube + ladspa-bf2quad + ladspa-bf2stereo + ladspa-fmh2oct + ladspa-encode-bformat + ladspa-encode-fmh + ladspa-bf-rotate-z + ladspa-fmh-rotate-z + ladspa-am + ladspa-analogue + ladspa-canyon-delay + ladspa-disintegrator + ladspa-sledgehammer + ladspa-delay-0-01s + ladspa-delay-0-1s + ladspa-delay-1s + ladspa-delay-60s + ladspa-track-max-peak + ladspa-track-max-rms + ladspa-track-peak + ladspa-track-rms + ladspa-fmh2bf + ladspa-fbdelay-0-01s + ladspa-fbdelay-0-1s + ladspa-fbdelay-1s + ladspa-fbdelay-5s + ladspa-fbdelay-60s + ladspa-freeverb3 + ladspa-grain-scatter + ladspa-hard-gate + ladspa-identity-audio + ladspa-identity-control + ladspa-lofi + ladspa-logistic + ladspa-mixer + ladspa-noise-source-white + ladspa-null-ai + ladspa-null-ao + ladspa-null-ci + ladspa-null-co + ladspa-organ + ladspa-peak + ladspa-phasemod + ladspa-pink-interpolated-audio + ladspa-pink-full-frequency + ladspa-pink-sh + ladspa-compress-peak + ladspa-compress-rms + ladspa-expand-peak + ladspa-expand-rms + ladspa-limit-peak + ladspa-limit-rms + ladspa-syndrum + ladspa-vcf303 + ladspa-wshape-sine + ladspa-amp + ladspa-diode + ladspa-divider + ladspa-shaper + ladspa-ringmod-2i1o + ladspa-ringmod-1i1o1l + ladspa-comb + ladspa-declip + ladspa-foverdrive + ladspa-multivoiceChorus + ladspa-hermesFilter + ladspa-decimator + ladspa-flanger + ladspa-retroFlange + ladspa-singlePara + ladspa-triplePara + ladspa-transient + ladspa-fadDelay + ladspa-dcRemove + ladspa-tapeDelay + ladspa-valve + ladspa-sifter + ladspa-harmonicGen + ladspa-stepMuxer + ladspa-foldover + ladspa-svf + ladspa-gsm + ladspa-gverb + ladspa-lfoPhaser + ladspa-fourByFourPole + ladspa-autoPhaser + ladspa-fastLookaheadLimiter + ladspa-surroundEncoder + ladspa-delayorama + ladspa-dysonCompress + ladspa-crossoverDist + ladspa-valveRect + ladspa-split + ladspa-alias + ladspa-satanMaximiser + ladspa-karaoke + ladspa-gate + ladspa-combSplitter + ladspa-waveTerrain + ladspa-hardLimiter + ladspa-smoothDecimate + ladspa-fmOsc + ladspa-analogueOsc + ladspa-rateShifter + ladspa-freqTracker + ladspa-modDelay + ladspa-matrixStMS + ladspa-matrixMSSt + ladspa-matrixSpatialiser + ladspa-plate + ladspa-gong + ladspa-sc1 + ladspa-sc2 + ladspa-sc3 + ladspa-zm1 + ladspa-inv + ladspa-chebstortion + ladspa-bodeShifter + ladspa-bodeShifterCV + ladspa-amPitchshift + ladspa-sc4 + ladspa-lcrDelay + ladspa-giantFlange + ladspa-djFlanger + ladspa-gongBeater + ladspa-hilbert + ladspa-sinCos + ladspa-se4 + ladspa-bandpass-a-iir + ladspa-bandpass-iir + ladspa-highpass-iir + ladspa-lowpass-iir + ladspa-notch-iir + ladspa-dj-eq-mono + ladspa-dj-eq + ladspa-bwxover-iir + ladspa-buttlow-iir + ladspa-butthigh-iir + ladspa-allpass-n + ladspa-allpass-l + ladspa-allpass-c + ladspa-comb-n + ladspa-comb-l + ladspa-comb-c + ladspa-decay + ladspa-delay-n + ladspa-delay-l + ladspa-delay-c + ladspa-impulse-fc + ladspa-vynil + ladspa-revdelay + ladspa-lsFilter + ladspa-const + ladspa-pointerCastDistortion + ladspa-pitchScale + ladspa-artificialLatency + ladspa-xfade + ladspa-xfade4 + ladspa-sc4m + ladspa-mbeq + ladspa-formant-vc + ladspa-pitchScaleHQ + ladspa-imp + ladspa-Parametric1 + ladspa-jaminController + ladspa-Chorus1 + ladspa-Chorus2 + ladspa-Phaser1 + ladspa-Phaser1+LFO + ladspa-Mvchpf-1 + ladspa-Mvclpf-1 + ladspa-Mvclpf-2 + ladspa-Mvclpf-3 + ladspa-Mvclpf-4 + ladspa-G2reverb + ladspa-Pulse-VCO + ladspa-Saw-VCO + ladspa-Rec-VCO + ladspa-Sync-Saw-VCO + ladspa-Sync-Rect-VCO + ladspa-Sync-Tri-VCO + ladspa-hz-voct-cr + ladspa-hz-voct-ar + ladspa-range-trans-cr + ladspa-range-trans-ar + ladspa-adenv-lvl + ladspa-adenv + ladspa-prob-switch-cr + ladspa-prob-switch-ar + ladspa-dahdsr-fexp + ladspa-dahdsr-hexp + ladspa-slew-limiter-ra + ladspa-slew-limiter-rc + ladspa-signal-abs-cr + ladspa-signal-abs-ar + ladspa-slide-ta + ladspa-slide-tc + ladspa-Eq + ladspa-Eq2x2 + ladspa-Compress + ladspa-Pan + ladspa-PreampIII + ladspa-PreampIV + ladspa-ToneStack + ladspa-ToneStackLT + ladspa-AmpIII + ladspa-AmpIV + ladspa-AmpV + ladspa-AmpVTS + ladspa-CabinetI + ladspa-CabinetII + ladspa-Clip + ladspa-ChorusI + ladspa-StereoChorusI + ladspa-ChorusII + ladspa-StereoChorusII + ladspa-PhaserI + ladspa-PhaserII + ladspa-SweepVFI + ladspa-SweepVFII + ladspa-AutoWah + ladspa-Scape + ladspa-VCOs + ladspa-VCOd + ladspa-CEO + ladspa-Sin + ladspa-White + ladspa-Lorenz + ladspa-Roessler + ladspa-JVRev + ladspa-Plate + ladspa-Plate2x2 + ladspa-Click + ladspa-Dirac + ladspa-HRTF + ladspa-wg-mesh-cr + ladspa-fast-xfade + ladspa-mux-cr + ladspa-mux-ar + ladspa-power-cr + ladspa-power + ladspa-ssm-masher + ladspa-sh-cr + ladspa-sh-ar + ladspa-tap-stereo-echo + ladspa-comp-ac + ladspa-comp-aa + ladspa-tap-autopan + ladspa-tap-chorusflanger + ladspa-tap-deesser + ladspa-tap-doubler + ladspa-tap-dynamics-m + ladspa-tap-dynamics-st + ladspa-tap-equalizer + ladspa-tap-equalizer-bw + ladspa-tap-limiter + ladspa-tap-pinknoise + ladspa-tap-pitch + ladspa-tap-reflector + ladspa-tap-reverb + ladspa-tap-rotspeak + ladspa-tap-sigmoid + ladspa-tap-tremolo + ladspa-tap-tubewarmth + ladspa-tap-vibrato + ladspa-Filter + ladspa-Filterclavier + ladspa-Flanger + ladspa-Reverb + ladspa-VintageDelay + ladspa-RotarySpeaker + ladspa-Phaser + ladspa-MultiChorus + ladspa-Compressor + GstModPlug + GstXvidEnc + GstXvidDec + GstWildmidi + GstTimidity + GstSpcDec + GstPitch + GstBaseTransform + GstAudioFilter + GstBPMDetect + GstStereo + GstHDVParse + GstCapsSetter + GstLegacyresample + GstVideoFilter + GstVideoAnalyse + GstVideoDetect + GstVideoMark + GstScaletempo + GstBayer2RGB + GstBaseSink + GstSFSink + GstVideoSink + GstSDLVideoSink + GstDfbVideoSink + GstBaseAudioSink + GstAudioSink + GstSDLAudioSink + GstNasSink + GstApExSink + GstOss4Sink + GstJackAudioSink + AlsaSPDIFSink + GstFBDEVSink + GstDCCPServerSink + GstDCCPClientSink GstBaseSrc + GstSFSrc GstPushSrc GstNeonhttpSrc GstMythtvSrc - GstDc1394 GstMMS GstBaseAudioSrc GstJackAudioSrc GstAudioSrc GstOss4Source + GstDc1394 GstVCDSrc GstDvbSrc + GstRfbSrc GstDCCPClientSrc GstDCCPServerSrc - GstRfbSrc - GstSFSrc GstDTMFSrc GstRTPDTMFSrc - GstCDAudio - GstBaseSink - GstVideoSink - GstDfbVideoSink - GstSDLVideoSink - GstBaseAudioSink - GstAudioSink - GstSDLAudioSink - GstApExSink - GstNasSink - GstOss4Sink - GstJackAudioSink - GstSFSink - AlsaSPDIFSink - GstFBDEVSink - GstDCCPServerSink - GstDCCPClientSink - GstFaad - GstCeltEnc - GstCeltDec - GstSpcDec - GstWildmidi - GstBaseTransform - GstAudioFilter - GstOFA - GstBPMDetect - GstStereo - GstBayer2RGB - GstScaletempo - GstHDVParse - GstDeinterlace - GstVideoFilter - GstVideoAnalyse - GstVideoDetect - GstVideoMark - GstIIR - GstLegacyresample - GstCapsSetter - GstSignalProcessor - ladspa-noise-white - ladspa-delay-5s - ladspa-amp-mono - ladspa-amp-stereo - ladspa-sine-faaa - ladspa-sine-faac - ladspa-sine-fcaa - ladspa-sine-fcac - ladspa-lpf - ladspa-hpf - GstXvidEnc - GstXvidDec - GstPitch + GstTRM GstMusepackDec + GstMplex GstMpeg2enc + GstBaseMetadata + GstMetadataDemux + GstMetadataMux GstGSMEnc GstGSMDec + GstFaad GstFaac GstDtsDec - Gstassrender - GstDiracEnc - GstTRM - GstBaseMetadata - GstMetadataDemux - GstMetadataMux + GstCeltEnc + GstCeltDec + GstCDAudio + GstBz2enc + GstBz2dec + GstAmrwbDec + GstAmrwbParse + GstAmrwbEnc GstOss4Mixer - GstAmrBaseParse - GstAmrParse - GstFestival - GstModPlug - ADPCMDec - GstMveDemux - GstMveMux - GstSrtEnc - GstMpeg4VParse - GstCDXAParse - GstVcdParse - GstNsfDec + GstShapeWipe + GstValve GstSirenDec GstSirenEnc - MpegTsMux - GstRealVideoDec - GstRealAudioDec GstRTPMux GstRTPDTMFMux - GstRawParse - GstVideoParse - GstAudioParse + GstLiveAdder + GstBaseRTPDepayload + GstRtpDTMFDepay + GstId3BaseMux + GstId3Mux + GstVMncDec + GstTtaParse + GstTtaDec + GstSrtEnc + ADPCMDec + GstSpeed + GstInputSelector + GstOutputSelector GstRtpJitterBuffer GstRtpPtDemux GstRtpSession GstRtpSsrcDemux - GstPcapParse - GstInputSelector - GstOutputSelector - GstAacBaseParse - GstAacParse - GstVMncDec + GstRealVideoDec + GstRealAudioDec + GstRawParse + GstVideoParse + GstAudioParse GstQTMux GstMP4Mux GstGPPMux GstMJ2Mux - MpegVideoParse - GstH264Parse + GstPcapParse + GstNuvDemux + GstNsfDec GstMXFDemux GstMXFMux - GstSpeed - GstFreeze - GstId3BaseMux - GstId3Mux - GstDVDSpu - AIFFParse - GstTtaParse - GstTtaDec - GstLiveAdder - GstValve - GstBaseRTPDepayload - GstRtpDTMFDepay - GstNuvDemux - GstShapeWipe - GstFLVDemux - GstFlvMux + GstMveDemux + GstMveMux + MpegVideoParse + MpegTsMux GstMpegPSDemux GstMpegTSDemux MpegTSParse - GstDeinterlace2 + GstMpeg4VParse + GstH264Parse + GstFreeze + GstFestival + GstDVDSpu + GstCDXAParse + GstVcdParse + GstAmrBaseParse + GstAmrParse + AIFFParse + GstAacBaseParse + GstAacParse GstBus GstTask + GstTaskPool GstClock GstSystemClock GstAudioClock GstPlugin GstRegistry GstRingBuffer + GstAudioSinkRingBuffer + GstAudioSrcRingBuffer GstJackAudioSrcRingBuffer GstJackAudioSinkRingBuffer GstSignalObject + MpegTsPatInfo + MpegTsPmtInfo + RTPSession GstColorBalanceChannel GstMixerTrack GstMixerOptions - RTPSession - MpegTsPatInfo - MpegTsPmtInfo GInterface GTypePlugin GstChildProxy GstURIHandler + GstPreset GstImplementsInterface - GstNavigation - GstColorBalance GstXOverlay + GstNavigation GstTagSetter - GstPreset + GstColorBalance GstMixer GstPropertyProbe - MXFDescriptiveMetadataFrameworkInterface GstPhotography + MXFDescriptiveMetadataFrameworkInterface diff --git a/docs/plugins/gst-plugins-bad-plugins.interfaces b/docs/plugins/gst-plugins-bad-plugins.interfaces index 53172c4b..fbec62e0 100644 --- a/docs/plugins/gst-plugins-bad-plugins.interfaces +++ b/docs/plugins/gst-plugins-bad-plugins.interfaces @@ -1,35 +1,31 @@ GstBin GstChildProxy GstPipeline GstChildProxy -GstCameraBin GstChildProxy GstImplementsInterface GstColorBalance GstTagSetter GstPhotography -RsnDvdBin GstChildProxy GstURIHandler -DvbBaseBin GstChildProxy GstURIHandler +GstCameraBin GstChildProxy GstImplementsInterface GstTagSetter GstColorBalance GstPhotography +RsnDvdBin GstURIHandler GstChildProxy +DvbBaseBin GstURIHandler GstChildProxy +GstFPSDisplaySink GstChildProxy GstAutoConvert GstChildProxy -GstRtpBin GstChildProxy -GstRtpClient GstChildProxy GstSDPDemux GstChildProxy -GstFPSDisplaySink GstChildProxy +GstRtpBin GstChildProxy +GstXvidEnc GstPreset +GstSDLVideoSink GstImplementsInterface GstXOverlay GstNavigation +GstDfbVideoSink GstImplementsInterface GstNavigation GstColorBalance +GstApExSink GstImplementsInterface GstMixer +GstOss4Sink GstPropertyProbe GstNeonhttpSrc GstURIHandler GstMythtvSrc GstURIHandler GstMMS GstURIHandler -GstOss4Source GstImplementsInterface GstMixer GstPropertyProbe +GstOss4Source GstImplementsInterface GstPropertyProbe GstMixer GstVCDSrc GstURIHandler -GstCDAudio GstURIHandler -GstDfbVideoSink GstImplementsInterface GstNavigation GstColorBalance -GstSDLVideoSink GstImplementsInterface GstNavigation GstXOverlay -GstApExSink GstImplementsInterface GstMixer -GstOss4Sink GstPropertyProbe -GstCeltEnc GstTagSetter GstPreset -GstXvidEnc GstPreset GstMpeg2enc GstPreset -GstFaac GstPreset -GstDiracEnc GstPreset GstMetadataMux GstTagSetter -GstOss4Mixer GstImplementsInterface GstMixer GstPropertyProbe +GstFaac GstPreset +GstCeltEnc GstPreset GstTagSetter +GstCDAudio GstURIHandler +GstOss4Mixer GstImplementsInterface GstPropertyProbe GstMixer +GstId3BaseMux GstTagSetter +GstId3Mux GstTagSetter GstQTMux GstTagSetter GstMP4Mux GstTagSetter GstGPPMux GstTagSetter GstMJ2Mux GstTagSetter -GstId3BaseMux GstTagSetter -GstId3Mux GstTagSetter -GstFlvMux GstTagSetter -GstDeinterlace2 GstChildProxy diff --git a/docs/plugins/gst-plugins-bad-plugins.prerequisites b/docs/plugins/gst-plugins-bad-plugins.prerequisites index fa02d4b9..c676c6b6 100644 --- a/docs/plugins/gst-plugins-bad-plugins.prerequisites +++ b/docs/plugins/gst-plugins-bad-plugins.prerequisites @@ -1,8 +1,8 @@ GstChildProxy GstObject -GstImplementsInterface GstElement -GstColorBalance GstImplementsInterface GstElement -GstXOverlay GstImplementsInterface GstElement -GstTagSetter GstElement -GstMixer GstImplementsInterface GstElement +GstImplementsInterface GstObject GstElement +GstXOverlay GstObject GstImplementsInterface GstElement +GstTagSetter GstObject GstElement +GstColorBalance GstObject GstImplementsInterface GstElement +GstMixer GstObject GstImplementsInterface GstElement +GstPhotography GstObject GstImplementsInterface GstElement MXFDescriptiveMetadataFrameworkInterface MXFDescriptiveMetadata -GstPhotography GstImplementsInterface GstElement diff --git a/docs/plugins/inspect/plugin-aacparse.xml b/docs/plugins/inspect/plugin-aacparse.xml index 364edec5..7678591f 100644 --- a/docs/plugins/inspect/plugin-aacparse.xml +++ b/docs/plugins/inspect/plugin-aacparse.xml @@ -3,11 +3,11 @@ Advanced Audio Coding Parser ../../gst/aacparse/.libs/libgstaacparse.so libgstaacparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org aacparse diff --git a/docs/plugins/inspect/plugin-adpcmdec.xml b/docs/plugins/inspect/plugin-adpcmdec.xml index 08f2a20b..2526e798 100644 --- a/docs/plugins/inspect/plugin-adpcmdec.xml +++ b/docs/plugins/inspect/plugin-adpcmdec.xml @@ -3,11 +3,11 @@ ADPCM decoder ../../gst/adpcmdec/.libs/libgstadpcmdec.so libgstadpcmdec.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org msadpcmdec diff --git a/docs/plugins/inspect/plugin-aiffparse.xml b/docs/plugins/inspect/plugin-aiffparse.xml index 9f627a4d..d161d133 100644 --- a/docs/plugins/inspect/plugin-aiffparse.xml +++ b/docs/plugins/inspect/plugin-aiffparse.xml @@ -3,11 +3,11 @@ Parse an .aiff file into raw audio ../../gst/aiffparse/.libs/libgstaiffparse.so libgstaiffparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org aiffparse diff --git a/docs/plugins/inspect/plugin-alsaspdif.xml b/docs/plugins/inspect/plugin-alsaspdif.xml index 48b87e16..42ce1b73 100644 --- a/docs/plugins/inspect/plugin-alsaspdif.xml +++ b/docs/plugins/inspect/plugin-alsaspdif.xml @@ -3,11 +3,11 @@ Alsa plugin for S/PDIF output ../../ext/alsaspdif/.libs/libgstalsaspdif.so libgstalsaspdif.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org alsaspdifsink diff --git a/docs/plugins/inspect/plugin-amrparse.xml b/docs/plugins/inspect/plugin-amrparse.xml index 0404fcaa..31dcdb82 100644 --- a/docs/plugins/inspect/plugin-amrparse.xml +++ b/docs/plugins/inspect/plugin-amrparse.xml @@ -3,11 +3,11 @@ Adaptive Multi-Rate Parser ../../gst/amrparse/.libs/libgstamrparse.so libgstamrparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org amrparse diff --git a/docs/plugins/inspect/plugin-amrwb.xml b/docs/plugins/inspect/plugin-amrwb.xml index 4862a31c..bd617351 100644 --- a/docs/plugins/inspect/plugin-amrwb.xml +++ b/docs/plugins/inspect/plugin-amrwb.xml @@ -3,11 +3,11 @@ Adaptive Multi-Rate Wide-Band ../../ext/amrwb/.libs/libgstamrwb.so libgstamrwb.so - 0.10.12.1 + 0.10.13.1 unknown gst-plugins-bad GStreamer Bad Plug-ins git/prerelease - Unknown package origin + http://gstreamer.freedesktop.org amrwbdec diff --git a/docs/plugins/inspect/plugin-apex.xml b/docs/plugins/inspect/plugin-apex.xml index 66e91255..f216e275 100644 --- a/docs/plugins/inspect/plugin-apex.xml +++ b/docs/plugins/inspect/plugin-apex.xml @@ -3,11 +3,11 @@ Apple AirPort Express Plugin ../../ext/apexsink/.libs/libgstapexsink.so libgstapexsink.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org apexsink diff --git a/docs/plugins/inspect/plugin-autoconvert.xml b/docs/plugins/inspect/plugin-autoconvert.xml index b5f3e951..5c4f274b 100644 --- a/docs/plugins/inspect/plugin-autoconvert.xml +++ b/docs/plugins/inspect/plugin-autoconvert.xml @@ -3,11 +3,11 @@ Selects convertor element based on caps ../../gst/autoconvert/.libs/libgstautoconvert.so libgstautoconvert.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org autoconvert diff --git a/docs/plugins/inspect/plugin-bayer.xml b/docs/plugins/inspect/plugin-bayer.xml index 9f955014..3f2c0930 100644 --- a/docs/plugins/inspect/plugin-bayer.xml +++ b/docs/plugins/inspect/plugin-bayer.xml @@ -3,11 +3,11 @@ Elements to convert Bayer images ../../gst/bayer/.libs/libgstbayer.so libgstbayer.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org bayer2rgb diff --git a/docs/plugins/inspect/plugin-bz2.xml b/docs/plugins/inspect/plugin-bz2.xml index 35d9dd57..d1755542 100644 --- a/docs/plugins/inspect/plugin-bz2.xml +++ b/docs/plugins/inspect/plugin-bz2.xml @@ -3,11 +3,11 @@ Compress or decompress streams ../../ext/bz2/.libs/libgstbz2.so libgstbz2.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org bz2dec diff --git a/docs/plugins/inspect/plugin-camerabin.xml b/docs/plugins/inspect/plugin-camerabin.xml index e977df97..b724d4b5 100644 --- a/docs/plugins/inspect/plugin-camerabin.xml +++ b/docs/plugins/inspect/plugin-camerabin.xml @@ -3,11 +3,11 @@ High level api for DC (Digital Camera) application ../../gst/camerabin/.libs/libgstcamerabin.so libgstcamerabin.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org camerabin diff --git a/docs/plugins/inspect/plugin-cdaudio.xml b/docs/plugins/inspect/plugin-cdaudio.xml index 349de576..39fe66ee 100644 --- a/docs/plugins/inspect/plugin-cdaudio.xml +++ b/docs/plugins/inspect/plugin-cdaudio.xml @@ -3,11 +3,11 @@ Play CD audio through the CD Drive ../../ext/cdaudio/.libs/libgstcdaudio.so libgstcdaudio.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org cdaudio diff --git a/docs/plugins/inspect/plugin-cdxaparse.xml b/docs/plugins/inspect/plugin-cdxaparse.xml index d81ff8b1..f096ff54 100644 --- a/docs/plugins/inspect/plugin-cdxaparse.xml +++ b/docs/plugins/inspect/plugin-cdxaparse.xml @@ -3,11 +3,11 @@ Parse a .dat file (VCD) into raw mpeg1 ../../gst/cdxaparse/.libs/libgstcdxaparse.so libgstcdxaparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org cdxaparse diff --git a/docs/plugins/inspect/plugin-celt.xml b/docs/plugins/inspect/plugin-celt.xml index 074b128d..8b90ea1e 100644 --- a/docs/plugins/inspect/plugin-celt.xml +++ b/docs/plugins/inspect/plugin-celt.xml @@ -3,11 +3,11 @@ CELT plugin library ../../ext/celt/.libs/libgstcelt.so libgstcelt.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org celtdec diff --git a/docs/plugins/inspect/plugin-dc1394.xml b/docs/plugins/inspect/plugin-dc1394.xml index 73555d9b..955fba97 100644 --- a/docs/plugins/inspect/plugin-dc1394.xml +++ b/docs/plugins/inspect/plugin-dc1394.xml @@ -3,11 +3,11 @@ 1394 IIDC Video Source ../../ext/dc1394/.libs/libgstdc1394.so libgstdc1394.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org dc1394src diff --git a/docs/plugins/inspect/plugin-dccp.xml b/docs/plugins/inspect/plugin-dccp.xml index becc5623..7c896559 100644 --- a/docs/plugins/inspect/plugin-dccp.xml +++ b/docs/plugins/inspect/plugin-dccp.xml @@ -3,7 +3,7 @@ transfer data over the network via DCCP. ../../gst/dccp/.libs/libgstdccp.so libgstdccp.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad DCCP diff --git a/docs/plugins/inspect/plugin-debugutilsbad.xml b/docs/plugins/inspect/plugin-debugutilsbad.xml index ff6d4b92..f315f3d1 100644 --- a/docs/plugins/inspect/plugin-debugutilsbad.xml +++ b/docs/plugins/inspect/plugin-debugutilsbad.xml @@ -3,11 +3,11 @@ Collection of elements that may or may not be useful for debugging ../../gst/debugutils/.libs/libgstdebugutilsbad.so libgstdebugutilsbad.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org capssetter diff --git a/docs/plugins/inspect/plugin-dfbvideosink.xml b/docs/plugins/inspect/plugin-dfbvideosink.xml index f0b3848b..9f5f9415 100644 --- a/docs/plugins/inspect/plugin-dfbvideosink.xml +++ b/docs/plugins/inspect/plugin-dfbvideosink.xml @@ -3,11 +3,11 @@ DirectFB video output plugin ../../ext/directfb/.libs/libgstdfbvideosink.so libgstdfbvideosink.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org dfbvideosink diff --git a/docs/plugins/inspect/plugin-dtmf.xml b/docs/plugins/inspect/plugin-dtmf.xml index ee1c3ac5..1ed26490 100644 --- a/docs/plugins/inspect/plugin-dtmf.xml +++ b/docs/plugins/inspect/plugin-dtmf.xml @@ -3,11 +3,11 @@ DTMF plugins ../../gst/dtmf/.libs/libgstdtmf.so libgstdtmf.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org dtmfsrc diff --git a/docs/plugins/inspect/plugin-dtsdec.xml b/docs/plugins/inspect/plugin-dtsdec.xml index fb6462b2..a55cb362 100644 --- a/docs/plugins/inspect/plugin-dtsdec.xml +++ b/docs/plugins/inspect/plugin-dtsdec.xml @@ -3,11 +3,11 @@ Decodes DTS audio streams ../../ext/dts/.libs/libgstdtsdec.so libgstdtsdec.so - 0.10.13 + 0.10.13.1 GPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org dtsdec diff --git a/docs/plugins/inspect/plugin-dvb.xml b/docs/plugins/inspect/plugin-dvb.xml index cb63c4e7..c80022ae 100644 --- a/docs/plugins/inspect/plugin-dvb.xml +++ b/docs/plugins/inspect/plugin-dvb.xml @@ -3,11 +3,11 @@ DVB elements ../../sys/dvb/.libs/libgstdvb.so libgstdvb.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org dvbbasebin diff --git a/docs/plugins/inspect/plugin-dvdspu.xml b/docs/plugins/inspect/plugin-dvdspu.xml index 1bec7c6b..b1410201 100644 --- a/docs/plugins/inspect/plugin-dvdspu.xml +++ b/docs/plugins/inspect/plugin-dvdspu.xml @@ -3,11 +3,11 @@ DVD Sub-picture Overlay element ../../gst/dvdspu/.libs/libgstdvdspu.so libgstdvdspu.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org dvdspu diff --git a/docs/plugins/inspect/plugin-faac.xml b/docs/plugins/inspect/plugin-faac.xml index 504cc910..5cb36811 100644 --- a/docs/plugins/inspect/plugin-faac.xml +++ b/docs/plugins/inspect/plugin-faac.xml @@ -3,11 +3,11 @@ Free AAC Encoder (FAAC) ../../ext/faac/.libs/libgstfaac.so libgstfaac.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org faac diff --git a/docs/plugins/inspect/plugin-faad.xml b/docs/plugins/inspect/plugin-faad.xml index 7ff0ca70..ad0e3c0a 100644 --- a/docs/plugins/inspect/plugin-faad.xml +++ b/docs/plugins/inspect/plugin-faad.xml @@ -3,11 +3,11 @@ Free AAC Decoder (FAAD) ../../ext/faad/.libs/libgstfaad.so libgstfaad.so - 0.10.13 + 0.10.13.1 GPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org faad diff --git a/docs/plugins/inspect/plugin-fbdevsink.xml b/docs/plugins/inspect/plugin-fbdevsink.xml index 6f1aea55..041959cf 100644 --- a/docs/plugins/inspect/plugin-fbdevsink.xml +++ b/docs/plugins/inspect/plugin-fbdevsink.xml @@ -3,11 +3,11 @@ linux framebuffer video sink ../../sys/fbdev/.libs/libgstfbdevsink.so libgstfbdevsink.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org fbdevsink diff --git a/docs/plugins/inspect/plugin-festival.xml b/docs/plugins/inspect/plugin-festival.xml index 272869ad..2ff7f846 100644 --- a/docs/plugins/inspect/plugin-festival.xml +++ b/docs/plugins/inspect/plugin-festival.xml @@ -3,11 +3,11 @@ Synthesizes plain text into audio ../../gst/festival/.libs/libgstfestival.so libgstfestival.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org festival diff --git a/docs/plugins/inspect/plugin-freeze.xml b/docs/plugins/inspect/plugin-freeze.xml index 636b0eee..a32a827a 100644 --- a/docs/plugins/inspect/plugin-freeze.xml +++ b/docs/plugins/inspect/plugin-freeze.xml @@ -3,11 +3,11 @@ Stream freezer ../../gst/freeze/.libs/libgstfreeze.so libgstfreeze.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org freeze diff --git a/docs/plugins/inspect/plugin-frei0r.xml b/docs/plugins/inspect/plugin-frei0r.xml new file mode 100644 index 00000000..2167f79b --- /dev/null +++ b/docs/plugins/inspect/plugin-frei0r.xml @@ -0,0 +1,14 @@ + + frei0r + frei0r plugin library + ../../gst/frei0r/.libs/libgstfrei0r.so + libgstfrei0r.so + 0.10.13.1 + LGPL + gst-plugins-bad + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org + + + + \ No newline at end of file diff --git a/docs/plugins/inspect/plugin-gsm.xml b/docs/plugins/inspect/plugin-gsm.xml index b2b0f727..62b2e275 100644 --- a/docs/plugins/inspect/plugin-gsm.xml +++ b/docs/plugins/inspect/plugin-gsm.xml @@ -3,11 +3,11 @@ GSM encoder/decoder ../../ext/gsm/.libs/libgstgsm.so libgstgsm.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org gsmdec diff --git a/docs/plugins/inspect/plugin-gstrtpmanager.xml b/docs/plugins/inspect/plugin-gstrtpmanager.xml index 3aa25c22..82e96115 100644 --- a/docs/plugins/inspect/plugin-gstrtpmanager.xml +++ b/docs/plugins/inspect/plugin-gstrtpmanager.xml @@ -3,11 +3,11 @@ RTP session management plugin library ../../gst/rtpmanager/.libs/libgstrtpmanager.so libgstrtpmanager.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org gstrtpbin @@ -54,33 +54,6 @@ - - gstrtpclient - RTP Client - Filter/Network/RTP - Implement an RTP client - Wim Taymans <wim.taymans@gmail.com> - - - rtp_src_%d_%d - source - sometimes -
application/x-rtp
-
- - sync_sink_%d - sink - request -
application/x-rtcp
-
- - rtp_sink_%d - sink - request -
application/x-rtp
-
-
-
gstrtpjitterbuffer RTP packet jitter-buffer diff --git a/docs/plugins/inspect/plugin-gstsiren.xml b/docs/plugins/inspect/plugin-gstsiren.xml index 3659161a..2545d7c2 100644 --- a/docs/plugins/inspect/plugin-gstsiren.xml +++ b/docs/plugins/inspect/plugin-gstsiren.xml @@ -3,11 +3,11 @@ Siren encoder/decoder/payloader/depayloader plugins ../../gst/siren/.libs/libgstsiren.so libgstsiren.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org sirendec diff --git a/docs/plugins/inspect/plugin-h264parse.xml b/docs/plugins/inspect/plugin-h264parse.xml index 065b9d3d..8007043b 100644 --- a/docs/plugins/inspect/plugin-h264parse.xml +++ b/docs/plugins/inspect/plugin-h264parse.xml @@ -3,11 +3,11 @@ Element parsing raw h264 streams ../../gst/h264parse/.libs/libgsth264parse.so libgsth264parse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org h264parse diff --git a/docs/plugins/inspect/plugin-hdvparse.xml b/docs/plugins/inspect/plugin-hdvparse.xml index 12ec2108..cd057d2a 100644 --- a/docs/plugins/inspect/plugin-hdvparse.xml +++ b/docs/plugins/inspect/plugin-hdvparse.xml @@ -3,7 +3,7 @@ HDV private stream parser ../../gst/hdvparse/.libs/libgsthdvparse.so libgsthdvparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad GStreamer diff --git a/docs/plugins/inspect/plugin-id3tag.xml b/docs/plugins/inspect/plugin-id3tag.xml index 0884e332..0710b594 100644 --- a/docs/plugins/inspect/plugin-id3tag.xml +++ b/docs/plugins/inspect/plugin-id3tag.xml @@ -3,11 +3,11 @@ ID3 v1 and v2 muxing plugin ../../gst/id3tag/.libs/libgstid3tag.so libgstid3tag.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org id3mux diff --git a/docs/plugins/inspect/plugin-jack.xml b/docs/plugins/inspect/plugin-jack.xml index e1fd47b3..359dff70 100644 --- a/docs/plugins/inspect/plugin-jack.xml +++ b/docs/plugins/inspect/plugin-jack.xml @@ -3,11 +3,11 @@ Jack elements ../../ext/jack/.libs/libgstjack.so libgstjack.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org jackaudiosink diff --git a/docs/plugins/inspect/plugin-ladspa.xml b/docs/plugins/inspect/plugin-ladspa.xml index 8a89a980..c3b5cbbf 100644 --- a/docs/plugins/inspect/plugin-ladspa.xml +++ b/docs/plugins/inspect/plugin-ladspa.xml @@ -3,18 +3,8255 @@ All LADSPA plugins ../../ext/ladspa/.libs/libgstladspa.so libgstladspa.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org + + ladspa-AmpIII + C* AmpIII - Tube amp + Filter/Effect/Audio/LADSPA/Simulators + C* AmpIII - Tube amp + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-AmpIV + C* AmpIV - Tube amp + tone controls + Filter/Effect/Audio/LADSPA/Simulators + C* AmpIV - Tube amp + tone controls + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-AmpV + C* AmpV - Tube amp + Filter/Effect/Audio/LADSPA/Simulators + C* AmpV - Tube amp + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-AmpVTS + C* AmpVTS - Tube amp + Tone stack + Filter/Effect/Audio/LADSPA/Simulators + C* AmpVTS - Tube amp + Tone stack + David Yeh <dtyeh@ccrma.stanford.edu> & Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-AutoWah + C* AutoWah - Resonant envelope-following filter + Filter/Effect/Audio/LADSPA/Frequency/Filters + C* AutoWah - Resonant envelope-following filter + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-CEO + C* CEO - Chief Executive Oscillator + Source/Audio/LADSPA/Generators/Oscillators + C* CEO - Chief Executive Oscillator + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-CabinetI + C* CabinetI - Loudspeaker cabinet emulation + Filter/Effect/Audio/LADSPA/Simulators + C* CabinetI - Loudspeaker cabinet emulation + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-CabinetII + C* CabinetII - Refined loudspeaker cabinet emulation + Filter/Effect/Audio/LADSPA/Simulators + C* CabinetII - Refined loudspeaker cabinet emulation + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Chorus1 + Chorus1 - Based on CSound orchestra by Sean Costello + Filter/Effect/Audio/LADSPA/Chorus/Time + Chorus1 - Based on CSound orchestra by Sean Costello + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Chorus2 + Chorus2 - Based on CSound orchestra by Sean Costello + Filter/Effect/Audio/LADSPA/Chorus/Time + Chorus2 - Based on CSound orchestra by Sean Costello + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ChorusI + C* ChorusI - Mono chorus/flanger + Filter/Effect/Audio/LADSPA/Chorus/Time + C* ChorusI - Mono chorus/flanger + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ChorusII + C* ChorusII - Mono chorus/flanger modulated by a fractal + Filter/Effect/Audio/LADSPA/Chorus/Time + C* ChorusII - Mono chorus/flanger modulated by a fractal + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Click + C* Click - Metronome + Source/Audio/LADSPA/Time + C* Click - Metronome + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Clip + C* Clip - Hard clipper, 8x oversampled + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + C* Clip - Hard clipper, 8x oversampled + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Compress + C* Compress - Mono compressor + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + C* Compress - Mono compressor + Tim Goetze <tim@quitte.de>, Steve Harris <steve@plugin.org.uk> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Compressor + Calf Compressor LADSPA + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + Calf Compressor LADSPA + Thor Harald Johansen + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Dirac + C* Dirac - One-sample impulse generator + Source/Audio/LADSPA/Generators + C* Dirac - One-sample impulse generator + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Eq + C* Eq - 10-band equalizer + Filter/Effect/Audio/LADSPA/Frequency/EQs + C* Eq - 10-band equalizer + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Eq2x2 + C* Eq2x2 - stereo 10-band equalizer + Filter/Effect/Audio/LADSPA/Frequency/EQs + C* Eq2x2 - stereo 10-band equalizer + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in-r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in-l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Filter + Calf Filter LADSPA + Filter/Effect/Audio/LADSPA/Frequency/Filters + Calf Filter LADSPA + Krzysztof Foltman + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Filterclavier + Calf Filterclavier LADSPA + Filter/Effect/Audio/LADSPA + Calf Filterclavier LADSPA + Krzysztof Foltman / Hans Baier + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Flanger + Calf Flanger LADSPA + Filter/Effect/Audio/LADSPA/Time/Flangers + Calf Flanger LADSPA + Krzysztof Foltman + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-G2reverb + Stereo reverb + Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators + Stereo reverb + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-HRTF + C* HRTF - Head-related transfer function at elevation 0 + Filter/Effect/Audio/LADSPA/Simulators + C* HRTF - Head-related transfer function at elevation 0 + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-JVRev + C* JVRev - Stanford-style reverb from STK + Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators + C* JVRev - Stanford-style reverb from STK + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Lorenz + C* Lorenz - The sound of a Lorenz attractor + Source/Audio/LADSPA/Generators + C* Lorenz - The sound of a Lorenz attractor + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-MultiChorus + Calf MultiChorus LADSPA + Filter/Effect/Audio/LADSPA/Chorus/Time + Calf MultiChorus LADSPA + Krzysztof Foltman + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Mvchpf-1 + Mvchpf-1 Digital implementation of the VC HP filter invented by R.A. Moog + Filter/Effect/Audio/LADSPA/Frequency/Filters + Mvchpf-1 Digital implementation of the VC HP filter invented by R.A. Moog + Fons Adriaensen <fons.adriaensen@skynet.be> + + + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Mvclpf-1 + Mvclpf-1 Digital implementation of the VC filter invented by R.A.Moog + Filter/Effect/Audio/LADSPA/Frequency/Filters + Mvclpf-1 Digital implementation of the VC filter invented by R.A.Moog + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Resonance + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Mvclpf-2 + Mvclpf-2 Digital implementation of the VC filter invented by R.A.Moog + Filter/Effect/Audio/LADSPA/Frequency/Filters + Mvclpf-2 Digital implementation of the VC filter invented by R.A.Moog + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Resonance + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Mvclpf-3 + Mvclpf-3 Digital implementation of the VC filter invented by R.A.Moog + Filter/Effect/Audio/LADSPA/Frequency/Filters + Mvclpf-3 Digital implementation of the VC filter invented by R.A.Moog + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Resonance + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Mvclpf-4 + Mvclpf-4 Digital implementation of the VC filter invented by R.A.Moog + Filter/Effect/Audio/LADSPA/Frequency/Filters + Mvclpf-4 Digital implementation of the VC filter invented by R.A.Moog + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Resonance + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Pan + C* Pan - Pan and width + Filter/Effect/Audio/LADSPA/Time/Delays + C* Pan - Pan and width + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Parametric1 + 4-band parametric filter + Filter/Effect/Audio/LADSPA/Frequency/EQs/Parametric + 4-band parametric filter + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Phaser + Calf Phaser LADSPA + Filter/Effect/Audio/LADSPA/Time/Phasers + Calf Phaser LADSPA + Krzysztof Foltman + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Phaser1 + Phaser1 - Similar to CSound's phaser1 by Sean Costello + Filter/Effect/Audio/LADSPA/Time/Phasers + Phaser1 - Similar to CSound's phaser1 by Sean Costello + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Lin_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Phaser1+LFO + Phaser1 with LFO + Filter/Effect/Audio/LADSPA/Time/Phasers + Phaser1 with LFO + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-PhaserI + C* PhaserI - Mono phaser + Filter/Effect/Audio/LADSPA/Time/Phasers + C* PhaserI - Mono phaser + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-PhaserII + C* PhaserII - Mono phaser modulated by a Lorenz fractal + Filter/Effect/Audio/LADSPA/Time/Phasers + C* PhaserII - Mono phaser modulated by a Lorenz fractal + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Plate + C* Plate - Versatile plate reverb + Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators + C* Plate - Versatile plate reverb + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Plate2x2 + C* Plate2x2 - Versatile plate reverb, stereo inputs + Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators + C* Plate2x2 - Versatile plate reverb, stereo inputs + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in-r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in-l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-PreampIII + C* PreampIII - Tube preamp emulation + Filter/Effect/Audio/LADSPA/Simulators + C* PreampIII - Tube preamp emulation + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-PreampIV + C* PreampIV - Tube preamp emulation + tone controls + Filter/Effect/Audio/LADSPA/Simulators + C* PreampIV - Tube preamp emulation + tone controls + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Pulse-VCO + Pulse-VCO -- Anti-aliased oscillator + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Pulse-VCO -- Anti-aliased oscillator + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Lin_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Rec-VCO + Rec-VCO -- Anti-aliased oscillator + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Rec-VCO -- Anti-aliased oscillator + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Sync + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Mod + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Lin_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Reverb + Calf Reverb LADSPA + Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators + Calf Reverb LADSPA + Krzysztof Foltman + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Roessler + C* Roessler - The sound of a Roessler attractor + Source/Audio/LADSPA/Generators + C* Roessler - The sound of a Roessler attractor + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-RotarySpeaker + Calf Rotary Speaker LADSPA + Filter/Effect/Audio/LADSPA + Calf Rotary Speaker LADSPA + Krzysztof Foltman + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Saw-VCO + Saw-VCO -- Anti-aliased oscillator + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Saw-VCO -- Anti-aliased oscillator + Fons Adriaensen <fons.adriaensen@alcatel.be> + + + Sync + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Lin_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Scape + C* Scape - Stereo delay + Filters + Filter/Effect/Audio/LADSPA/Time/Delays + C* Scape - Stereo delay + Filters + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Sin + C* Sin - Sine wave generator + Source/Audio/LADSPA/Generators/Oscillators + C* Sin - Sine wave generator + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-StereoChorusI + C* StereoChorusI - Stereo chorus/flanger + Filter/Effect/Audio/LADSPA/Chorus/Time + C* StereoChorusI - Stereo chorus/flanger + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-StereoChorusII + C* StereoChorusII - Stereo chorus/flanger modulated by a fractal + Filter/Effect/Audio/LADSPA/Chorus/Time + C* StereoChorusII - Stereo chorus/flanger modulated by a fractal + Tim Goetze <tim@quitte.de> + + + out-r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out-l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-SweepVFI + C* SweepVFI - Resonant filter swept by a Lorenz fractal + Filter/Effect/Audio/LADSPA/Frequency/Filters + C* SweepVFI - Resonant filter swept by a Lorenz fractal + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-SweepVFII + C* SweepVFII - Resonant filter, f and Q swept by a Lorenz fractal + Filter/Effect/Audio/LADSPA/Frequency/Filters + C* SweepVFII - Resonant filter, f and Q swept by a Lorenz fractal + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Sync-Rect-VCO + Sync-Rect-VCO -- Hard-sync-capable anti-aliased oscillator + Filter/Effect/Audio/LADSPA + Sync-Rect-VCO -- Hard-sync-capable anti-aliased oscillator + Sean Bolton <musound AT jps DOT net> + + + Sync_In + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Wave_Mod + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Lin_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Sync_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Sync-Saw-VCO + Sync-Saw-VCO -- Hard-sync-capable anti-aliased oscillator + Filter/Effect/Audio/LADSPA + Sync-Saw-VCO -- Hard-sync-capable anti-aliased oscillator + Sean Bolton <musound AT jps DOT net> + + + Sync_In + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Lin_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Sync_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-Sync-Tri-VCO + Sync-Tri-VCO -- Hard-sync-capable anti-aliased oscillator + Filter/Effect/Audio/LADSPA + Sync-Tri-VCO -- Hard-sync-capable anti-aliased oscillator + Sean Bolton <musound AT jps DOT net> + + + Sync_In + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Wave_Mod + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Lin_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exp_FM + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Sync_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ToneStack + C* ToneStack - Tone stack emulation + Filter/Effect/Audio/LADSPA/Simulators + C* ToneStack - Tone stack emulation + David Yeh <dtyeh@ccrma.stanford.edu> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ToneStackLT + C* ToneStackLT - Tone stack emulation, lattice filter 44.1 + Filter/Effect/Audio/LADSPA/Simulators + C* ToneStackLT - Tone stack emulation, lattice filter 44.1 + David Yeh <dtyeh@ccrma.stanford.edu> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-VCOd + C* VCOd - Double VCO with detune and hard sync options + Source/Audio/LADSPA/Generators/Oscillators + C* VCOd - Double VCO with detune and hard sync options + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-VCOs + C* VCOs - Virtual 'analogue' oscillator + Source/Audio/LADSPA/Generators/Oscillators + C* VCOs - Virtual 'analogue' oscillator + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-VintageDelay + Calf Vintage Delay LADSPA + Filter/Effect/Audio/LADSPA/Time/Delays + Calf Vintage Delay LADSPA + Krzysztof Foltman + + + Out_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-White + C* White - White noise generator + Source/Audio/LADSPA/Generators + C* White - White noise generator + Tim Goetze <tim@quitte.de> + + + out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-adenv + Percussive AD Envelope + Filter/Effect/Audio/LADSPA + Percussive AD Envelope + Loki Davison <ltdav1[at]student.monash.edu.au> + + + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-adenv-lvl + Percussive AD Envelope with levels + Filter/Effect/Audio/LADSPA + Percussive AD Envelope with levels + Loki Davison <ltdav1[at]student.monash.edu.au> + + + Reset_Level + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-adsr + ADSR Hüllkurve + Filter/Effect/Audio/LADSPA/Amplitude/Dynamics + ADSR Hüllkurve + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Driving_Signal + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-adsr-g+t + ADSR Hüllkurve mit Gatter und Auslöseimpuls + Filter/Effect/Audio/LADSPA/Amplitude/Dynamics + ADSR Hüllkurve mit Gatter und Auslöseimpuls + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Ausl--ser + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gatter + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-alias + Aliasing + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Aliasing + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-allpass-c + Allpass delay line, cubic spline interpolation + Filter/Effect/Audio/LADSPA/Time/Delays + Allpass delay line, cubic spline interpolation + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-allpass-l + Allpass delay line, linear interpolation + Filter/Effect/Audio/LADSPA/Time/Delays + Allpass delay line, linear interpolation + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-allpass-n + Allpass delay line, noninterpolating + Filter/Effect/Audio/LADSPA/Time/Delays + Allpass delay line, noninterpolating + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-am + Amplitude Modulator + Filter/Effect/Audio/LADSPA + Amplitude Modulator + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_2 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_1 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-amPitchshift + AM pitchshifter + Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters + AM pitchshifter + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-amp + Simple amplifier + Filter/Effect/Audio/LADSPA/Amplitude/Amplifiers + Simple amplifier + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-amp-gaia-oa + Amplifier (GAIA) + Filter/Effect/Audio/LADSPA/Amplitude/Amplifiers + Amplifier (GAIA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Verst--rkung_-dB- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-amp-gcia-oa + Amplifier (GCIA) + Filter/Effect/Audio/LADSPA/Amplitude/Amplifiers + Amplifier (GCIA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
ladspa-amp-mono Mono Amplifier Filter/Effect/Audio/LADSPA - Mono Amplifier - Richard Furse (LADSPA example plugins) + Mono Amplifier + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-amp-stereo + Stereo Amplifier + Filter/Effect/Audio/LADSPA + Stereo Amplifier + Richard Furse (LADSPA example plugins) + + + Output_-Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Right- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Left- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-analogue + Analogue Voice + Source/Audio/LADSPA + Analogue Voice + CMT (http://www.ladspa.org/cmt, plugin by David A. Bartold) + + + Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-analogueOsc + Analogue Oscillator + Source/Audio/LADSPA/Generators/Oscillators + Analogue Oscillator + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-artificialLatency + Artificial latency + Filter/Effect/Audio/LADSPA/Utilities + Artificial latency + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-autoPhaser + Auto phaser + Filter/Effect/Audio/LADSPA/Time/Phasers + Auto phaser + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bandpass-a-iir + Glame Bandpass Analog Filter + Filter/Effect/Audio/LADSPA/Frequency/Bandpass/Filters + Glame Bandpass Analog Filter + Alexander Ehlert <mag@glame.de> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bandpass-iir + Glame Bandpass Filter + Filter/Effect/Audio/LADSPA/Frequency/Bandpass/Filters + Glame Bandpass Filter + Alexander Ehlert <mag@glame.de> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bf-rotate-z + Ambisonic Rotation (B-Format, Horizontal) + Filter/Effect/Audio/LADSPA + Ambisonic Rotation (B-Format, Horizontal) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-Z- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Y- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-X- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-W- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Z- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Y- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-X- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-W- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bf2cube + Ambisonic Decoder (B-Format to Cube) + Filter/Effect/Audio/LADSPA + Ambisonic Decoder (B-Format to Cube) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-Top_Back_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Top_Back_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Top_Front_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Top_Front_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Base_Back_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Base_Back_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Base_Front_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Base_Front_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Z- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Y- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-X- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-W- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bf2quad + Ambisonic Decoder (B-Format to Quad) + Filter/Effect/Audio/LADSPA + Ambisonic Decoder (B-Format to Quad) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-Back_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Back_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Front_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Front_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Z- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Y- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-X- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-W- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bf2stereo + Ambisonic Decoder (B-Format to Stereo) + Filter/Effect/Audio/LADSPA + Ambisonic Decoder (B-Format to Stereo) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Z- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Y- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-X- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-W- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bodeShifter + Bode frequency shifter + Filter/Effect/Audio/LADSPA/Spectral + Bode frequency shifter + Steve Harris <steve@plugin.org.uk> + + + Up_out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Down_out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bodeShifterCV + Bode frequency shifter (CV) + Filter/Effect/Audio/LADSPA/Spectral + Bode frequency shifter (CV) + Steve Harris <steve@plugin.org.uk> + + + Mix_out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Up_out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Down_out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Shift_CV + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-branch-ia-oaoa + Signal Branch (IA) + Filter/Effect/Audio/LADSPA/Utilities + Signal Branch (IA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Second_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + First_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-branch-ic-ococ + Signal Branch (IC) + Source/Audio/LADSPA/Utilities + Signal Branch (IC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + + + + ladspa-butthigh-iir + GLAME Butterworth Highpass + Filter/Effect/Audio/LADSPA/Frequency/Highpass/Filters + GLAME Butterworth Highpass + Alexander Ehlert <mag@glame.de> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-buttlow-iir + GLAME Butterworth Lowpass + Filter/Effect/Audio/LADSPA/Frequency/Lowpass/Filters + GLAME Butterworth Lowpass + Alexander Ehlert <mag@glame.de> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-bwxover-iir + Glame Butterworth X-over Filter + Filter/Effect/Audio/LADSPA/Frequency/Bandpass/Filters + Glame Butterworth X-over Filter + Alexander Ehlert <mag@glame.de> + + + HP-Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + LP-Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-canyon-delay + Canyon Delay + Filter/Effect/Audio/LADSPA + Canyon Delay + CMT (http://www.ladspa.org/cmt, plugin by David A. Bartold) + + + Out_-Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_-Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_-Right- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_-Left- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-chebstortion + Chebyshev distortion + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Chebyshev distortion + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-comb + Comb Filter + Filter/Effect/Audio/LADSPA/Frequency/Combs/Filters + Comb Filter + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-comb-c + Comb delay line, cubic spline interpolation + Filter/Effect/Audio/LADSPA/Time/Delays + Comb delay line, cubic spline interpolation + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-comb-l + Comb delay line, linear interpolation + Filter/Effect/Audio/LADSPA/Time/Delays + Comb delay line, linear interpolation + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-comb-n + Comb delay line, noninterpolating + Filter/Effect/Audio/LADSPA/Time/Delays + Comb delay line, noninterpolating + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-combSplitter + Comb Splitter + Filter/Effect/Audio/LADSPA/Frequency/Combs/Filters + Comb Splitter + Steve Harris <steve@plugin.org.uk> + + + Output_2 + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_1 + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-comp-aa + Comparison (AA) + Filter/Effect/Audio/LADSPA + Comparison (AA) + Thorsten Wilms + + + A_=_B + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + A_>_B + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Smaller + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Larger + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + B + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + A + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-comp-ac + Comparison (AC) + Filter/Effect/Audio/LADSPA + Comparison (AC) + Thorsten Wilms + + + A_=_B + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + A_>_B + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Smaller + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Larger + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + A + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-compress-peak + Simple Compressor (Peak Envelope Tracking) + Filter/Effect/Audio/LADSPA + Simple Compressor (Peak Envelope Tracking) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-compress-rms + Simple Compressor (RMS Envelope Tracking) + Filter/Effect/Audio/LADSPA + Simple Compressor (RMS Envelope Tracking) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-const + Constant Signal Generator + Filter/Effect/Audio/LADSPA/Utilities + Constant Signal Generator + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-crossoverDist + Crossover distortion + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Crossover distortion + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dahdsr-cg+t-control + DAHDSR Envelope with Control Gate and Trigger (Control Inputs) + Source/Audio/LADSPA/Amplitude/Dynamics + DAHDSR Envelope with Control Gate and Trigger (Control Inputs) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dahdsr-fexp + DAHDSR Envelope full exp, adr + Filter/Effect/Audio/LADSPA + DAHDSR Envelope full exp, adr + Loki Davison <ltdav1[at]student.monash.edu.au> + + + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dahdsr-g+t-audio + DAHDSR Hullkurve mit Gatter und Auslöseimpuls (Audio Eingänge) + Filter/Effect/Audio/LADSPA/Amplitude/Dynamics + DAHDSR Hullkurve mit Gatter und Auslöseimpuls (Audio Eingänge) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Ausklingzeit_-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Haltewert + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Abklingzeit_-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Haltezeit_-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Einschwingzeit_-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Verz--gerungszeit_-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Ausl--ser + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gatter + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dahdsr-g+t-control + DAHDSR Hüllkurve mit Gatter und Auslöseimpuls (Kontroll Eingänge) + Filter/Effect/Audio/LADSPA/Amplitude/Dynamics + DAHDSR Hüllkurve mit Gatter und Auslöseimpuls (Kontroll Eingänge) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Ausl--ser + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gatter + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dahdsr-hexp + DAHDSR Envelope linear attack exp dr + Filter/Effect/Audio/LADSPA + DAHDSR Envelope linear attack exp dr + Loki Davison <ltdav1[at]student.monash.edu.au> + + + Envelope_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dcRemove + DC Offset Remover + Filter/Effect/Audio/LADSPA + DC Offset Remover + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-decay + Exponential signal decay + Filter/Effect/Audio/LADSPA/Utilities + Exponential signal decay + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-decimator + Decimator + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Decimator + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-declip + Declipper + Filter/Effect/Audio/LADSPA/Amplitude/Waveshapers + Declipper + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delay-0-01s + Echo Delay Line (Maximum Delay 0,01s) + Filter/Effect/Audio/LADSPA + Echo Delay Line (Maximum Delay 0,01s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delay-0-1s + Echo Delay Line (Maximum Delay 0,1s) + Filter/Effect/Audio/LADSPA + Echo Delay Line (Maximum Delay 0,1s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delay-1s + Echo Delay Line (Maximum Delay 1s) + Filter/Effect/Audio/LADSPA + Echo Delay Line (Maximum Delay 1s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delay-5s + Simple Delay Line + Filter/Effect/Audio/LADSPA + Simple Delay Line + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delay-60s + Echo Delay Line (Maximum Delay 60s) + Filter/Effect/Audio/LADSPA + Echo Delay Line (Maximum Delay 60s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delay-c + Simple delay line, cubic spline interpolation + Filter/Effect/Audio/LADSPA/Time/Delays + Simple delay line, cubic spline interpolation + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delay-l + Simple delay line, linear interpolation + Filter/Effect/Audio/LADSPA/Time/Delays + Simple delay line, linear interpolation + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delay-n + Simple delay line, noninterpolating + Filter/Effect/Audio/LADSPA/Time/Delays + Simple delay line, noninterpolating + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-delayorama + Delayorama + Filter/Effect/Audio/LADSPA/Time/Delays + Delayorama + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-difference-iama-oa + Signal Difference (IAMA) + Filter/Effect/Audio/LADSPA/Utilities + Signal Difference (IAMA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Difference_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_to_Subtract + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-difference-iamc-oa + Signal Difference (IAMC) + Filter/Effect/Audio/LADSPA/Utilities + Signal Difference (IAMC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Difference_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-difference-icma-oa + Signal Difference (ICMA) + Filter/Effect/Audio/LADSPA/Utilities + Signal Difference (ICMA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Difference_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_to_Subtract + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-difference-icmc-oc + Signal Difference (ICMC) + Source/Audio/LADSPA/Utilities + Signal Difference (ICMC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + + + + ladspa-diode + Diode Processor + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Diode Processor + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-disintegrator + Disintegrator + Filter/Effect/Audio/LADSPA + Disintegrator + CMT (http://www.ladspa.org/cmt, plugin by Nathaniel Virgo) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-divider + Audio Divider (Suboctave Generator) + Filter/Effect/Audio/LADSPA/Generators + Audio Divider (Suboctave Generator) + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dj-eq + DJ EQ + Filter/Effect/Audio/LADSPA/Frequency/EQs + DJ EQ + Steve Harris <steve@plugin.org.uk> + + + Output_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dj-eq-mono + DJ EQ (mono) + Filter/Effect/Audio/LADSPA/Frequency/EQs + DJ EQ (mono) + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-djFlanger + DJ flanger + Filter/Effect/Audio/LADSPA/Time/Flangers + DJ flanger + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-dysonCompress + Dyson compressor + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + Dyson compressor + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-encode-bformat + Ambisonic Encoder (B-Format) + Filter/Effect/Audio/LADSPA + Ambisonic Encoder (B-Format) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-Z- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Y- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-X- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-W- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-encode-fmh + Ambisonic Encoder (FMH-Format) + Filter/Effect/Audio/LADSPA + Ambisonic Encoder (FMH-Format) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-V- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-U- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-T- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-S- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-R- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Z- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Y- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-X- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-W- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-expand-peak + Simple Expander (Peak Envelope Tracking) + Filter/Effect/Audio/LADSPA + Simple Expander (Peak Envelope Tracking) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-expand-rms + Simple Expander (RMS Envelope Tracking) + Filter/Effect/Audio/LADSPA + Simple Expander (RMS Envelope Tracking) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fadDelay + Fractionally Addressed Delay Line + Filter/Effect/Audio/LADSPA/Time/Delays + Fractionally Addressed Delay Line + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fast-xfade + Fast Crossfade + Filter/Effect/Audio/LADSPA + Fast Crossfade + Thorsten Wilms + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + B + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + A + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Level + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fastLookaheadLimiter + Fast Lookahead limiter + Filter/Effect/Audio/LADSPA/Limiters/Amplitude/Dynamics + Fast Lookahead limiter + Steve Harris <steve@plugin.org.uk> + + + Output_2 + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_1 + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_2 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_1 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fbdelay-0-01s + Feedback Delay Line (Maximum Delay 0,01s) + Filter/Effect/Audio/LADSPA + Feedback Delay Line (Maximum Delay 0,01s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fbdelay-0-1s + Feedback Delay Line (Maximum Delay 0,1s) + Filter/Effect/Audio/LADSPA + Feedback Delay Line (Maximum Delay 0,1s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fbdelay-1s + Feedback Delay Line (Maximum Delay 1s) + Filter/Effect/Audio/LADSPA + Feedback Delay Line (Maximum Delay 1s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fbdelay-5s + Feedback Delay Line (Maximum Delay 5s) + Filter/Effect/Audio/LADSPA + Feedback Delay Line (Maximum Delay 5s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fbdelay-60s + Feedback Delay Line (Maximum Delay 60s) + Filter/Effect/Audio/LADSPA + Feedback Delay Line (Maximum Delay 60s) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-flanger + Flanger + Filter/Effect/Audio/LADSPA/Time/Flangers + Flanger + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fmOsc + FM Oscillator + Filter/Effect/Audio/LADSPA/Generators/Oscillators + FM Oscillator + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency_-Hz- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fmh-rotate-z + Ambisonic Rotation (FMH-Format, Horizontal) + Filter/Effect/Audio/LADSPA + Ambisonic Rotation (FMH-Format, Horizontal) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-V- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-U- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-T- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-S- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-R- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Z- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Y- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-X- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-W- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-V- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-U- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-T- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-S- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-R- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Z- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Y- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-X- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-W- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fmh2bf + FMH-Format to B-Format (Discards RSTUV Channels) + Filter/Effect/Audio/LADSPA + FMH-Format to B-Format (Discards RSTUV Channels) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-Z- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Y- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-X- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-W- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-V- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-U- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-T- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-S- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-R- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Z- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Y- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-X- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-W- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fmh2oct + Ambisonic Decoder (FMH-Format to Octagon) + Filter/Effect/Audio/LADSPA + Ambisonic Decoder (FMH-Format to Octagon) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output_-Front_Left_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Back_Left_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Back_Back_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Back_Back_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Back_Right_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Front_Right_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Front_Front_Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Front_Front_Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-V- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-U- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-T- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-S- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-R- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Z- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Y- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-X- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-W- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fmod-fama-oa + Frequenz Modulator (FAMA) + Filter/Effect/Audio/LADSPA/Frequency + Frequenz Modulator (FAMA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Modulierte_Frequenz_-Hz- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Modulation_-Octaves- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz_-Hz- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fmod-famc-oa + Frequenz Modulator (FAMC) + Filter/Effect/Audio/LADSPA/Frequency + Frequenz Modulator (FAMC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Modulierte_Frequenz_-Hz- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz_-Hz- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fmod-fcma-oa + Frequenz Modulator (FCMA) + Filter/Effect/Audio/LADSPA/Frequency + Frequenz Modulator (FCMA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Modulierte_Frequenz_-Hz- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Modulation_-Octaves- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fmod-fcmc-oc + Frequenz Modulator (FCMC) + Source/Audio/LADSPA/Frequency + Frequenz Modulator (FCMC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + + + + ladspa-foldover + Foldover distortion + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Foldover distortion + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-formant-vc + Formant Filter (CR vowel) + Filter/Effect/Audio/LADSPA + Formant Filter (CR vowel) + Dave Robillard + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-fourByFourPole + 4 x 4 pole allpass + Filter/Effect/Audio/LADSPA/Frequency/Filters/Allpass + 4 x 4 pole allpass + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-foverdrive + Fast overdrive + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Fast overdrive + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-freeverb3 + Freeverb (Version 3) + Filter/Effect/Audio/LADSPA + Freeverb (Version 3) + CMT (http://www.ladspa.org/cmt, plugin by Jezar at Dreampoint, ported by Richard W.E. Furse) + + + Output_-Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_-Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Right- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_-Left- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-freqTracker + Frequency tracker + Filter/Effect/Audio/LADSPA/Frequency/Measurement + Frequency tracker + Steve Harris <steve@plugin.org.uk> + + + Frequency_-Hz- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-gate + Gate + Filter/Effect/Audio/LADSPA/Gates/Amplitude/Dynamics + Gate + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-giantFlange + Giant flange + Filter/Effect/Audio/LADSPA/Time/Flangers + Giant flange + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-gong + Gong model + Filter/Effect/Audio/LADSPA + Gong model + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-gongBeater + Gong beater + Filter/Effect/Audio/LADSPA/Generators + Gong beater + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-grain-scatter + Granular Scatter Processor + Filter/Effect/Audio/LADSPA + Granular Scatter Processor + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-gsm + GSM simulator + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + GSM simulator + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-gverb + GVerb + Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators + GVerb + Juhana Sadeharju <kouhia at nic.funet.fi>, LADSPAification by Steve Harris <steve@plugin.org.uk> + + + Right_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-hard-gate + Hard Gate + Filter/Effect/Audio/LADSPA + Hard Gate + CMT (http://www.ladspa.org/cmt, plugin by Nathaniel Virgo) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-hardLimiter + Hard Limiter + Filter/Effect/Audio/LADSPA + Hard Limiter + Marcus Andersson + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-harmonicGen + Harmonic generator + Filter/Effect/Audio/LADSPA/Generators + Harmonic generator + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-hermesFilter + Hermes Filter + Filter/Effect/Audio/LADSPA/Frequency/Filters + Hermes Filter + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-highpass-iir + Glame Highpass Filter + Filter/Effect/Audio/LADSPA/Frequency/Highpass/Filters + Glame Highpass Filter + Alexander Ehlert <mag@glame.de> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-hilbert + Hilbert transformer + Filter/Effect/Audio/LADSPA/Utilities + Hilbert transformer + Steve Harris <steve@plugin.org.uk> + + + 90deg_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + 0deg_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-hpf + Simple High Pass Filter + Filter/Effect/Audio/LADSPA + Simple High Pass Filter + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-hz-voct-ar + Hz to V/Oct Converter (AR) + Filter/Effect/Audio/LADSPA + Hz to V/Oct Converter (AR) + Dave Robillard + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-hz-voct-cr + Hz to V/Oct Converter (CR) + Source/Audio/LADSPA + Hz to V/Oct Converter (CR) + Dave Robillard + + + + + + ladspa-identity-audio + Identity (Audio) + Filter/Effect/Audio/LADSPA + Identity (Audio) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-identity-control + Identity (Control) + Source/Audio/LADSPA + Identity (Control) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + + + + ladspa-imp + Impulse convolver + Filter/Effect/Audio/LADSPA/Spectral + Impulse convolver + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-impulse-fc + Nonbandlimited single-sample impulses (Frequency: Control) + Source/Audio/LADSPA/Utilities + Nonbandlimited single-sample impulses (Frequency: Control) + Andy Wingo <wingo at pobox dot com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-interpolator + Control to Audio Interpolator + Source/Audio/LADSPA/Utilities + Control to Audio Interpolator + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Interpolated_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-inv + Inverter + Filter/Effect/Audio/LADSPA/Utilities + Inverter + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-jaminController + JAMin Controller + Filter/Effect/Audio/LADSPA + JAMin Controller + xxx <yyy@zzz.com> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-karaoke + Karaoke + Filter/Effect/Audio/LADSPA/Utilities + Karaoke + Steve Harris <steve@plugin.org.uk> + + + Right_out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Right_in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_in + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-lcrDelay + L/C/R Delay + Filter/Effect/Audio/LADSPA/Time/Delays + L/C/R Delay + Steve Harris <steve@plugin.org.uk> + + + R_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + L_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + R_input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + L_input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-lfoPhaser + LFO Phaser + Filter/Effect/Audio/LADSPA/Time/Phasers + LFO Phaser + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-limit-peak + Simple Limiter (Peak Envelope Tracking) + Filter/Effect/Audio/LADSPA + Simple Limiter (Peak Envelope Tracking) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-limit-rms + Simple Limiter (RMS Envelope Tracking) + Filter/Effect/Audio/LADSPA + Simple Limiter (RMS Envelope Tracking) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-lofi + Lo Fi + Filter/Effect/Audio/LADSPA + Lo Fi + CMT (http://www.ladspa.org/cmt, plugin by David A. Bartold) + + + Out_-Right- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Out_-Left- + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_-Right- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + In_-Left- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-logistic + Logistic Map Control Generator + Source/Audio/LADSPA + Logistic Map Control Generator + CMT (http://www.ladspa.org/cmt, plugin by Nathaniel Virgo) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-lowpass-iir + Glame Lowpass Filter + Filter/Effect/Audio/LADSPA/Frequency/Lowpass/Filters + Glame Lowpass Filter + Alexander Ehlert <mag@glame.de> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-lp4pole-faraia-oa + 4 Pole Low-Pass Filter with Resonance (FARAIA) + Filter/Effect/Audio/LADSPA/Frequency/Lowpass/Filters + 4 Pole Low-Pass Filter with Resonance (FARAIA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Resonanz + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Cutoff_Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-lp4pole-fcrcia-oa + 4 Pole Low-Pass Filter with Resonance (FCRCIA) + Filter/Effect/Audio/LADSPA/Frequency/Lowpass/Filters + 4 Pole Low-Pass Filter with Resonance (FCRCIA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-lpf + Simple Low Pass Filter + Filter/Effect/Audio/LADSPA + Simple Low Pass Filter + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-lsFilter + LS Filter + Filter/Effect/Audio/LADSPA/Frequency/Filters + LS Filter + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-matrixMSSt + Matrix: MS to Stereo + Filter/Effect/Audio/LADSPA/Utilities + Matrix: MS to Stereo + Steve Harris <steve@plugin.org.uk> + + + Right + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Side + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Mid + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-matrixSpatialiser + Matrix Spatialiser + Filter/Effect/Audio/LADSPA/Utilities + Matrix Spatialiser + Joern Nettingsmeier <nettings@folkwang-hochschule.de> + + + Output_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-matrixStMS + Matrix: Stereo to MS + Filter/Effect/Audio/LADSPA/Utilities + Matrix: Stereo to MS + Steve Harris <steve@plugin.org.uk> + + + Side + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Mid + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Right + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-mbeq + Multiband EQ + Filter/Effect/Audio/LADSPA/Frequency/Multiband/EQs + Multiband EQ + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-mixer + Mixer (Stereo to Mono) + Filter/Effect/Audio/LADSPA + Mixer (Stereo to Mono) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_2 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_1 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-modDelay + Modulatable delay + Filter/Effect/Audio/LADSPA/Time/Delays + Modulatable delay + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Delay_-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-multivoiceChorus + Multivoice Chorus + Filter/Effect/Audio/LADSPA/Chorus/Time + Multivoice Chorus + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-mux-ar + Multiplexer (AR) + Filter/Effect/Audio/LADSPA + Multiplexer (AR) + Thorsten Wilms + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + On + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Off + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-mux-cr + Multiplexer (CR) + Sink/Analyzer/Audio/LADSPA + Multiplexer (CR) + Thorsten Wilms + + + Gate + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-noise-source-white + Noise Source (White) + Source/Audio/LADSPA + Noise Source (White) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-noise-white + White Noise Source + Source/Audio/LADSPA + White Noise Source + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-notch-iir + Mag's Notch Filter + Filter/Effect/Audio/LADSPA/Frequency/Notch/Filters + Mag's Notch Filter + Alexander Ehlert <mag@glame.de> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-null-ai + Null (Audio Input) + Sink/Audio/LADSPA + Null (Audio Input) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-null-ao + Null (Audio Output) + Source/Audio/LADSPA + Null (Audio Output) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-null-ci + Null (Control Input) + Source/Audio/LADSPA + Null (Control Input) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + + + + ladspa-null-co + Null (Control Output) + Source/Audio/LADSPA + Null (Control Output) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + + + + ladspa-organ + Organ + Source/Audio/LADSPA + Organ + CMT (http://www.ladspa.org/cmt, plugin by David A. Bartold) + + + Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-peak + Peak Monitor + Sink/Analyzer/Audio/LADSPA + Peak Monitor + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-phasemod + Phase Modulated Voice + Source/Audio/LADSPA + Phase Modulated Voice + CMT (http://www.ladspa.org/cmt, plugin by David A. Bartold) + + + Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pink-full-frequency + Pink Noise (full frequency range) + Source/Audio/LADSPA + Pink Noise (full frequency range) + CMT (http://www.ladspa.org/cmt, plugin by Nathaniel Virgo) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pink-interpolated-audio + Pink Noise (Interpolated) + Source/Audio/LADSPA + Pink Noise (Interpolated) + CMT (http://www.ladspa.org/cmt, plugin by Nathaniel Virgo) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pink-sh + Pink Noise (sample and hold) + Source/Audio/LADSPA + Pink Noise (sample and hold) + CMT (http://www.ladspa.org/cmt, plugin by Nathaniel Virgo) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pitchScale + Pitch Scaler + Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters + Pitch Scaler + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pitchScaleHQ + Higher Quality Pitch Scaler + Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters + Higher Quality Pitch Scaler + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-plate + Plate reverb + Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators + Plate reverb + Steve Harris <steve@plugin.org.uk> + + + Right_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pointerCastDistortion + Pointer cast distortion + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Pointer cast distortion + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-power + Power (AR) + Filter/Effect/Audio/LADSPA + Power (AR) + Thorsten Wilms + + + Result + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Exponent + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Base + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-power-cr + Power (CR) + Source/Audio/LADSPA + Power (CR) + Thorsten Wilms + + + + + + ladspa-prob-switch-ar + Probability Switch (AR Controls) + Filter/Effect/Audio/LADSPA + Probability Switch (AR Controls) + Loki Davison + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Probability + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_2 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_1 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-prob-switch-cr + Probability Switch (CR Controls) + Filter/Effect/Audio/LADSPA + Probability Switch (CR Controls) + Loki Davison + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_2 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_1 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-product-iaia-oa + Signal Product (IAIA) + Filter/Effect/Audio/LADSPA/Utilities + Signal Product (IAIA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Product_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Second_Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + First_Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-product-iaic-oa + Signal Product (IAIC) + Filter/Effect/Audio/LADSPA/Utilities + Signal Product (IAIC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Product_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + First_Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-product-icic-oc + Signal Product (ICIC) + Source/Audio/LADSPA/Utilities + Signal Product (ICIC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + + + + ladspa-pulse-fapa-oa + Bandlimited Variable Width Pulse Oscillator (FAPA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Bandlimited Variable Width Pulse Oscillator (FAPA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Pulse_Width + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pulse-fapc-oa + Bandlimited Variable Width Pulse Oscillator (FAPC) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Bandlimited Variable Width Pulse Oscillator (FAPC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pulse-fcpa-oa + Bandlimited Variable Width Pulse Oscillator (FCPA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Bandlimited Variable Width Pulse Oscillator (FCPA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Pulse_Width + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-pulse-fcpc-oa + Bandlimited Variable Width Pulse Oscillator (FCPC) + Source/Audio/LADSPA/Generators/Oscillators + Bandlimited Variable Width Pulse Oscillator (FCPC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-quantiser100 + Quantiser (100 Steps) + Filter/Effect/Audio/LADSPA/Utilities + Quantiser (100 Steps) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output_Changed + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Quantised_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-quantiser20 + Quantiser (20 Steps) + Filter/Effect/Audio/LADSPA/Utilities + Quantiser (20 Steps) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output_Changed + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Quantised_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-quantiser50 + Quantiser (50 Steps) + Filter/Effect/Audio/LADSPA/Utilities + Quantiser (50 Steps) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output_Changed + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Quantised_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-random-fasa-oa + Random Wave Generator (FASA) + Filter/Effect/Audio/LADSPA/Generators + Random Wave Generator (FASA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Wave_Smoothness + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz_-Hz- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-random-fasc-oa + Random Wave Generator (FASC) + Filter/Effect/Audio/LADSPA/Generators + Random Wave Generator (FASC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz_-Hz- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-random-fcsa-oa + Random Wave Generator (FCSA) + Filter/Effect/Audio/LADSPA/Generators + Random Wave Generator (FCSA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Wave_Smoothness + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-random-fcsc-oa + Random Wave Generator (FCSC) + Source/Audio/LADSPA/Generators + Random Wave Generator (FCSC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-range-trans-ar + Range Translator (AR Controls) + Filter/Effect/Audio/LADSPA + Range Translator (AR Controls) + Dave Robillard + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_Max + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_Min + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_Max + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_Min + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-range-trans-cr + Range Translator (CR Controls) + Filter/Effect/Audio/LADSPA + Range Translator (CR Controls) + Dave Robillard + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-rateShifter + Rate shifter + Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters + Rate shifter + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ratio-nada-oa + Signal Ratio (NADA) + Filter/Effect/Audio/LADSPA/Utilities + Signal Ratio (NADA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Ratio_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Denominator + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Numerator + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ratio-nadc-oa + Signal Ratio (NADC) + Filter/Effect/Audio/LADSPA/Utilities + Signal Ratio (NADC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Ratio_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Numerator + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ratio-ncda-oa + Signal Ratio (NCDA) + Filter/Effect/Audio/LADSPA/Utilities + Signal Ratio (NCDA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Ratio_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Denominator + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ratio-ncdc-oc + Signal Ratio (NCDC) + Source/Audio/LADSPA/Utilities + Signal Ratio (NCDC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + + + + ladspa-retroFlange + Retro Flanger + Filter/Effect/Audio/LADSPA/Time/Flangers + Retro Flanger + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-revdelay + Reverse Delay (5s max) + Filter/Effect/Audio/LADSPA/Time/Delays + Reverse Delay (5s max) + Jesse Chappell <jesse at essej dot net> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ringmod-1i1o1l + Ringmod with LFO + Filter/Effect/Audio/LADSPA/Amplitude/Modulators + Ringmod with LFO + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ringmod-2i1o + Ringmod with two inputs + Filter/Effect/Audio/LADSPA/Amplitude/Modulators + Ringmod with two inputs + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Modulator + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-satanMaximiser + Barry's Satan Maximiser + Filter/Effect/Audio/LADSPA + Barry's Satan Maximiser + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sawtooth-fa-oa + Bandlimited Sawtooth Oscillator (FA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Bandlimited Sawtooth Oscillator (FA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sawtooth-fc-oa + Bandlimited Sawtooth Oscillator (FC) + Source/Audio/LADSPA/Generators/Oscillators + Bandlimited Sawtooth Oscillator (FC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sc1 + SC1 + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + SC1 + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sc2 + SC2 + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + SC2 + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Sidechain + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sc3 + SC3 + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + SC3 + Steve Harris <steve@plugin.org.uk> + + + Right_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Right_input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Sidechain + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sc4 + SC4 + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + SC4 + Steve Harris <steve@plugin.org.uk> + + + Right_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Right_input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sc4m + SC4 mono + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + SC4 mono + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-se4 + SE4 + Filter/Effect/Audio/LADSPA/Compressors/Amplitude/Dynamics + SE4 + Steve Harris <steve@plugin.org.uk> + + + Right_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Right_input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Left_input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sequencer16 + Analogue Style 16 Step Sequencer + Filter/Effect/Audio/LADSPA/Simulators + Analogue Style 16 Step Sequencer + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Value_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Step_Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate_-Open_>_0- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sequencer32 + Analogue Style 32 Step Sequencer + Filter/Effect/Audio/LADSPA/Simulators + Analogue Style 32 Step Sequencer + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Value_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Step_Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate_-Open_>_0- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sequencer64 + Analogue Style 64 Step Sequencer + Filter/Effect/Audio/LADSPA/Simulators + Analogue Style 64 Step Sequencer + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Value_Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Step_Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate_-Open_>_0- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sh-ar + Sample and Hold (AR Threshold) + Filter/Effect/Audio/LADSPA + Sample and Hold (AR Threshold) + Thorsten Wilms + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Threshold + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sh-cr + Sample and Hold (CR Threshold) + Filter/Effect/Audio/LADSPA + Sample and Hold (CR Threshold) + Thorsten Wilms + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Trigger + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-shaper + Wave shaper + Filter/Effect/Audio/LADSPA/Amplitude/Waveshapers + Wave shaper + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sifter + Signal sifter + Filter/Effect/Audio/LADSPA + Signal sifter + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-signal-abs-ar + Signal Absolute value, negative or positive (AR Controls) + Filter/Effect/Audio/LADSPA + Signal Absolute value, negative or positive (AR Controls) + Loki Davison + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Sign + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_1 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-signal-abs-cr + Signal Absolute value, negative or positive (CR Controls) + Filter/Effect/Audio/LADSPA + Signal Absolute value, negative or positive (CR Controls) + Loki Davison + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sinCos + Sine + cosine oscillator + Source/Audio/LADSPA/Generators/Oscillators + Sine + cosine oscillator + Steve Harris <steve@plugin.org.uk> + + + Cosine_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Sine_output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sine-faaa + Sine Oscillator (Freq:audio, Amp:audio) + Filter/Effect/Audio/LADSPA + Sine Oscillator (Freq:audio, Amp:audio) + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Amplitude + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency_-Hz- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sine-faac + Sine Oscillator (Freq:audio, Amp:control) + Filter/Effect/Audio/LADSPA + Sine Oscillator (Freq:audio, Amp:control) + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency_-Hz- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sine-fcaa + Sine Oscillator (Freq:control, Amp:audio) + Filter/Effect/Audio/LADSPA + Sine Oscillator (Freq:control, Amp:audio) + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Amplitude + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sine-fcac + Sine Oscillator (Freq:control, Amp:control) + Source/Audio/LADSPA + Sine Oscillator (Freq:control, Amp:control) + Richard Furse (LADSPA example plugins) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-singlePara + Single band parametric + Filter/Effect/Audio/LADSPA/Frequency/EQs/Parametric + Single band parametric + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sinusWavewrapper + Sinus wavewrapper + Filter/Effect/Audio/LADSPA/Amplitude/Waveshapers + Sinus wavewrapper + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sledgehammer + Dynamic Sledgehammer + Filter/Effect/Audio/LADSPA + Dynamic Sledgehammer + CMT (http://www.ladspa.org/cmt, plugin by Nathaniel Virgo) + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Carrier + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Modulator + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-slew-limiter-ra + Slew limiter (RA) + Filter/Effect/Audio/LADSPA + Slew limiter (RA) + Lars Luthman <larsl@users.sourceforge.net> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Fall_rate_-1-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Rise_rate_-1-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-slew-limiter-rc + Slew limiter (RC) + Filter/Effect/Audio/LADSPA + Slew limiter (RC) + Lars Luthman <larsl@users.sourceforge.net> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-slide-ta + Slide (TA) + Filter/Effect/Audio/LADSPA + Slide (TA) + Lars Luthman <larsl@users.sourceforge.net> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Fall_time_-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Rise_time_-s- + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-slide-tc + Slide (TC) + Filter/Effect/Audio/LADSPA + Slide (TC) + Lars Luthman <larsl@users.sourceforge.net> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-smoothDecimate + Smooth Decimator + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + Smooth Decimator + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-split + Mono to Stereo splitter + Filter/Effect/Audio/LADSPA/Utilities + Mono to Stereo splitter + Frank Neumann <franky@users.sourceforge.net> + + + Output_2 + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_1 + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-square-fa-oa + Bandlimited Square Oscillator (FA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Bandlimited Square Oscillator (FA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-square-fc-oa + Bandlimited Square Oscillator (FC) + Source/Audio/LADSPA/Generators/Oscillators + Bandlimited Square Oscillator (FC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-ssm-masher + Masher + Filter/Effect/Audio/LADSPA + Masher + Dave Griffiths + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-stepMuxer + Step Demuxer + Filter/Effect/Audio/LADSPA/Utilities + Step Demuxer + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_8 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_7 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_6 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_5 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_4 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_3 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_2 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_1 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Clock + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sum-iaia-oa + Signal Sum (IAIA) + Filter/Effect/Audio/LADSPA/Utilities + Signal Sum (IAIA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Summed_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Second_Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + First_Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sum-iaic-oa + Signal Sum (IAIC) + Filter/Effect/Audio/LADSPA/Utilities + Signal Sum (IAIC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Summed_Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + First_Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-sum-icic-oc + Signal Sum (ICIC) + Source/Audio/LADSPA/Utilities + Signal Sum (ICIC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + + + + ladspa-surroundEncoder + Surround matrix encoder + Filter/Effect/Audio/LADSPA/Utilities + Surround matrix encoder + Steve Harris <steve@plugin.org.uk> + + + Rt + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Lt + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + S + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + C + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-svf + State Variable Filter + Filter/Effect/Audio/LADSPA/Frequency/Filters + State Variable Filter + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-syncpulse-fapaga-oa + Clock Pulse Oscillator with Gate (FAPAGA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Clock Pulse Oscillator with Gate (FAPAGA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gatter + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Pulse_Width + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-syncpulse-fcpcga-oa + Clock Pulse Oscillator with Gate (FCPCGA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Clock Pulse Oscillator with Gate (FCPCGA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gatter + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-syncsquare-faga-oa + Clock Oscillator with Gate (FAGA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Clock Oscillator with Gate (FAGA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequency + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-syncsquare-fcga-oa + Clock Oscillator with Gate (FCGA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Clock Oscillator with Gate (FCGA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gate + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-syndrum + Syn Drum + Source/Audio/LADSPA + Syn Drum + CMT (http://www.ladspa.org/cmt, plugin by David A. Bartold) + + + Out + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-autopan + TAP AutoPanner + Filter/Effect/Audio/LADSPA/Amplitude/Modulators + TAP AutoPanner + Tom Szilagyi + + + Output_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-chorusflanger + TAP Chorus/Flanger + Filter/Effect/Audio/LADSPA/Time/Flangers + TAP Chorus/Flanger + Tom Szilagyi + + + Output_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-deesser + TAP DeEsser + Filter/Effect/Audio/LADSPA/Amplitude/Dynamics + TAP DeEsser + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-doubler + TAP Fractal Doubler + Filter/Effect/Audio/LADSPA/Simulators + TAP Fractal Doubler + Tom Szilagyi + + + Output_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-dynamics-m + TAP Dynamics (M) + Filter/Effect/Audio/LADSPA/Amplitude/Dynamics + TAP Dynamics (M) + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-dynamics-st + TAP Dynamics (St) + Filter/Effect/Audio/LADSPA/Amplitude/Dynamics + TAP Dynamics (St) + Tom Szilagyi + + + Output_Right + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_Left + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_Right + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_Left + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-equalizer + TAP Equalizer + Filter/Effect/Audio/LADSPA/Frequency/EQs + TAP Equalizer + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-equalizer-bw + TAP Equalizer/BW + Filter/Effect/Audio/LADSPA/Frequency/EQs + TAP Equalizer/BW + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-limiter + TAP Scaling Limiter + Filter/Effect/Audio/LADSPA/Limiters/Amplitude/Dynamics + TAP Scaling Limiter + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-pinknoise + TAP Pink/Fractal Noise + Filter/Effect/Audio/LADSPA/Utilities + TAP Pink/Fractal Noise + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-pitch + TAP Pitch Shifter + Filter/Effect/Audio/LADSPA/Frequency/Pitch shifters + TAP Pitch Shifter + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-reflector + TAP Reflector + Filter/Effect/Audio/LADSPA/Time + TAP Reflector + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-reverb + TAP Reverberator + Filter/Effect/Audio/LADSPA/Reverbs/Time/Simulators + TAP Reverberator + Tom Szilagyi + + + Output_Right + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_Right + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_Left + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_Left + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-rotspeak + TAP Rotary Speaker + Filter/Effect/Audio/LADSPA/Simulators + TAP Rotary Speaker + Tom Szilagyi + + + Output_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_L + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-sigmoid + TAP Sigmoid Booster + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + TAP Sigmoid Booster + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-stereo-echo + TAP Stereo Echo + Filter/Effect/Audio/LADSPA/Time/Delays + TAP Stereo Echo + Tom Szilagyi + + + Output_Right + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_Right + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_Left + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_Left + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-tremolo + TAP Tremolo + Filter/Effect/Audio/LADSPA/Amplitude/Modulators + TAP Tremolo + Tom Szilagyi + + + Output_0 + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_0 + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-tubewarmth + TAP TubeWarmth + Filter/Effect/Audio/LADSPA/Simulators + TAP TubeWarmth + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tap-vibrato + TAP Vibrato + Filter/Effect/Audio/LADSPA/Amplitude/Modulators + TAP Vibrato + Tom Szilagyi + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tapeDelay + Tape Delay Simulation + Filter/Effect/Audio/LADSPA + Tape Delay Simulation + Steve Harris <steve@plugin.org.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-track-max-peak + Envelope Tracker (Maximum Peak) + Sink/Analyzer/Audio/LADSPA + Envelope Tracker (Maximum Peak) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-track-max-rms + Envelope Tracker (Maximum RMS) + Sink/Analyzer/Audio/LADSPA + Envelope Tracker (Maximum RMS) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-track-peak + Envelope Tracker (Peak) + Sink/Analyzer/Audio/LADSPA + Envelope Tracker (Peak) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-track-rms + Envelope Tracker (RMS) + Sink/Analyzer/Audio/LADSPA + Envelope Tracker (RMS) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) + + + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tracker-gaaadaia-oa + Signal Tracker (Audio Rates) + Filter/Effect/Audio/LADSPA + Signal Tracker (Audio Rates) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Decay_Rate_-Hz-_when_Gate_Low + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Attack_Rate_-Hz-_when_Gate_Low + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Decay_Rate_-Hz-_when_Gate_High + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Attack_Rate_-Hz-_when_Gate_High + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Gatter + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-tracker-gaacdcia-oa + Signal Tracker (Control Rates) + Filter/Effect/Audio/LADSPA/Amplitude/Waveshapers + Signal Tracker (Control Rates) + Mike Rawes <mike_rawes[at]yahoo.co.uk> Output @@ -28,35 +8265,56 @@ always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+ + Gatter + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
- ladspa-amp-stereo - Stereo Amplifier - Filter/Effect/Audio/LADSPA - Stereo Amplifier - Richard Furse (LADSPA example plugins) + ladspa-transient + Transient mangler + Filter/Effect/Audio/LADSPA/Amplitude/Dynamics + Transient mangler + Steve Harris <steve@plugin.org.uk> - Output_-Right- + Output source always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Input_-Right- + Input sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+ + ladspa-triangle-fasa-oa + Bandlimited Variable Slope Triangle Oscillator (FASA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Bandlimited Variable Slope Triangle Oscillator (FASA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + - Output_-Left- + Output source always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Input_-Left- + Slope + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Frequenz sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -64,11 +8322,11 @@
- ladspa-delay-5s - Simple Delay Line - Filter/Effect/Audio/LADSPA - Simple Delay Line - Richard Furse (LADSPA example plugins) + ladspa-triangle-fasc-oa + Bandlimited Variable Slope Triangle Oscillator (FASC) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Bandlimited Variable Slope Triangle Oscillator (FASC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> Output @@ -77,7 +8335,7 @@
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Input + Frequenz sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -85,11 +8343,47 @@
- ladspa-hpf - Simple High Pass Filter - Filter/Effect/Audio/LADSPA - Simple High Pass Filter - Richard Furse (LADSPA example plugins) + ladspa-triangle-fcsa-oa + Bandlimited Variable Slope Triangle Oscillator (FCSA) + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Bandlimited Variable Slope Triangle Oscillator (FCSA) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Slope + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-triangle-fcsc-oa + Bandlimited Variable Slope Triangle Oscillator (FCSC) + Source/Audio/LADSPA/Generators/Oscillators + Bandlimited Variable Slope Triangle Oscillator (FCSC) + Mike Rawes <mike_rawes[at]yahoo.co.uk> + + + Output + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-triplePara + Triple band parametric with shelves + Filter/Effect/Audio/LADSPA/Frequency/EQs/Parametric + Triple band parametric with shelves + Steve Harris <steve@plugin.org.uk> Output @@ -106,11 +8400,11 @@ - ladspa-lpf - Simple Low Pass Filter + ladspa-valve + Valve saturation Filter/Effect/Audio/LADSPA - Simple Low Pass Filter - Richard Furse (LADSPA example plugins) + Valve saturation + Steve Harris <steve@plugin.org.uk> Output @@ -127,11 +8421,11 @@ - ladspa-noise-white - White Noise Source - Source/Audio/LADSPA - White Noise Source - Richard Furse (LADSPA example plugins) + ladspa-valveRect + Valve rectifier + Filter/Effect/Audio/LADSPA + Valve rectifier + Steve Harris <steve@plugin.org.uk> Output @@ -139,29 +8433,62 @@ always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
- ladspa-sine-faaa - Sine Oscillator (Freq:audio, Amp:audio) + ladspa-vcf303 + VCF 303 Filter/Effect/Audio/LADSPA - Sine Oscillator (Freq:audio, Amp:audio) - Richard Furse (LADSPA example plugins) + VCF 303 + CMT (http://www.ladspa.org/cmt, plugin by David A. Bartold) - Output + Out source always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Amplitude + In sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+ + ladspa-vynil + VyNil (Vinyl Effect) + Filter/Effect/Audio/LADSPA/Distortions/Amplitude + VyNil (Vinyl Effect) + Steve Harris <steve@plugin.org.uk> + + + Output_R + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
- Frequency_-Hz- + Output_L + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_R + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_L sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -169,12 +8496,45 @@
- ladspa-sine-faac - Sine Oscillator (Freq:audio, Amp:control) + ladspa-waveTerrain + Wave Terrain Oscillator + Filter/Effect/Audio/LADSPA/Generators/Oscillators + Wave Terrain Oscillator + Steve Harris <steve@plugin.org.uk> + + + z + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + y + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + x + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-wg-mesh-cr + Simple waveguide mesh (CR Controls) Filter/Effect/Audio/LADSPA - Sine Oscillator (Freq:audio, Amp:control) - Richard Furse (LADSPA example plugins) + Simple waveguide mesh (CR Controls) + Loki Davison + + Power + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
Output source @@ -182,7 +8542,7 @@
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Frequency_-Hz- + Trigger sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -190,11 +8550,11 @@
- ladspa-sine-fcaa - Sine Oscillator (Freq:control, Amp:audio) + ladspa-wshape-sine + Wave Shaper (Sine-Based) Filter/Effect/Audio/LADSPA - Sine Oscillator (Freq:control, Amp:audio) - Richard Furse (LADSPA example plugins) + Wave Shaper (Sine-Based) + CMT (http://www.ladspa.org/cmt, plugin by Richard W.E. Furse) Output @@ -203,7 +8563,7 @@
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
- Amplitude + Input sink always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
@@ -211,11 +8571,113 @@
- ladspa-sine-fcac - Sine Oscillator (Freq:control, Amp:control) - Source/Audio/LADSPA - Sine Oscillator (Freq:control, Amp:control) - Richard Furse (LADSPA example plugins) + ladspa-xfade + Crossfade + Filter/Effect/Audio/LADSPA + Crossfade + Steve Harris <steve@plugin.org.uk> + + + Output_right + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_left + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_B_right + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_B_left + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_A_right + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_A_left + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-xfade4 + Crossfade (4 outs) + Filter/Effect/Audio/LADSPA + Crossfade (4 outs) + Steve Harris <steve@plugin.org.uk> + + + Output_B_right + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_B_left + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_A_right + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Output_A_left + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_B_right + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_B_left + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_A_right + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + Input_A_left + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + ladspa-zm1 + z-1 + Filter/Effect/Audio/LADSPA/Utilities + z-1 + Steve Harris <steve@plugin.org.uk> Output @@ -223,6 +8685,12 @@ always
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+ + Input + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
diff --git a/docs/plugins/inspect/plugin-legacyresample.xml b/docs/plugins/inspect/plugin-legacyresample.xml index 647a4748..85ae2230 100644 --- a/docs/plugins/inspect/plugin-legacyresample.xml +++ b/docs/plugins/inspect/plugin-legacyresample.xml @@ -3,11 +3,11 @@ Resamples audio ../../gst/legacyresample/.libs/libgstlegacyresample.so libgstlegacyresample.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org legacyresample diff --git a/docs/plugins/inspect/plugin-liveadder.xml b/docs/plugins/inspect/plugin-liveadder.xml index 18967bf0..7264aada 100644 --- a/docs/plugins/inspect/plugin-liveadder.xml +++ b/docs/plugins/inspect/plugin-liveadder.xml @@ -3,11 +3,11 @@ Adds multiple live discontinuous streams ../../gst/liveadder/.libs/libgstliveadder.so libgstliveadder.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org liveadder diff --git a/docs/plugins/inspect/plugin-lv2.xml b/docs/plugins/inspect/plugin-lv2.xml new file mode 100644 index 00000000..56815650 --- /dev/null +++ b/docs/plugins/inspect/plugin-lv2.xml @@ -0,0 +1,352 @@ + + lv2 + All LV2 plugins + ../../ext/lv2/.libs/libgstlv2.so + libgstlv2.so + 0.10.13.1 + LGPL + gst-plugins-bad + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org + + + http---calf-sourceforge-net-plugins-Compressor + Calf Compressor + Filter/Effect/Audio/LV2 + Calf Compressor + Thor Harald Johansen + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-Filter + Calf Filter + Filter/Effect/Audio/LV2 + Calf Filter + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-Filterclavier + Calf Filterclavier + Filter/Effect/Audio/LV2 + Calf Filterclavier + Krzysztof Foltman / Hans Baier + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-Flanger + Calf Flanger + Filter/Effect/Audio/LV2 + Calf Flanger + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-Monosynth + Calf Monosynth + Source/Audio/LV2 + Calf Monosynth + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-MultiChorus + Calf MultiChorus + Filter/Effect/Audio/LV2 + Calf MultiChorus + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-Organ + Calf Organ + Source/Audio/LV2 + Calf Organ + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-Phaser + Calf Phaser + Filter/Effect/Audio/LV2 + Calf Phaser + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-Reverb + Calf Reverb + Filter/Effect/Audio/LV2 + Calf Reverb + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-RotarySpeaker + Calf Rotary Speaker + Filter/Effect/Audio/LV2 + Calf Rotary Speaker + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+ + http---calf-sourceforge-net-plugins-VintageDelay + Calf Vintage Delay + Filter/Effect/Audio/LV2 + Calf Vintage Delay + Krzysztof Foltman + + + out_r + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + out_l + source + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_r + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+ + in_l + sink + always +
audio/x-raw-float, width=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234
+
+
+
+
+
\ No newline at end of file diff --git a/docs/plugins/inspect/plugin-metadata.xml b/docs/plugins/inspect/plugin-metadata.xml index a68fa129..3bed3e4b 100644 --- a/docs/plugins/inspect/plugin-metadata.xml +++ b/docs/plugins/inspect/plugin-metadata.xml @@ -3,11 +3,11 @@ Metadata (EXIF, IPTC and XMP) image (JPEG, TIFF) demuxer and muxer ../../ext/metadata/.libs/libgstmetadata.so libgstmetadata.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org metadatademux diff --git a/docs/plugins/inspect/plugin-mms.xml b/docs/plugins/inspect/plugin-mms.xml index 6c292cab..f02f2097 100644 --- a/docs/plugins/inspect/plugin-mms.xml +++ b/docs/plugins/inspect/plugin-mms.xml @@ -3,11 +3,11 @@ Microsoft Multi Media Server streaming protocol support ../../ext/libmms/.libs/libgstmms.so libgstmms.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mmssrc diff --git a/docs/plugins/inspect/plugin-modplug.xml b/docs/plugins/inspect/plugin-modplug.xml index 65a955e6..f9faa2a3 100644 --- a/docs/plugins/inspect/plugin-modplug.xml +++ b/docs/plugins/inspect/plugin-modplug.xml @@ -1,13 +1,13 @@ modplug .MOD audio decoding - ../../gst/modplug/.libs/libgstmodplug.so + ../../ext/modplug/.libs/libgstmodplug.so libgstmodplug.so - 0.10.10 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org modplug diff --git a/docs/plugins/inspect/plugin-mpeg2enc.xml b/docs/plugins/inspect/plugin-mpeg2enc.xml index 1b632e90..1f319aeb 100644 --- a/docs/plugins/inspect/plugin-mpeg2enc.xml +++ b/docs/plugins/inspect/plugin-mpeg2enc.xml @@ -3,11 +3,11 @@ High-quality MPEG-1/2 video encoder ../../ext/mpeg2enc/.libs/libgstmpeg2enc.so libgstmpeg2enc.so - 0.10.13 + 0.10.13.1 GPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mpeg2enc diff --git a/docs/plugins/inspect/plugin-mpeg4videoparse.xml b/docs/plugins/inspect/plugin-mpeg4videoparse.xml index e9c5cbc7..ad5c342d 100644 --- a/docs/plugins/inspect/plugin-mpeg4videoparse.xml +++ b/docs/plugins/inspect/plugin-mpeg4videoparse.xml @@ -3,11 +3,11 @@ MPEG-4 video parser ../../gst/mpeg4videoparse/.libs/libgstmpeg4videoparse.so libgstmpeg4videoparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mpeg4videoparse diff --git a/docs/plugins/inspect/plugin-mpegdemux2.xml b/docs/plugins/inspect/plugin-mpegdemux2.xml index ff3bec69..17a45680 100644 --- a/docs/plugins/inspect/plugin-mpegdemux2.xml +++ b/docs/plugins/inspect/plugin-mpegdemux2.xml @@ -3,11 +3,11 @@ MPEG demuxers ../../gst/mpegdemux/.libs/libgstmpegdemux.so libgstmpegdemux.so - 0.10.13 + 0.10.13.1 unknown gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mpegpsdemux diff --git a/docs/plugins/inspect/plugin-mpegtsmux.xml b/docs/plugins/inspect/plugin-mpegtsmux.xml index 0e327254..4dd56f3d 100644 --- a/docs/plugins/inspect/plugin-mpegtsmux.xml +++ b/docs/plugins/inspect/plugin-mpegtsmux.xml @@ -3,11 +3,11 @@ MPEG-TS muxer ../../gst/mpegtsmux/.libs/libgstmpegtsmux.so libgstmpegtsmux.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mpegtsmux diff --git a/docs/plugins/inspect/plugin-mpegvideoparse.xml b/docs/plugins/inspect/plugin-mpegvideoparse.xml index 5c098b36..3e49504a 100644 --- a/docs/plugins/inspect/plugin-mpegvideoparse.xml +++ b/docs/plugins/inspect/plugin-mpegvideoparse.xml @@ -3,11 +3,11 @@ MPEG-1 and MPEG-2 video parser ../../gst/mpegvideoparse/.libs/libgstmpegvideoparse.so libgstmpegvideoparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mpegvideoparse diff --git a/docs/plugins/inspect/plugin-mplex.xml b/docs/plugins/inspect/plugin-mplex.xml index 66338cef..61ac705d 100644 --- a/docs/plugins/inspect/plugin-mplex.xml +++ b/docs/plugins/inspect/plugin-mplex.xml @@ -3,11 +3,11 @@ High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer ../../ext/mplex/.libs/libgstmplex.so libgstmplex.so - 0.10.13 + 0.10.13.1 GPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mplex diff --git a/docs/plugins/inspect/plugin-musepack.xml b/docs/plugins/inspect/plugin-musepack.xml index b753852d..24f6d5b3 100644 --- a/docs/plugins/inspect/plugin-musepack.xml +++ b/docs/plugins/inspect/plugin-musepack.xml @@ -3,11 +3,11 @@ Musepack decoder ../../ext/musepack/.libs/libgstmusepack.so libgstmusepack.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org musepackdec diff --git a/docs/plugins/inspect/plugin-musicbrainz.xml b/docs/plugins/inspect/plugin-musicbrainz.xml index 9f598020..bdfa45ef 100644 --- a/docs/plugins/inspect/plugin-musicbrainz.xml +++ b/docs/plugins/inspect/plugin-musicbrainz.xml @@ -3,11 +3,11 @@ A TRM signature producer based on libmusicbrainz ../../ext/musicbrainz/.libs/libgsttrm.so libgsttrm.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org trm diff --git a/docs/plugins/inspect/plugin-mve.xml b/docs/plugins/inspect/plugin-mve.xml index 87184899..a1877cf1 100644 --- a/docs/plugins/inspect/plugin-mve.xml +++ b/docs/plugins/inspect/plugin-mve.xml @@ -3,11 +3,11 @@ Interplay MVE movie format manipulation ../../gst/mve/.libs/libgstmve.so libgstmve.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mvedemux diff --git a/docs/plugins/inspect/plugin-mxf.xml b/docs/plugins/inspect/plugin-mxf.xml index 8fd7206f..37d52c1f 100644 --- a/docs/plugins/inspect/plugin-mxf.xml +++ b/docs/plugins/inspect/plugin-mxf.xml @@ -3,11 +3,11 @@ MXF plugin library ../../gst/mxf/.libs/libgstmxf.so libgstmxf.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org mxfdemux diff --git a/docs/plugins/inspect/plugin-mythtv.xml b/docs/plugins/inspect/plugin-mythtv.xml index 66ea45d5..a3d79651 100644 --- a/docs/plugins/inspect/plugin-mythtv.xml +++ b/docs/plugins/inspect/plugin-mythtv.xml @@ -3,11 +3,11 @@ lib MythTV src ../../ext/mythtv/.libs/libgstmythtvsrc.so libgstmythtvsrc.so - 0.10.13 + 0.10.10.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins CVS/prerelease + http://gstreamer.freedesktop.org mythtvsrc diff --git a/docs/plugins/inspect/plugin-nas.xml b/docs/plugins/inspect/plugin-nas.xml index a2d5351b..aa39e10a 100644 --- a/docs/plugins/inspect/plugin-nas.xml +++ b/docs/plugins/inspect/plugin-nas.xml @@ -3,11 +3,11 @@ NAS (Network Audio System) support for GStreamer ../../ext/nas/.libs/libgstnassink.so libgstnassink.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org nassink diff --git a/docs/plugins/inspect/plugin-neon.xml b/docs/plugins/inspect/plugin-neon.xml index 186500c3..42edd463 100644 --- a/docs/plugins/inspect/plugin-neon.xml +++ b/docs/plugins/inspect/plugin-neon.xml @@ -3,11 +3,11 @@ lib neon http client src ../../ext/neon/.libs/libgstneonhttpsrc.so libgstneonhttpsrc.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org neonhttpsrc diff --git a/docs/plugins/inspect/plugin-nsfdec.xml b/docs/plugins/inspect/plugin-nsfdec.xml index 3e4a7021..e5e50df2 100644 --- a/docs/plugins/inspect/plugin-nsfdec.xml +++ b/docs/plugins/inspect/plugin-nsfdec.xml @@ -3,11 +3,11 @@ Uses nosefart to decode .nsf files ../../gst/nsf/.libs/libgstnsf.so libgstnsf.so - 0.10.13 + 0.10.13.1 GPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org nsfdec diff --git a/docs/plugins/inspect/plugin-nuvdemux.xml b/docs/plugins/inspect/plugin-nuvdemux.xml index 7be0b05b..9af7bb1c 100644 --- a/docs/plugins/inspect/plugin-nuvdemux.xml +++ b/docs/plugins/inspect/plugin-nuvdemux.xml @@ -3,11 +3,11 @@ Demuxes and muxes audio and video ../../gst/nuvdemux/.libs/libgstnuvdemux.so libgstnuvdemux.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org nuvdemux diff --git a/docs/plugins/inspect/plugin-oss4.xml b/docs/plugins/inspect/plugin-oss4.xml index c11a8a89..d786c64b 100644 --- a/docs/plugins/inspect/plugin-oss4.xml +++ b/docs/plugins/inspect/plugin-oss4.xml @@ -3,11 +3,11 @@ Open Sound System (OSS) version 4 support for GStreamer ../../sys/oss4/.libs/libgstoss4audio.so libgstoss4audio.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org oss4mixer diff --git a/docs/plugins/inspect/plugin-pcapparse.xml b/docs/plugins/inspect/plugin-pcapparse.xml index df93ffab..0d6a59ec 100644 --- a/docs/plugins/inspect/plugin-pcapparse.xml +++ b/docs/plugins/inspect/plugin-pcapparse.xml @@ -3,7 +3,7 @@ Element parsing raw pcap streams ../../gst/pcapparse/.libs/libgstpcapparse.so libgstpcapparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad GStreamer diff --git a/docs/plugins/inspect/plugin-qtmux.xml b/docs/plugins/inspect/plugin-qtmux.xml index 77afa85e..2310d3aa 100644 --- a/docs/plugins/inspect/plugin-qtmux.xml +++ b/docs/plugins/inspect/plugin-qtmux.xml @@ -3,7 +3,7 @@ Quicktime Muxer plugin ../../gst/qtmux/.libs/libgstqtmux.so libgstqtmux.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad gsoc2008 package diff --git a/docs/plugins/inspect/plugin-rawparse.xml b/docs/plugins/inspect/plugin-rawparse.xml index bcc466d1..d3676f6e 100644 --- a/docs/plugins/inspect/plugin-rawparse.xml +++ b/docs/plugins/inspect/plugin-rawparse.xml @@ -3,11 +3,11 @@ Parses byte streams into raw frames ../../gst/rawparse/.libs/libgstrawparse.so libgstrawparse.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org audioparse diff --git a/docs/plugins/inspect/plugin-real.xml b/docs/plugins/inspect/plugin-real.xml index 8120e64d..3fa748d1 100644 --- a/docs/plugins/inspect/plugin-real.xml +++ b/docs/plugins/inspect/plugin-real.xml @@ -3,11 +3,11 @@ Decode REAL streams ../../gst/real/.libs/libgstreal.so libgstreal.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org realaudiodec diff --git a/docs/plugins/inspect/plugin-resindvd.xml b/docs/plugins/inspect/plugin-resindvd.xml index d50f9a73..2bc97c79 100644 --- a/docs/plugins/inspect/plugin-resindvd.xml +++ b/docs/plugins/inspect/plugin-resindvd.xml @@ -3,7 +3,7 @@ Resin DVD playback elements ../../ext/resindvd/.libs/libresindvd.so libresindvd.so - 0.10.13 + 0.10.13.1 GPL gst-plugins-bad GStreamer diff --git a/docs/plugins/inspect/plugin-rfbsrc.xml b/docs/plugins/inspect/plugin-rfbsrc.xml index 703d50fd..cdf09044 100644 --- a/docs/plugins/inspect/plugin-rfbsrc.xml +++ b/docs/plugins/inspect/plugin-rfbsrc.xml @@ -3,11 +3,11 @@ Connects to a VNC server and decodes RFB stream ../../gst/librfb/.libs/libgstrfbsrc.so libgstrfbsrc.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org rfbsrc diff --git a/docs/plugins/inspect/plugin-rtpmux.xml b/docs/plugins/inspect/plugin-rtpmux.xml index 108067fe..5388c80e 100644 --- a/docs/plugins/inspect/plugin-rtpmux.xml +++ b/docs/plugins/inspect/plugin-rtpmux.xml @@ -3,11 +3,11 @@ RTP Muxer plugins ../../gst/rtpmux/.libs/libgstrtpmux.so libgstrtpmux.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org rtpdtmfmux diff --git a/docs/plugins/inspect/plugin-scaletempo.xml b/docs/plugins/inspect/plugin-scaletempo.xml index 6097ad01..3f3a241d 100644 --- a/docs/plugins/inspect/plugin-scaletempo.xml +++ b/docs/plugins/inspect/plugin-scaletempo.xml @@ -3,7 +3,7 @@ Scale audio tempo in sync with playback rate ../../gst/scaletempo/.libs/libgstscaletempoplugin.so libgstscaletempoplugin.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad GStreamer diff --git a/docs/plugins/inspect/plugin-sdl.xml b/docs/plugins/inspect/plugin-sdl.xml index ad5ae7e3..3276bec4 100644 --- a/docs/plugins/inspect/plugin-sdl.xml +++ b/docs/plugins/inspect/plugin-sdl.xml @@ -3,11 +3,11 @@ SDL (Simple DirectMedia Layer) support for GStreamer ../../ext/sdl/.libs/libgstsdl.so libgstsdl.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org sdlaudiosink diff --git a/docs/plugins/inspect/plugin-sdp.xml b/docs/plugins/inspect/plugin-sdp.xml index 410fb435..8de1ad41 100644 --- a/docs/plugins/inspect/plugin-sdp.xml +++ b/docs/plugins/inspect/plugin-sdp.xml @@ -3,11 +3,11 @@ configure streaming sessions using SDP ../../gst/sdp/.libs/libgstsdpelem.so libgstsdpelem.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org sdpdemux diff --git a/docs/plugins/inspect/plugin-selector.xml b/docs/plugins/inspect/plugin-selector.xml index 83637ed7..bdf9454a 100644 --- a/docs/plugins/inspect/plugin-selector.xml +++ b/docs/plugins/inspect/plugin-selector.xml @@ -3,11 +3,11 @@ input/output stream selector elements ../../gst/selector/.libs/libgstselector.so libgstselector.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org input-selector diff --git a/docs/plugins/inspect/plugin-shapewipe.xml b/docs/plugins/inspect/plugin-shapewipe.xml index 02b74125..d8ee5419 100644 --- a/docs/plugins/inspect/plugin-shapewipe.xml +++ b/docs/plugins/inspect/plugin-shapewipe.xml @@ -3,11 +3,11 @@ Shape Wipe transition filter ../../gst/shapewipe/.libs/libgstshapewipe.so libgstshapewipe.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org shapewipe @@ -20,7 +20,7 @@ src source always -
video/x-raw-yuv, format=(fourcc)AYUV, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-raw-yuv, format=(fourcc)AYUV, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
mask_sink @@ -32,7 +32,7 @@ video_sink sink always -
video/x-raw-yuv, format=(fourcc)AYUV, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-raw-yuv, format=(fourcc)AYUV, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
diff --git a/docs/plugins/inspect/plugin-sndfile.xml b/docs/plugins/inspect/plugin-sndfile.xml index e461b79c..5dcdbdda 100644 --- a/docs/plugins/inspect/plugin-sndfile.xml +++ b/docs/plugins/inspect/plugin-sndfile.xml @@ -3,11 +3,11 @@ use libsndfile to read and write audio from and to files ../../ext/sndfile/.libs/libgstsndfile.so libgstsndfile.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org sfsink diff --git a/docs/plugins/inspect/plugin-soundtouch.xml b/docs/plugins/inspect/plugin-soundtouch.xml index bd4b5ba5..604b7557 100644 --- a/docs/plugins/inspect/plugin-soundtouch.xml +++ b/docs/plugins/inspect/plugin-soundtouch.xml @@ -3,11 +3,11 @@ Audio Pitch Controller & BPM Detection ../../ext/soundtouch/.libs/libgstsoundtouch.so libgstsoundtouch.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org bpmdetect diff --git a/docs/plugins/inspect/plugin-spcdec.xml b/docs/plugins/inspect/plugin-spcdec.xml index 815e920e..54af91f5 100644 --- a/docs/plugins/inspect/plugin-spcdec.xml +++ b/docs/plugins/inspect/plugin-spcdec.xml @@ -3,11 +3,11 @@ OpenSPC Audio Decoder ../../ext/spc/.libs/libgstspc.so libgstspc.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org spcdec diff --git a/docs/plugins/inspect/plugin-speed.xml b/docs/plugins/inspect/plugin-speed.xml index 264d8f2b..1f46d6c9 100644 --- a/docs/plugins/inspect/plugin-speed.xml +++ b/docs/plugins/inspect/plugin-speed.xml @@ -3,11 +3,11 @@ Set speed/pitch on audio/raw streams (resampler) ../../gst/speed/.libs/libgstspeed.so libgstspeed.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org speed diff --git a/docs/plugins/inspect/plugin-stereo.xml b/docs/plugins/inspect/plugin-stereo.xml index 7a3eadf9..36aa1066 100644 --- a/docs/plugins/inspect/plugin-stereo.xml +++ b/docs/plugins/inspect/plugin-stereo.xml @@ -3,11 +3,11 @@ Muck with the stereo signal, enhance it's 'stereo-ness' ../../gst/stereo/.libs/libgststereo.so libgststereo.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org stereo diff --git a/docs/plugins/inspect/plugin-subenc.xml b/docs/plugins/inspect/plugin-subenc.xml index 68724664..a4121261 100644 --- a/docs/plugins/inspect/plugin-subenc.xml +++ b/docs/plugins/inspect/plugin-subenc.xml @@ -3,11 +3,11 @@ subtitle encoders ../../gst/subenc/.libs/libgstsubenc.so libgstsubenc.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org srtenc diff --git a/docs/plugins/inspect/plugin-timidity.xml b/docs/plugins/inspect/plugin-timidity.xml index 20000ea8..b13217b9 100644 --- a/docs/plugins/inspect/plugin-timidity.xml +++ b/docs/plugins/inspect/plugin-timidity.xml @@ -3,10 +3,10 @@ Timidity Plugin ../../ext/timidity/.libs/libgsttimidity.so libgsttimidity.so - 0.10.10.1 + 0.10.13.1 GPL gst-plugins-bad - GStreamer Bad Plug-ins CVS/prerelease + GStreamer Bad Plug-ins git/prerelease http://gstreamer.freedesktop.org diff --git a/docs/plugins/inspect/plugin-tta.xml b/docs/plugins/inspect/plugin-tta.xml index 34415a36..c5e64173 100644 --- a/docs/plugins/inspect/plugin-tta.xml +++ b/docs/plugins/inspect/plugin-tta.xml @@ -3,11 +3,11 @@ TTA lossless audio format handling ../../gst/tta/.libs/libgsttta.so libgsttta.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org ttadec diff --git a/docs/plugins/inspect/plugin-valve.xml b/docs/plugins/inspect/plugin-valve.xml index 4bfe29f3..4a895d1a 100644 --- a/docs/plugins/inspect/plugin-valve.xml +++ b/docs/plugins/inspect/plugin-valve.xml @@ -3,11 +3,11 @@ Valve ../../gst/valve/.libs/libgstvalve.so libgstvalve.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org valve diff --git a/docs/plugins/inspect/plugin-vcdsrc.xml b/docs/plugins/inspect/plugin-vcdsrc.xml index 804a6984..d9d07948 100644 --- a/docs/plugins/inspect/plugin-vcdsrc.xml +++ b/docs/plugins/inspect/plugin-vcdsrc.xml @@ -3,11 +3,11 @@ Asynchronous read from VCD disk ../../sys/vcd/.libs/libgstvcdsrc.so libgstvcdsrc.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org vcdsrc diff --git a/docs/plugins/inspect/plugin-videosignal.xml b/docs/plugins/inspect/plugin-videosignal.xml index 73209eff..d99e8de6 100644 --- a/docs/plugins/inspect/plugin-videosignal.xml +++ b/docs/plugins/inspect/plugin-videosignal.xml @@ -3,11 +3,11 @@ Various video signal analysers ../../gst/videosignal/.libs/libgstvideosignal.so libgstvideosignal.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org videoanalyse diff --git a/docs/plugins/inspect/plugin-vmnc.xml b/docs/plugins/inspect/plugin-vmnc.xml index ea56e443..a3c2812e 100644 --- a/docs/plugins/inspect/plugin-vmnc.xml +++ b/docs/plugins/inspect/plugin-vmnc.xml @@ -3,11 +3,11 @@ VMnc video plugin library ../../gst/vmnc/.libs/libgstvmnc.so libgstvmnc.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org vmncdec diff --git a/docs/plugins/inspect/plugin-wildmidi.xml b/docs/plugins/inspect/plugin-wildmidi.xml index 0b0e3c57..41650db7 100644 --- a/docs/plugins/inspect/plugin-wildmidi.xml +++ b/docs/plugins/inspect/plugin-wildmidi.xml @@ -3,11 +3,11 @@ Wildmidi Plugin ../../ext/timidity/.libs/libgstwildmidi.so libgstwildmidi.so - 0.10.13 + 0.10.13.1 GPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org wildmidi diff --git a/docs/plugins/inspect/plugin-xdgmime.xml b/docs/plugins/inspect/plugin-xdgmime.xml index 79ee46d8..42d28990 100644 --- a/docs/plugins/inspect/plugin-xdgmime.xml +++ b/docs/plugins/inspect/plugin-xdgmime.xml @@ -3,11 +3,11 @@ XDG-MIME ../../gst/xdgmime/.libs/libgstxdgmime.so libgstxdgmime.so - 0.10.13 + 0.10.13.1 LGPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org diff --git a/docs/plugins/inspect/plugin-xvid.xml b/docs/plugins/inspect/plugin-xvid.xml index 4d9cbe22..ee542f2d 100644 --- a/docs/plugins/inspect/plugin-xvid.xml +++ b/docs/plugins/inspect/plugin-xvid.xml @@ -3,11 +3,11 @@ XviD plugin library ../../ext/xvid/.libs/libgstxvid.so libgstxvid.so - 0.10.13 + 0.10.13.1 GPL gst-plugins-bad - GStreamer Bad Plug-ins source release - Unknown package origin + GStreamer Bad Plug-ins git/prerelease + http://gstreamer.freedesktop.org xviddec @@ -41,7 +41,7 @@ src source always -
video/x-xvid, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
video/x-xvid, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
sink diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index ccb20e67..b62d4c99 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -18,7 +18,16 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - +/** + * SECTION:element-ladspa + * @short_description: bridge for ladspa (Linux Audio Developer's Simple Plugin API) + * + * The ladspa (Linux Audio Developer's Simple Plugin API) element is a bridge + * for plugins using the ladspa API. + * It scans all installed ladspa plugins and registeres them as gstreamer + * elements. If available it can also parse lrdf files and use the metadata for + * element classification. + */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -- cgit v1.2.1 From b61f931d877172e45b67b44564ca4aec1b9d04af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Wed, 22 Jul 2009 14:19:18 -0400 Subject: mimenc: Ignore errors pushing out new segments The following buffer push will return more valuable information. --- ext/mimic/gstmimenc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/ext/mimic/gstmimenc.c b/ext/mimic/gstmimenc.c index fce5a47d..2418e7c8 100644 --- a/ext/mimic/gstmimenc.c +++ b/ext/mimic/gstmimenc.c @@ -346,13 +346,8 @@ gst_mimenc_chain (GstPad * pad, GstBuffer * in) GST_OBJECT_UNLOCK (mimenc); if (event) { - if (!gst_pad_push_event (mimenc->srcpad, event)) { - res = GST_FLOW_ERROR; - GST_ERROR_OBJECT (mimenc, "Failed to push NEWSEGMENT event"); - gst_buffer_unref (header); - gst_buffer_unref (out_buf); - goto out; - } + if (!gst_pad_push_event (mimenc->srcpad, event)) + GST_WARNING_OBJECT (mimenc, "Failed to push NEWSEGMENT event"); } res = gst_pad_push (mimenc->srcpad, header); @@ -513,11 +508,8 @@ paused_mode_task (gpointer data) " sending out a pause frame"); if (event) { - if (!gst_pad_push_event (mimenc->srcpad, event)) { - GST_ERROR_OBJECT (mimenc, "Failed to push NEWSEGMENT event"); - gst_buffer_unref (buffer); - goto stop_task; - } + if (!gst_pad_push_event (mimenc->srcpad, event)) + GST_WARNING_OBJECT (mimenc, "Failed to push NEWSEGMENT event"); } ret = gst_pad_push (mimenc->srcpad, buffer); if (ret < 0) { -- cgit v1.2.1 From d555d570e69366da7380e52fe4e5f73d9e4b7d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 21 Jul 2009 15:31:33 -0400 Subject: rtpmux: Free the pad private data on pad release Free the pad private data on pad release instead of using a weak ref, which is not thread safe. Also, lock the content of the pad private using the element's object lock. --- gst/rtpmux/gstrtpmux.c | 68 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index 82d4b003..4c2bea09 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -87,6 +87,7 @@ static void gst_rtp_mux_finalize (GObject * object); static GstPad *gst_rtp_mux_request_new_pad (GstElement * element, GstPadTemplate * templ, const gchar * name); +static void gst_rtp_mux_release_pad (GstElement * element, GstPad * pad); static GstFlowReturn gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer); static gboolean gst_rtp_mux_setcaps (GstPad * pad, GstCaps * caps); static GstCaps *gst_rtp_mux_getcaps (GstPad * pad); @@ -148,6 +149,7 @@ gst_rtp_mux_class_init (GstRTPMuxClass * klass) gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_rtp_mux_request_new_pad); + gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gst_rtp_mux_release_pad); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_mux_change_state); klass->chain_func = gst_rtp_mux_chain; @@ -245,15 +247,6 @@ gst_rtp_mux_create_sinkpad (GstRTPMux * rtp_mux, GstPadTemplate * templ) return newpad; } -static void -free_pad_private (gpointer data, GObject * where_the_object_was) -{ - GstRTPMuxPadPrivate *padpriv = data; - - gst_caps_replace (&padpriv->out_caps, NULL); - g_slice_free (GstRTPMuxPadPrivate, padpriv); -} - static void gst_rtp_mux_setup_sinkpad (GstRTPMux * rtp_mux, GstPad * sinkpad) { @@ -274,7 +267,6 @@ gst_rtp_mux_setup_sinkpad (GstRTPMux * rtp_mux, GstPad * sinkpad) gst_pad_set_active (sinkpad, TRUE); gst_pad_set_element_private (sinkpad, padpriv); - g_object_weak_ref (G_OBJECT (sinkpad), free_pad_private, padpriv); /* dd the pad to the element */ gst_element_add_pad (GST_ELEMENT (rtp_mux), sinkpad); @@ -306,6 +298,24 @@ gst_rtp_mux_request_new_pad (GstElement * element, return newpad; } +static void +gst_rtp_mux_release_pad (GstElement * element, GstPad * pad) +{ + GstRTPMuxPadPrivate *padpriv; + + GST_OBJECT_LOCK (element); + padpriv = gst_pad_get_element_private (pad); + gst_pad_set_element_private (pad, NULL); + GST_OBJECT_UNLOCK (element); + + gst_element_remove_pad (element, pad); + + if (padpriv) { + gst_caps_replace (&padpriv->out_caps, NULL); + g_slice_free (GstRTPMuxPadPrivate, padpriv); + } +} + /* Put our own clock-base on the buffer */ static void gst_rtp_mux_readjust_rtp_timestamp (GstRTPMux * rtp_mux, GstPad * pad, @@ -313,10 +323,14 @@ gst_rtp_mux_readjust_rtp_timestamp (GstRTPMux * rtp_mux, GstPad * pad, { guint32 ts; guint32 sink_ts_base = 0; - GstRTPMuxPadPrivate *padpriv = gst_pad_get_element_private (pad); + GstRTPMuxPadPrivate *padpriv; + - if (padpriv->have_clock_base) + GST_OBJECT_LOCK (rtp_mux); + padpriv = gst_pad_get_element_private (pad); + if (padpriv && padpriv->have_clock_base) sink_ts_base = padpriv->clock_base; + GST_OBJECT_UNLOCK (rtp_mux); ts = gst_rtp_buffer_get_timestamp (buffer) - sink_ts_base + rtp_mux->ts_base; GST_LOG_OBJECT (rtp_mux, "Re-adjusting RTP ts %u to %u", @@ -329,7 +343,7 @@ gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer) { GstRTPMux *rtp_mux; GstFlowReturn ret; - GstRTPMuxPadPrivate *padpriv = gst_pad_get_element_private (pad); + GstRTPMuxPadPrivate *padpriv; rtp_mux = GST_RTP_MUX (gst_pad_get_parent (pad)); @@ -344,6 +358,9 @@ gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer) GST_OBJECT_LOCK (rtp_mux); rtp_mux->seqnum++; gst_rtp_buffer_set_seq (buffer, rtp_mux->seqnum); + padpriv = gst_pad_get_element_private (pad); + if (padpriv) + gst_buffer_set_caps (buffer, padpriv->out_caps); GST_OBJECT_UNLOCK (rtp_mux); gst_rtp_buffer_set_ssrc (buffer, rtp_mux->current_ssrc); gst_rtp_mux_readjust_rtp_timestamp (rtp_mux, pad, buffer); @@ -351,10 +368,16 @@ gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer) GST_BUFFER_SIZE (buffer), rtp_mux->seqnum, gst_rtp_buffer_get_timestamp (buffer)); - gst_buffer_set_caps (buffer, padpriv->out_caps); + if (!padpriv) { + ret = GST_FLOW_NOT_LINKED; + gst_buffer_unref (buffer); + goto out; + } ret = gst_pad_push (rtp_mux->srcpad, buffer); +out: + gst_object_unref (rtp_mux); return ret; } @@ -365,7 +388,7 @@ gst_rtp_mux_setcaps (GstPad * pad, GstCaps * caps) GstRTPMux *rtp_mux; GstStructure *structure; gboolean ret = FALSE; - GstRTPMuxPadPrivate *padpriv = gst_pad_get_element_private (pad); + GstRTPMuxPadPrivate *padpriv; rtp_mux = GST_RTP_MUX (gst_pad_get_parent (pad)); @@ -374,9 +397,13 @@ gst_rtp_mux_setcaps (GstPad * pad, GstCaps * caps) if (!structure) goto out; - if (gst_structure_get_uint (structure, "clock-base", &padpriv->clock_base)) { + GST_OBJECT_LOCK (rtp_mux); + padpriv = gst_pad_get_element_private (pad); + if (padpriv && + gst_structure_get_uint (structure, "clock-base", &padpriv->clock_base)) { padpriv->have_clock_base = TRUE; } + GST_OBJECT_UNLOCK (rtp_mux); caps = gst_caps_copy (caps); @@ -388,8 +415,13 @@ gst_rtp_mux_setcaps (GstPad * pad, GstCaps * caps) "setting caps %" GST_PTR_FORMAT " on src pad..", caps); ret = gst_pad_set_caps (rtp_mux->srcpad, caps); - if (ret) - gst_caps_replace (&padpriv->out_caps, caps); + if (ret) { + GST_OBJECT_LOCK (rtp_mux); + padpriv = gst_pad_get_element_private (pad); + if (padpriv) + gst_caps_replace (&padpriv->out_caps, caps); + GST_OBJECT_UNLOCK (rtp_mux); + } gst_caps_unref (caps); out: -- cgit v1.2.1 From 2abe07f963b6eb9c689e26b352cb394434cc5a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 21 Jul 2009 15:33:41 -0400 Subject: rtpsession: Free conflicting addresses on finalize --- gst/rtpmanager/rtpsession.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index fa46f501..d63d9d0e 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -369,6 +369,9 @@ rtp_session_finalize (GObject * object) for (i = 0; i < 32; i++) g_hash_table_destroy (sess->ssrcs[i]); + g_list_foreach (sess->conflicting_addresses, (GFunc) g_free, NULL); + g_list_free (sess->conflicting_addresses); + g_free (sess->bye_reason); g_hash_table_destroy (sess->cnames); -- cgit v1.2.1