Skip to content

mcdikki/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 won't be actively maintained any longer. Since I'm not using it anymore, I can't afford the time needed to keep track with the development of the CasparCG server. If you still use it and find a bug, feel free to open an issue and I may find the time to look into it, but don't expect it be closed any time sone :-(

About

A DotNet Connector for CasparCG Server

Resources

License

Stars

Watchers

Forks

Packages

No packages published