Skip to content

Commit

Permalink
audio: Remove deprecated audio APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Sep 30, 2018
1 parent 186b670 commit cbb9529
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 22 deletions.
3 changes: 2 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Stream backend
Audio
-----

- (no changes yet)
- Remove the method :meth:`mopidy.audio.Audio.emit_end_of_stream`, which has
been deprecated since 1.0. (Fixes: :issue:`1465`)


v2.2.0 (2018-09-30)
Expand Down
16 changes: 1 addition & 15 deletions mopidy/audio/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from mopidy.audio import tags as tags_lib, utils
from mopidy.audio.constants import PlaybackState
from mopidy.audio.listener import AudioListener
from mopidy.internal import deprecation, process
from mopidy.internal import process
from mopidy.internal.gi import GObject, Gst, GstPbutils


Expand Down Expand Up @@ -615,20 +615,6 @@ def emit_data(self, buffer_):
"""
return self._appsrc.push(buffer_)

def emit_end_of_stream(self):
"""
Put an end-of-stream token on the playbin. This is typically used in
combination with :meth:`emit_data`.
We will get a GStreamer message when the stream playback reaches the
token, and can then do any end-of-stream related tasks.
.. deprecated:: 1.0
Use :meth:`emit_data` with a :class:`None` buffer instead.
"""
deprecation.warn('audio.emit_end_of_stream')
self._appsrc.push(None)

def set_about_to_finish_callback(self, callback):
"""
Configure audio to use an about-to-finish callback.
Expand Down
3 changes: 0 additions & 3 deletions mopidy/internal/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
'mpd.protocol.current_playlist.playlist':
'Do not use this, instead use playlistinfo',

# Deprecated features in audio:
'audio.emit_end_of_stream': 'audio.emit_end_of_stream() is deprecated',

# Deprecated features in core libary:
'core.library.find_exact': 'library.find_exact() is deprecated',
'core.library.lookup:uri_arg':
Expand Down
3 changes: 0 additions & 3 deletions tests/dummy_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ def set_appsrc(self, *args, **kwargs):
def emit_data(self, buffer_):
pass

def emit_end_of_stream(self):
pass

def get_position(self):
return self._position

Expand Down

0 comments on commit cbb9529

Please sign in to comment.