summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-10-19 21:23:52 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-10-19 21:23:52 +0000
commit70317cb5424c960fe5489cac3371b62ddc69adf9 (patch)
tree8d10b882bba804743539b8d6a5e9c21d5e693d6f
parent946822db0bab881f49563d6fd911f92bc287fbe9 (diff)
downloadxine-lib-70317cb5424c960fe5489cac3371b62ddc69adf9.tar.gz
xine-lib-70317cb5424c960fe5489cac3371b62ddc69adf9.tar.bz2
seeking in public api is now millisecond accurate (sorry, forgot that one but it was agreed it should be that way), events contain a timestamp now
CVS patchset: 2864 CVS date: 2002/10/19 21:23:52
-rw-r--r--include/xine.h.in11
-rw-r--r--src/xine-engine/events.c4
-rw-r--r--src/xine-engine/xine.c4
3 files changed, 14 insertions, 5 deletions
diff --git a/include/xine.h.in b/include/xine.h.in
index 815087716..f36bbde5f 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.h.in,v 1.20 2002/10/14 15:46:48 guenter Exp $
+ * $Id: xine.h.in,v 1.21 2002/10/19 21:23:52 guenter Exp $
*
* public xine-lib (libxine) interface and documentation
*
@@ -48,6 +48,8 @@ extern "C" {
#include <sys/types.h>
#include <unistd.h>
#include <inttypes.h>
+#include <sys/time.h>
+#include <time.h>
/*
* xine opaque data types
@@ -116,7 +118,7 @@ void xine_close_video_driver (xine_t *self, xine_vo_driver_t *driver);
* NULL on error (use xine_get_error for details)
*
* the only proper way to free the stream pointer returned by this
- * function is to call xine_close() on it. do not try to access any
+ * function is to call xine_dispose() on it. do not try to access any
* fields in xine_stream_t, they're all private and subject to change
* without further notice.
*/
@@ -137,6 +139,9 @@ int xine_open (xine_stream_t *stream, const char *mrl);
/*
* play a stream from a given position
+ *
+ * start_pos: 0..65535
+ * start_time: milliseconds
* if both start position parameters are != 0 start_pos will be used
* for non-seekable streams both values will be ignored
*
@@ -817,6 +822,8 @@ typedef struct {
void *data; /* contents depending on type */
int data_length;
+
+ struct timeval tv; /* timestamp of event creation */
} xine_event_t;
/*
diff --git a/src/xine-engine/events.c b/src/xine-engine/events.c
index 1e2c11965..0750408bc 100644
--- a/src/xine-engine/events.c
+++ b/src/xine-engine/events.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: events.c,v 1.10 2002/10/14 15:47:33 guenter Exp $
+ * $Id: events.c,v 1.11 2002/10/19 21:23:52 guenter Exp $
*
* Event handling functions
*
@@ -70,6 +70,8 @@ void xine_event_send (xine_stream_t *stream, const xine_event_t *event) {
xine_event_queue_t *queue;
+ gettimeofday (&event->tv, NULL);
+
pthread_mutex_lock (&stream->event_queues_lock);
queue = (xine_event_queue_t *)xine_list_first_content (stream->event_queues);
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 847390768..0d2973a6d 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.169 2002/10/18 04:04:10 miguelfreitas Exp $
+ * $Id: xine.c,v 1.170 2002/10/19 21:23:52 guenter Exp $
*
* top-level xine functions
*
@@ -453,7 +453,7 @@ int xine_play (xine_stream_t *stream, int start_pos, int start_time) {
pthread_mutex_lock (&stream->frontend_lock);
- ret = xine_play_internal (stream, start_pos, start_time);
+ ret = xine_play_internal (stream, start_pos, start_time/1000);
pthread_mutex_unlock (&stream->frontend_lock);