Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
XvDisplayer Class Reference

#include "stage/output/xv-displayer.hpp"

Description

XvDisplayer is a class which is responsible for rendering a video image via XVideo.

Definition at line 47 of file xv-displayer.hpp.

Public Member Functions

 XvDisplayer (Gtk::Widget &drawing_area, uint width, uint height)
 Constructor.
 
 ~XvDisplayer ()
 
- Public Member Functions inherited from Displayer
virtual ~Displayer ()
 
 Displayer (uint w, uint h)
 

Private Member Functions

void put (void *const image) override
 Put an image of a given width and height with the expected input format (as indicated by the format method).
 
bool usable () override
 Indicates if this object can be used to render images on the running system.
 
DisplayerInput format () override
 Indicates the format required by the abstract put method.
 

Private Attributes

bool gotPort
 Specifies whether the object is currently attached to an XVideo port.
 
uint grabbedPort
 The current port being used.
 
Gtk::Widget & drawingArea_
 The widget that video will be drawn into.
 
Display * display
 The display that video will be drawn into.
 
Window window
 The X11 window that video will be drawn into.
 
GC gc
 The graphics context which will be used when rendering video.
 
XvImage * xvImage
 The shared memory image object which video will be written into.
 
XShmSegmentInfo shmInfo
 Info about the shared memory segment.
 

Additional Inherited Members

- Protected Member Functions inherited from Displayer
void calculateVideoLayout (int widgetWidth, int widgetHeight, int &imgOrg_x, int &imgOrg_y, int &imgWidth, int &imgHeight)
 Calculates the coordinates for placing a video image inside a widget.
 
- Protected Attributes inherited from Displayer
const uint videoWidth
 
const uint videoHeight
 

Constructor & Destructor Documentation

◆ XvDisplayer()

XvDisplayer ( Gtk::Widget &  drawing_area,
uint  width,
uint  height 
)

Constructor.

Parameters
drawing_areaThe widget into which the video image will be drawn.
widthof the video image image to be displayed, in pixels.
heightof the video image in pixels to be displayed.

Definition at line 39 of file xv-displayer.cpp.

References XvDisplayer::display, XvDisplayer::drawingArea_, XvDisplayer::format(), XvDisplayer::gc, XvDisplayer::gotPort, XvDisplayer::grabbedPort, NULL, XvDisplayer::shmInfo, Displayer::videoHeight, Displayer::videoWidth, XvDisplayer::window, and XvDisplayer::xvImage.

+ Here is the call graph for this function:

◆ ~XvDisplayer()

Member Function Documentation

◆ put()

void put ( void *const  image)
overrideprivatevirtual

Put an image of a given width and height with the expected input format (as indicated by the format method).

Parameters
[in]imageThe video image array to draw.

Implements Displayer.

Definition at line 215 of file xv-displayer.cpp.

References Displayer::calculateVideoLayout(), XvDisplayer::display, XvDisplayer::drawingArea_, XvDisplayer::gc, XvDisplayer::grabbedPort, NULL, Displayer::videoHeight, Displayer::videoWidth, XvDisplayer::window, and XvDisplayer::xvImage.

+ Here is the call graph for this function:

◆ usable()

bool usable ( )
overrideprivatevirtual

Indicates if this object can be used to render images on the running system.

Implements Displayer.

Definition at line 208 of file xv-displayer.cpp.

References XvDisplayer::gotPort.

◆ format()

DisplayerInput format ( )
inlineoverrideprivatevirtual

Indicates the format required by the abstract put method.

Todo:
this feature was seemingly never used... can it be relevant? can we handle different formats?

Reimplemented from Displayer.

Definition at line 73 of file xv-displayer.hpp.

References lumiera::DISPLAY_YUV.

Referenced by XvDisplayer::XvDisplayer().

+ Here is the caller graph for this function:

Member Data Documentation

◆ gotPort

bool gotPort
private

Specifies whether the object is currently attached to an XVideo port.

Remarks
This value is false until the constructor has finished successfully.

Definition at line 83 of file xv-displayer.hpp.

Referenced by XvDisplayer::XvDisplayer(), XvDisplayer::~XvDisplayer(), and XvDisplayer::usable().

◆ grabbedPort

uint grabbedPort
private

The current port being used.

Remarks
This value is meaningless unless gotPort is true.

Definition at line 89 of file xv-displayer.hpp.

Referenced by XvDisplayer::XvDisplayer(), XvDisplayer::~XvDisplayer(), and XvDisplayer::put().

◆ drawingArea_

Gtk::Widget& drawingArea_
private

The widget that video will be drawn into.

Remarks
This value must be a valid pointer.

Definition at line 95 of file xv-displayer.hpp.

Referenced by XvDisplayer::XvDisplayer(), and XvDisplayer::put().

◆ display

Display* display
private

The display that video will be drawn into.

Definition at line 100 of file xv-displayer.hpp.

Referenced by XvDisplayer::XvDisplayer(), XvDisplayer::~XvDisplayer(), and XvDisplayer::put().

◆ window

Window window
private

The X11 window that video will be drawn into.

Definition at line 105 of file xv-displayer.hpp.

Referenced by XvDisplayer::XvDisplayer(), and XvDisplayer::put().

◆ gc

GC gc
private

The graphics context which will be used when rendering video.

Definition at line 110 of file xv-displayer.hpp.

Referenced by XvDisplayer::XvDisplayer(), and XvDisplayer::put().

◆ xvImage

XvImage* xvImage
private

The shared memory image object which video will be written into.

Definition at line 115 of file xv-displayer.hpp.

Referenced by XvDisplayer::XvDisplayer(), XvDisplayer::~XvDisplayer(), and XvDisplayer::put().

◆ shmInfo

XShmSegmentInfo shmInfo
private

Info about the shared memory segment.

Remarks
shmInfo.shmaddr is set to NULL, when the SHM is detached.

Definition at line 121 of file xv-displayer.hpp.

Referenced by XvDisplayer::XvDisplayer(), and XvDisplayer::~XvDisplayer().

+ Inheritance diagram for XvDisplayer:
+ Collaboration diagram for XvDisplayer:

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