digiKam
DigikamGenericMjpegStreamPlugin::MjpegServer Class Reference
+ Inheritance diagram for DigikamGenericMjpegStreamPlugin::MjpegServer:

Classes

class  Private
 

Public Slots

void slotWriteFrame (const QByteArray &frame)
 

Public Member Functions

QStringList blackList () const
 
int maxClients () const
 
 MjpegServer (const QString &address=QString(), int port=8080, QObject *const parent=nullptr)
 
int rate () const
 
void setBlackList (const QStringList &lst)
 
bool setMaxClients (int)
 
bool setRate (int)
 
void start ()
 
void stop ()
 
 ~MjpegServer ()
 

Constructor & Destructor Documentation

◆ MjpegServer()

DigikamGenericMjpegStreamPlugin::MjpegServer::MjpegServer ( const QString &  address = QString(),
int  port = 8080,
QObject *const  parent = nullptr 
)
explicit

Create an instance of MJPEG server listening on 'address' and 'port'. Default address is 'any' (an empty string), as server listen on all network interfaces. You can pass a literal address as "localhost" or an IPV4 based one as "192.168.1.1".

References DigikamGenericMjpegStreamPlugin::MjpegServer::Private::open(), and DigikamGenericMjpegStreamPlugin::MjpegServer::Private::setMaxClients().

◆ ~MjpegServer()

DigikamGenericMjpegStreamPlugin::MjpegServer::~MjpegServer ( )

Member Function Documentation

◆ blackList()

QStringList DigikamGenericMjpegStreamPlugin::MjpegServer::blackList ( ) const

◆ maxClients()

int DigikamGenericMjpegStreamPlugin::MjpegServer::maxClients ( ) const

◆ rate()

int DigikamGenericMjpegStreamPlugin::MjpegServer::rate ( ) const

◆ setBlackList()

void DigikamGenericMjpegStreamPlugin::MjpegServer::setBlackList ( const QStringList &  lst)

Handle the list of clients IP address to ban from the stream server.

References DigikamGenericMjpegStreamPlugin::MjpegServer::Private::blackList.

◆ setMaxClients()

bool DigikamGenericMjpegStreamPlugin::MjpegServer::setMaxClients ( int  max)

Limit the number of clients connected to the server [1 - 30]. Default = 10 clients.

References DigikamGenericMjpegStreamPlugin::MjpegServer::Private::setMaxClients().

◆ setRate()

bool DigikamGenericMjpegStreamPlugin::MjpegServer::setRate ( int  ra)

Handle rate of frame per seconds dispatched to the network [1 - 30]. A low value reduce network bandwidth use. Default = 15 img/s.

References DigikamGenericMjpegStreamPlugin::MjpegServer::Private::delay, and DigikamGenericMjpegStreamPlugin::MjpegServer::Private::rate.

◆ slotWriteFrame

void DigikamGenericMjpegStreamPlugin::MjpegServer::slotWriteFrame ( const QByteArray &  frame)
slot

Slot to push an update of JPEG frame to the remote client connected on server. Use a direct signal/slot connection to optimize time latency.

References DigikamGenericMjpegStreamPlugin::MjpegServer::Private::lastFrame, and DigikamGenericMjpegStreamPlugin::MjpegServer::Private::mutexFrame.

◆ start()

void DigikamGenericMjpegStreamPlugin::MjpegServer::start ( )

Start and stop the server to listen on the network. for a new client connection.

References DigikamGenericMjpegStreamPlugin::MjpegServer::Private::start().

◆ stop()

void DigikamGenericMjpegStreamPlugin::MjpegServer::stop ( )

The documentation for this class was generated from the following files: