Camstream: CamStream API documentation

Main Page Class Hierarchy Compound List File List Compound Members File Members

# CCamStreamApp Class Reference

The CamStream main application class. More...

`#include <CamStreamApp.h>`

Inheritance diagram for CCamStreamApp::

List of all members.

## Public Methods

- CCamStreamApp (int argc, char *argv[])
- ~CCamStreamApp ()
- QString GetUploadTmpDir () const
- int GetNumberOfFileTypes () const
- int GetFileTypeMask () const
- QString GetFileTypeExtension (int n) const
- QString GetFileTypeFormatStr (int n) const
- int FormatStrToEnum (const QString &) const
- QString FormatStrToExtension (const QString &) const
- SVideoOptions* FindVideoOptions (const QString &name, const QString &node, bool create=FALSE)

## Public Attributes

- CVideoCollector* VideoDevices
- struct {
  - QDomDocument Root
  - QDomElement Defaults
  - QDomElement VideoDevices
- } Configuration

## Detailed Description

The CamStream main application class.

This class is the main object for the CamStream application. It does the following:

- creates the canvas, loads widgets;
- determines available image file formats;
- stores and retrieves user settings;

The configuration is stored as an XML document. The structure still has to be defined fully, and is partially defined by sub-elements.

## Constructor & Destructor Documentation

CCamStreamApp::CCamStreamApp ( | int argc,
| char * argv[] )

| Constructor. Takes the argc and argv arguments from main().

CCamStreamApp::~CCamStreamApp ( | )

| Destructor. End of program; saves user settings (image formats, etc)

## Member Function Documentation

struct SVideoOptions * CCamStreamApp::FindVideoOptions ( | const QString & name,
| const QString & node,
| bool create = FALSE )

  | Find the options of a videodevice, matching by name or device node. Parameters:
  name | The name from the device, e.g. "CPiA webcam"
  node | The device nodename, e.g. /dev/video1
  create | If TRUE, will create a new structure which is added to the internal tree
Returns: a SVideoOptions structure, or NULL if nothing was found and create was FALSE This function tries to find a matching SVideoOptions struct for a device. It first searches the list looking for the 'name' (which is a symbolic name returned by the device), if that fails it uses the device nodename. By setting create to TRUE, a SVideoOptions structure will be created when it wasn't found in the current list, and will be appended to the known configurations.

int CCamStreamApp::FormatStrToEnum ( | const QString & format ) const

| Find enumeration belonging to file format. Returns: A positive integer on a match, -1 when nothing was found This function returns a number from FileTypeEnum that matches the string given in format. See GetFileTypeFormatStr

QString CCamStreamApp::FormatStrToExtension ( | const QString & ) const

QString CCamStreamApp::GetFileTypeExtension ( | int n ) const

  | Get string with the proper filename extension. Parameters:
  n | One of FileTypeEnum
Return the proper filename extension for the given file format. For example, for JPEG files, it will return "jpg".

QString CCamStreamApp::GetFileTypeFormatStr ( | int n ) const

| Get string with format for saving files. Return proper handler string for current file format (which is different from the file extension). See QImage::save(...)

int CCamStreamApp::GetFileTypeMask ( | ) const

| Return bitmak of available file formats. This function returns a bitmask of available formats. Every enumerated fileformat is represented by its corresponding bit (use 1 << n to mask out a bit). The number of fileformats is thus limited to 32.

int CCamStreamApp::GetNumberOfFileTypes ( | ) const

| Return number of file formats. This function returns the number of programmed file formats, including the formats that are currently not supported by Qt. The supported formats are determined at run time, see GetFileTypeMask.

QString CCamStreamApp::GetUploadTmpDir ( | ) const

## Member Data Documentation

struct { ... } CCamStreamApp::Configuration

QDomElement CCamStreamApp::Defaults

QDomDocument CCamStreamApp::Root

QDomElement CCamStreamApp::VideoDevices

CVideoCollector* CCamStreamApp::VideoDevices

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

- CamStreamApp.cc
- CamStreamApp.h