User Manual

Table Of Contents
TCP Protocol Stream
The following commands can be sent over the protocol stream.
connect
The client initiates the stream by sending a connect command string. There is no payload. The
server responds with a status value of 0x00.
goto
The client sends a goto command string followed by four unsigned chars representing the hour,
minute, second, and frame of the timecode.
The server responds with an appropriate status byte based on the execution of the command.
play
The client sends a play command string followed by a floating point value. Play in real-time is
1.0, stop is 0.0, reverse is -1.0, 2x is 2.0, etc.
The server responds with an appropriate status byte based on the execution of the command.
gettc
The client sends a gettc command string.
The server responds with an appropriate status byte (status byte may be 0xFF if no timeline
exists, for instance). If the status byte is 0x00, it is followed by four unsigned chars representing
the hour, minute, second, and frame of the timecode.
getframerate
The client sends a getframerate command string.
The server responds with an appropriate status byte. If the status byte is 0x00, it is followed by
a floating point value for the frame rate.
Sample Code
The following C sample program sets up the connection to Resolve, and returns the timeline
timecode to the client:
#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#define PORT 9060
int main(int argc, char const *argv[])
{
int sock = 0, valread;
struct sockaddr_in serv_addr;
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
Chapter – 175 TCP Protocol for DaVinci Resolve Transport Control 3542