PARP Research Group University of Murcia, Spain


QVVideoRecorder Class Reference
[Video and image input/storage group]

Video source class for reading many video file formats, webcams and digital cameras. More...

#include <qvio/qvvideorecorder.h>

Inherits QVWorker.

List of all members.

Public Member Functions

bool linkProperty (QVWorker &worker, const QString rgbImageName)
bool linkProperty (QVWorker &worker, const QString yImageName, const QString uImageName, const QString vImageName)
void iterate ()
 Function to be defined in subclasses with processing code.


Detailed Description

Video source class for reading many video file formats, webcams and digital cameras.

This worker can be linked to a worker object producing an output image, to store the flow of images in a video file in the uncompressed YUV4MPEG2 format.

To use it, create a QVVideoRecorder object in the main function, and link a RGB image from a worker, to store each output image from the worker in a video file.

int main(int argc, char *argv[])
        {
        [...]
        // The following worker should have a property named 'Output image' containing an RGB image.
        MyWorker myWorker("My worker");
        [...]
        QVVideoRecorder recorder("Video recorder");
        recorder.linkProperty(player, "Output image");
        [...]
        }

Alternatively you can link three properties containing the Y, U and V channels of a YUV image respectively to store images in the video file directly in that format:

int main(int argc, char *argv[])
        {
        [...]
        // The following worker should have three properties named 'Output image Y', 'Output image U' and
        // 'Output image V' representing the three channels of a YUV image.
        MyWorker myWorker("My worker");
        [...]
        QVVideoRecorder recorder("Video recorder");
        recorder.linkProperty(player, "Output image Y", "Output image U", "Output image V");
        [...]
        }

You can tune the number of frames per second and the name of the file to store the video using functions setFPS and setVideoFileName respectively, or through the user command line, setting values for the properties FPS and Record file name in the video record object.

Once the object reads the first image frame changing those values will have no effect.

Definition at line 74 of file qvvideorecorder.h.


Member Function Documentation

bool QVVideoRecorder::linkProperty ( QVWorker worker,
const QString  rgbImageName 
)

Todo:
Check image types

Definition at line 46 of file qvvideorecorder.cpp.

bool QVVideoRecorder::linkProperty ( QVWorker worker,
const QString  yImageName,
const QString  uImageName,
const QString  vImageName 
)

Todo:
Check image types

Definition at line 52 of file qvvideorecorder.cpp.

void QVVideoRecorder::iterate (  )  [virtual]

Function to be defined in subclasses with processing code.

This function should contain the code to process data, that will be executed continuously until worker is finished.

Reimplemented from QVWorker.

Definition at line 60 of file qvvideorecorder.cpp.


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



QVision framework. PARP research group, copyright 2007, 2008.