[xiph-commits] r2902 - liboggplay/trunk/plugin

shans at svn.annodex.net shans at svn.annodex.net
Tue Jun 12 21:54:36 PDT 2007


Author: shans
Date: 2007-06-12 21:54:33 -0700 (Tue, 12 Jun 2007)
New Revision: 2902

Modified:
   liboggplay/trunk/plugin/plugin_tools.c
Log:
Removed tools instance and associated functions.  Removed CMML handler.



Modified: liboggplay/trunk/plugin/plugin_tools.c
===================================================================
--- liboggplay/trunk/plugin/plugin_tools.c	2007-06-13 04:54:05 UTC (rev 2901)
+++ liboggplay/trunk/plugin/plugin_tools.c	2007-06-13 04:54:33 UTC (rev 2902)
@@ -40,22 +40,8 @@
 
 #include <stdlib.h>
 #include <math.h>
+#include <string.h>
 
-typedef struct {
-  char    * cmml_callback;
-  NPP       plugin_instance;
-} PluginToolsInfo;
-
-void * 
-initialise_tools(NPP plugin_instance) {
-
-  PluginToolsInfo *info = malloc(sizeof (PluginToolsInfo));
-  info->plugin_instance = plugin_instance;
-  info->cmml_callback = NULL;
-
-  return info;
-}
-
 void 
 buffer_audio_data(unsigned char ** buffer, int* buffer_length, 
           unsigned char * data, int samples, int sample_size, int channels) {
@@ -83,30 +69,3 @@
     }
   }
 }
-
-void 
-set_cmml_callback(void * handle, char * callback) {
-  PluginToolsInfo  * info = (PluginToolsInfo *)handle;  
-  
-  info->cmml_callback = callback;
-  
-  NPN_GetURL(info->plugin_instance, 
-                  "javascript:alert(\"CMML callback registered\");", NULL); 
-}
-
-void 
-on_cmml_data(void * handle, unsigned char ** cmml_data, int cmml_size) {
-  int i;
-
-  PluginToolsInfo * info = (PluginToolsInfo *)handle;
-
-  if ((info->cmml_callback == NULL) || (info->plugin_instance == NULL)) {
-    return;
-  }
-
-  for (i = 0; i < cmml_size; i++) {
-    printf("CMML annotations: %s\n", cmml_data[i]);
-  }
-  NPN_GetURL(info->plugin_instance, 
-                  "javascript:alert(\"CMML data recieved\");", NULL);
-}



More information about the commits mailing list