diff options
author | deva <deva> | 2005-04-15 08:59:46 +0000 |
---|---|---|
committer | deva <deva> | 2005-04-15 08:59:46 +0000 |
commit | 34c282721b819e419f378f64b6440fc65461321e (patch) | |
tree | 4e01baaa12fdcd523499b4bc569f6eccd14c1edc /src | |
parent | 0b9c28379907141a39b6a9abf49dd2db784277b6 (diff) |
a little more dv decoding working (shows green)
Diffstat (limited to 'src')
-rw-r--r-- | src/player.cc | 16 |
1 files 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; |