#include <frameServer.h>
Collaboration diagram for frameServer:

Signals | |
| void | frameReady (QImage *frame) |
| The signal emitted when a frame is available. | |
Public Member Functions | |
| frameServer () | |
| Empty Constructor. | |
| virtual | ~frameServer () |
| Empty Destructor. | |
| QImage * | getFrame () |
| getFrame will produce the current frame from the video. | |
| void | restart () |
| Restarts the video over from the beginning. | |
| void | setCaptureRate (int ms) |
| Set the sampling interval of the video source. | |
| void | startCapture () |
| Start the video capture. | |
| void | stopCapture () |
| Stops the current capture. | |
| int | attachSource (QString *sourceName) |
| Attaches to a video stream source. | |
| void | togglePause () |
| Toggles a pause of the current playback. | |
Private Slots | |
| void | obtain_frame () |
| A private slot that obtains a QImage frame from the video source. | |
Private Attributes | |
| QImage * | currentFrame |
| QImage * | lastFrame |
| QtFFPlay | qtfp |
| An instance of QtFFPlay that is used for handling the video. | |
| QTimer | m_timer |
| int | timeInt |
| int | capStatus |
The frameserver is responsible for providing access to frames from a video data file or video stream. The image can be provided for display (i.e. a display widget directly) or any arbitrary class that needs access to the raw image data (an image processing class, for example).
Definition at line 26 of file frameServer.h.
| frameServer::frameServer | ( | ) |
Empty Constructor.
Definition at line 11 of file frameServer.cpp.
References capStatus, lastFrame, m_timer, obtain_frame(), and timeInt.
| frameServer::~frameServer | ( | ) | [virtual] |
| int frameServer::attachSource | ( | QString * | sourceName | ) |
Attaches to a video stream source.
This will open a video stream source and being playback automatically.
| sourceName | A string with the location of the file/device to be viewed. |
Definition at line 77 of file frameServer.cpp.
References QtFFPlay::init(), QtFFPlay::input_filename, and qtfp.
Referenced by obstDet::openFile().
| void frameServer::frameReady | ( | QImage * | frame | ) | [signal] |
The signal emitted when a frame is available.
Typically this signal will be connected to the slots of other classes that need access to the raw frame data (for processing or display).
| frame | A pointer to the frame that is ready. |
Referenced by obtain_frame().
| QImage * frameServer::getFrame | ( | ) |
getFrame will produce the current frame from the video.
Definition at line 72 of file frameServer.cpp.
References currentFrame.
| void frameServer::obtain_frame | ( | ) | [private, slot] |
A private slot that obtains a QImage frame from the video source.
This is initiated by a QTimer.
Definition at line 63 of file frameServer.cpp.
References currentFrame, frameReady(), QtFFPlay::grabFrame(), lastFrame, and qtfp.
Referenced by frameServer().
| void frameServer::restart | ( | ) |
Restarts the video over from the beginning.
Restart will start the video over from the beginning (the first frame). The current frame will now be the first frame of the video source. This is only applicable when a video data source is being used.
Definition at line 28 of file frameServer.cpp.
| void frameServer::setCaptureRate | ( | int | ms | ) |
Set the sampling interval of the video source.
The video source will be sampled at a set interval. This function sets that interval value, which is then handled by a QTimer.
| ms | The number of milliseconds between each image capture. |
Definition at line 53 of file frameServer.cpp.
References capStatus, startCapture(), stopCapture(), and timeInt.
Referenced by obstDet::obstDet(), and obstDet::updateCaptureInt().
| void frameServer::startCapture | ( | ) |
Start the video capture.
This triggers the start of a video capture. The rate must be set first, or the default value of 0 for the capture rate will not allow any captures to occur.
Definition at line 38 of file frameServer.cpp.
References capStatus, m_timer, and timeInt.
Referenced by setCaptureRate(), and obstDet::toggleCapture().
| void frameServer::stopCapture | ( | ) |
Stops the current capture.
This will end the current capture.
Definition at line 47 of file frameServer.cpp.
References capStatus, and m_timer.
Referenced by setCaptureRate(), and obstDet::toggleCapture().
| void frameServer::togglePause | ( | ) |
Toggles a pause of the current playback.
Definition at line 32 of file frameServer.cpp.
References qtfp, and QtFFPlay::togglePause().
Referenced by obstDet::openFile(), and obstDet::togglePause().
QtFFPlay frameServer::qtfp [private] |
An instance of QtFFPlay that is used for handling the video.
Definition at line 106 of file frameServer.h.
Referenced by attachSource(), obtain_frame(), and togglePause().
1.4.7