Skip to content

Commit

Permalink
misc. build error etc
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Aug 4, 2014
1 parent 5cf98a9 commit 517b880
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 13 deletions.
2 changes: 1 addition & 1 deletion qml/QQuickItemRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <QmlAV/QmlAVPlayer.h>
#include "QmlAV/SGVideoNode.h"
#include <QtAV/VideoRendererTypes.h> //it declares a factory we need
#include "prepost.h"
#include "QtAV/prepost.h"

namespace QtAV
{
Expand Down
2 changes: 1 addition & 1 deletion src/AudioOutputDSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "QtAV/AudioOutput.h"
#include "QtAV/private/AudioOutput_p.h"
#include "prepost.h"
#include "QtAV/prepost.h"
#include <QtCore/QLibrary>
#include <QtCore/QVector>

Expand Down
2 changes: 1 addition & 1 deletion src/AudioOutputOpenAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "QtAV/AudioOutput.h"
#include "QtAV/private/AudioOutput_p.h"
#include "prepost.h"
#include "QtAV/prepost.h"
#include <QtCore/QVector>

#if defined(HEADER_OPENAL_PREFIX)
Expand Down
2 changes: 1 addition & 1 deletion src/AudioOutputOpenSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "QtAV/private/AudioOutput_p.h"
#include <QtCore/QThread>
#include <SLES/OpenSLES.h>
#include "prepost.h"
#include "QtAV/prepost.h"

namespace QtAV {

Expand Down
3 changes: 3 additions & 0 deletions src/Direct2DRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class Direct2DRenderer : public QWidget, public VideoRenderer
//stay on top will change parent, hide then show(windows). we need GetDC() again
virtual void showEvent(QShowEvent *);
};
typedef Direct2DRenderer VideoRendererDirect2D;
extern VideoRendererId VideoRendererId_Direct2D;
FACTORY_REGISTER_ID_AUTO(VideoRenderer, Direct2D, "Direct2D")

Expand Down Expand Up @@ -423,3 +424,5 @@ void Direct2DRenderer::showEvent(QShowEvent *)
}

} //namespace QtAV

#include "Direct2DRenderer.moc"
4 changes: 3 additions & 1 deletion src/GDIRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class GDIRenderer : public QWidget, public VideoRenderer
//stay on top will change parent, hide then show(windows). we need GetDC() again
virtual void showEvent(QShowEvent *);
};

typedef GDIRenderer VideoRendererGDI;
extern VideoRendererId VideoRendererId_GDI;
FACTORY_REGISTER_ID_AUTO(VideoRenderer, GDI, "GDI")

Expand Down Expand Up @@ -308,3 +308,5 @@ void GDIRenderer::showEvent(QShowEvent *)
}

} //namespace QtAV

#include "GDIRenderer.moc"
2 changes: 1 addition & 1 deletion src/ImageConverterIPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "QtAV/ImageConverter.h"
#include "QtAV/private/ImageConverter_p.h"
#include "QtAV/private/AVCompat.h"
#include "prepost.h"
#include "QtAV/prepost.h"

#if QTAV_HAVE(IPP)
#include <ipp.h>
Expand Down
4 changes: 2 additions & 2 deletions src/QtAV/FactoryDefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* We define the id in MyClassTypes.cpp because MyClassSubA may not be compiled(e.g. platform dependent features), but the id must be defined.
* 1. create a source file MyClassSubA.cpp and implement the required members
* 2. In MyClassSubA.cpp, add the following lines
* #include "prepost.h" //for PRE_FUNC_ADD()
* #include "QtAV/prepost.h" //for PRE_FUNC_ADD()
* //we don't want to depend on MyClassTypes.h, so extern
* extern MyClassId MyClassId_SubA;
* FACTORY_REGISTER_ID_AUTO(MyClass, SubA, "SubA's name")
Expand All @@ -66,7 +66,7 @@
* just create MyClassSubA.cpp with the content:
*
* #include "MyClass.h"
* #include "prepost.h" //for PRE_FUNC_ADD()
* #include "QtAV/prepost.h" //for PRE_FUNC_ADD()
* MyClassId MyClassId_SubA = some_value; //it can be used somewhere else as "extern"
* FACTORY_REGISTER_ID_AUTO(MyClass, SubA, "SubA's name")
* void RegisterMyClassSubA_Man() //call it when you need as "extern"
Expand Down
5 changes: 5 additions & 0 deletions src/QtAV/private/singleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@
#include <stdexcept>
#endif

#define DEBUG 0
#if DEBUG
#define DBG(fmt, ...) \
printf(fmt, ##__VA_ARGS__); \
fflush(0);
#else
#define DBG(...)
#endif //DEBUG

#define DISABLE_COPY(Class) \
Class(const Class &); \
Expand Down
16 changes: 16 additions & 0 deletions src/VideoDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,29 @@ FACTORY_DEFINE(VideoDecoder)

extern void RegisterVideoDecoderFFmpeg_Man();
extern void RegisterVideoDecoderDXVA_Man();
extern void RegisterVideoDecoderCUDA_Man();
extern void RegisterVideoDecoderVAAPI_Man();
extern void RegisterVideoDecoderVDA_Man();
extern void RegisterVideoDecoderCedarv_Man();

void VideoDecoder_RegisterAll()
{
RegisterVideoDecoderFFmpeg_Man();
#if QTAV_HAVE(DXVA)
RegisterVideoDecoderDXVA_Man();
#endif //QTAV_HAVE(DXVA)
#if QTAV_HAVE(CUDA)
RegisterVideoDecoderCUDA_Man();
#endif //QTAV_HAVE(CUDA)
#if QTAV_HAVE(VAAPI)
RegisterVideoDecoderVAAPI_Man();
#endif //QTAV_HAVE(VAAPI)
#if QTAV_HAVE(VDA)
RegisterVideoDecoderVDA_Man();
#endif //QTAV_HAVE(VDA)
#if QTAV_HAVE(CEDARV)
RegisterVideoDecoderCedarv_Man();
#endif //QTAV_HAVE(CEDARV)
}


Expand Down
2 changes: 1 addition & 1 deletion src/VideoDecoderCedarv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "QtAV/private/VideoDecoder_p.h"
#include "QtAV/Packet.h"
#include "QtAV/private/AVCompat.h"
#include "prepost.h"
#include "QtAV/prepost.h"

#include <QDebug>

Expand Down
2 changes: 1 addition & 1 deletion src/VideoDecoderDXVA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "QtAV/private/VideoDecoderFFmpegHW_p.h"
#include "QtAV/Packet.h"
#include "QtAV/private/AVCompat.h"
#include "prepost.h"
#include "QtAV/prepost.h"
#include "utils/GPUMemCopy.h"

// TODO: add to QtAV_Compat.h?
Expand Down
2 changes: 1 addition & 1 deletion src/VideoDecoderVAAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "QtAV/SurfaceInterop.h"
#include "QtAV/private/AVCompat.h"
#include "utils/GPUMemCopy.h"
#include "prepost.h"
#include "QtAV/prepost.h"
#include <va/va.h>
#include <libavcodec/vaapi.h>

Expand Down
2 changes: 1 addition & 1 deletion src/VideoDecoderVDA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "QtAV/private/VideoDecoderFFmpegHW_p.h"
#include "utils/GPUMemCopy.h"
#include "QtAV/private/AVCompat.h"
#include "prepost.h"
#include "QtAV/prepost.h"
#include <assert.h>

#ifdef __cplusplus
Expand Down
3 changes: 3 additions & 0 deletions src/XVRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class XVRenderer : public QWidget, public VideoRenderer
virtual bool onSetHue(qreal h);
virtual bool onSetSaturation(qreal s);
};
typedef XVRenderer VideoRendererXV;
extern VideoRendererId VideoRendererId_XV;
FACTORY_REGISTER_ID_AUTO(VideoRenderer, XV, "XVideo")

Expand Down Expand Up @@ -544,3 +545,5 @@ bool XVRenderer::onSetSaturation(qreal s)
}

} //namespace QtAV

#include "XVRenderer.moc"
3 changes: 2 additions & 1 deletion tests/ao/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <limits>
#include <QtCore/QCoreApplication>
#include <QtCore/QElapsedTimer>
#include <QtCore/QStringList>
#include <QtAV/AudioOutput.h>
#include <QtAV/AudioOutputTypes.h>
#include <QtDebug>
Expand All @@ -38,7 +39,7 @@ void help() {
for (int i = 0; i < (int)names.size(); ++i) {
backends.append(names[i].c_str());
}
qDebug() << "parameters: [-ao " << backends.join('|') << "]";
qDebug() << "parameters: [-ao " << backends.join("|") << "]";
}

int main(int argc, char** argv)
Expand Down

0 comments on commit 517b880

Please sign in to comment.