2 * GPAC - Multimedia Framework C SDK
\r
4 * Copyright (c) Jean Le Feuvre 2000-2005
\r
5 * All rights reserved
\r
7 * This file is part of GPAC / Stream Management sub-project
\r
9 * GPAC is free software; you can redistribute it and/or modify
\r
10 * it under the terms of the GNU Lesser General Public License as published by
\r
11 * the Free Software Foundation; either version 2, or (at your option)
\r
12 * any later version.
\r
14 * GPAC is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 * GNU Lesser General Public License for more details.
\r
19 * You should have received a copy of the GNU Lesser General Public
\r
20 * License along with this library; see the file COPYING. If not, write to
\r
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
\r
34 //#include <gpac/math.h>
\r
35 #include <gpac/events.h>
\r
36 #include <gpac/module.h>
\r
38 /*GPAC client terminal*/
\r
39 typedef struct _tag_terminal GF_Terminal;
\r
45 /*display should be hidden upon initialization*/
\r
46 GF_TERM_INIT_HIDE = 1,
\r
47 /*no audio renderer will be created*/
\r
48 GF_TERM_NO_AUDIO = 1<<1,
\r
49 /*terminal is used without visual threading:
\r
50 * media codecs are not threaded
\r
51 * all composition memories are filled before rendering
\r
52 * rendering is done after media decoding
\r
53 * the user is responsible for updating the terminal
\r
55 GF_TERM_NO_VISUAL_THREAD = 1<<2,
\r
56 /*disables frame-rate regulation (used when dumping content)*/
\r
57 GF_TERM_NO_REGULATION = 1<<3,
\r
58 /*lets the main user handle window events (neede for browser plugins)*/
\r
59 GF_TERM_NO_WINDOWPROC_OVERRIDE = 1<<4,
\r
60 /*works in windowless mode - experimental, only supported on Win32*/
\r
61 GF_TERM_WINDOWLESS = 1<<5
\r
64 /*user object for all callbacks*/
\r
67 /*user defined callback for all functions - cannot be NULL*/
\r
69 /*the event proc. Return value depend on the event type, usually 0
\r
70 cannot be NULL if os_window_handler is specified and dont_override_window_proc is set
\r
71 may be NULL otherwise*/
\r
72 Bool (*EventProc)(void *opaque, GF_Event *event);
\r
74 /*config file of client - cannot be NULL*/
\r
76 /*modules manager - cannot be NULL - owned by the user (to allow selection of module directory)*/
\r
77 GF_ModuleManager *modules;
\r
78 /*optional os window handler (HWND on win32/winCE, XWindow for X11)
\r
79 if not set the video outut will create and manage the display window.*/
\r
80 void *os_window_handler;
\r
81 /*for now, only used by X11 (indicates display the window is on)*/
\r
84 /*init flags bypassing GPAC config file */
\r
89 /*macro for event forwarding*/
\r
90 #define GF_USER_SENDEVENT(_user, _evt) (_user->EventProc ? _user->EventProc(_user->opaque, _evt) : 0)
\r
92 /*macro for message event format/send*/
\r
93 #define GF_USER_MESSAGE(_user, _serv, _msg, _e) \
\r
96 if (_user->EventProc) { \
\r
97 evt.type = GF_EVENT_MESSAGE; \
\r
98 evt.message.service = _serv; \
\r
99 evt.message.message = _msg; \
\r
100 evt.message.error = _e; \
\r
101 _user->EventProc(_user->opaque, &evt); \
\r
110 #endif /*_GF_USER_H_*/
\r