Giter VIP home page Giter VIP logo

Comments (5)

thomasleveil avatar thomasleveil commented on July 28, 2024

idea: make mps player agnostic

Since sending commands to a mplayer instance running slave mode is quite similar to sending command to the Music Player Daemon it would be nice to then give users the choice of the backend music player.

Maybe some kind of player adpater class could be put together to abstract the details of different supported music player backends. Something similar to:

class MplayerAdapter(object):
    def start(self):
        # run mplayer in slave mode in a thread
    def play(song):
        # command to tell mplayer to play that song
    ...

Other adapters would have to implement the start and play methods as well so one could be used in place of one other.

from yewtube.

np1 avatar np1 commented on July 28, 2024

Yes that sounds great, I'm all for that design. Do you want to start working on it? Should I create a new branch?

from yewtube.

thomasleveil avatar thomasleveil commented on July 28, 2024

Start it. I don't know when i'll have more free time for coding.

I may contribute to the mpd adapter as i'm using it at home

from yewtube.

np1 avatar np1 commented on July 28, 2024

Ok no prob I will get to work on it, thanks for your help so far!

from yewtube.

np1 avatar np1 commented on July 28, 2024

From the mpv man page:

  --slave-broken
          Switches on the old slave mode. This is for  testing  only,  and
          incompatible to the removed --slave switch.
          ATTENTION!:
             Changes  incompatible  to  slave  mode applications have been
             made. In particular, the  status  line  output  was  changed,
             which  is  used by some applications to determine the current
             playback position. This switch has been  renamed  to  prevent
             these  applications  from  working  with this version of mpv,
             because it would lead to buggy and confusing  behavior  only.
             Moreover,  the slave mode protocol is so horribly bad that it
             should not be used for new programs, nor should existing pro‐
             grams  attempt  to  adapt  to  the changed output and use the
             --slave-broken switch. Instead, a new, saner protocol  should
             be developed (and will be, if there is enough interest).

             This affects most third-party GUI frontends.

With this in mind I'm not going to attempt implementing slave mode with mpv. I don't mind about the mpv status output having been changed, but implementing something that has been relabelled as broken can't be a good idea. It's probably not going to be supported and may be dropped in future.

I'm also not happy about implementing it just for mplayer - it will fragment the codebase too much. I might abandon this idea entirely.

from yewtube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.