Media from svt.caspar.dll


#1

I am using svt.caspar.dll and Svt.Network.dll for retrieving media and templates. These are working fine in server 2.07 and 2.1.
But in server 2.2 I am not getting it. My codes in vb.net for getting templates in a listbox are as follows.

lsttemplate.Items.Clear()
CasparDevice.RefreshTemplates()
Threading.Thread.Sleep(1000)
For Each File In CasparDevice.Templates.All
lsttemplate.Items.Add((Replace((File.FullName), “”, “/”)))
Next
lsttemplate.Refresh()

I have started scanner.exe and getting templates list in console. Even casparcg official client showing template list. But not getting it on my client through dll.

When TLS is executed, and when I debug and I get
CasparDevice.Templates.All.Count=0
CasparDevice.Templates.All.ToString=System.Collections.Generic.List`1[Casparcg.Core.Device.TemplateInfo]


#2

I’m by no means an expert on this workflow, but I believe Server 2.2 uses the Media Scanner for this: https://github.com/CasparCG/media-scanner


#3

It looks like the format of the dat returned over TLS has changed. This is likely confusing that lib, but somehow not the client. This might want to be corrected in media-scanner as it is a breaking change

2.1:

200 TLS OK
"CasparCG_Flash_Templates_Example_Pack_1/ADVANCEDTEMPLATE1" 30327 20180313193300 flash
"CasparCG_Flash_Templates_Example_Pack_1/ADVANCEDTEMPLATE2" 49578 20180313193300 flash

2.2 (media-scanner):

200 TLS OK
CASPARCG_FLASH_TEMPLATES_EXAMPLE_PACK_1/ADVANCEDTEMPLATE1
CASPARCG_FLASH_TEMPLATES_EXAMPLE_PACK_1/ADVANCEDTEMPLATE2