2 * Copyright (C) 2006 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef _SWFDEC_PLAYER_MANAGER_H_
21 #define _SWFDEC_PLAYER_MANAGER_H_
24 #include <libswfdec/swfdec.h>
25 #include <libswfdec/swfdec_debugger.h>
29 typedef struct _SwfdecPlayerManager SwfdecPlayerManager
;
30 typedef struct _SwfdecPlayerManagerClass SwfdecPlayerManagerClass
;
32 #define SWFDEC_TYPE_PLAYER_MANAGER (swfdec_player_manager_get_type())
33 #define SWFDEC_IS_PLAYER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_PLAYER_MANAGER))
34 #define SWFDEC_IS_PLAYER_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_PLAYER_MANAGER))
35 #define SWFDEC_PLAYER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_PLAYER_MANAGER, SwfdecPlayerManager))
36 #define SWFDEC_PLAYER_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_PLAYER_MANAGER, SwfdecPlayerManagerClass))
38 struct _SwfdecPlayerManager
42 SwfdecPlayer
* player
; /* the video we play */
43 GSource
* source
; /* the source that is ticking */
44 double speed
; /* speed of playback */
45 gboolean playing
; /* if we should be playing */
46 SwfdecDebuggerScript
*interrupt_script
; /* script that caused the interrupt */
47 guint interrupt_line
; /* line in script that caused the interrupt */
48 GMainLoop
* interrupt_loop
; /* loop we run during an interruption */
49 guint next_id
; /* id of breakpoint for "next" command */
52 struct _SwfdecPlayerManagerClass
54 GObjectClass object_class
;
57 GType
swfdec_player_manager_get_type (void);
60 swfdec_player_manager_new (SwfdecPlayer
* player
);
62 void swfdec_player_manager_set_speed (SwfdecPlayerManager
* manager
,
64 double swfdec_player_manager_get_speed (SwfdecPlayerManager
* manager
);
65 void swfdec_player_manager_set_playing (SwfdecPlayerManager
* manager
,
67 gboolean
swfdec_player_manager_get_playing (SwfdecPlayerManager
* manager
);
68 gboolean
swfdec_player_manager_get_interrupted (SwfdecPlayerManager
* manager
);
70 guint
swfdec_player_manager_iterate (SwfdecPlayerManager
* manager
);
72 void swfdec_player_manager_continue (SwfdecPlayerManager
* manager
);
73 void swfdec_player_manager_next (SwfdecPlayerManager
* manager
);
74 void swfdec_player_manager_get_interrupt (SwfdecPlayerManager
* manager
,
75 SwfdecDebuggerScript
**script
,
78 void swfdec_player_manager_execute (SwfdecPlayerManager
* manager
,
79 const char * command
);