From 34c282721b819e419f378f64b6440fc65461321e Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 15 Apr 2005 08:59:46 +0000 Subject: a little more dv decoding working (shows green) --- src/player.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/player.cc b/src/player.cc index 2a08dc1..1f00c19 100644 --- a/src/player.cc +++ b/src/player.cc @@ -91,8 +91,8 @@ void Player::player() SDL_Rect rect; Frame *frame; // AVPicture pict; - unsigned char pixel_buffer[720 * 576 * 3]; - int pitches[3]; + unsigned char pixel_buffer[720 * 576][3]; + // int pitches[3]; int i; struct timespec ts; @@ -112,7 +112,6 @@ void Player::player() pict.linesize[i] = overlay->pitches[i]; } */ - dv_decoder_t *decoder = NULL; decoder = dv_decoder_new(FALSE, FALSE, FALSE); decoder->quality = DV_QUALITY_BEST; @@ -145,16 +144,17 @@ void Player::player() // img_convert(&pict, PIX_FMT_YUV420P, (AVPicture *)f->frame, // PIX_FMT_YUV420P, DISPLAYWIDTH, DISPLAYHEIGHT); - + + SDL_LockYUVOverlay(overlay); // libdv img decode dv_decode_full_frame(decoder, (const uint8_t*)frame->data, e_dv_color_yuv, - (uint8_t**)pixel_buffer, - pitches); + overlay->pixels, + (int*)overlay->pitches); - SDL_LockYUVOverlay(overlay); - overlay->pixels = (Uint8**)pixel_buffer; + // SDL_LockYUVOverlay(overlay); + // overlay->pixels = (Uint8**)pixel_buffer; SDL_UnlockYUVOverlay(overlay); SDL_DisplayYUVOverlay(overlay, &rect); // delete f; -- cgit v1.2.3