3
* Ekiga -- A VoIP and Video-Conferencing application
4
* Copyright (C) 2000-2007 Damien Sandras
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or (at
9
* your option) any later version. This program is distributed in the hope
10
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
11
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
* See the GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Ekiga is licensed under the GPL license and as a special exception, you
19
* have permission to link or otherwise combine this program with the
20
* programs OPAL, OpenH323 and PWLIB, and distribute the combination, without
21
* applying the requirements of the GNU GPL to the OPAL, OpenH323 and PWLIB
22
* programs, as long as you do follow the requirements of the GNU GPL for all
23
* the rest of the software thus combined.
28
* videooutput-manager.h - description
29
* ------------------------------------------
30
* begin : written in 2007 by Matthias Schneider
31
* copyright : (c) 2007 by Matthias Schneider
32
* description : Declaration of the interface of a videooutput manager
33
* implementation backend.
38
#ifndef __VIDEOOUTPUT_MANAGER_H__
39
#define __VIDEOOUTPUT_MANAGER_H__
41
#include "videooutput-core.h"
47
* @addtogroup videooutput
51
/** Generic implementation for the Ekiga::VideoOutputManager class.
53
* Each VideoOutputManager represents a sink for video frames.
54
* A VideoOutputManager can display the video signal, record single frames or record video signal.
56
class VideoOutputManager
63
VideoOutputManager () {}
67
virtual ~VideoOutputManager () {}
70
/*** API for video output ***/
73
* The device must be opened before calling set_frame_data().
75
virtual void open () { };
79
virtual void close () { };
81
/** Set one video frame buffer.
82
* Requires the device to be opened.
83
* @param data a pointer to the buffer with the data to be written. It will not be freed.
84
* @param width the width in pixels of the frame to be written.
85
* @param height the height in pixels of the frame to be written.
86
* @param local true if the frame is a frame of the local video source, false if it is from the remote end.
87
* @param devices_nbr 1 if only local or remote device has been opened, 2 if both have been opened.
89
virtual void set_frame_data (const char *data,
95
virtual void set_display_info (const DisplayInfo &) { };
98
/*** API to act on VideoOutputDevice events ***/
100
/** This signal is emitted when a video output device is opened.
101
* @param videooutput_accel actual hardware acceleration support active on the video output device opened.
102
* @param mode the mode in which the device was initially opened.
103
* @param zoom the initial zoom level when de device was opened.
104
* @param both_streams if a frame from both local and remote stream has been received.
106
sigc::signal<void, VideoOutputAccel, VideoOutputMode, unsigned, bool> device_opened;
108
/** This signal is emitted when a video output device is closed.
110
sigc::signal<void> device_closed;
112
/** This signal is emitted when an error occurs when opening a video output device.
113
* @param error_code the video output device error code.
115
sigc::signal<void, VideoOutputErrorCodes> device_error;
117
/** This signal is emitted when a manager switches autonomously into or out of fullscreen mode.
118
* Some managers like DX and XV allow the user to switch between FS
119
* by pressing a key or clicking a mouse button on top of the video. In order to
120
* This signal is called whenever the size of the widget carrying the video signal
121
* has to be changed. This happens when the displayed video changes in resolution
122
* or when it is being zoomed in or out.
123
* @param toggle VO_FS_ON or VO_FS_OFF depending on whether FS was activated or deactivated.
125
sigc::signal<void, VideoOutputFSToggle> fullscreen_mode_changed;
127
/** This signal is emitted the video output size has changed.
128
* This signal is called whenever the size of the widget carrying the video signal
129
* has to be changed. This happens when the displayed video changes in resolution
130
* or when it is being zoomed in or out.
131
* @param width the new width of the widget.
132
* @param height the new height of the widget.
134
sigc::signal<void, unsigned, unsigned> size_changed;
137
virtual void get_display_info (DisplayInfo &) { };