~ubuntu-branches/ubuntu/intrepid/gpac/intrepid-proposed

« back to all changes in this revision

Viewing changes to include/gpac/user.h

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2007-01-24 23:34:57 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070124233457-zzlls8afkt0nyakj
Tags: 0.4.2~rc2-0ubuntu1
* New upstream release
  * Most notably MP4 tagging support via MP4Box -itags
* debian/patches/01_64bits.dpatch: dropped; included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        GF_EVT_KEYUP,
66
66
        /*window events*/
67
67
        /*size has changed - indicate new w & h in .x end .y fields of event. 
68
 
        When sent to the user event proc, signals the scene size (if indicated in scene) upon connection
69
 
                if scene size hasn't changed (seeking or other) this event is not sent
70
68
        When sent from gpac to a video plugin, indicates the output size should be changed. This is only sent when the plugin
71
69
        manages the output video himself
72
70
        When sent from a video plugin to gpac, indicates the output size has been changed. This is only sent when the plugin
73
71
        manages the output video himself
74
72
        */
75
73
        GF_EVT_SIZE,            
 
74
        /*signals the scene size (if indicated in scene) upon connection (sent to the user event proc only)
 
75
                if scene size hasn't changed (seeking or other) this event is not sent
 
76
        */
 
77
        GF_EVT_SCENE_SIZE,              
76
78
        GF_EVT_SHOWHIDE,        /*window show/hide (minimized or other). This is also sent to the user to signal focus switch in fullscreen*/
77
79
        GF_EVT_SET_CURSOR,      /*set mouse cursor*/
78
 
        GF_EVT_SET_STYLE,       /*set window style*/
79
80
        GF_EVT_SET_CAPTION,     /*set window caption*/
80
81
        GF_EVT_REFRESH, /*window needs repaint (whenever needed, eg restore, hide->show, background refresh, paint)*/
81
82
        GF_EVT_QUIT,    /*window is being closed*/
82
83
        /*video hw setup message:
83
 
                when sent from gpac to plugin, indicates that the plugin should resetup hardware context due to a window resize
84
 
                when sent from plugin to gpac, indicates that hardware resources must be resetup before next render step (this is mainly
85
 
                due to discard all openGL textures and cached objects. 
86
 
        This is done in two steps because depending on windowing systems it could be possible to resize a window without
87
 
        destroying the GL context.
 
84
                - when sent from gpac to plugin, indicates that the plugin should re-setup hardware context due to a window resize:
 
85
                        * for 2D output, this means resizing the backbuffer if needed (depending on HW constraints)
 
86
                        * for 3D output, this means re-setup of OpenGL context (depending on HW constraints). Depending on windowing systems 
 
87
                        and implementations, it could be possible to resize a window without destroying the GL context.
 
88
 
 
89
                - when sent from plugin to gpac, indicates that hardware resources must be resetup before next render step (this is mainly
 
90
                due to discard all openGL textures and cached objects)
88
91
        */
89
92
        GF_EVT_VIDEO_SETUP,
 
93
 
90
94
        /*terminal events*/
91
95
        GF_EVT_CONNECT, /*signal URL is connected*/
92
96
        GF_EVT_DURATION,        /*signal duration of presentation*/
93
97
        GF_EVT_AUTHORIZATION,   /*indicates a user and pass is queried*/
94
98
        GF_EVT_NAVIGATE, /*indicates the user app should load or jump to the given URL.*/
 
99
        GF_EVT_NAVIGATE_INFO, /*indicates the link or its description under the mouse pointer*/
95
100
        GF_EVT_MESSAGE, /*message from the MPEG-4 terminal*/
96
101
        GF_EVT_PROGRESS, /*progress message from the MPEG-4 terminal*/
97
102
        GF_EVT_VIEWPOINTS,      /*indicates viewpoint list has changed - no struct associated*/
98
103
        GF_EVT_STREAMLIST,      /*indicates stream list has changed - no struct associated - only used when no scene info is present*/
 
104
 
 
105
        GF_EVT_SYS_COLORS,      /*queries the list of system colors*/
 
106
        GF_EVT_RESET_RTI,       /*forces a reset of the runtime info*/
 
107
        GF_EVT_UPDATE_RTI,      /*updates runtime info*/
99
108
};
100
109
 
101
110
/*virtual keys - codes respect MPEG4/VRML KeySensor ones*/
223
232
/*event proc return value: ignored*/
224
233
typedef struct
225
234
{
226
 
        /*GF_EVT_SET_STYLE*/
227
 
        u8 type;
228
 
        /*window style flags - NOT USED YET*/
229
 
        u32 window_style;
230
 
} GF_EventStyle;
231
 
 
232
 
/*event proc return value: ignored*/
233
 
typedef struct
234
 
{
235
235
        /*GF_EVT_SET_CAPTION*/
236
236
        u8 type;
237
237
        /*window style flags - NOT USED YET*/
255
255
*/
256
256
typedef struct
257
257
{
258
 
        /*GF_EVT_NAVIGATE*/
 
258
        /*GF_EVT_NAVIGATE and GF_EVT_NAVIGATE_INFO*/
259
259
        u8 type;
260
260
        /*new url to open / data to handle*/
261
261
        const char *to_url;
262
 
        /*parameters (cf vrml spec:) )*/
 
262
        /*parameters (cf vrml spec) - UNUSED for GF_EVT_NAVIGATE_INFO*/
263
263
        u32 param_count;
264
264
        const char **parameters;
265
265
} GF_EventNavigate;
318
318
        char *password;
319
319
} GF_EventAuthorize;
320
320
 
 
321
 
 
322
/*event proc return value: 1 if info has been completed, 0 otherwise */
 
323
typedef struct
 
324
{
 
325
        /*GF_EVT_SYS_COLORS*/
 
326
        u8 type;
 
327
        /*ARGB colors, in order:
 
328
        ActiveBorder, ActiveCaption, AppWorkspace, Background, ButtonFace, ButtonHighlight, ButtonShadow, 
 
329
        ButtonText, CaptionText, GrayText, Highlight, HighlightText, InactiveBorder, InactiveCaption, 
 
330
        InactiveCaptionText, InfoBackground, InfoText, Menu, MenuText, Scrollbar, ThreeDDarkShadow, 
 
331
        ThreeDFace, ThreeDHighlight, ThreeDLightShadow, ThreeDShadow, Window, WindowFrame, WindowText
 
332
        */
 
333
        u32 sys_colors[28];
 
334
} GF_EventSysColors;
 
335
 
 
336
 
321
337
typedef union
322
338
{
323
339
        u8 type;
332
348
        GF_EventProgress progress;
333
349
        GF_EventConnect connect;
334
350
        GF_EventCaption caption;
335
 
        GF_EventStyle style;
336
351
        GF_EventCursor cursor;
337
352
        GF_EventAuthorize auth;
 
353
        GF_EventSysColors sys_cols;
338
354
} GF_Event;
339
355
        
 
356
 
 
357
enum
 
358
{
 
359
        /*display should be hidden upon initialization*/
 
360
        GF_TERM_INIT_HIDE = 1,
 
361
        /*no audio renderer will be created*/
 
362
        GF_TERM_INIT_NO_AUDIO = 1<<1,
 
363
        /*terminal is used to extract content: 
 
364
                * audio render is disabled
 
365
                * media codecs are not threaded
 
366
                * all composition memories are filled before rendering
 
367
                * rendering is done after media decoding
 
368
                * frame-rate regulation is disabled (no sleep)
 
369
                * the user is responsible for updating the terminal
 
370
        */
 
371
        GF_TERM_INIT_NOT_THREADED = 1<<2,
 
372
        /*forces 2D renderer, regardless of config file*/
 
373
        GF_TERM_INIT_FORCE_2D = 1<<3,
 
374
        /*forces 3D renderer, regardless of config file*/
 
375
        GF_TERM_INIT_FORCE_3D = 1<<4
 
376
};
 
377
 
340
378
/*user object for all callbacks*/
341
379
typedef struct 
342
380
{
357
395
        /*for now, only used by X11 (indicates display the window is on)*/
358
396
        void *os_display;
359
397
 
360
 
        /*only used with os_window_handler (win32/CE). 
361
 
        If not set the window proc will be overriden and the video driver will take care of window messages
362
 
        If set the window proc will be untouched and the app will have to process the window messages
363
 
        */
364
 
        Bool dont_override_window_proc;
 
398
        /*init flags bypassing GPAC config file */
 
399
        u32 init_flags;
365
400
} GF_User;
366
401
 
367
402
 
382
417
        }
383
418
 
384
419
 
385
 
 
386
 
typedef struct
387
 
{
388
 
        u32 width, height, pitch;
389
 
        u32 pixel_format;
390
 
        /*pointer to video memory (top, left)*/
391
 
        unsigned char *video_buffer;
392
 
        /*os specific handler if needed*/
393
 
        void *os_handle;
394
 
} GF_VideoSurface;
395
 
 
396
 
 
397
 
/*window for blitting - all coords are x, y at top-left, x+w, y+h at bottom-right */
398
 
typedef struct
399
 
{
400
 
        u32 x, y;
401
 
        u32 w, h;
402
 
} GF_Window;
403
 
 
404
 
 
405
420
#ifdef __cplusplus
406
421
}
407
422
#endif