[ 
http://dev.sourcefabric.org/browse/LS-631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=27022#action_27022
 ] 

David Baelde commented on LS-631:
---------------------------------

Clearly, producing a better error message is possible and would be an 
improvement. We could also think of issuing warnings when implicitly 
restricting the variable channel type into a fixed channel type. But we can 
also think of more radical changes, though we should be very careful.

One easy change is to wrap input.http in an audio_to_stereo in utils.liq (or an 
equivalent of audio_to_stereo that would allow video). We could do the same for 
request based sources. Then we should rename the old operators and advertise 
them for users who want to control conversions themselves (either because they 
want a non-standard conversion or because they want to control where the 
conversion happens in their setup).

Doing a change at a low-level in liquidsoap is very risky, so I wouldn't go 
that way. In particular, hardcoding implicit conversions in decoders could kill 
important features (in addition to the above example on choosing conversions, 
think of the current possibility of decoding only the audio part of a video 
file).


> Incorrect typing of channels for input.http
> -------------------------------------------
>
>                 Key: LS-631
>                 URL: http://dev.sourcefabric.org/browse/LS-631
>             Project: Liquidsoap
>          Issue Type: Bug
>            Reporter: Samuel Mimram
>            Priority: Major
>
> The following was reported on the mailing list!
> liquidsoap 
> 'output.alsa(mksafe(input.http("http://mp36.bbc.streamuk.com:80/";)))'
> Here is the Liquidsoap output:
> 2012/09/07 17:19:08 [alsa_out(default):3] Using ALSA 1.0.23.
> 2012/09/07 17:19:08 [alsa_out(default):2] Falling back on interleaved S16LE
> 2012/09/07 17:19:08 [alsa_out(default):3] Samplefreq=44100Hz, 
> Bufsize=1048576B, Frame=4B, Periods=1024
> 2012/09/07 17:19:08 [decoder:3] Method "MAD" accepted "audio/mpeg".
> 2012/09/07 17:19:08 [http_4984:3] Decoding...
> 2012/09/07 17:19:08 [mksafe:3] Switch to http_4984 with transition.
> 2012/09/07 17:19:08 [http_4984:3] Incorrect stream type!
> 2012/09/07 17:19:08 [mksafe:3] Switch to safe_blank with forgetful transition.
> 2012/09/07 17:19:08 [http_4984:2] Feeding stopped: Incorrect stream type!
> 2012/09/07 17:19:11 [decoder:3] Method "MAD" accepted "audio/mpeg".
> 2012/09/07 17:19:11 [http_4984:3] Decoding...
> 2012/09/07 17:19:11 [mksafe:3] Switch to http_4984 with transition.
> 2012/09/07 17:19:11 [http_4984:3] Incorrect stream type!
> 2012/09/07 17:19:11 [mksafe:3] Switch to safe_blank with forgetful transition.
> 2012/09/07 17:19:11 [http_4984:2] Feeding stopped: Incorrect stream type!
> The "incorrect stream type" error comes from generator.ml and is due to the 
> fact that we get only one audio channel (the BBC stream is mono) whereas we 
> expect two (stereo). This should either
> - have been detected at typing type
> - have produced a better error message
> - (my prefered for now) have produced a stereo stream
> The snippet above can of course be corrected by inserting an audio_to_stereo 
> but the user has no idea about it from the error message...
> More generally, while the typing of audio channels is theoretically nice, it 
> seems to have produced a lot of errors for not much for now. My point of view 
> is that at least conversion mono -> n channels should be implicit...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-devl mailing list
Savonet-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-devl

Répondre à