[xiph-commits] r2912 - liboggplay/trunk/plugin
tahn at svn.annodex.net
tahn at svn.annodex.net
Tue Jun 12 22:55:06 PDT 2007
Author: tahn
Date: 2007-06-12 22:55:04 -0700 (Tue, 12 Jun 2007)
New Revision: 2912
Modified:
liboggplay/trunk/plugin/plugin_gui_mac.c
Log:
Updated for new gui init interface, and added CMML callback handling.
Modified: liboggplay/trunk/plugin/plugin_gui_mac.c
===================================================================
--- liboggplay/trunk/plugin/plugin_gui_mac.c 2007-06-13 05:26:09 UTC (rev 2911)
+++ liboggplay/trunk/plugin/plugin_gui_mac.c 2007-06-13 05:55:04 UTC (rev 2912)
@@ -73,7 +73,7 @@
PluginPlaybackState playback_state;
PluginStateChange playback_state_change;
semaphore playback_sem;
- void * tools_handle;
+ nsPluginInstance * plugin_instance;
} PluginWindowInfo;
typedef struct {
@@ -420,13 +420,21 @@
convert_oggplay_frame(info->oggplay_handle, &td.frame_data, RGB);
update_gl_output(info, &td);
}
- bool have_video = (td.frame_data.video_data != NULL);
- bool have_audio = (td.frame_data.samples != NULL && td.frame_data.size > 0);
/*
+ * Notify the plugin class that we've got some CMML data.
+ */
+ if (td.frame_data.cmml_strings != NULL) {
+ onCMMLData(info->plugin_instance, td.frame_data.cmml_strings,
+ td.frame_data.cmml_size);
+ }
+
+ /*
* Spin until we have some data (but wait for a bit first so we don't
* chew too many cycles).
*/
+ bool have_video = (td.frame_data.video_data != NULL);
+ bool have_audio = (td.frame_data.samples != NULL && td.frame_data.size > 0);
if (!have_video && !have_audio) {
free_oggplay_frame(info->oggplay_handle, &td.frame_data);
oggplay_millisleep(5);
@@ -554,7 +562,8 @@
*/
void *
-initialise_gui(NPWindow *np_window, void *oggplay_handle, void *tools_handle) {
+initialise_gui(nsPluginInstance *plugin_instance, NPWindow *np_window,
+ void *oggplay_handle) {
PluginWindowInfo * info;
@@ -574,7 +583,7 @@
info->new_oggplay_handle = NULL;
info->playback_state = PLAYING;
info->playback_state_change = NO_CHANGE;
- info->tools_handle = tools_handle;
+ info->plugin_instance = plugin_instance;
/*
* Create semaphores to coordinate window resizing, replacement of the
More information about the commits
mailing list