Public Member Functions | Protected Attributes

ffmpegStream Class Reference

#include <ffmpegServer.h>

List of all members.

Public Member Functions

 ffmpegStream (const char *portName, int queueSize, int blockingCallbacks, const char *NDArrayPort, int NDArrayAddr, int maxBuffers, int maxMemory, int priority, int stackSize)
void processCallbacks (NDArray *pArray)
int send_frame (int sid, NDArray *pArray)
void send_stream (int sid)
void send_snapshot (int sid, int index)

Protected Attributes

int ffmpegServerQuality
int ffmpegServerFalseCol
int ffmpegServerHttpPort
int ffmpegServerHost
int ffmpegServerJpgUrl
int ffmpegServerMjpgUrl
int ffmpegServerClients
int ffmpegServerMaxW
int ffmpegServerMaxH
int ffmpegServerAlwaysOn

Detailed Description

Take an array source and compress it and serve it as an mjpeg stream.

Definition at line 34 of file ffmpegServer.h.


Constructor & Destructor Documentation

ffmpegStream::ffmpegStream ( const char *  portName,
int  queueSize,
int  blockingCallbacks,
const char *  NDArrayPort,
int  NDArrayAddr,
int  maxBuffers,
int  maxMemory,
int  priority,
int  stackSize 
)

Constructor for ffmpegStream; Class representing an mjpg stream served up by ffmpegServer. ffmpegServerConfigure() must be called before creating any instances of this class. ffmpegStreamConfigure() should be used to create an instance in the iocsh. See ffmpegStream.template for more details of usage.

Parameters:
portName The name of the asyn port driver to be created.
queueSize The number of NDArrays that the input queue for this plugin can hold when NDPluginDriverBlockingCallbacks=0. Larger queues can decrease the number of dropped arrays, at the expense of more NDArray buffers being allocated from the underlying driver's NDArrayPool.
blockingCallbacks Initial setting for the NDPluginDriverBlockingCallbacks flag. 0=callbacks are queued and executed by the callback thread; 1 callbacks execute in the thread of the driver doing the callbacks.
NDArrayPort Name of asyn port driver for initial source of NDArray callbacks.
NDArrayAddr asyn port driver address for initial source of NDArray callbacks.
maxBuffers The maximum number of NDArray buffers that the NDArrayPool for this driver is allowed to allocate. Set this to -1 to allow an unlimited number of buffers.
maxMemory The maximum amount of memory that the NDArrayPool for this driver is allowed to allocate. Set this to -1 to allow an unlimited amount of memory.
priority The thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
stackSize The stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.

Definition at line 548 of file ffmpegServer.cpp.


Member Function Documentation

void ffmpegStream::processCallbacks ( NDArray *  pArray  ) 

Take an NDArray, add grid and false colour, compress it to a jpeg, then signal to the server process that there is a new frame available.

Definition at line 371 of file ffmpegServer.cpp.

int ffmpegStream::send_frame ( int  sid,
NDArray *  pArray 
)

Internal function to send a jpeg frame as part of an mjpeg stream

Definition at line 270 of file ffmpegServer.cpp.

void ffmpegStream::send_snapshot ( int  sid,
int  index 
)

Internal function to send a single snapshot

Definition at line 225 of file ffmpegServer.cpp.

void ffmpegStream::send_stream ( int  sid  ) 

Internal function to send an mjpg stream

Definition at line 318 of file ffmpegServer.cpp.


Member Data Documentation

Definition at line 57 of file ffmpegServer.h.

Definition at line 54 of file ffmpegServer.h.

Definition at line 49 of file ffmpegServer.h.

Definition at line 51 of file ffmpegServer.h.

Definition at line 50 of file ffmpegServer.h.

Definition at line 52 of file ffmpegServer.h.

Definition at line 56 of file ffmpegServer.h.

Definition at line 55 of file ffmpegServer.h.

Definition at line 53 of file ffmpegServer.h.

Definition at line 47 of file ffmpegServer.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines