SDLRenderer Class Reference
This I/O class renders a gray-scale or RGB24/32 or YUV I420/YV12 stream the used SDL surface is created within this function, incl. CTRL-C/ESC signal/event catchers. More...
#include <SDLRenderer.hpp>
Inheritance diagram for SDLRenderer:
Public Member Functions | |
SDLRenderer (const VideoESInfo *es, UncompressedVideoFrame::ColorSpace colorSpace=UncompressedVideoFrame::ColorSpaceI420, int width=0, int height=0, bool fullScreen=false, bool pollEvents=true, bool isLabelResizable=true, bool fixAspectRatio=true, bool allowUpscaleX=false, bool rotateXDisplay=false) | |
Constructor. | |
virtual | ~SDLRenderer () |
Destructor. | |
virtual int | writeFrame (Frame *frm, ESInfo *out_es=NULL) |
Renders a frame to the destination YUV_Overlay/RGB_Surface. | |
virtual bool | open () |
Creates internal frame buffers and checks whether the stream to be rendered matches the widget dimensions. | |
void | setESInfo (ESInfo *es) |
Not implemented. | |
Protected Member Functions | |
bool | updateDisplayRegion () |
Update frame_info (except size ) and display_region. | |
void | doRotateXDisplay (int orientation) |
rotate the X11 display using the XRandr extension |
Detailed Description
This I/O class renders a gray-scale or RGB24/32 or YUV I420/YV12 stream the used SDL surface is created within this function, incl. CTRL-C/ESC signal/event catchers.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 given size 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:
- Michael Kropfberger
- Version:
- Id
- SDLRenderer.hpp,v 1.11 2006/01/20 15:37:18 mkropfbe Exp
Definition at line 80 of file SDLRenderer.hpp.
Constructor & Destructor Documentation
|
Constructor. If the parameters are invalid, the open() method will fail.
References UncompressedVideoFrame::ColorSpace.
|
Member Function Documentation
|
rotate the X11 display using the XRandr extension
Referenced by open(), and ~SDLRenderer().
|
|
Creates internal frame buffers and checks whether the stream to be rendered matches the widget dimensions.
Reimplemented from VideoRenderer. Definition at line 149 of file SDLRenderer.cpp. References doRotateXDisplay(), UncompressedVideoFrame::mapColorSpaceToBitDepth(), and 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 108 of file SDLRenderer.cpp. References VideoRenderer::updateDisplayRegion(). Referenced by open().
|
|
Renders a frame to the destination YUV_Overlay/RGB_Surface.
Reimplemented from VideoRenderer. Definition at line 315 of file SDLRenderer.cpp. References Frame::getAU(), and VideoRenderer::writeFrame().
|
The documentation for this class was generated from the following files: