summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2006-11-02 20:13:26 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-11-02 20:13:26 +0000
commitb261441c068013a5c41dcb20e661534133ef7f4a (patch)
treee2f699348a65019277babadaa18d4f1878593011
parent017a8c8527ff37a4068189e4323a68bc30d1fa92 (diff)
downloadgst-plugins-bad-b261441c068013a5c41dcb20e661534133ef7f4a.tar.gz
gst-plugins-bad-b261441c068013a5c41dcb20e661534133ef7f4a.tar.bz2
gst-plugins-bad-b261441c068013a5c41dcb20e661534133ef7f4a.zip
Fix enum nicks; only emit no-more-pads once; add support for very fast encoding mode in upcoming 4.40.0 release (#369...
Original commit message from CVS: Patch by: Sebastian Dröge <slomo at circular-chaos.org> * configure.ac: * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_mode_get_type), (gst_wavpack_enc_correction_mode_get_type), (gst_wavpack_enc_joint_stereo_mode_get_type), (gst_wavpack_enc_init), (gst_wavpack_enc_set_wp_config): Fix enum nicks; only emit no-more-pads once; add support for very fast encoding mode in upcoming 4.40.0 release (#369539).
-rw-r--r--ChangeLog12
-rw-r--r--configure.ac2
-rw-r--r--ext/wavpack/gstwavpackenc.c52
3 files changed, 48 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 60682bb7..8663836a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-11-02 Tim-Philipp Müller <tim at centricular dot net>
+
+ Patch by: Sebastian Dröge <slomo at circular-chaos.org>
+
+ * configure.ac:
+ * ext/wavpack/gstwavpackenc.c: (gst_wavpack_enc_mode_get_type),
+ (gst_wavpack_enc_correction_mode_get_type),
+ (gst_wavpack_enc_joint_stereo_mode_get_type),
+ (gst_wavpack_enc_init), (gst_wavpack_enc_set_wp_config):
+ Fix enum nicks; only emit no-more-pads once; add support for very
+ fast encoding mode in upcoming 4.40.0 release (#369539).
+
2006-11-01 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Sergey Scobich <sergey dot scobich at gmail com>
diff --git a/configure.ac b/configure.ac
index e1d98482..11dd53a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -691,7 +691,7 @@ int main () { return 0; }
dnl *** wavpack ***
translit(dnm, m, l) AM_CONDITIONAL(USE_WAVPACK, true)
GST_CHECK_FEATURE(WAVPACK, [wavpack plug-in], wavpack, [
- PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.33, HAVE_WAVPACK=yes, [
+ PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.40.0, HAVE_WAVPACK=yes, [
PKG_CHECK_MODULES(WAVPACK, wavpack >= 4.20, [
HAVE_WAVPACK=yes
AC_DEFINE(WAVPACK_OLD_API, 1, [old wavpack API])
diff --git a/ext/wavpack/gstwavpackenc.c b/ext/wavpack/gstwavpackenc.c
index 308f951c..f4fab948 100644
--- a/ext/wavpack/gstwavpackenc.c
+++ b/ext/wavpack/gstwavpackenc.c
@@ -148,7 +148,7 @@ static GstStaticPadTemplate wvcsrc_factory = GST_STATIC_PAD_TEMPLATE ("wvcsrc",
GST_STATIC_CAPS ("audio/x-wavpack-correction, " "framed = (boolean) TRUE")
);
-#define DEFAULT_MODE 1
+#define DEFAULT_MODE 2
#define GST_TYPE_WAVPACK_ENC_MODE (gst_wavpack_enc_mode_get_type ())
static GType
gst_wavpack_enc_mode_get_type (void)
@@ -157,9 +157,17 @@ gst_wavpack_enc_mode_get_type (void)
if (qtype == 0) {
static const GEnumValue values[] = {
- {0, "Fast Compression", "0"},
- {1, "Default", "1"},
- {2, "High Compression", "2"},
+#if 0
+ /* Very Fast Compression is not supported yet, but will be supported
+ * in future wavpack versions */
+ {0, "Very Fast Compression", "veryfast"},
+#endif
+ {1, "Fast Compression", "fast"},
+ {2, "Normal Compression", "normal"},
+ {3, "High Compression", "high"},
+#ifndef WAVPACK_OLD_API
+ {4, "Very High Compression", "veryhigh"},
+#endif
{0, NULL, NULL}
};
@@ -177,9 +185,9 @@ gst_wavpack_enc_correction_mode_get_type (void)
if (qtype == 0) {
static const GEnumValue values[] = {
- {0, "Create no correction file (default)", "0"},
- {1, "Create correction file", "1"},
- {2, "Create optimized correction file", "2"},
+ {0, "Create no correction file", "off"},
+ {1, "Create correction file", "on"},
+ {2, "Create optimized correction file", "optimized"},
{0, NULL, NULL}
};
@@ -197,9 +205,9 @@ gst_wavpack_enc_joint_stereo_mode_get_type (void)
if (qtype == 0) {
static const GEnumValue values[] = {
- {0, "auto (default)", "0"},
- {1, "left/right", "1"},
- {2, "mid/side", "2"},
+ {0, "auto", "auto"},
+ {1, "left/right", "leftright"},
+ {2, "mid/side", "midside"},
{0, NULL, NULL}
};
@@ -320,12 +328,12 @@ gst_wavpack_enc_init (GstWavpackEnc * enc, GstWavpackEncClass * gclass)
enc->wvc_id->wavpack_enc = enc;
/* set default values of params */
- enc->mode = 1;
+ enc->mode = DEFAULT_MODE;
enc->bitrate = 0.0;
- enc->correction_mode = 0;
+ enc->correction_mode = DEFAULT_CORRECTION_MODE;
enc->md5 = FALSE;
enc->extra_processing = FALSE;
- enc->joint_stereo_mode = 0;
+ enc->joint_stereo_mode = DEFAULT_JS_MODE;
}
static void
@@ -402,14 +410,26 @@ gst_wavpack_enc_set_wp_config (GstWavpackEnc * enc)
/* Encoding mode */
switch (enc->mode) {
+#if 0
case 0:
+ enc->wp_config->flags |= CONFIG_VERY_FAST_FLAG;
enc->wp_config->flags |= CONFIG_FAST_FLAG;
break;
- case 1: /* default */
+#endif
+ case 1:
+ enc->wp_config->flags |= CONFIG_FAST_FLAG;
break;
- case 2:
+ case 2: /* default */
+ break;
+ case 3:
enc->wp_config->flags |= CONFIG_HIGH_FLAG;
break;
+#ifndef WAVPACK_OLD_API
+ case 4:
+ enc->wp_config->flags |= CONFIG_HIGH_FLAG;
+ enc->wp_config->flags |= CONFIG_VERY_HIGH_FLAG;
+ break;
+#endif
}
/* Bitrate, enables lossy mode */
@@ -433,8 +453,6 @@ gst_wavpack_enc_set_wp_config (GstWavpackEnc * enc)
GstCaps *caps = gst_caps_new_simple ("audio/x-wavpack-correction",
"framed", G_TYPE_BOOLEAN, TRUE, NULL);
- gst_element_no_more_pads (GST_ELEMENT (enc));
-
GST_DEBUG_OBJECT (enc, "Adding correction pad with caps %"
GST_PTR_FORMAT, caps);
if (!gst_pad_set_caps (enc->wvcsrcpad, caps)) {