summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-03-14 13:57:15 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-03-14 13:57:15 +0000
commiteb0240ff0f72d78e583a40292d3ba0fe7efa22ab (patch)
tree67a4db2624f10f73d80195bdfd26e77b95c1f3ca
parent6e0f8db43be862f7612e6132db0371a875ffd6dc (diff)
downloadxine-lib-eb0240ff0f72d78e583a40292d3ba0fe7efa22ab.tar.gz
xine-lib-eb0240ff0f72d78e583a40292d3ba0fe7efa22ab.tar.bz2
- make libsputext work again
- update osd & video_overlay to use 64-bits pts CVS patchset: 1569 CVS date: 2002/03/14 13:57:15
-rw-r--r--include/xine.h.tmpl.in6
-rw-r--r--src/demuxers/demux_avi.c10
-rw-r--r--src/libsputext/xine_decoder.c20
-rw-r--r--src/xine-engine/osd.c8
-rw-r--r--src/xine-engine/osd.h6
-rw-r--r--src/xine-engine/video_out.h4
-rw-r--r--src/xine-engine/video_overlay.c8
-rw-r--r--src/xine-engine/video_overlay.h6
-rw-r--r--src/xine-engine/xine.c4
9 files changed, 37 insertions, 35 deletions
diff --git a/include/xine.h.tmpl.in b/include/xine.h.tmpl.in
index 707c7ec3b..05d188fd8 100644
--- a/include/xine.h.tmpl.in
+++ b/include/xine.h.tmpl.in
@@ -28,7 +28,7 @@
\endverbatim
*/
/*
- * $Id: xine.h.tmpl.in,v 1.85 2002/03/14 04:31:49 miguelfreitas Exp $
+ * $Id: xine.h.tmpl.in,v 1.86 2002/03/14 13:57:15 miguelfreitas Exp $
*
*/
@@ -1752,13 +1752,13 @@ struct osd_renderer_s {
* send the osd to be displayed at given pts (0=now)
* the object is not changed. there may be subsequent drawing on it.
*/
- int (*show) (osd_object_t *osd, uint32_t vpts );
+ int (*show) (osd_object_t *osd, int64_t vpts );
/*
* send event to hide osd at given pts (0=now)
* the object is not changed. there may be subsequent drawing on it.
*/
- int (*hide) (osd_object_t *osd, uint32_t vpts );
+ int (*hide) (osd_object_t *osd, int64_t vpts );
/*
* Bresenham line implementation on osd object
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index ebaf9f8e1..e598e6927 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.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: demux_avi.c,v 1.67 2002/03/12 11:04:06 guenter Exp $
+ * $Id: demux_avi.c,v 1.68 2002/03/14 13:57:15 miguelfreitas Exp $
*
* demultiplexer for avi streams
*
@@ -802,14 +802,14 @@ static int demux_avi_next (demux_avi_t *this) {
* send packages to inform & drive text spu decoder
*/
- if (this->have_spu && (buf->decoder_info[0] == 2)) {
+ if (this->have_spu && (buf->decoder_flags & BUF_FLAG_FRAME_END)) {
buf_element_t *buf;
buf = this->video_fifo->buffer_pool_alloc (this->video_fifo);
- buf->type = BUF_SPU_TEXT;
- buf->pts = video_pts;
+ buf->decoder_flags = BUF_FLAG_FRAME_END;
+ buf->type = BUF_SPU_TEXT;
+ buf->pts = video_pts;
- buf->decoder_info[0] = 1;
buf->decoder_info[1] = this->avi->video_posf;
this->video_fifo->put (this->video_fifo, buf);
diff --git a/src/libsputext/xine_decoder.c b/src/libsputext/xine_decoder.c
index 4a941bc26..53a6d4d4b 100644
--- a/src/libsputext/xine_decoder.c
+++ b/src/libsputext/xine_decoder.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_decoder.c,v 1.16 2002/03/11 12:31:26 guenter Exp $
+ * $Id: xine_decoder.c,v 1.17 2002/03/14 13:57:15 miguelfreitas Exp $
*
* code based on mplayer module:
*
@@ -756,7 +756,6 @@ static int spudec_can_handle (spu_decoder_t *this_gen, int buf_type) {
}
-
static void spudec_init (spu_decoder_t *this_gen, vo_instance_t *vo_out) {
sputext_decoder_t *this = (sputext_decoder_t *) this_gen;
@@ -776,8 +775,9 @@ static void spudec_init (spu_decoder_t *this_gen, vo_instance_t *vo_out) {
static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
sputext_decoder_t *this = (sputext_decoder_t *) this_gen;
-
- if (buf->decoder_info[0] == 0) {
+ int64_t current_time;
+
+ if (buf->decoder_flags & BUF_FLAG_HEADER) {
int y;
@@ -809,8 +809,10 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
this->renderer->set_position (this->osd, 0, y);
this->renderer->render_text (this->osd, 0, 0, "sputext decoder", OSD_TEXT1);
- this->renderer->show (this->osd, 0);
- this->renderer->hide (this->osd, 300000);
+
+ current_time = this->xine->metronom->get_current_time (this->xine->metronom);
+ this->renderer->show (this->osd, current_time);
+ this->renderer->hide (this->osd, current_time+300000);
this->fd = (FILE *) buf->content;
@@ -829,11 +831,11 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
subtitle_t *subtitle;
subtitle = NULL;
-
+
pts = buf->pts;
pts_end = pts;
frame_num = buf->decoder_info[1];
-
+
/*
* find out which subtitle to display
*/
@@ -929,7 +931,7 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
this->renderer->hide (this->osd, pts_end);
#ifdef LOG
- printf ("sputext: scheduling subtitle >%s< at %d until %d, current time is %d\n",
+ printf ("sputext: scheduling subtitle >%s< at %lld until %lld, current time is %lld\n",
subtitle->text[0], pts, pts_end,
this->xine->metronom->get_current_time (this->xine->metronom));
#endif
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index 7944907c8..69c06bbff 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -140,7 +140,7 @@ static osd_object_t *osd_new_object (osd_renderer_t *this, int width, int height
* send the osd to be displayed at given pts (0=now)
* the object is not changed. there may be subsequent drawing on it.
*/
-static int osd_show (osd_object_t *osd, uint32_t vpts ) {
+static int osd_show (osd_object_t *osd, int64_t vpts ) {
osd_renderer_t *this = osd->renderer;
rle_elem_t rle, *rle_p=0;
@@ -148,7 +148,7 @@ static int osd_show (osd_object_t *osd, uint32_t vpts ) {
uint8_t *c;
#ifdef LOG_DEBUG
- printf("osd_show %p vpts=%d\n", osd, vpts);
+ printf("osd_show %p vpts=%lld\n", osd, vpts);
#endif
if( osd->handle < 0 ) {
@@ -230,12 +230,12 @@ static int osd_show (osd_object_t *osd, uint32_t vpts ) {
* send event to hide osd at given pts (0=now)
* the object is not changed. there may be subsequent drawing on it.
*/
-static int osd_hide (osd_object_t *osd, uint32_t vpts) {
+static int osd_hide (osd_object_t *osd, int64_t vpts) {
osd_renderer_t *this = osd->renderer;
#ifdef LOG_DEBUG
- printf("osd_hide %p vpts=%d\n",osd, vpts);
+ printf("osd_hide %p vpts=%lld\n",osd, vpts);
#endif
if( osd->handle < 0 )
diff --git a/src/xine-engine/osd.h b/src/xine-engine/osd.h
index 37205fdbc..486b176b8 100644
--- a/src/xine-engine/osd.h
+++ b/src/xine-engine/osd.h
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
* OSD stuff (text and graphic primitives)
- * $Id: osd.h,v 1.8 2002/03/14 04:31:49 miguelfreitas Exp $
+ * $Id: osd.h,v 1.9 2002/03/14 13:57:15 miguelfreitas Exp $
*/
#ifndef HAVE_OSD_H
@@ -56,13 +56,13 @@ struct osd_renderer_s {
* send the osd to be displayed at given pts (0=now)
* the object is not changed. there may be subsequent drawing on it.
*/
- int (*show) (osd_object_t *osd, uint32_t vpts );
+ int (*show) (osd_object_t *osd, int64_t vpts );
/*
* send event to hide osd at given pts (0=now)
* the object is not changed. there may be subsequent drawing on it.
*/
- int (*hide) (osd_object_t *osd, uint32_t vpts );
+ int (*hide) (osd_object_t *osd, int64_t vpts );
/*
* Bresenham line implementation on osd object
diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h
index 5fe24da4f..78147f1c2 100644
--- a/src/xine-engine/video_out.h
+++ b/src/xine-engine/video_out.h
@@ -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: video_out.h,v 1.49 2002/03/14 04:31:49 miguelfreitas Exp $
+ * $Id: video_out.h,v 1.50 2002/03/14 13:57:15 miguelfreitas Exp $
*
*
* xine version of video_out.h
@@ -354,7 +354,7 @@ struct video_overlay_instance_s {
void (*flush_events) (video_overlay_instance_t *this_gen );
- void (*multiple_overlay_blend) (video_overlay_instance_t *this_gen, int vpts,
+ void (*multiple_overlay_blend) (video_overlay_instance_t *this_gen, int64_t vpts,
vo_driver_t *output, vo_frame_t *vo_img, int enabled);
};
diff --git a/src/xine-engine/video_overlay.c b/src/xine-engine/video_overlay.c
index da759b717..52b01beb8 100644
--- a/src/xine-engine/video_overlay.c
+++ b/src/xine-engine/video_overlay.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: video_overlay.c,v 1.15 2002/03/14 04:31:49 miguelfreitas Exp $
+ * $Id: video_overlay.c,v 1.16 2002/03/14 13:57:15 miguelfreitas Exp $
*
*/
@@ -329,7 +329,7 @@ static void video_overlay_print_overlay( vo_overlay_t *ovl ) {
process overlay events
if vpts == 0 will process everything now (used in flush)
*/
-static void video_overlay_event( video_overlay_t *this, int vpts ) {
+static void video_overlay_event( video_overlay_t *this, int64_t vpts ) {
int32_t handle;
uint32_t this_event;
@@ -567,7 +567,7 @@ static void video_overlay_event( video_overlay_t *this, int vpts ) {
}
if ( (this->video_overlay_events[this_event].event->object.pts !=
this->video_overlay_objects[handle].pts) ) {
- printf ("MENU BUTTON DROPPED menu pts=%u spu pts=%u\n",
+ printf ("MENU BUTTON DROPPED menu pts=%lld spu pts=%lld\n",
this->video_overlay_events[this_event].event->object.pts,
this->video_overlay_objects[handle].pts);
}
@@ -602,7 +602,7 @@ static void video_overlay_event( video_overlay_t *this, int vpts ) {
/* This is called from video_out.c
* must call output->overlay_blend for each active overlay.
*/
-static void video_overlay_multiple_overlay_blend(video_overlay_instance_t *this_gen, int vpts,
+static void video_overlay_multiple_overlay_blend(video_overlay_instance_t *this_gen, int64_t vpts,
vo_driver_t *output, vo_frame_t *vo_img, int enabled) {
video_overlay_t *this = (video_overlay_t *) this_gen;
int i;
diff --git a/src/xine-engine/video_overlay.h b/src/xine-engine/video_overlay.h
index 4eaca8e6e..489bac777 100644
--- a/src/xine-engine/video_overlay.h
+++ b/src/xine-engine/video_overlay.h
@@ -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: video_overlay.h,v 1.6 2002/03/08 13:50:41 jcdutton Exp $
+ * $Id: video_overlay.h,v 1.7 2002/03/14 13:57:15 miguelfreitas Exp $
*
*/
@@ -78,7 +78,7 @@ typedef struct vo_buttons_s {
typedef struct video_overlay_object_s {
int32_t handle; /* Used to match Show and Hide events. */
uint32_t object_type; /* 0=Subtitle, 1=Menu */
- uint32_t pts; /* Needed for Menu button compares */
+ int64_t pts; /* Needed for Menu button compares */
vo_overlay_t *overlay; /* The image data. */
uint32_t palette_type; /* 1 Y'CrCB, 2 R'G'B' */
uint32_t *palette; /* If NULL, no palette contained in this event. */
@@ -89,7 +89,7 @@ typedef struct video_overlay_object_s {
/* This will hold all details of an event item, needed for event queue to function */
typedef struct video_overlay_event_s {
uint32_t event_type; /* Show SPU, Show OSD, Hide etc. */
- uint32_t vpts; /* Time when event will action. 0 means action now */
+ int64_t vpts; /* Time when event will action. 0 means action now */
/* Once video_out blend_yuv etc. can take rle_elem_t with Colour, blend and length information.
* we can remove clut and blend from this structure.
* This will allow for many more colours for OSD.
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index ef88b6a31..aa17f4858 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.108 2002/03/12 19:51:29 guenter Exp $
+ * $Id: xine.c,v 1.109 2002/03/14 13:57:15 miguelfreitas Exp $
*
* top-level xine functions
*
@@ -383,7 +383,7 @@ int xine_play (xine_t *this, char *mrl,
xine_set_speed_internal (this, SPEED_NORMAL);
/* osd */
- xine_internal_osd (this, ">", 0, 300000);
+ xine_internal_osd (this, ">", this->metronom->get_current_time (this->metronom), 300000);
}