server icon indicating copy to clipboard operation
server copied to clipboard

AMCP PLAY/LOAD command producer prefix

Open Julusian opened this issue 6 years ago • 7 comments

When using the PLAY/LOAD/LOADBG and CG ADD/CG PLAY caspar internally attempts to initialize each producer in turn until one successfully parses the command. This has required a [HTML] prefix to be adopted by the html producer, as it both it and ffmpeg think they can play files beginning with http://. This has been the source of a couple of bugs, which I believe is why html has a prefix.

For years I assumed that PLAY 1-10 CLEAR would load an empty frame and have no overhead, but it in fact loads in a transparent colour producer.

Instead of this, I think it would be nicer to always prefix the producer when running one of these commands, as this will make it more predictable as to what producer is going to respond and make it more efficient. If we do this for 2.2, then we can at the same time deprecate the unprefixed way of calling these commands, with the intention to remove them in 3.0.

I expect that some of the prefixes might want multiple aliases (eg COLOR/COLOUR OR VIDEO/FFMPEG).

Some example changes:

PLAY 1-10 RED => PLAY 1-10 [COLOR] RED
PLAY 1-10 AMB => PLAY 1-10 [FFMPEG] AMB 
PLAY 1-10 TICKER-BAR => PLAY 1-10 [IMAGE] TICKER-BAR 

CG 1-10 ADD TEST => CG 1-10 ADD [HTML] TEST

Additionally, I don't like how that the CG ADD command uses 0 and 1 for autoplay. I think it would be much nicer to use an optional keyword such as [AUTOPLAY] at the same position. Makes it much more descriptive and makes clear what the default will be. I can live with this as is though, as having a transition period with this would be harder and there is less benefit.

Julusian avatar Feb 12 '18 14:02 Julusian