Hello,

apparently all intermediate "source transformation" functions are shut 
down with a source.shutdown() applied on an output.x EXCEPT
strip_blank() - there might be more examples than that though.

I call strip_blank() like that in my script:
ref_source := strip_blank(length=10., !ref_source, threshold=-30.)

How to force it to shut down too?

See here, it doesn't say it goes down unlike the other functions, why is 
it still linked to itself BTW (?):

2013/10/22 23:44:30 [lang:3] channel Test has stopped
2013/10/22 23:44:30 [compress_6228:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source compress_6228 gets down.
2013/10/22 23:44:30 [normalize_6227:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source normalize_6227 gets down.
2013/10/22 23:44:30 [fallback_6226:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source fallback_6226 gets down.
2013/10/22 23:44:30 [normalize_6211:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source normalize_6211 gets down.
2013/10/22 23:44:30 [on_metadata_6210:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source on_metadata_6210 gets down.
2013/10/22 23:44:30 [strip_blank_6209:4] Activations changed: 
static=[strip_blank_6209], dynamic=[].
2013/10/22 23:44:30 [smart_cross_6222:4] Activations changed: 
static=[fallback_6226:normalize_6227:compress_6228:/play:/play], dynamic=[].
2013/10/22 23:44:30 [smart_cross_6222:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source smart_cross_6222 gets down.
2013/10/22 23:44:30 [sequence_6394:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source sequence_6394 gets down.
2013/10/22 23:44:30 [smart_cross_6222_after:4] Activations changed: 
static=[], dynamic=[].
2013/10/22 23:44:30 [source:4] Source smart_cross_6222_after gets down.
2013/10/22 23:44:30 [on_metadata_6221:4] Activations changed: static=[], 
dynamic=[smart_cross_6222].
2013/10/22 23:44:30 [on_metadata_6221:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source on_metadata_6221 gets down.
2013/10/22 23:44:30 [on_track_6220:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source on_track_6220 gets down.
2013/10/22 23:44:30 [normalize_6219:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source normalize_6219 gets down.
2013/10/22 23:44:30 [eat_blank_6218:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source eat_blank_6218 gets down.
2013/10/22 23:44:30 [skip_blank_6217:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source skip_blank_6217 gets down.
2013/10/22 23:44:30 [cue_cut_6213:4] Activations changed: static=[], 
dynamic=[].
2013/10/22 23:44:30 [source:4] Source cue_cut_6213 gets down.
2013/10/22 23:44:30 [queue_1:4] Activations changed: static=[], dynamic=[].
2013/10/22 23:44:30 [source:4] Source queue_1 gets down.

On 23/10/2013 00:07, okay_awright wrote:
> Hello!
> Thanks Romain it actually works (I think)!
> Setting an very large return value for on_error and forcing a
> source.shutdown() on the active_source of the output.x did the trick:
> the output stops but Liquidsoap still runs!
>
> Thanks!
>
> P.S. Now I have some errors when I try to re-open an output.X with the
> same parameters as the one that just failed :), but I think it has to do
> with my script, I'll investigate. Maybe I also need to perform a
> source.shutdown individually on all sources that are combined to produce
> the active_source that has just stopped?
>
> 2013/10/22 23:44:38 [clock.wallclock_main:2] Error when starting /play:
> Lang.Invalid_value(_, "A source is already register for this
> mountpointpoint '/' and port 8030.")!
> 2013/10/22 23:44:38 [clock.wallclock_main:3] Raised at file "list.ml",
> line 144, characters 16-25
> 2013/10/22 23:44:38 [/play:1] Got ill-balanced activations (from /play)!
> 2013/10/22 23:44:38 [clock:2] Error when leaving output /play: File
> "source.ml", line 396, characters 10-16: Assertion failed!
>
> Longer log snippet attached.
>
>
> On 22/10/2013 14:33, Romain Beauxis wrote:
>> Actually, on a second though, have you tried to set the return value
>> of the on_error callback to a high value and then calling
>> source.shutdown on output.icecast? That would probably work...
>>
>> 2013/10/22 Romain Beauxis <[email protected]>:
>>> Hi,
>>>
>>> 2013/10/17 okay_awright <[email protected]>:
>>>> Hello everyone, I have a simple question which is apparently difficult
>>>> to answer.
>>>>
>>>> If output.icecast fails, then Liquidsoap also shuts down, plain and
>>>> simple; how can I prevent that from happening?
>>>>
>>>> This behaviour is indeed described here
>>>> http://savonet.sourceforge.net/doc-svn/on2_part1.html : "Notice that
>>>> liquidsoap only attempts once to reconnect, then fails and shuts down.
>>>> For another behavior that tolerates more persistent failures, set
>>>> restart=true."
>>>>
>>>> I'd really like Liquidsoap not to exit in those situtations, but I also
>>>> don't want it to endlessly retry to connect. I can already make it try
>>>> not to automatically reconnect by overriding the default "onError"
>>>> event
>>>> and even destroy and clean up its associated source, but then I am
>>>> stuck
>>>> in trying to prevent Liquidsoap not to shut down when it cannot
>>>> communicate with the media server anymore. I have a complex script that
>>>> can take care of connection losses and try another server to
>>>> communicate
>>>> with when it happens. I can use a phony output.dummy(blank()) at script
>>>> launch time to fake Liquidsoap in believing that something is playing
>>>> all the time (or even use the "init.force_start" directive), waiting to
>>>> open a new output.icecast connection to another server with
>>>> add_timeout() and a fresh source.
>>>>
>>>> Is it possible? Can I do it using the Liquidsoap 1.1.1 script language?
>>>> What's the reason behind such a default behaviour (i.e. no control over
>>>> automatic shutdowns)?
>>>
>>> It is not possible at the moment. When an error occurs, either
>>> on_error returns a strictly positive number and connection is
>>> attempted again or an exception is raised.
>>>
>>> While your use case makes sense, it is also quite advanced. I will try
>>> to think of a way to allow this without making the operator even more
>>> complex..
>>>
>>> Romain
>>
>> ------------------------------------------------------------------------------
>>
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the
>> most from
>> the latest Intel processors and coprocessors. See abstracts and
>> register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>
>> _______________________________________________
>> Savonet-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>
>
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>


-- 
regards,
okay_awright
<okay_awright AT ddcr DOT biz>

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to