Lumiera  0.pre.03
»edit your freedom«
displayer.hpp
Go to the documentation of this file.
1 /*
2  DISPLAYER.hpp - base class for displaying video
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 
26 #ifndef STAGE_OUTPUT_DISPLAYER_H
27 #define STAGE_OUTPUT_DISPLAYER_H
28 
29 
30 namespace stage {
31 namespace output {
32 
35  DISPLAY_NONE,
36  DISPLAY_YUV,
37  DISPLAY_RGB,
38  DISPLAY_BGR,
39  DISPLAY_BGR0,
40  DISPLAY_RGB16
41  };
42 
43 
65  class Displayer
66  {
67  protected:
68  int imageWidth;
69  int imageHeight;
70 
71  public:
72  virtual ~Displayer() { }
73 
74 
76  virtual bool usable();
77 
79  virtual DisplayerInput format();
80 
82  virtual int preferredWidth();
83 
85  virtual int preferredHeight();
86 
91  virtual void put (void* const) =0;
92 
93 
94  protected:
109  static void calculateVideoLayout(
110  int widget_width, int widget_height,
111  int image_width, int image_height,
112  int &video_x, int &video_y, int &video_width, int &video_height );
113  };
114 
115 
116 
117 }} // namespace stage::output
118 #endif /*STAGE_OUTPUT_DISPLAYER_H*/
virtual void put(void *const)=0
Put an image of a given width and height with the expected input format (as indicated by the format m...
static void calculateVideoLayout(int widget_width, int widget_height, int image_width, int image_height, int &video_x, int &video_y, int &video_width, int &video_height)
Calculates the coordinates for placing a video image inside a widget.
Definition: displayer.cpp:62
virtual int preferredHeight()
Expected height of input to put.
Definition: displayer.cpp:56
virtual DisplayerInput format()
Indicates the format required by the abstract put method.
Definition: displayer.cpp:44
virtual int preferredWidth()
Expected width of input to put.
Definition: displayer.cpp:50
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
virtual bool usable()
Indicates if this object can be used to render images on the running system.
Definition: displayer.cpp:38
DisplayerInput
Supported Displayer formats.
Definition: displayer.hpp:34
A Displayer is a class which is responsible for rendering an image in some way (ie: Xvideo...
Definition: displayer.hpp:65