[Mplayer-cvslog] CVS: main vobsub.c,1.16,1.17 vobsub.h,1.6,1.7

Kim Minh Kaplan CVS kmkaplan at mplayerhq.hu
Sun Jul 28 18:28:33 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv4581

Modified Files:
	vobsub.c vobsub.h 
Log Message:
New function vobsub_get_next_packet for subrip.



Index: vobsub.c
===================================================================
RCS file: /cvsroot/mplayer/main/vobsub.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- vobsub.c	28 Jul 2002 12:01:32 -0000	1.16
+++ vobsub.c	28 Jul 2002 16:28:30 -0000	1.17
@@ -978,6 +978,23 @@
   return -1;
 }
 
+int
+vobsub_get_next_packet(void *vobhandle, void** data, int* timestamp)
+{
+  vobsub_t *vob = (vobsub_t *)vobhandle;
+  if (vob->spu_streams && 0 <= vobsub_id && (unsigned) vobsub_id < vob->spu_streams_size) {
+    packet_queue_t *queue = vob->spu_streams + vobsub_id;
+    if (queue->current_index < queue->packets_size) {
+      packet_t *pkt = queue->packets + queue->current_index;
+      ++queue->current_index;
+      *data = pkt->data;
+      *timestamp = pkt->pts100;
+      return pkt->size;
+    }
+  }
+  return -1;
+}
+
 void
 vobsub_reset(void *vobhandle)
 {

Index: vobsub.h
===================================================================
RCS file: /cvsroot/mplayer/main/vobsub.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vobsub.h	8 Jul 2002 21:44:51 -0000	1.6
+++ vobsub.h	28 Jul 2002 16:28:30 -0000	1.7
@@ -5,6 +5,7 @@
 extern void vobsub_reset(void *vob);
 extern int vobsub_parse_ifo(void* this, const char *const name, unsigned int *palette, unsigned int *width, unsigned int *height, int force, int sid, char *langid);
 extern int vobsub_get_packet(void *vobhandle, float pts,void** data, int* timestamp);
+extern int vobsub_get_next_packet(void *vobhandle, void** data, int* timestamp);
 extern void vobsub_close(void *this);
 
 extern void *vobsub_out_open(const char *basename, const unsigned int *palette, unsigned int orig_width, unsigned int orig_height, const char *id, unsigned int index);




More information about the MPlayer-cvslog mailing list