Hello there.

[This is a repost of stuff that was previously only on the (secret)
Boom forum. If you were a Boom beta-tester and saw it there then you
don't need to read any further.]

There is a major change to SqueezeCentre that has now been merged into
the 7.3 trunk code. It goes by the general title of 'new-streaming'. It
is a substantial rewrite of much of the streaming-control functionality
of SC - that is, the stuff that plays music (or whatever). The main
module that has been gutted is Slim::Player::Source but the changes are
much more far-reaching than that.

There are several goals of this new work:
    
- Try to bring some structure back to control of streaming.
  Source.pm, in particular, had become incomprehensible to all but Andy
  and was very fragile.
- The increased emphasis on multi-player synchronization made the the
  purely player-centric view of the world difficult to work with. Things
  like gapless synced play were impractical.
- The code had too close a knowledge of the interaction with the
  player control protocols which made it unnecessarily difficult to
  support different types of players (SliMP3, SB1, SB2/SB3/TP/Boom,
  SqueezePlay).
- There is a lot of duplication of effort in many of the
  music-services and internet-radio protocol handlers.
- There is a desire to make SC smaller and less resource-intensive
  and the opacity of the current code was hindering that.
  

It has already had quite a good workout and I am now confident that the
problems that do pop up will be tractable. There is clearly a risk that
one set of obscure and intractable problems has simply been replaced by
a new, subtly different set, and that some of the subtle and clever
tricks that were buried in the workings of Source.pm have been
overlooked. We would very much like you assistance in testing this new
code. 

Here are some highlights, both functional and non-functional:
    
- Slim::Player::Source largely replaced by an explicit state-machine
  implementation, in Source::Player::StreamingController.
- Gapless synchronization (but not for SliMP3 or SB1 - there is no
  architectural limitation but I have not taken the trouble to look at
  what would be necessary for these cases).
- Mid-track join, when a new player joins, by restarting all players
  in a sync-group at the current playing position (for stream sources
  that support this). I have not (yet) tackled  non-interrupting
  mid-track join, which is much more difficult and will require
  specific firmware changes among other things.
- Harmonised Getting-Track-Info/Connecting/Bufffering/Rebuffering
  control and feedback.
  

The design is documented in UML and I will post a description and I
have put some images in the repository. I have put some documentation
on the Wiki at
http://wiki.slimdevices.com/index.php/Design_of_new-streaming. I need
to update some bits.

There is a good chance that third-party plugins will break, especially
if they do anything related to sync-management. In particular
Slim::Player::Sync::masterOrSelf() and
Slim::Player::Client::masterOrSelf() have been replaced by
Slim::Player::Sync::master(). This is a deliberately incompatible
change because the semantics of this call have changed. In many cases a
straight replacement will do but there are also plenty of cases where
the call is not necessary or where the results may not be what is
intended. In the new model, isSynced() will return TRUE for a player
that is part of a syncgroup but currently -off-.

There is a list of outstanding issues that I am working on:

    
- Migrate Slacker protocol handler
  It is working but using a sort of compatibility mode. The other
  handlers have already been migrated. 
- Fix schema for Song
  The current definition of the Song object is something of a mess,
  with users dipping into its blessed hash.
- Review handler requirements for various actions (no longer playing,
  logging on end-of-track, ...)
  Several handlers have requirements in this area and it would be good
  to sort out consistent mechanisms. Mechanisms are now in place but
  handlers need review.
- Review/fix reconnect behaviour (SB1s definitely broken)
- SB1 should stop trying to get nextChunk when there are none just
  now (playout-play).
  Need to disable the stream writeable-select while the open stream is
  idle.
- Convert Song and StreamingController to use Accessor.
- Sort out time-played for SliMP3/SB1
  It is broken when transcoding (at least); need to determine the
  actual stream bitrate in these cases.
- Refactor SliMP3/SB1 sync frame tracking.
  It is only needed when these player types are in use (and synced) and
  so, does not need to be loaded or invoked otherwise.
  

Alan.


-- 
awy
------------------------------------------------------------------------
awy's Profile: http://forums.slimdevices.com/member.php?userid=7480
View this thread: http://forums.slimdevices.com/showthread.php?t=51659

_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/beta

Reply via email to