mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-24 14:42:53 +02:00
Style fixes
This commit is contained in:
@@ -22,9 +22,8 @@
|
||||
#ifndef AUDIOOUTPUT_H
|
||||
#define AUDIOOUTPUT_H
|
||||
|
||||
#include "../Typedefs.h"
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
#include "utils/MediaStream.h"
|
||||
|
||||
#include <functional>
|
||||
@@ -41,24 +40,24 @@ Q_OBJECT
|
||||
public:
|
||||
enum AudioState { Stopped = 0, Playing = 1, Paused = 2, Error = 3, Loading = 4, Buffering = 5 };
|
||||
|
||||
explicit AudioOutput(QObject* parent = 0);
|
||||
explicit AudioOutput( QObject* parent = nullptr );
|
||||
~AudioOutput();
|
||||
|
||||
AudioState state();
|
||||
|
||||
void setCurrentSource( const QUrl& stream);
|
||||
void setCurrentSource( QIODevice* stream);
|
||||
void setCurrentSource( const QUrl& stream );
|
||||
void setCurrentSource( QIODevice* stream );
|
||||
void setCurrentSource( MediaStream* stream );
|
||||
|
||||
void play();
|
||||
void pause();
|
||||
void stop();
|
||||
void seek(qint64 milliseconds);
|
||||
void seek( qint64 milliseconds );
|
||||
|
||||
bool isSeekable();
|
||||
bool isMuted();
|
||||
void setMuted(bool m);
|
||||
void setVolume(qreal vol);
|
||||
void setMuted( bool m );
|
||||
void setVolume( qreal vol );
|
||||
qreal volume();
|
||||
qint64 currentTime();
|
||||
qint64 totalTime();
|
||||
|
@@ -30,8 +30,7 @@ static QString s_aeInfoIdentifier = QString( "MEDIASTREAM" );
|
||||
MediaStream::MediaStream( QObject* parent )
|
||||
: QObject( parent )
|
||||
, m_type( Unknown )
|
||||
, m_url( QUrl() )
|
||||
, m_ioDevice ( 0 )
|
||||
, m_ioDevice ( nullptr )
|
||||
, m_started( false )
|
||||
, m_bufferingFinished( false )
|
||||
, m_eos( false )
|
||||
@@ -39,14 +38,14 @@ MediaStream::MediaStream( QObject* parent )
|
||||
, m_streamSize( 0 )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
MediaStream::MediaStream( const QUrl &url )
|
||||
: QObject( 0 )
|
||||
, m_type( Url )
|
||||
, m_ioDevice ( 0 )
|
||||
, m_url( url )
|
||||
, m_ioDevice ( nullptr )
|
||||
, m_started( false )
|
||||
, m_bufferingFinished( false )
|
||||
, m_eos( false )
|
||||
@@ -54,16 +53,13 @@ MediaStream::MediaStream( const QUrl &url )
|
||||
, m_streamSize( 0 )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
|
||||
m_url = url;
|
||||
}
|
||||
|
||||
|
||||
MediaStream::MediaStream( QIODevice* device )
|
||||
: QObject( 0 )
|
||||
, m_type( IODevice )
|
||||
, m_url( QUrl() )
|
||||
, m_ioDevice ( 0 )
|
||||
, m_ioDevice ( device )
|
||||
, m_started( false )
|
||||
, m_bufferingFinished( false )
|
||||
, m_eos( false )
|
||||
@@ -72,7 +68,6 @@ MediaStream::MediaStream( QIODevice* device )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
|
||||
m_ioDevice = device;
|
||||
QObject::connect( m_ioDevice, SIGNAL( readChannelFinished() ), this, SLOT( bufferingFinished() ) );
|
||||
}
|
||||
|
||||
|
@@ -21,13 +21,10 @@
|
||||
#ifndef MEDIASTREAM_H
|
||||
#define MEDIASTREAM_H
|
||||
|
||||
#include "../Typedefs.h"
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
#include "utils/Logger.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
#include <QIODevice>
|
||||
|
||||
@@ -38,7 +35,7 @@ class DLLEXPORT MediaStream : public QObject
|
||||
public:
|
||||
enum MediaType { Unknown = -1, Empty = 0, Url = 1, Stream = 2, IODevice = 3 };
|
||||
|
||||
MediaStream( QObject* parent = 0 );
|
||||
MediaStream( QObject* parent = nullptr );
|
||||
explicit MediaStream( const QUrl &url );
|
||||
explicit MediaStream( QIODevice* device );
|
||||
virtual ~MediaStream();
|
||||
@@ -74,7 +71,7 @@ protected:
|
||||
|
||||
char m_buffer[1048576];
|
||||
private:
|
||||
Q_DISABLE_COPY( MediaStream );
|
||||
Q_DISABLE_COPY( MediaStream )
|
||||
};
|
||||
|
||||
#endif // MEDIASTREAM_H
|
||||
|
Reference in New Issue
Block a user