[gstreamer-bugs] [Bug 152864] [PATCH] GstAlsaMixer doesn't support signals

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Jul 21 04:40:41 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=152864
 GStreamer | gst-plugins-base | Ver: HEAD CVS





------- Comment #8 from Andy Wingo  2006-07-21 11:40 UTC -------
(In reply to comment #7)

Michael, we do support getting the record status on a track. ALSA does not
provide an interface for us to efficiently do notification signalling, so we
require apps to poll if they need to, as you do with pyalsaaudio. Here is an
alternate implementation of GetRecordingMixers that uses GStreamer:

import gst, gst.interfaces

def GetRecordingMixers(device):
        """Returns a list containing all the channels which have recording
switched on."""

        recmixers = []
        alsamixer = gst.element_factory_make('alsamixer')
        alsamixer.set_property('device', device)
        alsamixer.set_state(gst.STATE_PAUSED)

        if alsamixer.implements_interface(gst.interfaces.Mixer):
                recmixers = [(alsamixer, track) for track in
alsamixer.list_tracks()
                             if (track.flags & gst.interfaces.MIXER_TRACK_INPUT
                                 and track.flags &
gst.interfaces.MIXER_TRACK_RECORD
                                 # Ignore 'Capture' channel due to it being a
                                 # requirement for recording on most low-end
                                 # cards
                                 and track.label != 'Capture')]
        else:
                print ('Could not get the mixer for ALSA device %s, '
                       'check your permissions' % (device,))
                recmixers = []

        print device, recmixers
        return recmixers


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list