diff options
author | deva <deva> | 2006-04-10 13:21:12 +0000 |
---|---|---|
committer | deva <deva> | 2006-04-10 13:21:12 +0000 |
commit | d90e7cb1937c4903fcfe5593a6a59be52763f235 (patch) | |
tree | 87836cf62b4ef884de953e2a1b67743451e8c72c /client/player.cc | |
parent | 582bcd19d6a58c266f5453961c87acf72fae5353 (diff) |
*** empty log message ***
Diffstat (limited to 'client/player.cc')
-rw-r--r-- | client/player.cc | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/client/player.cc b/client/player.cc index 1f789b9..1689dcf 100644 --- a/client/player.cc +++ b/client/player.cc @@ -32,7 +32,6 @@ //#define COLORSPACE_YV12 static int num = 0; -static bool first = true; Player::Player(QWidget *w, Decoder *d) { @@ -43,9 +42,7 @@ Player::Player(QWidget *w, Decoder *d) connect(this, SIGNAL(timeout()), this, SLOT(show_frame())); - dvdecoder = dv_decoder_new(FALSE/*this value is unused*/, FALSE, FALSE); - dv_set_quality(dvdecoder, DV_QUALITY_COLOR | DV_QUALITY_AC_1); - //dv_set_quality(dvdecoder, DV_QUALITY_BEST); + dvdecoder.setOutputBuffer(render.getDisplayData()); } Player::~Player() @@ -61,34 +58,7 @@ void Player::show_frame() frame = decoder->getFrame(); if(!frame) return; - if(first) { -#ifdef COLORSPACE_YV12 - yuv[0] = (unsigned char*)render.xvimage->data; - yuv[1] = (unsigned char*)yuv[0] + (WIDTH * HEIGHT); - yuv[2] = (unsigned char*)yuv[1] + (WIDTH * HEIGHT / 4); - pitches[0] = WIDTH; - pitches[1] = WIDTH / 2; - pitches[2] = WIDTH / 2; -#else - yuv[0] = (unsigned char*)render.getDisplayData(); // Decode directly to the XVideo buffer - pitches[0] = WIDTH * 2; -#endif - - dv_parse_header(dvdecoder, frame->data); - //dv_parse_packs(decoder, frame->data); // Not needed anyway! - - dvdecoder->system = e_dv_system_625_50; // PAL lines, PAL framerate - dvdecoder->sampling = e_dv_sample_422; // 4 bytes y, 2 bytes u, 2 bytes v - dvdecoder->std = e_dv_std_iec_61834; - dvdecoder->num_dif_seqs = 12; - first = false; - } - - dv_decode_full_frame(dvdecoder, - frame->data, - e_dv_color_yuv, - yuv, - pitches); + dvdecoder.decode((char*)frame->data); render.width = widget->width(); render.height = widget->height(); |