.net Library - StarDust.CasparCG.net

AFAIK there is not much difference in the arguments it takes. The only thing I know of is the AUTO parameter that only makes sense for LOADBG.

Of course the big difference is, were it is loaded. The standard LOAD command loads in the foreground (visible), while the LOADBG load in the background (invisible).

Hi Romain,

Thanks for your efforts. I really appreciate that.
Unfortunately it’s still not running stable.
Every now and again the connection fails when I try to connect either from a previous disconnect (reconnect) or from a freshly started application.
It throws the following error message:

System.NullReferenceException
  HResult=0x80004003
  Nachricht = Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
  Quelle = StarDust.CasparCg.net.Device
  Stapelüberwachung:
   bei StarDust.CasparCG.net.Device.CasparDevice.OnUpdatedChannelInfo(InfoEventArgs e)
   bei StarDust.CasparCG.net.Device.CasparDevice.<GetInfoAsync>d__77.MoveNext()
   bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs: Zeile184

  Diese Ausnahme wurde ursprünglich von dieser Aufrufliste ausgelöst:
    StarDust.CasparCG.net.Device.CasparDevice.OnUpdatedChannelInfo(StarDust.CasparCG.net.AmcpProtocol.InfoEventArgs)
    StarDust.CasparCG.net.Device.CasparDevice.GetInfoAsync()
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) in TaskAwaiter.cs

Maybe you might encounter this problem with the test-app I sent previously.

It seems that there is a timeout when the server tries to answer to INFO command or THUMBNAIL LIST command that is sent automatically by your library on connect.

Sorry to cause so much trouble… :neutral_face:

Thanks!

Ingo

@rom1 just reported a bug on github about the new WIP OSC event hub being broken

1 Like

@Ingo Were you able to fix this issue?
I think there’s something wrong with the lib, but want to be sure before opening a bug report.

Sometimes I get a crash when trying to connect the app, the same as you.

Hi,
No I unfortunetly could not cope with it. So I switched to server 2.11 Nrk using rrebuffos lib. This works fine for me.
However I think there is an issue in the stardust lib with that.

Ingo

Sorry for this problem. I just publish a new version that fixed this issue.

Thanks for keeping up with the lib and trying to fix things! I appreciate it!

I saw your latest commits, upgraded nugets and still have the same issue when using OSC event hub:

Exception thrown: 'Unity.ResolutionFailedException' in Unity.Container.dll
Unity.ResolutionFailedException: Exception has been thrown by the target of an invocation.
_____________________________________________________
Exception occurred while:
   on constructor:  CasparCGOscEventsHub(IOscListener casparCgOscListener)
        mapped to:  ICasparCGOscEventsHub
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void StarDust.CasparCG.net.OSC.IOscListener.add_ListenerStarted(System.EventHandler)'.
   at StarDust.CasparCG.net.OSC.EventHub.CasparCGOscEventsHub..ctor(IOscListener casparCgOscListener)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Unity.Processors.ConstructorDiagnostic.<>c__DisplayClass14_0.<GetResolverDelegate>b__0(BuilderContext& c) in C:\projects\unity\Container\src\Processors\Constructor\ConstructorDiagnostic.cs:line 360
   at Unity.Processors.MemberProcessor`2.<>c__DisplayClass8_0.<GetResolver>b__0(BuilderContext& c) in C:\projects\unity\Container\src\Processors\Abstracts\MemberProcessor.cs:line 162
   at Unity.Processors.MemberProcessor`2.<>c__DisplayClass8_0.<GetResolver>b__0(BuilderContext& c) in C:\projects\unity\Container\src\Processors\Abstracts\MemberProcessor.cs:line 162
   at Unity.Processors.MemberProcessor`2.<>c__DisplayClass8_0.<GetResolver>b__0(BuilderContext& c) in C:\projects\unity\Container\src\Processors\Abstracts\MemberProcessor.cs:line 162
   at Unity.UnityContainer.<>c__DisplayClass113_0.<OptimizingFactory>b__0(BuilderContext& c) in C:\projects\unity\Container\src\UnityContainer.Resolution.cs:line 288
   at Unity.Strategies.BuildPlanStrategy.PreBuildUp(BuilderContext& context) in C:\projects\unity\Container\src\Strategies\BuildPlanStrategy.cs:line 80
   at Unity.UnityContainer.ExecuteValidatingPlan(BuilderContext& context) in C:\projects\unity\Container\src\UnityContainer.Resolution.cs:line 399

Also, casparCGServer.ChannelsUpdated seems to have stopped firing.

Hi all,
can somebody share proper way to format command

PLAY 1-30 EMPTY MIX 6

cant make it work in stardust

Please find an example here

 var casparCGServer = _container.Resolve<ICasparDevice>();
            var channel = casparCGServer.Channels.First(x => x.ID == 1);
            channel.LoadBG(new CasparPlayingInfoItem
            {
                VideoLayer = 1,
                Clipname = "EMPTY",
                Transition = new Transition
                {
                    Direction = TransitionDirection.LEFT,
                    Type = TransitionType.PUSH,
                    Duration = 100
                }
            });
            channel.Play(1);
1 Like

thank you, actually I get that working but could not proper format transition string.

I just add a play command with transition parameter. I just publish this addon in a new prerelease version.
Can you try to install the 2020.9.19-alpha. Don’t ommit to select prerelease option on your nuget manager

 channel.Play(new CasparPlayingInfoItem
            {
                VideoLayer = 1,
                Clipname = "EMPTY",
                Transition = new Transition
                {
                    Direction = TransitionDirection.LEFT,
                    Type = TransitionType.PUSH,
                    Duration = 100
                }
            });

I will try it, thanx

Please make me a feedback, to allow me to release the alpha :wink:

Hey @rom1!

Can you check this please? Missing resume functionality for a project.

1 Like

Hi Joel,

Thank you for the add. Very happy to see that community improve the framework ;).
I just merge your commit. I release this addon.

1 Like

Hello,
on your Github page, you say that your development is still in testing for server 2.3. Is the GitHub post sufficient or do you have another link? I would like to test your solution. sorry for my poor English.

thanks

Hello,

can you check that please? I changed the automatic reconnection because it was not working.

image

Seems that you closed your pull request ?

It’s not very tested. But I already used the lib with the 2.3 and it seems ok. You can used it and provide some feedback in case of problems.