diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-01-15 13:51:10 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-01-15 13:51:10 +0000 |
commit | c2fab8bca1738d1ac988c488085ff798321f878d (patch) | |
tree | e62634ed6352806f03bc46ed166b80e278ba729d | |
parent | 89bb410ff3c1b157f59aafa903b04f8e123340ee (diff) | |
download | xine-lib-c2fab8bca1738d1ac988c488085ff798321f878d.tar.gz xine-lib-c2fab8bca1738d1ac988c488085ff798321f878d.tar.bz2 |
small fixes and cleanups, metronom wasn't told the frame rate of next stream in playlist
CVS patchset: 1407
CVS date: 2002/01/15 13:51:10
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 8 | ||||
-rw-r--r-- | src/xine-engine/metronom.c | 17 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 3 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 4 |
4 files changed, 18 insertions, 14 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 2b14fab06..820e4a1fa 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.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_mpeg_block.c,v 1.72 2002/01/05 18:14:27 jcdutton Exp $ + * $Id: demux_mpeg_block.c,v 1.73 2002/01/15 13:51:10 guenter Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -65,7 +65,8 @@ } #endif -#define NUM_PREVIEW_BUFFERS 250 +#define NUM_PREVIEW_BUFFERS 250 +#define DISC_TRESHOLD 90000 typedef struct demux_mpeg_block_s { demux_plugin_t demux_plugin; @@ -283,9 +284,8 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m printf ("demux_mpeg_block: scr %d last_scr %d diff %d\n", scr, this->last_scr, scr_diff); #endif - - if (abs(scr_diff) > 60000) { + if (abs(scr_diff) > DISC_TRESHOLD) { buf_element_t *buf; diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index e3e34b052..1226da399 100644 --- a/src/xine-engine/metronom.c +++ b/src/xine-engine/metronom.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: metronom.c,v 1.49 2002/01/14 00:34:22 guenter Exp $ + * $Id: metronom.c,v 1.50 2002/01/15 13:51:10 guenter Exp $ */ #ifdef HAVE_CONFIG_H @@ -69,9 +69,9 @@ } #endif -/* + #define METRONOM_LOG -*/ + /* * **************************************** @@ -261,8 +261,8 @@ static void metronom_video_stream_start (metronom_t *this) { return; } - this->pts_per_frame = 3000; - this->avg_frame_duration = 3000; + /*this->pts_per_frame = 3000; */ + this->avg_frame_duration = this->pts_per_frame; this->video_vpts = PREBUFFER_PTS_OFFSET; @@ -393,6 +393,8 @@ static void metronom_audio_stream_end (metronom_t *this) { static void metronom_set_video_rate (metronom_t *this, uint32_t pts_per_frame) { pthread_mutex_lock (&this->lock); + printf ("metronom: set_video_rate %d\n", pts_per_frame); + this->pts_per_frame = pts_per_frame; this->avg_frame_duration = this->pts_per_frame; @@ -953,8 +955,9 @@ metronom_t * metronom_init (int have_audio, void *xine) { pthread_cond_init (&this->video_discontinuity_reached, NULL); pthread_cond_init (&this->audio_discontinuity_reached, NULL); - this->av_offset = 0; - this->have_audio = have_audio; + this->av_offset = 0; + this->have_audio = have_audio; + this->pts_per_frame = 3600; return this; } diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index f5a13d71d..a66f6111b 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.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_out.c,v 1.65 2002/01/14 00:34:22 guenter Exp $ + * $Id: video_out.c,v 1.66 2002/01/15 13:51:10 guenter Exp $ * */ @@ -526,6 +526,7 @@ static void vo_open (vo_instance_t *this) { if (!this->video_loop_running) { this->video_loop_running = 1; this->decoder_started_flag = 0; + this->pts_per_frame = 0; pthread_attr_init(&pth_attrs); pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM); diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index a9909dc67..536ac4f25 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.97 2002/01/09 22:33:04 jcdutton Exp $ + * $Id: xine.c,v 1.98 2002/01/15 13:51:10 guenter Exp $ * * top-level xine functions * @@ -148,7 +148,7 @@ void xine_stop_internal (xine_t *this) { LOG_MSG(this, _("xine_stop\n")); - xine_internal_osd (this, "}", this->metronom->get_current_time (this->metronom), 30000); + /* xine_internal_osd (this, "}", this->metronom->get_current_time (this->metronom), 30000); never works */ if (this->status == XINE_STOP) { LOG_MSG(this, _("xine_stop ignored\n")); |