forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use PacketBuffer instead of a simple blocking queue
rename AVThread.packetQueue()?
- Loading branch information
Showing
7 changed files
with
19 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2012-2013 Wang Bin <[email protected]> | ||
Copyright (C) 2012-2015 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
|
@@ -25,14 +25,11 @@ | |
#include <QtCore/QRunnable> | ||
#include <QtCore/QScopedPointer> | ||
#include <QtCore/QThread> | ||
#include "QtAV/Packet.h" | ||
#include "utils/BlockingQueue.h" | ||
#include "PacketBuffer.h" | ||
//TODO: pause functions. AVOutput may be null, use AVThread's pause state | ||
|
||
namespace QtAV { | ||
|
||
typedef BlockingQueue<Packet, QQueue> PacketQueue; | ||
|
||
class AVDecoder; | ||
class AVThreadPrivate; | ||
class AVOutput; | ||
|
@@ -55,8 +52,7 @@ class AVThread : public QThread | |
void setClock(AVClock *clock); | ||
AVClock* clock() const; | ||
|
||
//void setPacketQueue(PacketQueue *queue); | ||
PacketQueue* packetQueue() const; | ||
PacketBuffer* packetQueue() const; | ||
|
||
void setDecoder(AVDecoder *decoder); | ||
AVDecoder *decoder() const; | ||
|
@@ -79,7 +75,6 @@ class AVThread : public QThread | |
|
||
// TODO: resample, resize task etc. | ||
void scheduleTask(QRunnable *task); | ||
|
||
//only decode video without display or skip decode audio until pts reaches | ||
void skipRenderUntil(qreal pts); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2012-2013 Wang Bin <[email protected]> | ||
Copyright (C) 2012-2015 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
|
@@ -24,11 +24,8 @@ | |
|
||
#include <QtCore/QMutex> | ||
#include <QtCore/QMutexLocker> | ||
#include <QtCore/QQueue> | ||
#include <QtCore/QWaitCondition> | ||
#include "QtAV/Packet.h" | ||
#include "utils/BlockingQueue.h" | ||
//#include "AVThread.h" //PacketQueue | ||
#include "PacketBuffer.h" | ||
|
||
class QRunnable; | ||
namespace QtAV { | ||
|
@@ -65,7 +62,7 @@ class AVThreadPrivate : public DPtrPrivate<AVThread> | |
bool demux_end; | ||
volatile bool stop; //true when packets is empty and demux is end. | ||
AVClock *clock; | ||
BlockingQueue<Packet, QQueue> packets; | ||
PacketBuffer packets; | ||
AVDecoder *dec; | ||
OutputSet *outputSet; | ||
QMutex mutex; | ||
|