summaryrefslogtreecommitdiff
path: root/client/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/player.cc')
-rw-r--r--client/player.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/client/player.cc b/client/player.cc
index 44e9cc9..dc3002d 100644
--- a/client/player.cc
+++ b/client/player.cc
@@ -34,25 +34,21 @@ Player::Player(QWidget *w, Decoder *d) :
{
widget = w;
decoder = d;
- dvdecoder = new LibDVWrapper(DV::ColorBest, DV::PAL, DV::YUV_422);
connect(this, SIGNAL(timeout()), this, SLOT(show_frame()));
-
- dvdecoder->setOutputBuffer(render.getDisplayData());
+ decoder->setPFrameData(render.getDisplayData());
}
Player::~Player()
{
- delete dvdecoder;
+ // delete dvdecoder;
}
void Player::show_frame()
{
- char *frame;
+ // char *frame;
- frame = decoder->pframeAcquire(); // Acquire frame data
- dvdecoder->decode(frame); // Decode the DV frame to YUV
- decoder->pframeRelease(); // Release frame data
+ decoder->pframeAcquire(); // Acquire frame data
// Scale the video in aspect:
if((double)widget->width() / WIDTH < (double)widget->height() / HEIGHT) {
@@ -65,4 +61,6 @@ void Player::show_frame()
// Display the YUV frame
render.display(WIDTH, HEIGHT);
+
+ decoder->pframeRelease(); // Release frame data
}