summaryrefslogtreecommitdiff
path: root/src/player.cc
diff options
context:
space:
mode:
authordeva <deva>2005-04-19 19:16:19 +0000
committerdeva <deva>2005-04-19 19:16:19 +0000
commite135953b099687f39fc03557f901fdec00903d35 (patch)
tree7ed460d67ffef3588b0abf524b433d3dd7b92848 /src/player.cc
parent6e952aa069f0a78d6f784d4c132969a2bb63acb7 (diff)
some experiments with the dc decoder-
Diffstat (limited to 'src/player.cc')
-rw-r--r--src/player.cc24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/player.cc b/src/player.cc
index df9668e..5573b79 100644
--- a/src/player.cc
+++ b/src/player.cc
@@ -90,7 +90,7 @@ void Player::player()
SDL_Event event;
SDL_Rect rect;
Frame *frame;
- // AVPicture pict;
+
// unsigned char pixel_buffer[720 * 576 * 3];
unsigned char *pxs[3];
int pitches[3];
@@ -106,16 +106,15 @@ void Player::player()
rect.w = DISPLAYWIDTH;
rect.h = DISPLAYHEIGHT;
- //+++++Reference to the overlay pixels/pitches, only after creating a new overlay+++++
- // ?????????
+ // Reference to the overlay pixels/pitches.
for(i = 0; i < 3; i++) {
pxs[i] = overlay->pixels[i];
pitches[i] = overlay->pitches[i];
}
- dv_decoder_t *decoder = NULL;
- decoder = dv_decoder_new(FALSE, FALSE, TRUE);
- decoder->quality = DV_QUALITY_BEST;
+ dv_decoder_t *decoder = dv_decoder_new(0/*this value is unused*/, FALSE, FALSE);
+ decoder->quality = DV_QUALITY_BEST;
+ //decoder->system = e_dv_system_625_50;
while(*running) {
// Wait for the semaphore to be free... then run
@@ -141,18 +140,21 @@ void Player::player()
pthread_mutex_unlock(mutex);
if(!frame) break;
+ fprintf(stderr, "[%d]", dv_is_PAL(decoder)); fflush(stderr);
+ SDL_LockYUVOverlay(overlay);
+
// libdv img decode
dv_decode_full_frame(decoder,
- (const uint8_t*)frame->data,
+ frame->data,
e_dv_color_yuv,
pxs,
pitches);
- SDL_LockYUVOverlay(overlay);
- overlay->pixels = pxs;
+ dv_report_video_error(decoder, frame->data);
+ // overlay->pixels = pxs;
SDL_UnlockYUVOverlay(overlay);
SDL_DisplayYUVOverlay(overlay, &rect);
- // delete f;
+ // delete frame;
break;
case SDL_QUIT:
@@ -173,7 +175,7 @@ void Player::player()
pthread_mutex_lock(mutex);
frame = queue->pop();
pthread_mutex_unlock(mutex);
- // if(f) delete f;
+ // if(frame) delete frame;
}
void Player::run()