![]() |
University of Murcia, Spain ![]() |
QVYUV4MPEG2Recorder Class ReferenceVideo source class for reading many video file formats, webcams and digital cameras.
More...
|
Public Slots | |
void | processTrigger (QString name) |
Process trigger activations in the worker. | |
Public Member Functions | |
QVYUV4MPEG2Recorder (QString name, const QString fileName="pru.mpg", const int fps=25, const bool recording=true) | |
~QVYUV4MPEG2Recorder () | |
bool | linkUnspecifiedInputProperty (QVPropertyContainer *srcCont, QString srcProp, LinkType linkType) |
void | iterate () |
Function to be defined in subclasses with processing code. |
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 QVYUV4MPEG2Recorder 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"); [...] QVYUV4MPEG2Recorder recorder("Video recorder"); player.linkProperty("Output image", recorder); [...] }
You can tune the number of frames per second and the name of the file to store the video 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 58 of file qvyuv4mpeg2recorder.h.
void QVYUV4MPEG2Recorder::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 95 of file qvyuv4mpeg2recorder.cpp.
void QVYUV4MPEG2Recorder::processTrigger | ( | QString | name | ) | [virtual, slot] |
Process trigger activations in the worker.
Triggers are just named actions that can be called upon a QVWorker to change it's state, initialize itself, or whatever action the programmer considers convenient, in a completely asynchronous manner.
When added to a worker, they will depict a button in the corresponding property widget in the interface, that will do a call to processTrigger() function when pressed. Use addTrigger to add triggers to a worker, and redefine this function to capture their activations.
name | the name of the trigger that was activated. |
Reimplemented from QVWorker.
Definition at line 54 of file qvyuv4mpeg2recorder.cpp.