[gst-devel] Normalization, audio properties

Stefan Kost ensonic at hora-obscura.de
Mon May 29 15:29:02 CEST 2006


hi sam,

Am Montag, den 29.05.2006, 16:03 +0100 schrieb Sam Thursfield:
> Hi
> I have a couple of questions about gstreamer ! The first one is about:
> the properties of audio files. I'd like to find out the bitrate,
> samplerate and number of channels of some mp3 and ogg files. I'm going
> to PAUSED and reading all the tag messages, but it seems the mad
> plugin isn't often sending samplerate or bitrate tags. And neither
> plugin sends me anything about the number of channels. Is there
> another way to find out these properties?  Certainly it should be
> possible to count the channels being sent but I can't see how. Is the
> mp3 plugin simply broken that it's not always sending any bitrate and
> samplerate tags ?
You'll find out about samplerate and channels by inspecting the
negotiated src-caps of mad.

if((pad=gst_element_get_pad(mad,"sink"))) {
  g_signal_connect(pad,"notify::caps",
    G_CALLBACK(on_caps_negotiated),(gpointer)self);
}

Stefan





More information about the gstreamer-devel mailing list