QLabelRenderer Class Reference
This I/O class renders a gray-scale or RGB stream (via a QFrameBuffer) onto a QLabel widget. More...
#include <QLabelRenderer.hpp>
Inheritance diagram for QLabelRenderer:
Public Member Functions | |
QLabelRenderer (const VideoESInfo *es, UncompressedVideoFrame::ColorSpace colorSpace, QLabel *qlabel, bool allowUpscaleX=false, QEvent::Type eventType=QEvent::User) | |
Constructor. | |
virtual | ~QLabelRenderer () |
Destructor. | |
virtual int | writeFrame (Frame *frm, ESInfo *out_es=NULL) |
Renders a frame to the destination QLabel widget. | |
virtual bool | open () |
Creates internal frame buffers and checks whether the stream to be rendered matches the widget dimensions. | |
Protected Member Functions | |
bool | updateDisplayRegion () |
Update frame_info (except size ) and display_region. |
Detailed Description
This I/O class renders a gray-scale or RGB stream (via a QFrameBuffer) onto a QLabel widget.It is intended to be used as a DataSink connected to a DataChannel.
Video frames will be (down or up) scaled to fit into the QLabel widget by preserving the aspect ratio given in VideoESInfo.
The expected format of the gray-scale stream is: 1 byte per pixel.
The expected format of the RGB24 stream is: 3 bytes per pixel, in the order RGB (red, green, blue).
The expected format of the RGB32 stream is: 4 bytes per pixel, in the order BGRA (blue, green, red, alpha). This conforms to the PIX_FMT_RGBA32 format defined in ffmpeg/libavcodec/avcodec.h on little endian architectures.
- Author:
- Mario Taschwer
- Version:
- Id
- QLabelRenderer.hpp,v 1.18 2006/01/20 15:37:18 mkropfbe Exp
Definition at line 82 of file QLabelRenderer.hpp.
Constructor & Destructor Documentation
|
Constructor. If the parameters are invalid, the open() method will fail.
References UncompressedVideoFrame::ColorSpace.
|
Member Function Documentation
|
Creates internal frame buffers and checks whether the stream to be rendered matches the widget dimensions.
Reimplemented from VideoRenderer. Definition at line 90 of file QLabelRenderer.cpp. References updateDisplayRegion().
|
|
Update frame_info (except This function is not thread-safe, and is internally called by the open() method. Reimplemented from VideoRenderer. Definition at line 76 of file QLabelRenderer.cpp. References VideoRenderer::updateDisplayRegion(). Referenced by open().
|
|
Renders a frame to the destination QLabel widget.
Reimplemented from VideoRenderer. Definition at line 144 of file QLabelRenderer.cpp. References VideoRenderer::writeFrame().
|
The documentation for this class was generated from the following files: