GStreamer 1.0 Good Plugins: level Return RMS = [-699.9999998436322, -699.9999998436322]

Luis de Bethencourt luis at debethencourt.com
Fri Jan 9 03:34:05 PST 2015


In my machine it returns:
[-45.52592812710999, -45.47488150930283]
[-47.53910343727122, -47.766107828050835]
[-48.14226846092638, -48.37797057538709]

I don't understand the question, why what?

Luis

On 9 January 2015 at 11:08, ivsatel <wincky at mail.ru> wrote:

> Возвращается не ожидаемое значение rms
>
> import gi
> gi.require_version('Gst', '1.0')
> from gi.repository import Gst
> from gi.repository import Gtk
> from gi.repository import GObject
>
> GObject.threads_init()
> Gst.init_check(None)
>
> class MyLPlayer(object):
>     def __init__(self, channel):
>
>         self.caps = Gst.Caps.from_string('audio/*, rate=44100, channels=2')
>         self.pipeline = Gst.Pipeline.new('my-player')
>
>         self.playbin = Gst.ElementFactory.make('playbin')
>         self.autoaudiosrc = Gst.ElementFactory.make('autoaudiosrc')
>         self.audioconvert = Gst.ElementFactory.make('audioconvert')
>         self.level = Gst.ElementFactory.make('level')
>         self.fakesink = Gst.ElementFactory.make('fakesink')
>
>         self.pipeline.add(self.playbin)
>         self.pipeline.add(self.autoaudiosrc)
>         self.pipeline.add(self.audioconvert)
>         self.pipeline.add(self.fakesink)
>         self.pipeline.add(self.level)
>
>         self.autoaudiosrc.link(self.audioconvert)
>         self.audioconvert.link_filtered(self.level, self.caps)
>         self.level.link(self.fakesink)
>
>         self.fakesink.set_property("sync", True)
>
>         self.bus = self.pipeline.get_bus()
>         self.bus.add_signal_watch()
>         self.bus.connect('message', self.show_peak)
>
>         self.playbin.set_property('uri', channel)
>         self.pipeline.set_state(Gst.State.PLAYING)
>
>     def show_peak(self, bus, message):
>         s = Gst.Message.get_structure(message)
>
>         if message.type == Gst.MessageType.ELEMENT:
>             if str(Gst.Structure.get_name(s)) == 'level':
>                 a = s.get_value('rms')
>                 print(a)
>
> win = MyLPlayer('http://http-live.sr.se/p1-mp3-192')
> win
> Gtk.main()
>
> Why?
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/GStreamer-1-0-Good-Plugins-level-Return-RMS-699-9999998436322-699-9999998436322-tp4670184.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150109/79676958/attachment-0001.html>


More information about the gstreamer-devel mailing list