diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-05-24 15:31:30 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-05-24 15:31:30 +0000 |
commit | df2eb164e1af3a7f267ce5fc42578b3816eb15fb (patch) | |
tree | 58ab86a1bd3a3927bb0f4d495ab3a0c3d3217f25 /src | |
parent | 103c9964e7b2c81a2d7c073a92c46ee3d2b046d1 (diff) | |
download | xine-lib-df2eb164e1af3a7f267ce5fc42578b3816eb15fb.tar.gz xine-lib-df2eb164e1af3a7f267ce5fc42578b3816eb15fb.tar.bz2 |
first sloppy frames and audio
CVS patchset: 78
CVS date: 2001/05/24 15:31:30
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_mpeg.c | 8 | ||||
-rw-r--r-- | src/libmpeg2/decode.c | 4 | ||||
-rw-r--r-- | src/xine-engine/audio_decoder.c | 12 | ||||
-rw-r--r-- | src/xine-engine/buffer.c | 4 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 16 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 14 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 6 |
7 files changed, 23 insertions, 41 deletions
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index f42bc2b4e..72ff2ca92 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.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.c,v 1.9 2001/05/07 03:40:35 f1rmb Exp $ + * $Id: demux_mpeg.c,v 1.10 2001/05/24 15:31:30 guenter Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -495,16 +495,12 @@ static void demux_mpeg_start (demux_plugin_t *this_gen, this->status = DEMUX_OK; - printf ("demux_mpeg: seek...\n"); - if ((this->input->get_capabilities (this->input) & INPUT_CAP_SEEKABLE) != 0 ) { xprintf (VERBOSE|DEMUX, "=>seek to %Ld\n",pos); this->input->seek (this->input, pos+4, SEEK_SET); } else read_bytes(this, 4); - printf ("demux_mpeg: create start packages...\n"); - buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); buf->type = BUF_CONTROL_START; this->video_fifo->put (this->video_fifo, buf); @@ -512,8 +508,6 @@ static void demux_mpeg_start (demux_plugin_t *this_gen, buf->type = BUF_CONTROL_START; this->audio_fifo->put (this->audio_fifo, buf); - printf ("demux_mpeg: create thread...\n"); - pthread_create (&this->thread, NULL, demux_mpeg_loop, this) ; } diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index ee32e934f..ce0d97643 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -183,11 +183,11 @@ static int parse_chunk (mpeg2dec_t * mpeg2dec, int code, uint8_t * buffer, uint3 (picture->second_field)) { if (picture->picture_coding_type == B_TYPE) { picture->throwaway_frame->bFrameBad = !mpeg2dec->drop_frame; - picture->throwaway_frame->draw (picture->throwaway_frame); + picture->throwaway_frame->draw (picture->throwaway_frame); picture->throwaway_frame->free (picture->throwaway_frame); } else { picture->forward_reference_frame->bFrameBad = !mpeg2dec->drop_frame; - picture->forward_reference_frame->draw (picture->forward_reference_frame); + picture->forward_reference_frame->draw (picture->forward_reference_frame); } bFlipPage = 1; } else diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 209aef15c..d34b8397a 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_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: audio_decoder.c,v 1.7 2001/05/01 00:55:23 guenter Exp $ + * $Id: audio_decoder.c,v 1.8 2001/05/24 15:31:31 guenter Exp $ * * * functions that implement audio decoding @@ -69,7 +69,7 @@ void *audio_decoder_loop (void *this_gen) { case BUF_AUDIO_LPCM: case BUF_AUDIO_AVI: - printf ("audio_decoder: got an audio buffer, type %08x\n", buf->type); + /* printf ("audio_decoder: got an audio buffer, type %08x\n", buf->type); */ /* update track map */ @@ -79,7 +79,7 @@ void *audio_decoder_loop (void *this_gen) { if ( (i==this->audio_track_map_entries) || (this->audio_track_map[i] != buf->type) ) { - printf ("audio_decoder: inserting audio type %08x into track map\n", buf->type); + /* printf ("audio_decoder: inserting audio type %08x into track map\n", buf->type); */ j = this->audio_track_map_entries; while (j>i) { @@ -90,7 +90,7 @@ void *audio_decoder_loop (void *this_gen) { this->audio_track_map_entries++; if (i<=this->audio_channel) { - printf ("audio_decoder: resetting audio decoder because of new channel\n"); + /* printf ("audio_decoder: resetting audio decoder because of new channel\n"); */ if (this->cur_audio_decoder_plugin) { this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin); @@ -105,7 +105,7 @@ void *audio_decoder_loop (void *this_gen) { int streamtype = (buf->type>>16) & 0xFF; - printf ("audio_decoder_c: buffer is from the right track => decode it\n"); + /* printf ("audio_decoder_c: buffer is from the right track => decode it\n"); */ decoder = this->audio_decoder_plugins [streamtype]; @@ -166,8 +166,6 @@ void audio_decoder_init (xine_t *this) { this->audio_fifo = fifo_buffer_new (1500, 4096); pthread_create (&this->audio_thread, NULL, audio_decoder_loop, this) ; - - printf ("audio_decoder_init: audio thread created\n"); } void audio_decoder_shutdown (xine_t *this) { diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c index 0af1cf02a..6ad5d9f4d 100644 --- a/src/xine-engine/buffer.c +++ b/src/xine-engine/buffer.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: buffer.c,v 1.3 2001/04/30 21:55:27 guenter Exp $ + * $Id: buffer.c,v 1.4 2001/05/24 15:31:31 guenter Exp $ * * * contents: @@ -142,7 +142,7 @@ static void fifo_buffer_clear (fifo_buffer_t *fifo) { if (fifo->first==NULL) fifo->last = NULL; - buffer_pool_free (buf); + buf->free_buffer(buf); } pthread_mutex_unlock (&fifo->mutex); diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index ebf38ded2..a7ac3a3a5 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_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: video_decoder.c,v 1.12 2001/05/22 23:07:49 guenter Exp $ + * $Id: video_decoder.c,v 1.13 2001/05/24 15:31:31 guenter Exp $ * */ @@ -37,19 +37,13 @@ void *video_decoder_loop (void *this_gen) { while (running) { - printf ("video_decoder: get buffer\n"); - buf = this->video_fifo->get (this->video_fifo); - printf ("video_decoder: processing buffer\n"); - /* gVD.mnCurInputPos = pBuf->nInputPos; */ switch (buf->type) { case BUF_CONTROL_START: - printf ("video_decoder: found start of stream\n"); - if (this->cur_video_decoder_plugin) { this->cur_video_decoder_plugin->close (this->cur_video_decoder_plugin); this->cur_video_decoder_plugin = NULL; @@ -66,14 +60,10 @@ void *video_decoder_loop (void *this_gen) { streamtype = (buf->type>>16) & 0xFF; - printf ("video_decoder: processing buffer type= %08x (%02x), size=%d\n", buf->type,streamtype, buf->size); - decoder = this->video_decoder_plugins [streamtype]; if (decoder) { - printf ("video_decoder: decoder found.\n"); - if (this->cur_video_decoder_plugin != decoder) { if (this->cur_video_decoder_plugin) @@ -84,15 +74,13 @@ void *video_decoder_loop (void *this_gen) { } - decoder->decode_data (this->cur_video_decoder_plugin, buf); + decoder->decode_data (this->cur_video_decoder_plugin, buf); } break; case BUF_CONTROL_END: - printf ("video_decoder: found end of stream\n"); - if (this->cur_video_decoder_plugin) { this->cur_video_decoder_plugin->close (this->cur_video_decoder_plugin); this->cur_video_decoder_plugin = NULL; diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index f8d2da8fc..1b272b3eb 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.5 2001/05/22 23:07:49 guenter Exp $ + * $Id: video_out.c,v 1.6 2001/05/24 15:31:31 guenter Exp $ * */ @@ -148,7 +148,6 @@ static void *video_out_loop (void *this_gen) { signal (SIGALRM, video_timer_handler); - video_step = this->metronom->get_video_rate (this->metronom); vo_set_timer (video_step); @@ -166,7 +165,7 @@ static void *video_out_loop (void *this_gen) { cur_pts = this->metronom->get_current_time (this->metronom); - xprintf (VERBOSE|VIDEO, "video_out : vo_video_out called at audio pts %d\n", cur_pts); + xprintf (VERBOSE|VIDEO, "video_out : video loop iteration at audio pts %d\n", cur_pts); img = this->display_img_buf_queue->first; @@ -240,7 +239,7 @@ static void *video_out_loop (void *this_gen) { xprintf (VERBOSE|VIDEO, "video_out : passing to video driver, image with pts = %d\n", pts); - this->driver->display_frame (this->driver, img); + this->driver->display_frame (this->driver, img); } return NULL; } @@ -263,7 +262,7 @@ static vo_frame_t *vo_get_frame (vo_instance_t *this, vo_frame_t *img; - printf ("video_out: vo_get_frame\n"); + /* printf ("video_out: vo_get_frame\n"); */ if (this->pts_per_frame != duration) { this->pts_per_frame = duration; @@ -284,7 +283,7 @@ static vo_frame_t *vo_get_frame (vo_instance_t *this, pthread_mutex_unlock (&img->mutex); - printf ("video_out: vo_get_frame done\n"); + /* printf ("video_out: vo_get_frame done\n"); */ return img; } @@ -360,6 +359,8 @@ static int vo_frame_draw (vo_frame_t *img) { xprintf (VERBOSE|VIDEO,"video_out: got image. vpts for picture is %d\n", pic_vpts); + /* printf ("video_out: got image. vpts for picture is %d\n", pic_vpts); */ + cur_vpts = this->metronom->get_current_time(this->metronom); diff = pic_vpts - cur_vpts; @@ -373,6 +374,7 @@ static int vo_frame_draw (vo_frame_t *img) { this->num_frames_discarded++; xprintf (VERBOSE|VIDEO, "vo_frame_draw: rejected, %d frames to skip\n", frames_to_skip); + printf ("vo_frame_draw: rejected, %d frames to skip\n", frames_to_skip); return frames_to_skip; diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 0fab5e247..af1f9a119 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.5 2001/05/06 14:25:42 guenter Exp $ + * $Id: video_out.h,v 1.6 2001/05/24 15:31:31 guenter Exp $ * * * xine version of video_out.h @@ -128,8 +128,8 @@ struct vo_instance_s { int video_loop_running; pthread_t video_thread; - uint32_t pts_per_half_frame; - uint32_t pts_per_frame; + int pts_per_half_frame; + int pts_per_frame; int num_frames_delivered; int num_frames_skipped; |