Lumiera  0.pre.03
»edit your freedom«
xvdisplayer.hpp
Go to the documentation of this file.
1 /*
2  XVDISPLAYER.hpp - XVideo display
3 
4  Copyright (C)
5  2000, Arne Schirmacher <arne@schirmacher.de>
6  2001-2007, Dan Dennedy <dan@dennedy.org>
7  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
8 
9   **Lumiera** is free software; you can redistribute it and/or modify it
10   under the terms of the GNU General Public License as published by the
11   Free Software Foundation; either version 2 of the License, or (at your
12   option) any later version. See the file COPYING for further details.
13 
14 */
15 
16 
28 #ifndef STAGE_OUTPUT_XVDISPLAYER_H
29 #define STAGE_OUTPUT_XVDISPLAYER_H
30 
31 
33 #include "stage/gtk-base.hpp"
34 
35 #include <X11/Xlib.h>
36 #include <sys/ipc.h>
37 #include <sys/shm.h>
38 #include <X11/extensions/XShm.h>
39 #include <X11/extensions/Xvlib.h>
40 
41 
42 namespace Gtk {
43  class Widget;
44 }
45 
46 namespace stage {
47 namespace output {
48 
53  class XvDisplayer
54  : public Displayer
55  {
56  public:
66  XvDisplayer (Gtk::Widget* drawing_area, int width, int height);
67 
68  ~XvDisplayer();
69 
70 
76  void put (void* const image);
77 
79  bool usable();
80 
81  private:
82 
87  bool gotPort;
88 
94 
99  Gtk::Widget* drawingArea;
100 
105 
109  Window window;
110 
114  GC gc;
115 
119  XvImage* xvImage;
120 
125  XShmSegmentInfo shmInfo;
126  };
127 
128 
129 }} // namespace stage::output
130 #endif // XVDISPLAYER_HPP
GC gc
The graphics context which will be used when rendering video.
Interface for outputting frames to an (already allocated) viewer or display.
Window window
The X11 window that video will be drawn into.
uint grabbedPort
The current port being used.
Definition: xvdisplayer.hpp:93
bool gotPort
Specifies whether the object is currently attached to an XVideo port.
Definition: xvdisplayer.hpp:87
XShmSegmentInfo shmInfo
Info about the shared memory segment.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
Display * display
The display that video will be drawn into.
XvDisplayer is a class which is responsible for rendering a video image via XVideo.
Definition: xvdisplayer.hpp:53
Gtk::Widget * drawingArea
The widget that video will be drawn into.
Definition: xvdisplayer.hpp:99
The Displayer serves as base of all video display implementations.
XvImage * xvImage
The shared memory image object which video will be written into.
A set of basic GTK includes for the UI.
A Displayer is a class which is responsible for rendering an image in some way (ie: Xvideo...
Definition: displayer.hpp:65