Hi,

There is no way to disable prefetching (otherwise you could have blank
between songs, etc.). I think that you either have to rethink the logics of
your program generating the list of songs or liquidsoap's queues by using
the request.queue operator.

++

Sam.


On Tue, Sep 13, 2011 at 10:26 PM, Alfie <[email protected]> wrote:

>   Hi Samuel,
> Thank you for the explanation. I realize that this is not the behavior that
> my application needs. I want to have control over everything.
> I Need to control the order.
> 1. next
> 2. on_track
> 3. on_end
>
> I guess all I want to do is turn off prefetch. Here is why; you see I have
> a queue and queues operate on FIFO principle. I when I get next, I do not
> remove the first item from the queue unless on_end is called. If a prefetch
> happens before end then it will just read the same item that is on the queue
> when next was called.
> This is why I need to control the events... is there a way to do this?
>
>  *From:* Samuel Mimram <[email protected]>
> *Sent:* Thursday, September 08, 2011 4:13 AM
> *To:* Alfie <[email protected]>
> *Cc:* David Baelde <[email protected]> ;
> [email protected]
>  *Subject:* Re: [Savonet-users] LiquidSoap for Win32
>
> Hi,
>
> This is because Liquidsoap gets the next song in advance (the prefetching
> David mentionned), while the current song is playing:
>
> 1111: song 1 is downloaded
> 2222: song 1 is played
> 1111: song 2 is downloaded (while song 1 is playing)
> 3333: song 1 stops
> 2222: song 2 is played
> 1111: song 3 is dowloaded (while song 1 is playing)
> 3333: song 2 stops
> 2222: song 3 is played
> etc.
>
> ++
>
> Sam.
>
>
> On Thu, Sep 8, 2011 at 5:51 AM, Alfie <[email protected]> wrote:
>
>> Hi again,
>> I know you told me to post in the thread but I don’t even know where it
>> is?
>>
>> I tried the on_track method and I am even more lost... It does seem to be
>> working as you described...
>> Here is my script and look at the log. It seems to not be firing in the
>> order you and your documentation describes. the order is suppose to be
>> 1,2,3. But it is apparently not.
>> Can you tell me why?
>>
>> def ab_next() =
>> # Get the first line of my external process
>>    log("11111111111111111111111111111111111111-------------next")
>> result =
>>    list.hd(get_process_lines("C:\PlayGen.exe -cmd=next"))
>> # Create and return a request using this result
>> request.create(result)
>> end
>>
>> def ab_playing(m) =
>> # Get the first line of my external process
>> log("2222222222222222222222222222222222222--------------playing")
>> system("C:\PlayGen.exe -cmd=playing")
>> end
>>
>> def ab_played(t, m) =
>> # Get the first line of my external process
>>    log("33333333333333333333333333333333333--------------played")
>>    system("C:\PlayGen.exe -cmd=played -cat=-1")
>> end
>>
>> # Create the source
>> s = request.dynamic(ab_next)
>> s =  mksafe(s)
>> s = on_track(ab_playing,s)
>> s = on_end(ab_played, s,delay=3.0)
>>
>> output.icecast(%mp3,host="localhost",fallible=true,port=8041,password="hackme",mount="live",s)
>>
>> ******************LOG BELOW**********************
>>
>> 2011/09/07 23:35:32 [lang:3]
>> 11111111111111111111111111111111111111-------------next
>> 2011/09/07 23:35:32 [decoder:3] Method "MP3/LIBMAD" accepted
>> "c:\Out\int.mp3".
>> 2011/09/07 23:35:35 [request.dynamic_4308:3] Finished with
>> "c:\Out\7af6061e-e1c1-495d-983d-2c3a9b36e9bd.mp3".
>> 2011/09/07 23:35:35 [request.dynamic_4308:3] Prepared "c:\Out\int.mp3"
>> (RID
>> 70).
>> 2011/09/07 23:35:35 [lang:3]
>> 2222222222222222222222222222222222222--------------playing
>> 2011/09/07 23:35:35 [lang:3]
>> 11111111111111111111111111111111111111-------------next
>> 2011/09/07 23:35:35 [decoder:3] Method "MP3/LIBMAD" accepted
>> "c:\Out\int.mp3".
>> 2011/09/07 23:35:38 [clock.wallclock_main:2] We must catchup 2.50 seconds!
>> 2011/09/07 23:35:40 [lang:3]
>> 33333333333333333333333333333333333--------------played
>> 2011/09/07 23:35:43 [request.dynamic_4308:3] Finished with
>> "c:\Out\int.mp3".
>> 2011/09/07 23:35:43 [request.dynamic_4308:3] Prepared "c:\Out\int.mp3"
>> (RID
>> 47).
>> 2011/09/07 23:35:43 [lang:3]
>> 2222222222222222222222222222222222222--------------playing
>> 2011/09/07 23:35:43 [lang:3]
>> 11111111111111111111111111111111111111-------------next
>> 2011/09/07 23:35:44 [decoder:3] Method "MP3/LIBMAD" accepted
>> "c:\Out\d54f0765-783c-4a2f-b96e-44cfe2e6af80.mp3".
>> 2011/09/07 23:35:46 [clock.wallclock_main:2] We must catchup 2.64 seconds!
>> 2011/09/07 23:35:48 [lang:3]
>> 33333333333333333333333333333333333--------------played
>> 2011/09/07 23:35:52 [request.dynamic_4308:3] Finished with
>> "c:\Out\int.mp3".
>> 2011/09/07 23:35:52 [request.dynamic_4308:3] Prepared
>> "c:\Out\d54f0765-783c-4a2f-b96e-44cfe2e6af80.mp3" (RID 372).
>> 2011/09/07 23:35:52 [lang:3]
>> 2222222222222222222222222222222222222--------------playing
>> 2011/09/07 23:35:54 [clock.wallclock_main:2] We must catchup 2.55 seconds!
>>
>> -----Original Message-----
>> From: David Baelde
>> Sent: Tuesday, September 06, 2011 4:45 AM
>> To: Alfie
>> Cc: [email protected]
>> Subject: Re: [Savonet-users] LiquidSoap for Win32
>>
>> Hi,
>>
>> On Tue, Sep 6, 2011 at 9:31 AM, Alfie <[email protected]> wrote:
>> > For problem 2, I think I should explain more. You see, I have a program
>> > that
>> > generates a playlist. when it is generated it also sets an image that is
>> > for
>> > the current playing item so that the website can use the image.
>> > this requires that when liquidsoap calls the playlist program it should
>> be
>> > in sync.
>>
>> OK so you don't need "perfect sync", just "enough sync".
>>
>> > The problem is that liquid soap streams the data and grabs another
>> "next"
>> > too soon and it makes the images out of sync by a few seconds.
>> > How can I tell liquid soap to wait for the entire stream to be sent
>> before
>> > it grabs another playlist item?
>>
>> You need to distinguish prefetching (when liquidsoap prepares a file)
>> and playing (when it actually plays it, which is when you want to
>> inform the website that the image should change). To do stuff when a
>> file is played, you typically need to use on_track().
>>
>> If you need more help, please start a new thread with a clear topic
>> and explaination: many people here have similar devices and could
>> share their experience and code snippets.
>>
>> Cheers,
>> --
>> David
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Doing More with Less: The Next Generation Virtual Desktop
>> What are the key obstacles that have prevented many mid-market businesses
>> from deploying virtual desktops?   How do next-generation virtual desktops
>> provide companies an easier-to-deploy, easier-to-manage and more
>> affordable
>> virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
>> _______________________________________________
>> Savonet-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>
>
>
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to