Skip to content

Commit

Permalink
OSX: As of GStreamer 1.10, it supports the GstDeviceMonitor interface
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Apr 22, 2017
1 parent e3cd6ad commit f68981c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 213 deletions.
18 changes: 10 additions & 8 deletions xl/player/gst/sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ def _gst_device_autodetect():

try:
for device in dm.get_devices():
if hasattr(device.props, 'internal_name'):
device_id = device.props.internal_name
elif hasattr(device.props, 'device_id'): # OSX
device_id = str(device.props.device_id)

yield (device.get_display_name(),
device.props.internal_name,
device_id,
device.create_element)
finally:
dm.stop()
Expand Down Expand Up @@ -200,13 +205,10 @@ def __init__(self, pipeline, name):
# autodetection of output devices
#

if sys.platform == 'darwin':
import sink_osx
dev_fn = sink_osx.load_osxaudiosink(SINK_PRESETS)
_autodetect_devices.append(dev_fn)

elif sys.platform == 'win32':
# OSX: support was added in gstreamer 1.10


if sys.platform == 'win32':
import sink_windows
dev_fn = sink_windows.load_directsoundsink(SINK_PRESETS)
_autodetect_devices.append(dev_fn)

205 changes: 0 additions & 205 deletions xl/player/gst/sink_osx.py

This file was deleted.

0 comments on commit f68981c

Please sign in to comment.