{GST_WAVPACK_ENC_MODE_FAST, "Fast Compression", "fast"},
{GST_WAVPACK_ENC_MODE_DEFAULT, "Normal Compression", "normal"},
{GST_WAVPACK_ENC_MODE_HIGH, "High Compression", "high"},
-#ifndef WAVPACK_OLD_API
{GST_WAVPACK_ENC_MODE_VERY_HIGH, "Very High Compression", "veryhigh"},
-#endif
{0, NULL, NULL}
};
GstAudioEncoderClass *base_class = (GstAudioEncoderClass *) (klass);
/* add pad templates */
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_factory));
- 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 (&wvcsrc_factory));
+ gst_element_class_add_static_pad_template (element_class, &sink_factory);
+ gst_element_class_add_static_pad_template (element_class, &src_factory);
+ gst_element_class_add_static_pad_template (element_class, &wvcsrc_factory);
/* set element details */
gst_element_class_set_static_metadata (element_class, "Wavpack audio encoder",
/* require perfect ts */
gst_audio_encoder_set_perfect_timestamp (benc, TRUE);
+
+ GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
}
case GST_WAVPACK_ENC_MODE_HIGH:
enc->wp_config->flags |= CONFIG_HIGH_FLAG;
break;
-#ifndef WAVPACK_OLD_API
case GST_WAVPACK_ENC_MODE_VERY_HIGH:
enc->wp_config->flags |= CONFIG_HIGH_FLAG;
enc->wp_config->flags |= CONFIG_VERY_HIGH_FLAG;
break;
-#endif
}
/* Bitrate, enables lossy mode */
enc->pending_offset = wph.block_index;
}
- if (!(wph.flags & FINAL_BLOCK))
+ /* Is this the not-final block of multi-channel data? If so, just
+ * accumulate and return here. */
+ if (!(wph.flags & FINAL_BLOCK) && ((block[32] & ID_OPTIONAL_DATA) == 0))
return TRUE;
buffer = enc->pending_buffer;