Add AudioEngine with new implementation
Change-Id: I5eebe662ecbce9814ed3e763db56df9be737d11f Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
@@ -74,7 +74,7 @@ class QSampleCache;
|
||||
class QWaveDecoder;
|
||||
|
||||
// Lives in application thread
|
||||
class QSample : public QObject
|
||||
class Q_MULTIMEDIA_EXPORT QSample : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -127,17 +127,23 @@ private:
|
||||
int m_ref;
|
||||
};
|
||||
|
||||
class QSampleCache
|
||||
class Q_MULTIMEDIA_EXPORT QSampleCache : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
friend class QSample;
|
||||
|
||||
QSampleCache();
|
||||
QSampleCache(QObject *parent = 0);
|
||||
~QSampleCache();
|
||||
|
||||
QSample* requestSample(const QUrl& url);
|
||||
void setCapacity(qint64 capacity);
|
||||
|
||||
bool isLoading() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void isLoadingChanged();
|
||||
|
||||
private:
|
||||
QMap<QUrl, QSample*> m_samples;
|
||||
QSet<QSample*> m_staleSamples;
|
||||
@@ -152,6 +158,10 @@ private:
|
||||
bool notifyUnreferencedSample(QSample* sample);
|
||||
void removeUnreferencedSample(QSample* sample);
|
||||
void unloadSample(QSample* sample);
|
||||
|
||||
void loadingRelease();
|
||||
int m_loadingRefCount;
|
||||
QMutex m_loadingMutex;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user