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

tahn at svn.annodex.net tahn at svn.annodex.net
Wed Jul 4 03:12:33 PDT 2007


Author: tahn
Date: 2007-07-04 03:12:33 -0700 (Wed, 04 Jul 2007)
New Revision: 3157

Modified:
   liboggplay/trunk/plugin/plugin_gui_mac.c
Log:
The display still needs to be updated when frames are being dropped.


Modified: liboggplay/trunk/plugin/plugin_gui_mac.c
===================================================================
--- liboggplay/trunk/plugin/plugin_gui_mac.c	2007-07-04 09:44:51 UTC (rev 3156)
+++ liboggplay/trunk/plugin/plugin_gui_mac.c	2007-07-04 10:12:33 UTC (rev 3157)
@@ -260,7 +260,7 @@
 
 
 static void
-update_gl_output(PluginWindowInfo *info, ThreadData *td) {
+update_gl_output(PluginWindowInfo *info, ThreadData *td, bool drop_video_frame) {
 
   if (td->agl_context == NULL) {
     return;
@@ -276,7 +276,7 @@
   glScalef(td->x_scale, td->y_scale, 1.0);
   glViewport(0, 0, td->port_width, td->port_height);
 
-  if (td->frame_data.frame != NULL) {
+  if (td->frame_data.frame != NULL && !drop_video_frame) {
     glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA, td->frame_data.width,
         td->frame_data.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, td->frame_data.frame);
   }
@@ -410,6 +410,9 @@
      */
     if (!paused) {
       get_oggplay_frame(info->oggplay_handle, &td.frame_data);
+      if (!drop_video_frame) {
+        convert_oggplay_frame(info->oggplay_handle, &td.frame_data, RGB);
+      }
 
       /*
        * Retrieve the latest oggplay status and update accordingly.
@@ -429,10 +432,7 @@
           break;
       }
     }
-    if (!drop_video_frame) {
-      convert_oggplay_frame(info->oggplay_handle, &td.frame_data, RGB);
-      update_gl_output(info, &td);
-    }
+    update_gl_output(info, &td, drop_video_frame);
 
     /*
      * Notify the plugin class that we've got some CMML data.
@@ -562,12 +562,11 @@
         td.frame_data.frame != NULL, td.frame_data.size,
         playback_target >> 16, cur_time, offset, drop_video_frame ? "*" : "");
 #endif
-    if (drop_video_frame) {
-      offset = 0;
-    }
 
     free_oggplay_frame(info->oggplay_handle, &td.frame_data);
-    oggplay_millisleep(offset);
+    if (offset > 0) {
+      oggplay_millisleep(offset);
+    }
 
   } /* while (!info->shutdown_gui) */
 



More information about the commits mailing list