summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-01-07 23:36:37 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-01-07 23:36:37 +0000
commit667197fa667f7061650b0767aa2e05e0f4c10d6d (patch)
treecaa2200146c63d2d26c13860b1c743e668d9cda4 /src
parent8a21b65f6c426a441cdfa3178a58aaf6c5a337b3 (diff)
downloadxine-lib-667197fa667f7061650b0767aa2e05e0f4c10d6d.tar.gz
xine-lib-667197fa667f7061650b0767aa2e05e0f4c10d6d.tar.bz2
Improved subtitles
Replaced SETPTS calls now that I understand them. Always call SETPTS with the vpts just before a WRITE. If PTS=0, call SETPTS with a vpts = 0 ; CVS patchset: 1372 CVS date: 2002/01/07 23:36:37
Diffstat (limited to 'src')
-rw-r--r--src/dxr3/dxr3_decoder.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/src/dxr3/dxr3_decoder.c b/src/dxr3/dxr3_decoder.c
index d9dd59253..bbe0260d7 100644
--- a/src/dxr3/dxr3_decoder.c
+++ b/src/dxr3/dxr3_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: dxr3_decoder.c,v 1.55 2002/01/07 21:26:04 jcdutton Exp $
+ * $Id: dxr3_decoder.c,v 1.56 2002/01/07 23:36:37 jcdutton Exp $
*
* dxr3 video and spu decoder plugin. Accepts the video and spu data
* from XINE and sends it directly to the corresponding dxr3 devices.
@@ -25,6 +25,15 @@
* priority.
* also incorporates an scr plugin for metronom
*
+ * update 7/1/2002 by jcdutton:
+ * Updated to work better with the changes done to dvdnav.
+ * Subtitles display properly now.
+ * TODO: Process NAV packets so that the first
+ * menu button appears, and also so that
+ * menu buttons disappear when one starts playing the movie.
+ * Processing NAV packets will also make "The White Rabbit"
+ * work on DXR3 as I currently works on XV.
+ *
* update 25/11/01 by Harm:
* Major retooling; so much so that I've decided to cvs-tag the dxr3 sources
* as DXR3_095 before commiting.
@@ -611,15 +620,13 @@ static void dxr3_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
this->last_pts = vpts;
/* SETPTS only if less then one second in the future and
* either buffer has PTS or sync_every_frame is set */
- if ((delay > 0) && (delay < 90000) &&
- (this->sync_every_frame || buf->PTS)) {
+// if ((delay > 0) && (delay < 90000) &&
+// (this->sync_every_frame || buf->PTS)) {
/* update the dxr3's current pts value */
-/*************
if (ioctl(this->fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vpts))
printf("dxr3: set video pts failed (%s)\n",
strerror(errno));
-**************/
- }
+// }
if (delay >= 90000) {
/* frame more than 1 sec ahead */
printf("dxr3: WARNING: vpts %d is %.02f seconds ahead of time!\n",
@@ -885,26 +892,29 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf)
#endif
return;
}
-/*
+/* spu_channel is now set based on whether we are in the menu or not. */
+/* Bit 7 is set if only forced display SPUs should be shown */
+ if ( (this->xine->spu_channel & 0x1f) != stream_id ) {
+#if LOG_SPU
+ printf ("dxr3_spu: Dropping SPU channel %d. Not selected stream_id\n", stream_id);
+#endif
+ return;
+ }
+// if (this->xine->spu_channel != stream_id && this->menu!=1 ) return;
+ /* Hide any previous button highlights */
+ ioctl(this->fd_spu, EM8300_IOCTL_SPU_BUTTON, NULL);
if (buf->PTS) {
int vpts;
vpts = this->spu_decoder.metronom->got_spu_packet
(this->spu_decoder.metronom, buf->PTS, 0, buf->SCR);
+#if LOG_SPU
+ printf ("dxr3_spu: PTS=%u VPTS=%u\n", buf->PTS, vpts);
+#endif
if (ioctl(this->fd_spu, EM8300_IOCTL_SPU_SETPTS, &vpts))
printf("dxr3: spu setpts failed (%s)\n", strerror(errno));
}
-*/
-/* spu_channel is now set based on whether we are in the menu or not. */
-/* Bit 7 is set if only forced display SPUs should be shown */
- if ( (this->xine->spu_channel & 0x1f) != stream_id ) {
-#if LOG_SPU
- printf ("dxr3_spu: Dropping SPU channel %d. Not selected stream_id\n", stream_id);
-#endif
- return;
- }
-// if (this->xine->spu_channel != stream_id && this->menu!=1 ) return;
#if LOG_SPU
printf ("dxr3_spu: write: SPU_FD = %i\n",this->fd_spu);