View | Details | Raw Unified | Return to bug 256818 | Differences between
and this patch

Collapse All | Expand All

(-)vdr-xineliboutput/device.c (-4 / +4 lines)
Lines 967-973 Link Here
967
#ifdef LOG_TRICKSPEED
967
#ifdef LOG_TRICKSPEED
968
      if(PictureType != NO_PICTURE && PES_HAS_PTS(buf)) {
968
      if(PictureType != NO_PICTURE && PES_HAS_PTS(buf)) {
969
	int64_t pts = pes_get_pts(buf, length);
969
	int64_t pts = pes_get_pts(buf, length);
970
	LOGMSG("    TrickSpeed: frame %s pts %"PRId64, picture_type_str[PictureType], pts);
970
	LOGMSG("    TrickSpeed: frame %s pts %" PRId64, picture_type_str[PictureType], pts);
971
      }
971
      }
972
#endif
972
#endif
973
973
Lines 1019-1029 Link Here
1019
      if(m_TrickSpeedPts == 0) {
1019
      if(m_TrickSpeedPts == 0) {
1020
	m_TrickSpeedMode |= trs_NoAudio;
1020
	m_TrickSpeedMode |= trs_NoAudio;
1021
	m_TrickSpeedPts = pts;
1021
	m_TrickSpeedPts = pts;
1022
	LOGTRICKSPEED("    Seen video pts = %"PRId64, pts);
1022
	LOGTRICKSPEED("    Seen video pts = %" PRId64, pts);
1023
      } else {
1023
      } else {
1024
	if(pts < m_TrickSpeedPts) {
1024
	if(pts < m_TrickSpeedPts) {
1025
	  /* -> playing fast backwards */
1025
	  /* -> playing fast backwards */
1026
	  LOGTRICKSPEED("    Detected fast backward mode. last %"PRId64" now %"PRId64, 
1026
	  LOGTRICKSPEED("    Detected fast backward mode. last %" PRId64 " now %" PRId64,
1027
			m_TrickSpeedPts, pts);
1027
			m_TrickSpeedPts, pts);
1028
	  //if(!(m_TrickSpeedMode & trs_PTS_recalc))
1028
	  //if(!(m_TrickSpeedMode & trs_PTS_recalc))
1029
	  //  ForEach(m_clients, &cXinelibThread::Clear);
1029
	  //  ForEach(m_clients, &cXinelibThread::Clear);
Lines 1051-1057 Link Here
1051
      if(m_TrickSpeedPts == 0)
1051
      if(m_TrickSpeedPts == 0)
1052
	m_TrickSpeedPts = pts;
1052
	m_TrickSpeedPts = pts;
1053
1053
1054
      LOGTRICKSPEED("    pts %"PRId64" -> %"PRId64" (diff %"PRId64")  %"PRId64"", pts, 
1054
      LOGTRICKSPEED("    pts %" PRId64 " -> %" PRId64 " (diff %" PRId64 ")  %" PRId64 "", pts,
1055
		    m_TrickSpeedPts + 40*12*90, m_TrickSpeedPts + 40*12*90 - pts,
1055
		    m_TrickSpeedPts + 40*12*90, m_TrickSpeedPts + 40*12*90 - pts,
1056
		    (m_TrickSpeedPts + 40*12*90)^0x80000000);
1056
		    (m_TrickSpeedPts + 40*12*90)^0x80000000);
1057
      pts = m_TrickSpeedPts = m_TrickSpeedPts + 40*12*90; /* 12 frames * 40ms -> pts units */
1057
      pts = m_TrickSpeedPts = m_TrickSpeedPts + 40*12*90; /* 12 frames * 40ms -> pts units */
(-)vdr-xineliboutput/tools/ts.c (-1 / +1 lines)
Lines 545-551 Link Here
545
545
546
#ifdef LOG_PCR
546
#ifdef LOG_PCR
547
  uint epcr = ((pkt[10] & 0x1) << 8) | pkt[11];
547
  uint epcr = ((pkt[10] & 0x1) << 8) | pkt[11];
548
  LOGPCR("ts_get_pcr: PCR: %"PRId64", EPCR: %u", pcr, epcr);
548
  LOGPCR("ts_get_pcr: PCR: %" PRId64 ", EPCR: %u", pcr, epcr);
549
#endif
549
#endif
550
550
551
  *ppcr = pcr;
551
  *ppcr = pcr;
(-)vdr-xineliboutput/xine/BluRay/decode_spuhdmv.c (-1 / +1 lines)
Lines 925-931 Link Here
925
925
926
static void decode_segment(spuhdmv_decoder_t *this)
926
static void decode_segment(spuhdmv_decoder_t *this)
927
{
927
{
928
  XINE_HDMV_TRACE("*** new segment, pts %010"PRId64": 0x%02x (%8d bytes)\n",
928
  XINE_HDMV_TRACE("*** new segment, pts %010" PRId64 ": 0x%02x (%8d bytes)\n",
929
                  this->pts, this->buf->segment_type, this->buf->segment_len);
929
                  this->pts, this->buf->segment_type, this->buf->segment_len);
930
930
931
  switch (segbuf_segment_type(this->buf)) {
931
  switch (segbuf_segment_type(this->buf)) {
(-)vdr-xineliboutput/xine/BluRay/input_bluray.c (-1 / +1 lines)
Lines 568-574 Link Here
568
568
569
#ifdef LOG
569
#ifdef LOG
570
  int ms = this->title_info->duration / INT64_C(90);
570
  int ms = this->title_info->duration / INT64_C(90);
571
  lprintf("Opened title %d. Length %"PRId64" bytes / %02d:%02d:%02d.%03d\n",
571
  lprintf("Opened title %d. Length %" PRId64 " bytes / %02d:%02d:%02d.%03d\n",
572
          this->current_title_idx, bd_get_title_size(this->bdh),
572
          this->current_title_idx, bd_get_title_size(this->bdh),
573
          ms / 3600000, (ms % 3600000 / 60000), (ms % 60000) / 1000, ms % 1000);
573
          ms / 3600000, (ms % 3600000 / 60000), (ms % 60000) / 1000, ms % 1000);
574
#endif
574
#endif
(-)vdr-xineliboutput/xine/adjustable_scr.c (-2 / +2 lines)
Lines 274-286 Link Here
274
      set_pivot( this );
274
      set_pivot( this );
275
      this->buffering = 1;
275
      this->buffering = 1;
276
      this->buffering_start_time = time_ms();
276
      this->buffering_start_time = time_ms();
277
      LOGMSG("start buffering at %"PRId64, this->cur_pts);
277
      LOGMSG("start buffering at %" PRId64, this->cur_pts);
278
    }
278
    }
279
  } else {
279
  } else {
280
    if (this->buffering) {
280
    if (this->buffering) {
281
      set_pivot( this );
281
      set_pivot( this );
282
      this->buffering = 0;
282
      this->buffering = 0;
283
      LOGMSG("stop buffering at %"PRId64" (buffering took %"PRIu64" ms)",
283
      LOGMSG("stop buffering at %" PRId64 " (buffering took %" PRIu64 " ms)",
284
	     this->cur_pts, elapsed(this->buffering_start_time));
284
	     this->cur_pts, elapsed(this->buffering_start_time));
285
    }
285
    }
286
  }
286
  }
(-)vdr-xineliboutput/xine/demux_xvdr.c (-2 / +2 lines)
Lines 227-233 Link Here
227
    int still_mode  = (int)this->stream->metronom->get_option(this->stream->metronom, XVDR_METRONOM_STILL_MODE);
227
    int still_mode  = (int)this->stream->metronom->get_option(this->stream->metronom, XVDR_METRONOM_STILL_MODE);
228
    int trick_speed = (int)this->stream->metronom->get_option(this->stream->metronom, XVDR_METRONOM_TRICK_SPEED);
228
    int trick_speed = (int)this->stream->metronom->get_option(this->stream->metronom, XVDR_METRONOM_TRICK_SPEED);
229
    if (still_mode > 0 || trick_speed > 0) {
229
    if (still_mode > 0 || trick_speed > 0) {
230
      LOGMSG("Skipping new pts %"PRId64" (still=%d trickspeed=%d)", buf->pts, still_mode, trick_speed);
230
      LOGMSG("Skipping new pts %" PRId64 " (still=%d trickspeed=%d)", buf->pts, still_mode, trick_speed);
231
      return;
231
      return;
232
    }
232
    }
233
  }
233
  }
Lines 239-245 Link Here
239
239
240
    if (this->send_newpts || (this->last_pts[video] && abs(diff)>WRAP_THRESHOLD)) {
240
    if (this->send_newpts || (this->last_pts[video] && abs(diff)>WRAP_THRESHOLD)) {
241
241
242
      LOGVERBOSE("New PTS: %"PRId64" (%s)", buf->pts, video ? "VIDEO" : "AUDIO");
242
      LOGVERBOSE("New PTS: %" PRId64 " (%s)", buf->pts, video ? "VIDEO" : "AUDIO");
243
243
244
      if (this->buf_flag_seek) {
244
      if (this->buf_flag_seek) {
245
        _x_demux_control_newpts(this->stream, buf->pts, BUF_FLAG_SEEK);
245
        _x_demux_control_newpts(this->stream, buf->pts, BUF_FLAG_SEEK);
(-)vdr-xineliboutput/xine/vo_lastpts.c (-1 / +1 lines)
Lines 83-89 Link Here
83
    if (this->xvdr_metronom) {
83
    if (this->xvdr_metronom) {
84
      ASSERT_RET(this->xvdr_metronom->set_option, return);
84
      ASSERT_RET(this->xvdr_metronom->set_option, return);
85
85
86
      LOGVERBOSE("last pts %"PRId64, vo_img->pts);
86
      LOGVERBOSE("last pts %" PRId64, vo_img->pts);
87
87
88
      this->xvdr_metronom->set_option(this->xvdr_metronom, XVDR_METRONOM_LAST_VO_PTS, vo_img->pts);
88
      this->xvdr_metronom->set_option(this->xvdr_metronom, XVDR_METRONOM_LAST_VO_PTS, vo_img->pts);
89
    }
89
    }
(-)vdr-xineliboutput/xine/xvdr_metronom.c (-4 / +4 lines)
Lines 37-47 Link Here
37
    int64_t dv = this->vid_pts - this->disc_pts;
37
    int64_t dv = this->vid_pts - this->disc_pts;
38
    int64_t d_min = min64(da, dv);
38
    int64_t d_min = min64(da, dv);
39
    LOGMSG("  stream A-V diff %d ms", (int)(this->vid_pts - this->aud_pts)/90);
39
    LOGMSG("  stream A-V diff %d ms", (int)(this->vid_pts - this->aud_pts)/90);
40
    LOGMSG("  reported stream start at pts %"PRId64, this->disc_pts);
40
    LOGMSG("  reported stream start at pts %" PRId64, this->disc_pts);
41
    LOGMSG("  output fifo end at: audio %"PRId64" video %"PRId64, this->aud_pts, this->vid_pts);
41
    LOGMSG("  output fifo end at: audio %" PRId64 " video %" PRId64, this->aud_pts, this->vid_pts);
42
    LOGMSG("  dA %"PRId64" dV %"PRId64, da, dv);
42
    LOGMSG("  dA %" PRId64 " dV %" PRId64, da, dv);
43
    if (d_min < 0 && d_min > -10*90000) {
43
    if (d_min < 0 && d_min > -10*90000) {
44
      LOGMSG("  *** output is late %"PRId64" ticks (%"PRId64" ms) ***", d_min, -d_min/90);
44
      LOGMSG("  *** output is late %" PRId64 " ticks (%" PRId64 " ms) ***", d_min, -d_min/90);
45
      this->scr->jump(this->scr, d_min);
45
      this->scr->jump(this->scr, d_min);
46
    }
46
    }
47
    this->buffering = 0;
47
    this->buffering = 0;
(-)vdr-xineliboutput/xine_input_vdr.c (-2 / +2 lines)
Lines 3963-3969 Link Here
3963
  }
3963
  }
3964
3964
3965
  if (this->discard_index != this->curpos) {
3965
  if (this->discard_index != this->curpos) {
3966
    LOGMSG("wait_stream_sync: discard_index %"PRIu64" != curpos %"PRIu64" ! (diff %"PRId64")",
3966
    LOGMSG("wait_stream_sync: discard_index %"PRIu64" != curpos %"PRIu64" ! (diff %" PRId64 ")",
3967
           this->discard_index, this->curpos, (int64_t)(this->discard_index - this->curpos));
3967
           this->discard_index, this->curpos, (int64_t)(this->discard_index - this->curpos));
3968
  }
3968
  }
3969
3969
Lines 3983-3989 Link Here
3983
    errno = EINTR;
3983
    errno = EINTR;
3984
  }
3984
  }
3985
  else if (counter <= 0) {
3985
  else if (counter <= 0) {
3986
    LOGMSG("wait_stream_sync: Timed out ! diff %"PRId64,
3986
    LOGMSG("wait_stream_sync: Timed out ! diff %" PRId64,
3987
           (int64_t)(this->discard_index - this->discard_index_ds));
3987
           (int64_t)(this->discard_index - this->discard_index_ds));
3988
    errno = EAGAIN;
3988
    errno = EAGAIN;
3989
  }
3989
  }

Return to bug 256818