mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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).
This commit is contained in:
parent
017a8c8527
commit
b261441c06
3 changed files with 48 additions and 18 deletions
12
ChangeLog
12
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>
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue