Fwd: Re: how get audio track sample rate,

zare laky zarelaky at hotmail.com
Wed Feb 15 04:17:45 UTC 2017


Hi
   Tim,
   my gstreamer version is 0.10, I got caps below, rate is range value 
type, can you tell me, how to find the one that the rate of current play 
file.

caps=audio/x-raw-int, width=(int){ 16, 24, 32 }, depth=(int){ 16, 24, 32 
}, rate=(int){ 7350, 8000, 11025, 12000, 16000, 2205
0, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }, channels=(int)[ 1, 8 ]

my code like:
      caps = gst_pad_get_caps (pad);
      stru = gst_caps_get_structure (caps, 0);
      gst_structure_get_int(stru, "rate", &rate);
my pipeline is,
filesrc -> decodebin2 -> <constructed dynamically> -> alsasink

thanks
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list