[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [Phonon] 292bded: Documentation and whitespace fixes in phonon
From: David Faure <faure () kde ! org>
Date: 2010-02-20 2:27:06
Message-ID: 201002200227.o1K2R6ok028811 () kore ! kollide ! net
[Download RAW message or body]
commit 292bded7339eb39d693b9baab176d912ca890a31
Author: David Faure <faure@kde.org>
Date: Thu Jul 16 16:44:55 2009 +0200
Documentation and whitespace fixes in phonon
- fix wrong copy/pasted comments (including the whole docs for isSeekable)
- make docs of Notifier more generic (there are 3 signals, not just one)
- untabify
Merge-request: 875
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
diff --git a/ds9/backend.cpp b/ds9/backend.cpp
index 245749a..2c56af7 100644
--- a/ds9/backend.cpp
+++ b/ds9/backend.cpp
@@ -50,7 +50,7 @@ namespace Phonon
Backend::Backend(QObject *parent, const QVariantList &)
: QObject(parent)
{
- ::CoInitialize(0);
+ ::CoInitialize(0);
//registering meta types
qRegisterMetaType<HRESULT>("HRESULT");
@@ -61,7 +61,7 @@ namespace Phonon
{
m_audioOutputs.clear();
m_audioEffects.clear();
- ::CoUninitialize();
+ ::CoUninitialize();
}
QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, \
const QList<QVariant> &args) @@ -216,7 +216,7 @@ namespace Phonon
LPOLESTR str = 0;
HRESULT hr = mon->GetDisplayName(0,0, &str);
if (SUCCEEDED(hr)) {
- QString name = QString::fromUtf16((unsigned short*)str);
+ QString name = QString::fromUtf16((unsigned short*)str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
diff --git a/ds9/mediaobject.cpp b/ds9/mediaobject.cpp
index 2867daa..d1e15c0 100644
--- a/ds9/mediaobject.cpp
+++ b/ds9/mediaobject.cpp
@@ -37,7 +37,7 @@ along with this library. If not, see \
<http://www.gnu.org/licenses/>.
#include <QtCore/QDebug>
-#define TIMER_INTERVAL 16 //... ms for the timer that polls the current state (we \
use the multimedia timer +#define TIMER_INTERVAL 16 //... ms for the timer that polls \
the current state (we use the multimedia timer) #define PRELOAD_TIME 2000 // 2 \
seconds to load a source
QT_BEGIN_NAMESPACE
@@ -90,7 +90,7 @@ namespace Phonon
DWORD result = ::WaitForMultipleObjects(count, handles, FALSE, \
INFINITE); if (result == WAIT_OBJECT_0) {
if (m_finished) {
- //that's the end if the thread execution
+ //that's the end of the thread execution
return;
}
@@ -251,7 +251,7 @@ namespace Phonon
hr = w.graph->RenderFile(reinterpret_cast<const wchar_t \
*>(w.url.utf16()), 0); }
if (hr != E_ABORT) {
- emit asyncRenderFinished(w.id, hr, w.graph);
+ emit asyncRenderFinished(w.id, hr, w.graph);
}
} else if (w.task == Seek) {
//that's a seekrequest
@@ -267,7 +267,7 @@ namespace Phonon
}
}
emit asyncSeekingFinished(w.id, currentTime);
- hr = E_ABORT; //to avoid emitting asyncRenderFinished
+ hr = E_ABORT; //to avoid emitting asyncRenderFinished
} else if (w.task == ChangeState) {
//remove useless decoders
@@ -343,10 +343,10 @@ namespace Phonon
}
}
- if (m_currentRender && m_currentRenderId == renderId) {
- m_currentRender->Abort();
- }
- }
+ if (m_currentRender && m_currentRenderId == renderId) {
+ m_currentRender->Abort();
+ }
+ }
//tells the thread to stop processing
void WorkerThread::signalStop()
@@ -384,13 +384,13 @@ namespace Phonon
{
for(int i = 0; i < FILTER_COUNT; ++i) {
- m_graphs[i] = new MediaGraph(this, i);
+ m_graphs[i] = new MediaGraph(this, i);
}
- connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)),
+ connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)),
SLOT(slotStateReady(Graph, Phonon::State)));
- connect(&m_thread, SIGNAL(eventReady(Graph, long, long)),
+ connect(&m_thread, SIGNAL(eventReady(Graph, long, long)),
SLOT(handleEvents(Graph, long, long)));
connect(&m_thread, SIGNAL(asyncRenderFinished(quint16, HRESULT, Graph)),
@@ -485,7 +485,7 @@ namespace Phonon
}
if (!m_aboutToFinishSent && remaining < PRELOAD_TIME - \
m_transitionTime + TIMER_INTERVAL/2) {
- //let's take a 2 seconds time time to actually load the next \
file + //let's take a 2 seconds time to actually load the next \
file #ifdef GRAPH_DEBUG
qDebug() << "DS9: emit aboutToFinish" << remaining << \
QTime::currentTime().toString(); #endif
@@ -583,7 +583,7 @@ namespace Phonon
{
#ifndef QT_NO_PHONON_MEDIACONTROLLER
//1st, check if there is more titles after
- const qint64 ret = (m_currentTitle < _iface_availableTitles() - 1) ?
+ const qint64 ret = (m_currentTitle < _iface_availableTitles() - 1) ?
titleAbsolutePosition(m_currentTitle+1) : \
currentGraph()->absoluteTotalTime();
//this is the duration of the current title
@@ -596,7 +596,7 @@ namespace Phonon
qint64 MediaObject::currentTime() const
{
//this handles inaccuracy when stopping on a title
- return currentGraph()->absoluteCurrentTime()
+ return currentGraph()->absoluteCurrentTime()
#ifndef QT_NO_PHONON_MEDIACONTROLLER
- titleAbsolutePosition(m_currentTitle)
#endif //QT_NO_PHONON_MEDIACONTROLLER
@@ -746,7 +746,7 @@ namespace Phonon
m_oldHasVideo = currentGraph()->hasVideo();
setState(Phonon::LoadingState);
//After loading we go into stopped state
- m_nextState = Phonon::StoppedState;
+ m_nextState = Phonon::StoppedState;
catchComError(currentGraph()->loadSource(source));
emit currentSourceChanged(source);
}
@@ -760,7 +760,7 @@ namespace Phonon
void MediaObject::loadingFinished(MediaGraph *mg)
{
- if (mg == currentGraph()) {
+ if (mg == currentGraph()) {
#ifndef QT_NO_PHONON_MEDIACONTROLLER
//Title interface
m_currentTitle = 0;
@@ -817,7 +817,7 @@ namespace Phonon
void MediaObject::seekingFinished(MediaGraph *mg)
{
- if (mg == currentGraph()) {
+ if (mg == currentGraph()) {
updateTargetTick();
if (currentTime() < totalTime() - m_prefinishMark) {
@@ -892,7 +892,7 @@ namespace Phonon
#ifndef QT_NO_PHONON_VIDEO
if (VideoWidget *video = qobject_cast<VideoWidget*>(sink)) {
m_videoWidgets += video;
- } else
+ } else
#endif //QT_NO_PHONON_VIDEO
if (AudioOutput *audio = qobject_cast<AudioOutput*>(sink)) {
m_audioOutputs += audio;
@@ -911,7 +911,7 @@ namespace Phonon
#ifndef QT_NO_PHONON_VIDEO
if (VideoWidget *video = qobject_cast<VideoWidget*>(sink)) {
m_videoWidgets.removeOne(video);
- } else
+ } else
#endif //QT_NO_PHONON_VIDEO
if (AudioOutput *audio = qobject_cast<AudioOutput*>(sink)) {
m_audioOutputs.removeOne(audio);
@@ -993,7 +993,7 @@ namespace Phonon
emit stateChanged(state(), m_state);
}
break;
- case EC_LENGTH_CHANGED:
+ case EC_LENGTH_CHANGED:
if (graph == currentGraph()->graph()) {
emit totalTimeChanged( totalTime() );
}
diff --git a/ds9/qmeminputpin.cpp b/ds9/qmeminputpin.cpp
index 0af1bfd..dca99db 100644
--- a/ds9/qmeminputpin.cpp
+++ b/ds9/qmeminputpin.cpp
@@ -28,7 +28,7 @@ namespace Phonon
namespace DS9
{
- QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector<AM_MEDIA_TYPE> \
&mt, bool transform) : + QMemInputPin::QMemInputPin(QBaseFilter *parent, \
const QVector<AM_MEDIA_TYPE> &mt, bool transform) :
QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), \
m_transform(transform) {
}
@@ -203,7 +203,7 @@ namespace Phonon
for (int i = 0; i < m_outputs.count(); ++i) {
QPin *current = m_outputs.at(i);
- IMediaSample *outSample = m_shouldDuplicateSamples ?
+ IMediaSample *outSample = m_shouldDuplicateSamples ?
duplicateSampleForOutput(sample, current->memoryAllocator())
: sample;
@@ -261,7 +261,7 @@ namespace Phonon
}
//addition
- //this should be used by the filter to tell it's input pins to which output \
they should route the samples + //this should be used by the filter to tell \
its input pins to which output they should route the samples
void QMemInputPin::addOutput(QPin *output)
{
diff --git a/phonon/backendcapabilities.h b/phonon/backendcapabilities.h
index bbe6937..643c8ef 100644
--- a/phonon/backendcapabilities.h
+++ b/phonon/backendcapabilities.h
@@ -15,7 +15,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
+ You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -88,19 +88,18 @@ namespace BackendCapabilities
};
/**
- * Use this function to get a QObject pointer to connect to the \
capabilitiesChanged signal. + * Use this function to get a QObject pointer to \
connect to one of the Notifier signals.
*
* \return a pointer to a QObject.
*
- * The capabilitiesChanged signal is emitted if the capabilities have changed. \
This can
- * happen if the user has requested a backend change.
- *
- * To connect to this signal do the following:
+ * To connect to the signal do the following:
* \code
* QObject::connect(BackendCapabilities::notifier(), \
SIGNAL(capabilitiesChanged()), ...
* \endcode
*
* \see Notifier::capabilitiesChanged()
+ * \see Notifier::availableAudioOutputDevicesChanged()
+ * \see Notifier::availableAudioCaptureDevicesChanged()
*/
PHONON_EXPORT Notifier *notifier();
diff --git a/phonon/mediaobject.h b/phonon/mediaobject.h
index c1fa3c6..ade966a 100644
--- a/phonon/mediaobject.h
+++ b/phonon/mediaobject.h
@@ -15,7 +15,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
+ You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -198,18 +198,18 @@ namespace Phonon
* Check whether the current media may be seeked.
*
* \warning This information cannot be known immediately. It is best
- * to also listen to the hasVideoChanged signal.
+ * to also listen to the seekableChanged signal.
*
* \code
- * connect(media, SIGNAL(hasVideoChanged(bool)), \
hasVideoChanged(bool)); + * connect(media, \
SIGNAL(seekableChanged(bool)), seekableChanged(bool));
* media->setCurrentSource("somevideo.avi");
- * media->hasVideo(); // returns false;
+ * media->isSeekable(); // returns false;
* }
*
- * void hasVideoChanged(bool b)
+ * void seekableChanged(bool b)
* {
* // b == true
- * media->hasVideo(); // returns true;
+ * media->isSeekable(); // returns true;
* }
* \endcode
*
@@ -301,7 +301,7 @@ namespace Phonon
void setCurrentSource(const MediaSource &source);
/**
- * Returns the queued media sources. This does list does not include
+ * Returns the queued media sources. This list does not include
* the current source (returned by currentSource).
*/
QList<MediaSource> queue() const;
@@ -456,8 +456,6 @@ namespace Phonon
Q_SIGNALS:
/**
* Emitted when the state of the MediaObject has changed.
- * In case you're not interested in the old state you can also
- * connect to a slot that only has one State argument.
*
* @param newstate The state the Player is in now.
* @param oldstate The state the Player was in before.
@@ -587,7 +585,7 @@ namespace Phonon
/**
* This signal is emitted as soon as the total time of the media file is
* known or has changed. For most non-local media data the total
- * time of the media can only be known after some time. At that time the
+ * time of the media can only be known after some time. Initially the
* totalTime function can not return useful information. You have
* to wait for this signal to know the real total time.
*
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic