Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Senior Member
    Join Date
    Apr 2005
    Posts
    6,932
    Quote Originally Posted by AndrewFG View Post
    How do you do that? Can you kindly give me a code snippet?
    Many thanks for the leading questions. I will check these tomorrow and get back to you.
    I suspect its trying to play the whitebear:// url

    You have $class->isAudioURL returning true which means the Slim::Utils::Scanner::Remote will treat the url as a playable url.

    Assuming this is true (the debugs will show), then you may be able to change streamUrl in the new method of your protocol handler before calling the super class?

    [difficult to be certain when I can't try it... Post some debugs and I'm sure we can work it out.]

  2. #12
    Senior Member AndrewFG's Avatar
    Join Date
    Mar 2008
    Posts
    782
    Quote Originally Posted by Triode View Post
    I suspect its trying to play the whitebear:// url
    ... Post some debugs and I'm sure we can work it out.]
    Ok. Here is one...

    Code:
    [12-08-20 22:02:22.8313] Slim::Player::Squeezebox::stream_s (814) This player supports direct streaming for whitebear://192.168.1.100:31416/play.flc?http://192.168.1.32:52100/Music/F3892.wav as whitebear://192.168.1.100:31416/play.flc?http://192.168.1.32:52100/Music/F3892.wav, let's do it.
    [12-08-20 22:02:22.8336] Slim::Player::Squeezebox::stream_s (840) Made synchronous DNS request for 192.168.1.100 (0.00 ms)
    [12-08-20 22:02:22.8481] Slim::Player::Squeezebox::stream_s (861) setting up direct stream (3232235876:31416) autostart: 2 format: f.
    [12-08-20 22:02:22.8490] Slim::Player::Squeezebox::stream_s (862) request string: GET /play.flc?http://192.168.1.32:52100/Music/F3892.wav HTTP/1.0
    Cache-Control: no-cache
    Connection: close
    Accept: */*
    Host: 192.168.1.100:31416
    User-Agent: iTunes/4.7.1 (Windows; N; Windows 7; 586; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/7.7.2/33893
    Icy-Metadata: 1
    It's interesting because the HTTP GET never mentions the scheme (whitebear or http) because it just connects to the server IP:PORT and then GET's the path part of the url...
    Last edited by AndrewFG; 2012-08-20 at 22:45.
    Regards,
    AndrewFG

    Try out Whitebear. The middleware that joins the two worlds of:
    1. UPnP/DLNA media clients and media players, and,
    2. Squeezebox Server and Squeeze Players
    Download it for free here: http://www.whitebear.ch/mediaserver

  3. #13
    Senior Member
    Join Date
    Apr 2005
    Posts
    6,932
    Quote Originally Posted by AndrewFG View Post
    Ok. Here is one...

    Code:
    [12-08-20 22:02:22.8313] Slim::Player::Squeezebox::stream_s (814) This player supports direct streaming for whitebear://192.168.1.100:31416/play.flc?http://192.168.1.32:52100/Music/F3892.wav as whitebear://192.168.1.100:31416/play.flc?http://192.168.1.32:52100/Music/F3892.wav, let's do it.
    [12-08-20 22:02:22.8336] Slim::Player::Squeezebox::stream_s (840) Made synchronous DNS request for 192.168.1.100 (0.00 ms)
    [12-08-20 22:02:22.8481] Slim::Player::Squeezebox::stream_s (861) setting up direct stream (3232235876:31416) autostart: 2 format: f.
    [12-08-20 22:02:22.8490] Slim::Player::Squeezebox::stream_s (862) request string: GET /play.flc?http://192.168.1.32:52100/Music/F3892.wav HTTP/1.0
    Cache-Control: no-cache
    Connection: close
    Accept: */*
    Host: 192.168.1.100:31416
    User-Agent: iTunes/4.7.1 (Windows; N; Windows 7; 586; EN; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/7.7.2/33893
    Icy-Metadata: 1
    It's interesting because the HTTP GET never mentions the scheme (whitebear or http) because it just connects to the server IP:PORT and then GET's the path part of the url...
    Yep - the "direct stream" path will pass the host/port + header to the player without processing too deeply. I am not convinced the processing via the server's protocol hander will do this (change the mp3 streaming method for this or sync the player...)

  4. #14
    Senior Member AndrewFG's Avatar
    Join Date
    Mar 2008
    Posts
    782
    Quote Originally Posted by Triode View Post
    Yep - the "direct stream" path will pass the host/port + header to the player without processing too deeply. I am not convinced the processing via the server's protocol hander will do this (change the mp3 streaming method for this or sync the player...)
    Hi Triode,

    I very much appreciate your help, but perhaps it is too complicated to try to double guess my "lousy" code. Perhaps we should restart this discussion the other way round, and try to identify the basic requirements that I need to fulfil? Do you think you can provide tips about which ProtocolHandler class one must inherit from, and which minimum set of methods of that class must be implemented/overriden in order to get the following functionality:

    1) handles "playlist add" command urls having the form whitebear://1.2.3.4:5/path
    2) reads meta data for such urls (via getMetaDataFor) from a cache (insofar as a custom cli command will have already written such metadata into the cache)
    3) indicates that the source is a remote stream; which is a simple playable, seekable, (stoppable, pausable, replayable etc.) audio track
    4) indicates that the stream shall be fetched via an HTTP GET on a stream url having the form http://1.2.3.4:5/path the same as the whitebear:// command url
    5) in the case of non synced players, indicates that the GET shall be done "directly" by the player concerned
    6) in the case of multiple synced players, indicates that GET shall be done "indirectly" by LMS and pushed out to each respective player in the sync group
    Regards,
    AndrewFG

    Try out Whitebear. The middleware that joins the two worlds of:
    1. UPnP/DLNA media clients and media players, and,
    2. Squeezebox Server and Squeeze Players
    Download it for free here: http://www.whitebear.ch/mediaserver

  5. #15
    Senior Member
    Join Date
    Apr 2005
    Posts
    6,932
    Quote Originally Posted by AndrewFG View Post
    Hi Triode,

    I very much appreciate your help, but perhaps it is too complicated to try to double guess my "lousy" code. Perhaps we should restart this discussion the other way round, and try to identify the basic requirements that I need to fulfil? Do you think you can provide tips about which ProtocolHandler class one must inherit from, and which minimum set of methods of that class must be implemented/overriden in order to get the following functionality:

    1) handles "playlist add" command urls having the form whitebear://1.2.3.4:5/path
    2) reads meta data for such urls (via getMetaDataFor) from a cache (insofar as a custom cli command will have already written such metadata into the cache)
    3) indicates that the source is a remote stream; which is a simple playable, seekable, (stoppable, pausable, replayable etc.) audio track
    4) indicates that the stream shall be fetched via an HTTP GET on a stream url having the form http://1.2.3.4:5/path the same as the whitebear:// command url
    5) in the case of non synced players, indicates that the GET shall be done "directly" by the player concerned
    6) in the case of multiple synced players, indicates that GET shall be done "indirectly" by LMS and pushed out to each respective player in the sync group
    What you have looks similar to the server's upnp handler - what's the errors from the debug when streaming via the server? Difficult to see what is going on without running this. Mail me off list if you want to discuss further.

  6. #16
    Senior Member AndrewFG's Avatar
    Join Date
    Mar 2008
    Posts
    782
    Quote Originally Posted by Triode View Post
    Mail me off list if you want to discuss further.
    Hi Triode, sorry for the delay; I was rather busy with something else; anyway I have sent you a PM.
    Regards,
    AndrewFG

    Try out Whitebear. The middleware that joins the two worlds of:
    1. UPnP/DLNA media clients and media players, and,
    2. Squeezebox Server and Squeeze Players
    Download it for free here: http://www.whitebear.ch/mediaserver

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •