Commits

Ivan Andrianov  committed 46a8c99

Refined Frame class.

  • Participants
  • Parent commits 87607dc

Comments (0)

Files changed (3)

File src/codecs/frame.cpp

  */
 
 #include "frame.h"
-#include "frame_p.h"
+
+#include <QtCore/QScopedArrayPointer>
 
 namespace FFTranscoder
 {
 namespace Codecs
 {
 
+class Frame::Private
+{
+    Q_DISABLE_COPY(Frame::Private)
+
+public:
+    Private(const qint32 * samples, int sampleCount, int channelCount);
+    ~Private();
+
+    QScopedArrayPointer<const qint32> samples;
+    int sampleCount;
+    int channelCount;
+};
+
 Frame::Frame() :
-        d(new FramePrivate(0, 0, 0))
+        d(new Frame::Private(0, 0, 0))
 {
 }
 
 Frame::Frame(const qint32 * samples, int sampleCount, int channelCount) :
-        d(new FramePrivate(samples, sampleCount, channelCount))
+        d(new Frame::Private(samples, sampleCount, channelCount))
 {
 }
 
     return d->channelCount;
 }
 
-FramePrivate::FramePrivate(const qint32 * samples, int sampleCount,
+Frame::Private::Private(const qint32 * samples, int sampleCount,
         int channelCount) :
         samples(samples), sampleCount(sampleCount), channelCount(channelCount)
 {
 }
 
-FramePrivate::~FramePrivate()
+Frame::Private::~Private()
 {
 }
 

File src/codecs/frame.h

 #ifndef FFTRANSCODER_CODECS_FRAME_H
 #define FFTRANSCODER_CODECS_FRAME_H
 
-#include <QScopedPointer>
+#include <QtCore/QScopedPointer>
 
 #include "global.h"
 
 namespace Codecs
 {
 
-class FramePrivate;
-
 /**
  * Class representing a frame (an array of samples).
  */
     int channelCount() const;
 
 private:
-    QScopedPointer<FramePrivate> d;
+    class Private;
+    QScopedPointer<Private> d;
 };
 
 }

File src/codecs/frame_p.h

-/*
- * Copyright (C) 2012 by Ivan Andrianov
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef FFTRANSCODER_CODECS_FRAME_P_H
-#define FFTRANSCODER_CODECS_FRAME_P_H
-
-#include <QScopedArrayPointer>
-
-namespace FFTranscoder
-{
-namespace Codecs
-{
-
-class FramePrivate
-{
-    Q_DISABLE_COPY(FramePrivate)
-
-public:
-    FramePrivate(const qint32 * samples, int sampleCount, int channelCount);
-    ~FramePrivate();
-
-    QScopedArrayPointer<const qint32> samples;
-    int sampleCount;
-    int channelCount;
-};
-
-}
-}
-
-#endif // FFTRANSCODER_CODECS_FRAME_P_H