diff --git a/src/backend/thread-wrapper.hpp b/src/backend/thread-wrapper.hpp index c45fd4e75..60413b037 100644 --- a/src/backend/thread-wrapper.hpp +++ b/src/backend/thread-wrapper.hpp @@ -2,7 +2,7 @@ THREADWRAPPER.hpp - thin convenience wrapper for starting lumiera threads Copyright (C) Lumiera.org - 2008 - 2010 Hermann Vosseler + 2008, 2010 Hermann Vosseler Christian Thaeter This program is free software; you can redistribute it and/or diff --git a/src/gui/guistart.cpp b/src/gui/guistart.cpp index d8c5513d8..6eadf445c 100644 --- a/src/gui/guistart.cpp +++ b/src/gui/guistart.cpp @@ -3,7 +3,7 @@ Copyright (C) Lumiera.org 2007-2008, Joel Holdsworth - Christian Thaeter + 2009, Christian Thaeter Hermann Vosseler This program is free software; you can redistribute it and/or @@ -199,7 +199,7 @@ extern "C" { /* ================== define an lumieraorg_Gui instance =========== return "Copyright (C) Lumiera.org\n" "2007-2008, Joel Holdsworth \n" - " Christian Thaeter \n" + "2009, Christian Thaeter \n" " Hermann Vosseler "; } ) diff --git a/src/gui/output/gdkdisplayer.hpp b/src/gui/output/gdkdisplayer.hpp index ed7df23b1..8c94efec0 100644 --- a/src/gui/output/gdkdisplayer.hpp +++ b/src/gui/output/gdkdisplayer.hpp @@ -21,6 +21,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /** @file gdkdisplayer.hpp ** This file contains the definition of XvDisplayer, the XVideo ** video output implementation @@ -28,10 +30,10 @@ ** @see displayer.hpp */ -#include "displayer.hpp" +#ifndef GUI_OUTPUT_GDKDISPLAYER_H +#define GUI_OUTPUT_GDKDISPLAYER_H -#ifndef GDKDISPLAYER_HPP -#define GDKDISPLAYER_HPP +#include "displayer.hpp" namespace Gtk { class Widget; @@ -44,46 +46,47 @@ namespace output { * GdkDisplayer is a class which is responsible for rendering a video * image via GDK. */ -class GdkDisplayer : public Displayer -{ -public: - - /** - * Constructor - * @param[in] drawing_area The widget into which the video image will - * be drawn. This value must not be NULL. - * @param[in] width The width of the video image in pixels. This value - * must be greater than zero. - * @param[in] height The height of the video image in pixels. This - * value must be greater than zero. - */ - GdkDisplayer( Gtk::Widget *drawing_area, int width, int height ); - - /** - * Put an image of a given width and height with the expected input - * format (as indicated by the format method). - * @param[in] image The video image array to draw. - */ - void put( const void* image ); - -protected: - - /** - * Indicates if this object can be used to render images on the - * running system. - */ - bool usable(); - -private: - - /** - * The widget that video will be drawn into. - * @remarks This value must be a valid pointer. - */ - Gtk::Widget *drawingArea; -}; - -} // namespace output -} // namespace gui - +class GdkDisplayer + : public Displayer + { + public: + + /** + * Constructor + * @param[in] drawing_area The widget into which the video image will + * be drawn. This value must not be NULL. + * @param[in] width The width of the video image in pixels. This value + * must be greater than zero. + * @param[in] height The height of the video image in pixels. This + * value must be greater than zero. + */ + GdkDisplayer( Gtk::Widget *drawing_area, int width, int height ); + + /** + * Put an image of a given width and height with the expected input + * format (as indicated by the format method). + * @param[in] image The video image array to draw. + */ + void put( const void* image ); + + protected: + + /** + * Indicates if this object can be used to render images on the + * running system. + */ + bool usable(); + + private: + + /** + * The widget that video will be drawn into. + * @remarks This value must be a valid pointer. + */ + Gtk::Widget *drawingArea; + }; + + + +}} // namespace gui::output #endif // GDKDISPLAYER_HPP diff --git a/src/gui/output/xvdisplayer.hpp b/src/gui/output/xvdisplayer.hpp index 362928717..8f8bf388c 100644 --- a/src/gui/output/xvdisplayer.hpp +++ b/src/gui/output/xvdisplayer.hpp @@ -21,6 +21,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /** @file xvdisplayer.hpp ** This file contains the definition of XvDisplayer, the XVideo ** video output implementation @@ -28,6 +30,10 @@ ** @see displayer.hpp */ + +#ifndef GUI_OUTPUT_XVDISPLAYER_H +#define GUI_OUTPUT_XVDISPLAYER_H + #include #include #include @@ -36,8 +42,6 @@ #include "displayer.hpp" -#ifndef XVDISPLAYER_HPP -#define XVDISPLAYER_HPP namespace Gtk { class Widget; @@ -50,88 +54,86 @@ namespace output { * XvDisplayer is a class which is responsible for rendering a video * image via XVideo. */ -class XvDisplayer : public Displayer -{ -public: - /** - * Constructor - * @param drawing_area The widget into which the video image will be - * drawn. This value must not be NULL. - * @param width The width of the video image in pixels. This value - * must be greater than zero. - * @param height The height of the video image in pixels. This value - * must be greater than zero. - */ - XvDisplayer( Gtk::Widget *drawing_area, int width, int height ); +class XvDisplayer + : public Displayer + { + public: + /** + * Constructor + * @param drawing_area The widget into which the video image will be + * drawn. This value must not be NULL. + * @param width The width of the video image in pixels. This value + * must be greater than zero. + * @param height The height of the video image in pixels. This value + * must be greater than zero. + */ + XvDisplayer( Gtk::Widget *drawing_area, int width, int height ); + + + ~XvDisplayer(); + + /** + * Put an image of a given width and height with the expected input + * format (as indicated by the format method). + * @param[in] image The video image array to draw. + */ + void put( const void* image ); + + /** + * Indicates if this object can be used to render images on the + * running system. + */ + bool usable(); + + private: + + /** + * Specifies whether the object is currently attached to an XVideo + * port. + * @remarks This value is false until the constructor has finished + * successfully. + */ + bool gotPort; + + /** + * The current port being used. + * @remarks This value is meaningless unless gotPort is true. + */ + unsigned int grabbedPort; + + /** + * The widget that video will be drawn into. + * @remarks This value must be a valid pointer. + */ + Gtk::Widget *drawingArea; + + /** + * The display that video will be drawn into. + */ + Display *display; + + /** + * The X11 window that video will be drawn into. + */ + Window window; + + /** + * The graphics context which will be used when rendering video. + */ + GC gc; + + /** + * The shared memory image object which video will be written into. + */ + XvImage *xvImage; + + /** + * Info about the shared memory segment. + * @remarks shmInfo.shmaddr is set to NULL, when the SHM is detached. + */ + XShmSegmentInfo shmInfo; + }; - /** - * Destructor - */ - ~XvDisplayer(); - - /** - * Put an image of a given width and height with the expected input - * format (as indicated by the format method). - * @param[in] image The video image array to draw. - */ - void put( const void* image ); - - /** - * Indicates if this object can be used to render images on the - * running system. - */ - bool usable(); - -private: - - /** - * Specifies whether the object is currently attached to an XVideo - * port. - * @remarks This value is false until the constructor has finished - * successfully. - */ - bool gotPort; - /** - * The current port being used. - * @remarks This value is meaninless unless gotPort is true. - */ - unsigned int grabbedPort; - - /** - * The widget that video will be drawn into. - * @remarks This value must be a valid pointer. - */ - Gtk::Widget *drawingArea; - - /** - * The display that video will be drawn into. - */ - Display *display; - - /** - * The X11 window that video will be drawn into. - */ - Window window; - - /** - * The graphics context which will be used when rednering video. - */ - GC gc; - - /** - * The shared memory image object which video will be written into. - */ - XvImage *xvImage; - - /** - * Info about the shared memory segment. - * @remarks shmInfo.shmaddr is set to NULL, when the SHM is detached. - */ - XShmSegmentInfo shmInfo; -}; - -} // namespace output -} // namespace gui - +}} // namespace gui::output #endif // XVDISPLAYER_HPP diff --git a/src/gui/widgets/video-display-widget.cpp b/src/gui/widgets/video-display-widget.cpp index 22531d1f5..7f11c0036 100644 --- a/src/gui/widgets/video-display-widget.cpp +++ b/src/gui/widgets/video-display-widget.cpp @@ -1,5 +1,5 @@ /* - video-display-widget.cpp - Implementation of the video viewer widget + VideoDisplayWidget - Implementation of the video viewer widget Copyright (C) Lumiera.org 2008, Joel Holdsworth @@ -20,6 +20,7 @@ * *****************************************************/ + #include "gui/gtk-lumiera.hpp" #include "gui/output/xvdisplayer.hpp" #include "gui/output/gdkdisplayer.hpp" @@ -28,62 +29,58 @@ namespace gui { namespace widgets { - -VideoDisplayWidget::VideoDisplayWidget() : - displayer(NULL) -{ -} - -VideoDisplayWidget::~VideoDisplayWidget() -{ - if(displayer != NULL) - delete displayer; -} - -Displayer* -VideoDisplayWidget::get_displayer() const -{ - return displayer; -} - -void -VideoDisplayWidget::on_realize() -{ - // Call base class: - Gtk::Widget::on_realize(); - - // Set colors - modify_bg(Gtk::STATE_NORMAL, Gdk::Color("black")); - - if(displayer != NULL) - delete displayer; - displayer = createDisplayer(this, 320, 240); - - add_events(Gdk::ALL_EVENTS_MASK); -} - -Displayer* -VideoDisplayWidget::createDisplayer( Gtk::Widget *drawingArea, int width, int height ) -{ - REQUIRE(drawingArea != NULL); - REQUIRE(width > 0 && height > 0); - Displayer *displayer = NULL; + VideoDisplayWidget::VideoDisplayWidget ( ) + : displayer (NULL) + { } - displayer = new XvDisplayer( drawingArea, width, height ); - if ( !displayer->usable() ) - { - delete displayer; - displayer = NULL; - } - - if ( displayer == NULL ) - { - displayer = new GdkDisplayer( drawingArea, width, height ); - } - - return displayer; -} - -} // namespace widgets -} // namespace gui + + VideoDisplayWidget::~VideoDisplayWidget ( ) + { + if (displayer != NULL) delete displayer; + } + + Displayer* + VideoDisplayWidget::get_displayer ( ) const + { + return displayer; + } + + void VideoDisplayWidget::on_realize ( ) + { + // Call base class: + Gtk::Widget::on_realize (); + + // Set colours + modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("black")); + + if (displayer != NULL) delete displayer; + displayer = createDisplayer (this, 320, 240); + + add_events (Gdk::ALL_EVENTS_MASK); + } + + Displayer* + VideoDisplayWidget::createDisplayer (Gtk::Widget *drawingArea, int width, int height) + { + REQUIRE (drawingArea != NULL); + REQUIRE (width > 0 && height > 0); + + Displayer *displayer = NULL; + + displayer = new XvDisplayer (drawingArea, width, height); + if (!displayer->usable ()) + { + delete displayer; + displayer = NULL; + } + + if (displayer == NULL) + { + displayer = new GdkDisplayer (drawingArea, width, height); + } + + return displayer; + } + +}}// namespace gui::widgets diff --git a/src/gui/widgets/video-display-widget.hpp b/src/gui/widgets/video-display-widget.hpp index 8e6e9a5e4..b77cb118e 100644 --- a/src/gui/widgets/video-display-widget.hpp +++ b/src/gui/widgets/video-display-widget.hpp @@ -1,5 +1,5 @@ /* - video-display-widget.hpp - Declaration of the video viewer widget + VIDEO-DISPLAY-WIDGET.hpp - GUI widget for displaying video Copyright (C) Lumiera.org 2008, Joel Holdsworth @@ -19,10 +19,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /** @file video-display-widget.hpp ** This file contains the definition of video viewer widget */ + #ifndef VIDEO_DISPLAY_WIDGET_HPP #define VIDEO_DISPLAY_WIDGET_HPP @@ -34,31 +37,31 @@ using namespace gui::output; namespace gui { namespace widgets { - -class VideoDisplayWidget : public Gtk::DrawingArea -{ -public: - VideoDisplayWidget(); - - ~VideoDisplayWidget(); - Displayer* get_displayer() const; - - /* ===== Overrides ===== */ -private: - virtual void on_realize(); - - /* ===== Internals ===== */ -private: - static Displayer* - createDisplayer( Gtk::Widget *drawingArea, int width, int height ); - -private: - - Displayer *displayer; -}; - -} // namespace widgets -} // namespace gui - + class VideoDisplayWidget + : public Gtk::DrawingArea + { + public: + VideoDisplayWidget(); + + ~VideoDisplayWidget(); + + Displayer* get_displayer() const; + + /* ===== Overrides ===== */ + private: + virtual void on_realize(); + + /* ===== Internals ===== */ + private: + static Displayer* + createDisplayer( Gtk::Widget *drawingArea, int width, int height ); + + private: + + Displayer *displayer; + }; + + +}} // namespace gui::widgets #endif // VIDEO_DISPLAY_WIDGET_HPP diff --git a/src/lib/error.hpp b/src/lib/error.hpp index 51fce33e0..e96942ee6 100644 --- a/src/lib/error.hpp +++ b/src/lib/error.hpp @@ -2,7 +2,7 @@ ERROR.hpp - Lumiera Exception Interface Copyright (C) Lumiera.org - 2008-2010 Hermann Vosseler + 2008,2010 Hermann Vosseler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/lumiera/main.cpp b/src/lumiera/main.cpp index a1f73e53e..4eed4da1d 100644 --- a/src/lumiera/main.cpp +++ b/src/lumiera/main.cpp @@ -2,7 +2,7 @@ main.cpp - start the Lumiera Application Copyright (C) Lumiera.org - 2007-2009, Joel Holdsworth + 2007,2011, Joel Holdsworth Christian Thaeter Hermann Vosseler diff --git a/src/proc/asset/struct-factory-impl.hpp b/src/proc/asset/struct-factory-impl.hpp index bfc702d18..78986ea74 100644 --- a/src/proc/asset/struct-factory-impl.hpp +++ b/src/proc/asset/struct-factory-impl.hpp @@ -2,7 +2,7 @@ STRUCT-FACTORY-IMPL.hpp - crating structural assets (impl details) Copyright (C) Lumiera.org - 2008-2010, Hermann Vosseler + 2008,2010, Hermann Vosseler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/proc/mobject/session/mobjectfactory.cpp b/src/proc/mobject/session/mobjectfactory.cpp index f6c6aa807..8c47a3d8e 100644 --- a/src/proc/mobject/session/mobjectfactory.cpp +++ b/src/proc/mobject/session/mobjectfactory.cpp @@ -2,7 +2,7 @@ MObjectFactory - creating concrete MObject subclass instances Copyright (C) Lumiera.org - 2008-2010, Hermann Vosseler + 2008,2010, Hermann Vosseler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/proc/mobject/session/mobjectfactory.hpp b/src/proc/mobject/session/mobjectfactory.hpp index 67e1ada4e..82efd7c0c 100644 --- a/src/proc/mobject/session/mobjectfactory.hpp +++ b/src/proc/mobject/session/mobjectfactory.hpp @@ -2,7 +2,7 @@ MOBJECTFACTORY.hpp - creating concrete MObject subclass instances Copyright (C) Lumiera.org - 2008-2010, Hermann Vosseler + 2008, 2010, Hermann Vosseler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/tests/components/proc/mobject/session/session-element-tracker-test.cpp b/tests/components/proc/mobject/session/session-element-tracker-test.cpp index 207d099a6..d5ba6ad8b 100644 --- a/tests/components/proc/mobject/session/session-element-tracker-test.cpp +++ b/tests/components/proc/mobject/session/session-element-tracker-test.cpp @@ -2,7 +2,7 @@ SessionElementTracker(Test) - check the facility to track and expose selected model elements Copyright (C) Lumiera.org - 2008-2010, Hermann Vosseler + 2008, 2010, Hermann Vosseler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/tests/components/proc/mobject/session/session-structure-test.cpp b/tests/components/proc/mobject/session/session-structure-test.cpp index 458633d5c..6ae27c3ee 100644 --- a/tests/components/proc/mobject/session/session-structure-test.cpp +++ b/tests/components/proc/mobject/session/session-structure-test.cpp @@ -2,7 +2,7 @@ SessionStructure(Test) - verifying basic Session/Model structure Copyright (C) Lumiera.org - 2008-2010, Hermann Vosseler + 2008, 2011, Hermann Vosseler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/tests/components/proc/mobject/session/timeline-sequence-handling-test.cpp b/tests/components/proc/mobject/session/timeline-sequence-handling-test.cpp index c250b6019..a1eb84a34 100644 --- a/tests/components/proc/mobject/session/timeline-sequence-handling-test.cpp +++ b/tests/components/proc/mobject/session/timeline-sequence-handling-test.cpp @@ -2,7 +2,7 @@ TimelineSequenceHandling(Test) - managing the top level session facade objects Copyright (C) Lumiera.org - 2008-2010, Hermann Vosseler + 2008, 2011, Hermann Vosseler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/tests/lib/custom-shared-ptr-test.cpp b/tests/lib/custom-shared-ptr-test.cpp index c6d9e147d..45bf5da25 100644 --- a/tests/lib/custom-shared-ptr-test.cpp +++ b/tests/lib/custom-shared-ptr-test.cpp @@ -2,7 +2,7 @@ CustomSharedPtr(Test) - ref counting, equality and comparisons Copyright (C) Lumiera.org - 2008-2010, Hermann Vosseler + 2008, 2010, Hermann Vosseler This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as