diff options
author | deva <deva> | 2005-04-18 09:27:57 +0000 |
---|---|---|
committer | deva <deva> | 2005-04-18 09:27:57 +0000 |
commit | e5d332d18f5211920dbc5db02560512a128db3c0 (patch) | |
tree | 03a79ced594e93d0fe28e94f594c652b774a9116 /src | |
parent | a33c36fa2c1af21252a3afce45b96e0b02923c90 (diff) |
libdv decoder in player now initialized for PAL
Diffstat (limited to 'src')
-rw-r--r-- | src/encoder.cc | 4 | ||||
-rw-r--r-- | src/player.cc | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/encoder.cc b/src/encoder.cc index a762c99..714ee81 100644 --- a/src/encoder.cc +++ b/src/encoder.cc @@ -94,8 +94,8 @@ void Encoder::encode() n->sendPackage(&h, f->data, f->size); - free(f->data); - delete f; + // free(f->data); + // delete f; } } pthread_exit(NULL); diff --git a/src/player.cc b/src/player.cc index 12c8c17..88566e1 100644 --- a/src/player.cc +++ b/src/player.cc @@ -113,10 +113,8 @@ void Player::player() } */ dv_decoder_t *decoder = NULL; - decoder = dv_decoder_new(FALSE, FALSE, FALSE); + decoder = dv_decoder_new(FALSE, TRUE, TRUE); decoder->quality = DV_QUALITY_BEST; - decoder->clamp_luma = FALSE; - decoder->clamp_chroma = FALSE; while(*running) { // Wait for the semaphore to be free... then run @@ -145,17 +143,19 @@ void Player::player() // img_convert(&pict, PIX_FMT_YUV420P, (AVPicture *)f->frame, // PIX_FMT_YUV420P, DISPLAYWIDTH, DISPLAYHEIGHT); - SDL_LockYUVOverlay(overlay); + // libdv img decode + SDL_LockYUVOverlay(overlay); + dv_decode_full_frame(decoder, (const uint8_t*)frame->data, e_dv_color_yuv, overlay->pixels, pitches); - overlay->pitches[0] = picthes[0]; - overlay->pitches[1] = picthes[1]; - overlay->pitches[2] = picthes[2]; + overlay->pitches[0] = pitches[0]; + overlay->pitches[1] = pitches[1]; + overlay->pitches[2] = pitches[2]; // SDL_LockYUVOverlay(overlay); // overlay->pixels = (Uint8**)pixel_buffer; |