import logging

from mopidy.backends import BaseBackend, BasePlaybackController

logger = logging.getLogger(u'backends.gstreamer')

class GStreamerBackend(BaseBackend):
    def __init__(self, *args, **kwargs):
        super(GStreamerBackend, self).__init__(*args, **kwargs)

        self.playback = GStreamerPlaybackController(self)

class GStreamerPlaybackController(BasePlaybackController):
    def __init__(self, backend):
        super(GStreamerPlaybackController, self).__init__(backend)

import logging

import gst

from mopidy.backends import BaseBackend, BasePlaybackController

logger = logging.getLogger(u'backends.gstreamer')

class GStreamerBackend(BaseBackend):
    def __init__(self, *args, **kwargs):
        super(GStreamerBackend, self).__init__(*args, **kwargs)

        self.playback = GStreamerPlaybackController(self)

class GStreamerPlaybackController(BasePlaybackController):
    PAUSED = gst.STATE_PAUSED
    PLAYING = gst.STATE_PLAYING
    STOPPED = gst.STATE_NULL

    def __init__(self, backend):
        super(GStreamerPlaybackController, self).__init__(backend)

Add playback states to GStreamer
Add playback states to GStreamer

  import logging
+ 
+ import gst
  
  from mopidy.backends import BaseBackend, BasePlaybackController
  
  logger = logging.getLogger(u'backends.gstreamer')
  
  class GStreamerBackend(BaseBackend):
      def __init__(self, *args, **kwargs):
          super(GStreamerBackend, self).__init__(*args, **kwargs)
  
          self.playback = GStreamerPlaybackController(self)
  
  class GStreamerPlaybackController(BasePlaybackController):
+     PAUSED = gst.STATE_PAUSED
+     PLAYING = gst.STATE_PLAYING
+     STOPPED = gst.STATE_NULL
+ 
      def __init__(self, backend):
          super(GStreamerPlaybackController, self).__init__(backend)
  
Add playback states to GStreamer
## Code Before:
import logging

from mopidy.backends import BaseBackend, BasePlaybackController

logger = logging.getLogger(u'backends.gstreamer')

class GStreamerBackend(BaseBackend):
    def __init__(self, *args, **kwargs):
        super(GStreamerBackend, self).__init__(*args, **kwargs)

        self.playback = GStreamerPlaybackController(self)

class GStreamerPlaybackController(BasePlaybackController):
    def __init__(self, backend):
        super(GStreamerPlaybackController, self).__init__(backend)

## Instruction:
Add playback states to GStreamer
## Code After:
import logging

import gst

from mopidy.backends import BaseBackend, BasePlaybackController

logger = logging.getLogger(u'backends.gstreamer')

class GStreamerBackend(BaseBackend):
    def __init__(self, *args, **kwargs):
        super(GStreamerBackend, self).__init__(*args, **kwargs)

        self.playback = GStreamerPlaybackController(self)

class GStreamerPlaybackController(BasePlaybackController):
    PAUSED = gst.STATE_PAUSED
    PLAYING = gst.STATE_PLAYING
    STOPPED = gst.STATE_NULL

    def __init__(self, backend):
        super(GStreamerPlaybackController, self).__init__(backend)
