[xiph-commits] r3050 - in liboggplay/trunk: include/oggplay src/liboggplay

shans at svn.annodex.net shans at svn.annodex.net
Mon Jun 25 18:05:33 PDT 2007


Author: shans
Date: 2007-06-25 18:05:33 -0700 (Mon, 25 Jun 2007)
New Revision: 3050

Modified:
   liboggplay/trunk/include/oggplay/oggplay_enums.h
   liboggplay/trunk/src/liboggplay/oggplay_callback_info.c
   liboggplay/trunk/src/liboggplay/oggplay_seek.c
Log:
Added OGGPLAY_STREAM_JUST_SEEKED status to stream_info enums, set this status
on first frame after a seek.



Modified: liboggplay/trunk/include/oggplay/oggplay_enums.h
===================================================================
--- liboggplay/trunk/include/oggplay/oggplay_enums.h	2007-06-26 01:04:56 UTC (rev 3049)
+++ liboggplay/trunk/include/oggplay/oggplay_enums.h	2007-06-26 01:05:33 UTC (rev 3050)
@@ -77,7 +77,8 @@
   OGGPLAY_STREAM_UNINITIALISED = 0,
   OGGPLAY_STREAM_FIRST_DATA = 1,
   OGGPLAY_STREAM_INITIALISED = 2,
-  OGGPLAY_STREAM_LAST_DATA = 3
+  OGGPLAY_STREAM_LAST_DATA = 3,
+  OGGPLAY_STREAM_JUST_SEEKED = 4
 } OggPlayStreamInfo;
 
 #endif

Modified: liboggplay/trunk/src/liboggplay/oggplay_callback_info.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_callback_info.c	2007-06-26 01:04:56 UTC (rev 3049)
+++ liboggplay/trunk/src/liboggplay/oggplay_callback_info.c	2007-06-26 01:05:33 UTC (rev 3050)
@@ -114,14 +114,7 @@
         track_info->stream_info = track->stream_info;
       }
 
-      /*
-       * if the StreamState is FIRST_DATA then update it to INITIALISED, 
-       * as we've marked the first data instance
-       */
-      if (track->stream_info == OGGPLAY_STREAM_FIRST_DATA) {
-        track->stream_info = OGGPLAY_STREAM_INITIALISED;
-      }
-    } else {
+   } else {
       track_info->stream_info = OGGPLAY_STREAM_UNINITIALISED;
     }
     
@@ -143,6 +136,23 @@
     }
 
      
+    if (track_info->required_records > 0) {
+      /*
+       * if the StreamState is FIRST_DATA then update it to INITIALISED, 
+       * as we've marked the first data instance
+       */
+      if 
+      (
+        track->stream_info == OGGPLAY_STREAM_FIRST_DATA
+        ||
+        track->stream_info == OGGPLAY_STREAM_JUST_SEEKED
+      ) 
+      {
+        track->stream_info = OGGPLAY_STREAM_INITIALISED;
+      }
+ 
+    }
+
     //printf("%d: %d/%d\t", i, 
     //                track_info->required_records, count);
     /*
@@ -164,7 +174,7 @@
     }
 
   }
-  
+ 
   //printf("\n");
 
   /*

Modified: liboggplay/trunk/src/liboggplay/oggplay_seek.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_seek.c	2007-06-26 01:04:56 UTC (rev 3049)
+++ liboggplay/trunk/src/liboggplay/oggplay_seek.c	2007-06-26 01:05:33 UTC (rev 3050)
@@ -105,6 +105,7 @@
     track->data_list = track->end_of_data_list = NULL;
     track->untimed_data_list = NULL;
     track->current_loc = -1;
+    track->stream_info = OGGPLAY_STREAM_JUST_SEEKED;
   }
  
   /*



More information about the commits mailing list