summaryrefslogtreecommitdiff
path: root/src/player.cc
diff options
context:
space:
mode:
authordeva <deva>2005-04-19 10:15:17 +0000
committerdeva <deva>2005-04-19 10:15:17 +0000
commit322d53169f05269c6150019cb7fc7cd85c024cc8 (patch)
tree565bb2175a468c7c3214ffb7a52aa5a66130cb9e /src/player.cc
parente5d332d18f5211920dbc5db02560512a128db3c0 (diff)
Added dv1394 object
Diffstat (limited to 'src/player.cc')
-rw-r--r--src/player.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/player.cc b/src/player.cc
index 88566e1..085f4df 100644
--- a/src/player.cc
+++ b/src/player.cc
@@ -91,9 +91,16 @@ void Player::player()
SDL_Rect rect;
Frame *frame;
// AVPicture pict;
- unsigned char pixel_buffer[720 * 576][3];
+ unsigned char pixel_buffer[720 * 576 * 3];
+ unsigned char *pxs[3];
int pitches[3];
+ pitches[0] = 720 * 2;
+ pxs[0] = pixel_buffer;
+ pxs[1] = pixel_buffer;
+ pxs[2] = pixel_buffer;
+
+
int i;
struct timespec ts;
@@ -113,7 +120,7 @@ void Player::player()
}
*/
dv_decoder_t *decoder = NULL;
- decoder = dv_decoder_new(FALSE, TRUE, TRUE);
+ decoder = dv_decoder_new(FALSE, FALSE, TRUE);
decoder->quality = DV_QUALITY_BEST;
while(*running) {
@@ -145,20 +152,17 @@ void Player::player()
// libdv img decode
- SDL_LockYUVOverlay(overlay);
-
dv_decode_full_frame(decoder,
(const uint8_t*)frame->data,
e_dv_color_yuv,
- overlay->pixels,
+ pxs,
pitches);
+ SDL_LockYUVOverlay(overlay);
overlay->pitches[0] = pitches[0];
overlay->pitches[1] = pitches[1];
overlay->pitches[2] = pitches[2];
-
- // SDL_LockYUVOverlay(overlay);
- // overlay->pixels = (Uint8**)pixel_buffer;
+ overlay->pixels = pxs;
SDL_UnlockYUVOverlay(overlay);
SDL_DisplayYUVOverlay(overlay, &rect);
// delete f;