diff options
author | Daniel Drake <dsd@laptop.org> | 2010-04-29 14:08:37 (GMT) |
---|---|---|
committer | Daniel Drake <dan@reactivated.net> | 2010-04-29 14:52:03 (GMT) |
commit | 1b297e262385720a40ea7426017fffeae31f63d1 (patch) | |
tree | 8a1219903d0b8c075901c0125eee04d1c4366a6b | |
parent | 157adbc0cac15e60676d1733c49dfa163f8f8838 (diff) |
Attempt to record audio from plughw:0,0
Improves A/V sync, for reasons not entirely known.
-rw-r--r-- | glive.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -119,6 +119,15 @@ class Glive: def createAudioBin ( self ): src = gst.element_factory_make("alsasrc", "absrc") + + # attempt to use direct access to the 0,0 device, solving some A/V + # sync issues + src.set_property("device", "plughw:0,0") + hwdev_available = src.set_state(gst.STATE_PAUSED) != gst.STATE_CHANGE_FAILURE + src.set_state(gst.STATE_NULL) + if not hwdev_available: + src.set_property("device", "default") + srccaps = gst.Caps("audio/x-raw-int,rate=16000,channels=1,depth=16") # without a buffer here, gstreamer struggles at the start of the |