22 #ifndef QTAV_VIDEOFRAME_H 23 #define QTAV_VIDEOFRAME_H 27 #include <QtCore/QSize> 31 class VideoFramePrivate;
48 static VideoFrame fromGPU(
const VideoFormat& fmt,
int width,
int height,
int surface_h, quint8 *src[],
int pitch[],
bool optimized =
true,
bool swapUV =
false);
49 static void copyPlane(quint8 *dst,
size_t dst_stride,
const quint8 *src,
size_t src_stride,
unsigned byteWidth,
unsigned height);
68 QImage::Format imageFormat()
const;
69 int pixelFormatFFmpeg()
const;
72 operator bool()
const {
return isValid();}
79 int effectivePlaneWidth(
int plane)
const;
81 int planeWidth(
int plane)
const;
82 int planeHeight(
int plane)
const;
84 float displayAspectRatio()
const;
85 void setDisplayAspectRatio(
float displayAspectRatio);
95 int effectiveBytesPerLine(
int plane)
const;
103 QImage toImage(QImage::Format fmt = QImage::Format_ARGB32,
const QSize& dstSize = QSize(),
const QRectF& roi = QRect())
const;
112 VideoFrame to(
const VideoFormat& fmt,
const QSize& dstSize = QSize(),
const QRectF& roi = QRect())
const;
113 bool to(
VideoFormat::PixelFormat pixfmt, quint8 *
const dst[],
const int dstStride[],
const QSize& dstSize = QSize(),
const QRectF& roi = QRect())
const;
114 bool to(
const VideoFormat& fmt, quint8 *
const dst[],
const int dstStride[],
const QSize& dstSize = QSize(),
const QRectF& roi = QRect())
const;
120 void* map(
SurfaceType type,
void* handle,
int plane = 0);
122 void unmap(
void* handle);
128 void* createInteropHandle(
void* handle,
SurfaceType type,
int plane);
131 class ImageConverter;
138 void setEq(
int brightness,
int contrast,
int saturation);
148 mutable ImageConverter *m_cvt;
154 #endif // QTAV_VIDEOFRAME_H
#define Q_AV_EXPORT
Definition: QtAV_Global.h:40
size_t size
Definition: mem.h:207
Definition: VideoFrame.h:132
ColorSpace
Definition: QtAV_Global.h:122
Definition: VideoFrame.h:32
SurfaceType
The SurfaceType enum HostMemorySurface: Map the decoded frame to host memory GLTextureSurface: Map th...
Definition: QtAV_Global.h:152
ColorRange
The ColorRange enum YUV or RGB color range.
Definition: QtAV_Global.h:134
AudioOutput ao; ao.setAudioFormat(fmt); ao.open(); while (has_data) { data = read_data(ao->bufferSize...
Definition: AudioDecoder.h:31
#define Q_DECL_OVERRIDE
Definition: QtAV_Global.h:177