MythTV master
mythmediacodecinterop.h
Go to the documentation of this file.
1#ifndef MYTHMEDIACODECINTEROP_H
2#define MYTHMEDIACODECINTEROP_H
3
4// Qt
5#include <QMutex>
6#include <QWaitCondition>
7#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
8#include <QtAndroidExtras>
9#else
10#include <QJniEnvironment>
11#include <QJniObject>
12#define QAndroidJniEnvironment QJniEnvironment
13#define QAndroidJniObject QJniObject
14#endif
15
16// MythTV
17#include "mythopenglinterop.h"
18
19extern "C" MTV_PUBLIC void Java_org_mythtv_video_SurfaceTextureListener_frameAvailable(JNIEnv*/*env*/, jobject /*listener*/, jlong Wait, jobject /*texture*/);
20
22{
23 public:
25 std::vector<MythVideoTextureOpenGL*> Acquire(MythRenderOpenGL *Context,
26 MythVideoColourSpace *ColourSpace,
27 MythVideoFrame *Frame, FrameScanType Scan) override;
28 void* GetSurface(void);
29
30 protected:
32 ~MythMediaCodecInterop() override;
33 bool Initialise(QSize Size);
34
35 private:
36 QWaitCondition m_frameWait;
42 jfloatArray m_textureTransform { nullptr };
43 QMatrix4x4 m_transform;
44};
45
46#endif // MYTHMEDIACODECINTEROP_H
MythMediaCodecInterop(MythPlayerUI *Player, MythRenderOpenGL *Context)
QAndroidJniObject m_surface
QAndroidJniObject m_surfaceTexture
std::vector< MythVideoTextureOpenGL * > Acquire(MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan) override
static MythMediaCodecInterop * CreateMediaCodec(MythPlayerUI *Player, MythRenderOpenGL *Context, QSize Size)
QAndroidJniObject m_surfaceListener
MythVideoColourSpace contains a QMatrix4x4 that can convert YCbCr data to RGB.
MTV_PUBLIC void Java_org_mythtv_video_SurfaceTextureListener_frameAvailable(JNIEnv *, jobject, jlong Wait, jobject)
#define QAndroidJniObject
#define MTV_PUBLIC
Definition: mythtvexp.h:8
FrameScanType
Definition: videoouttypes.h:95