diff options
Diffstat (limited to 'client')
| -rw-r--r-- | client/player.cc | 34 | ||||
| -rw-r--r-- | client/player.h | 12 | 
2 files changed, 4 insertions, 42 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(); diff --git a/client/player.h b/client/player.h index 824e2c0..723fc33 100644 --- a/client/player.h +++ b/client/player.h @@ -37,10 +37,7 @@  #include <X11/Xlib.h>  #include <X11/extensions/Xvlib.h> -//#include "libdv_wrapper.h" -// Use libdv -#include <libdv/dv.h> -#include <libdv/dv_types.h> +#include "libdv_wrapper.h"  #include "xvaccelrenderer.h" @@ -55,12 +52,7 @@ public slots:    void show_frame();  private: -  int pitches[3]; -  unsigned char* yuv[3]; - -  //  LibDVWrapper dvdecoder; -  dv_decoder_t *dvdecoder; - +  LibDVWrapper dvdecoder;    Decoder *decoder;    QWidget *widget; | 
