Skip to content

Commit

Permalink
mv some non-public headers to private or other places. rename AVCompat.h
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Jul 26, 2014
1 parent 6b93165 commit 64c7919
Show file tree
Hide file tree
Showing 58 changed files with 185 additions and 270 deletions.
2 changes: 1 addition & 1 deletion examples/filters/SimpleFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
******************************************************************************/

#include "SimpleFilter.h"
#include "private/Filter_p.h"
#include "QtAV/private/Filter_p.h"
#include <math.h>

namespace QtAV {
Expand Down
2 changes: 1 addition & 1 deletion src/QtAV_Compat.cpp → src/AVCompat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/QtAV_Compat.h>
#include <QtAV/private/AVCompat.h>
#include "QtAV/version.h"
#include "QtAV/prepost.h"

Expand Down
10 changes: 5 additions & 5 deletions src/AVDemuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/AVDemuxer.h>
#include <QtAV/AVError.h>
#include <QtAV/Packet.h>
#include <QtAV/QtAV_Compat.h>
#include <QtAV/QAVIOContext.h>
#include "QtAV/AVDemuxer.h"
#include <QtCore/QThread>
#include <QtCore/QCoreApplication>
#include "QtAV/AVError.h"
#include "QtAV/Packet.h"
#include "QtAV/private/QAVIOContext.h"
#include "QtAV/private/AVCompat.h"

namespace QtAV {

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


#include "QtAV/AVError.h"
#include "QtAV/QtAV_Compat.h"
#include "QtAV/private/AVCompat.h"
#ifndef QT_NO_DEBUG_STREAM
#include <QtCore/qdebug.h>
#endif
Expand Down
13 changes: 6 additions & 7 deletions src/AVOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/AVOutput.h>
#include <QtAV/private/AVOutput_p.h>
#include <QtAV/Filter.h>
#include <QtAV/FilterContext.h>
#include <QtAV/FilterManager.h>
#include <QtAV/OutputSet.h>
//#include <QtCore/QMetaObject>
#include "QtAV/AVOutput.h"
#include "QtAV/private/AVOutput_p.h"
#include "QtAV/Filter.h"
#include "QtAV/FilterContext.h"
#include "QtAV/private/FilterManager.h"
#include "QtAV/private/OutputSet.h"

namespace QtAV {

Expand Down
51 changes: 23 additions & 28 deletions src/AVPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,34 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/AVPlayer.h>
#include "QtAV/AVPlayer.h"

#include <limits>

#include <qevent.h>
#include <qpainter.h>
#include <QApplication>
#include <QEvent>
#include <QtCore/QEvent>
#include <QtCore/QDir>
//#include <QtCore/QMetaObject>

#include <QtAV/AVDemuxer.h>
#include <QtAV/AudioFormat.h>
#include <QtAV/AudioResampler.h>
#include <QtAV/AudioThread.h>
#include <QtAV/Packet.h>
#include <QtAV/AudioDecoder.h>
#include <QtAV/VideoRenderer.h>
#include <QtAV/OutputSet.h>
#include <QtAV/AVClock.h>
#include <QtAV/VideoCapture.h>
#include <QtAV/VideoDecoderTypes.h>
#include <QtAV/WidgetRenderer.h>
#include <QtAV/VideoThread.h>
#include <QtAV/AVDemuxThread.h>
#include <QtAV/VideoOutputEventFilter.h>
#include <QtAV/VideoCapture.h>
#include <QtAV/AudioOutputTypes.h>
#include <QtAV/FilterManager.h>

#include <QIODevice>

#include <QtAV/QtAV_Compat.h>
#include <QtCore/QIODevice>

#include "QtAV/AVDemuxer.h"
#include "QtAV/AudioFormat.h"
#include "QtAV/AudioResampler.h"
#include "QtAV/AudioThread.h"
#include "QtAV/Packet.h"
#include "QtAV/AudioDecoder.h"
#include "QtAV/VideoRenderer.h"
#include "QtAV/AVClock.h"
#include "QtAV/VideoCapture.h"
#include "QtAV/VideoDecoderTypes.h"
#include "QtAV/WidgetRenderer.h"
#include "QtAV/VideoThread.h"
#include "QtAV/AVDemuxThread.h"
#include "QtAV/VideoCapture.h"
#include "QtAV/AudioOutputTypes.h"
#include "QtAV/private/FilterManager.h"
#include "QtAV/private/OutputSet.h"
#include "QtAV/private/VideoOutputEventFilter.h"
#include "QtAV/private/AVCompat.h"

namespace QtAV {

Expand Down
10 changes: 5 additions & 5 deletions src/AVThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/AVThread.h>
#include <QtAV/private/AVThread_p.h>
#include <QtAV/AVOutput.h>
#include <QtAV/Filter.h>
#include <QtAV/OutputSet.h>
#include "QtAV/AVThread.h"
#include "QtAV/private/AVThread_p.h"
#include "QtAV/AVOutput.h"
#include "QtAV/Filter.h"
#include "QtAV/private/OutputSet.h"

namespace QtAV {

Expand Down
10 changes: 5 additions & 5 deletions src/AudioDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/AudioDecoder.h>
#include <QtAV/private/AVDecoder_p.h>
#include <QtAV/QtAV_Compat.h>
#include <QtAV/AudioResampler.h>
#include <QtAV/AudioResamplerTypes.h>
#include "QtAV/AudioDecoder.h"
#include "QtAV/private/AVDecoder_p.h"
#include "QtAV/private/AVCompat.h"
#include "QtAV/AudioResampler.h"
#include "QtAV/AudioResamplerTypes.h"

namespace QtAV {

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

#include "QtAV/AudioFormat.h"
#include <QtCore/QtDebug>
#include "QtAV/QtAV_Compat.h"
#include "QtAV/private/AVCompat.h"

//FF_API_OLD_SAMPLE_FMT. e.g. FFmpeg 0.9
#ifdef SampleFormat
Expand Down
2 changes: 1 addition & 1 deletion src/AudioFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "QtAV/AudioFrame.h"
#include "QtAV/private/Frame_p.h"
#include "QtAV/AudioResampler.h"
#include "QtAV/QtAV_Compat.h"
#include "QtAV/private/AVCompat.h"


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

#include "QtAV/AudioOutputTypes.h"
#include "QtAV/FactoryDefine.h"
#include "QtAV/factory.h"
#include "QtAV/private/factory.h"

namespace QtAV {

Expand Down
2 changes: 1 addition & 1 deletion src/AudioResampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "QtAV/AudioResampler.h"
#include "QtAV/AudioFormat.h"
#include "QtAV/private/AudioResampler_p.h"
#include "QtAV/factory.h"
#include "QtAV/private/factory.h"

namespace QtAV {

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

#include "QtAV/AudioResampler.h"
#include "QtAV/private/AudioResampler_p.h"
#include "QtAV/QtAV_Compat.h"
#include "QtAV/private/AVCompat.h"
#include "QtAV/prepost.h"

namespace QtAV {
Expand Down
2 changes: 1 addition & 1 deletion src/AudioResamplerLibav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define QTAV_HAVE_SWR_AVR_MAP 1
#include "QtAV/AudioResampler.h"
#include "QtAV/private/AudioResampler_p.h"
#include "QtAV/QtAV_Compat.h"
#include "QtAV/private/AVCompat.h"
#include "QtAV/prepost.h"

namespace QtAV {
Expand Down
20 changes: 10 additions & 10 deletions src/AudioThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/AudioThread.h>
#include <QtAV/private/AVThread_p.h>
#include <QtAV/AudioDecoder.h>
#include <QtAV/Packet.h>
#include <QtAV/AudioFormat.h>
#include <QtAV/AudioOutput.h>
#include <QtAV/AudioResampler.h>
#include <QtAV/AVClock.h>
#include <QtAV/OutputSet.h>
#include <QtAV/QtAV_Compat.h>
#include "QtAV/AudioThread.h"
#include "QtAV/private/AVThread_p.h"
#include "QtAV/AudioDecoder.h"
#include "QtAV/Packet.h"
#include "QtAV/AudioFormat.h"
#include "QtAV/AudioOutput.h"
#include "QtAV/AudioResampler.h"
#include "QtAV/AVClock.h"
#include "QtAV/private/OutputSet.h"
#include "QtAV/private/AVCompat.h"
#include <QtCore/QCoreApplication>

namespace QtAV {
Expand Down
2 changes: 1 addition & 1 deletion src/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include "QtAV/Filter.h"
#include "QtAV/private/Filter_p.h"
#include "QtAV/Statistics.h"
#include "QtAV/FilterManager.h"
#include "QtAV/AVOutput.h"
#include "QtAV/AVPlayer.h"
#include "QtAV/private/FilterManager.h"

namespace QtAV {

Expand Down
8 changes: 4 additions & 4 deletions src/FilterManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include "QtAV/FilterManager.h"
#include "QtAV/private/FilterManager.h"
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtAV/AVPlayer.h>
#include <QtAV/Filter.h>
#include <QtAV/AVOutput.h>
#include "QtAV/AVPlayer.h"
#include "QtAV/Filter.h"
#include "QtAV/AVOutput.h"

namespace QtAV {

Expand Down
24 changes: 21 additions & 3 deletions src/GraphicsItemRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/GraphicsItemRenderer.h>
#include <QtAV/private/GraphicsItemRenderer_p.h>
#include <QtAV/FilterContext.h>
#include "QtAV/GraphicsItemRenderer.h"
#include "QtAV/private/QPainterRenderer_p.h"
#include "QtAV/FilterContext.h"
#include "QtAV/OpenGLVideo.h"
#include <QGraphicsScene>
#include <QtGui/QPainter>
#include <QEvent>
Expand All @@ -33,6 +34,23 @@

namespace QtAV {

class GraphicsItemRendererPrivate : public QPainterRendererPrivate
{
public:
GraphicsItemRendererPrivate()
: opengl(false)
{}
virtual ~GraphicsItemRendererPrivate(){}
void setupAspectRatio() {
matrix(0, 0) = (GLfloat)out_rect.width()/(GLfloat)renderer_width;
matrix(1, 1) = (GLfloat)out_rect.height()/(GLfloat)renderer_height;
}

bool opengl;
OpenGLVideo glv;
QMatrix4x4 matrix;
};

GraphicsItemRenderer::GraphicsItemRenderer(QGraphicsItem * parent)
:GraphicsWidget(parent),QPainterRenderer(*new GraphicsItemRendererPrivate())
{
Expand Down
8 changes: 4 additions & 4 deletions src/ImageConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
******************************************************************************/


#include <QtAV/private/ImageConverter_p.h>
#include <QtAV/QtAV_Compat.h>
#include <QtAV/factory.h>
#include <QtAV/ImageConverter.h>
#include "QtAV/private/ImageConverter_p.h"
#include "QtAV/private/AVCompat.h"
#include "QtAV/private/factory.h"
#include "QtAV/ImageConverter.h"

namespace QtAV {

Expand Down
6 changes: 3 additions & 3 deletions src/ImageConverterFF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/ImageConverter.h>
#include <QtAV/private/ImageConverter_p.h>
#include <QtAV/QtAV_Compat.h>
#include "QtAV/ImageConverter.h"
#include "QtAV/private/ImageConverter_p.h"
#include "QtAV/private/AVCompat.h"
#include "QtAV/prepost.h"

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

#include "QtAV/ImageConverter.h"
#include "QtAV/private/ImageConverter_p.h"
#include "QtAV/QtAV_Compat.h"
#include "QtAV/private/AVCompat.h"
#include "prepost.h"

#if QTAV_HAVE(IPP)
Expand Down
2 changes: 1 addition & 1 deletion src/LibAVFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "QtAV/private/Filter_p.h"
#include "QtAV/Statistics.h"
#include "QtAV/VideoFrame.h"
#include "QtAV/QtAV_Compat.h"
#include "QtAV/private/AVCompat.h"

/*
* libav10.x, ffmpeg2.x: av_buffersink_read deprecated
Expand Down
3 changes: 1 addition & 2 deletions src/OutputSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QWidget>
#include "QtAV/private/OutputSet.h"
#include "QtAV/AVPlayer.h"
#include "QtAV/OutputSet.h"
#include "QtAV/VideoRenderer.h"

namespace QtAV {
Expand Down
5 changes: 2 additions & 3 deletions src/QAVIOContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/

#include <QtAV/QAVIOContext.h>
#include "QtAV/private/QAVIOContext.h"
#include "QtAV/private/AVCompat.h"
#include <QtCore/QIODevice>
#include <QtAV/QtAV_Compat.h>
#include <QDebug>

namespace QtAV {

Expand Down
Loading

0 comments on commit 64c7919

Please sign in to comment.