Skip to content

duncanbarnes/CasparCGNetConnector

 
 

Repository files navigation

CasparCGNetConnector

A DotNet Connector for CasparCG Server

Table of contents

License

This software is licensed under the [Gnu GPL v3] 2.

Features

This connector framework was written for CasparsPlayoutClient and offers the follwing features:

  • easy connection
  • duplex communication with the CasparCG Server
  • built in CasparCG Server command classes
    • with version control
    • easy runtime exploreation of commands and their paramters - perfect for UI building
    • command and parameter discriptions
  • ready to use media objects for OO usage
  • plaintext command sending

Quick Start

See the Wiki for a more detailed and complete Guide.

Add CasparCGNetConnector to your project and import the namespace where needed

import CasparCGNetConnector

Now you need a CasparCGNetConnector.CasparCGConnection object

Dim con as new CasparCGConnection(server,port)

where server is the IP or DNS name of the CasparCG Server and port the TCP port nummber.

For sending commands to the CasparCG Server, there are two possible ways:

  • creating a CasparCGNetConnector.Command object and call it's execute method

Dim cmd as new PlayCommand(channel,layer,medianame) cmd.execute(con)

  • send a plaintext command

con.sendCommand("play 1-1 amb")

If you are interrested in the CasparCG Server response, you can check the CasparCGResponse. Both, the execute() and the sendCommand() method is returning a CasparCGResponse object holding:

  • the CasparCG Server response code
    response.getCode() as integer
  • the received data as string
    response.getData()
  • the received data as xml (if any)
    response.getXML()
  • the executed command as string
    response.getCommand()
  • the raw server message as it was received
    response.getServerMessage()
  • the response status
    response.isOK()
    

response.isERR() response.isINFO() response.isUNKNOWN()

This should be enough to give you a good start. There are more functions to explore. Just check out the code.

Development

CasparCGNetConnector is still under development and has reached an alpha state now. This means you can use it and I will provide compiled dlls, but the chances are given that the interface of the classes change over the releases. With the first beta release, interface changes will only occur with big version steps. Any contributions are welcome. The first development phase was under high time pressure, so some parts of the code are not or only hardly documented so far. But it's getting better ;-)

About

A DotNet Connector for CasparCG Server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Visual Basic .NET 100.0%