forked from sailfish-on-fxtecpro1/gmp-droid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gmp-droid-conv.h
50 lines (41 loc) · 1.32 KB
/
gmp-droid-conv.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** This Source Code Form is subject to the terms of the
** Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
** with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
**
****************************************************************************/
#ifndef GMP_DROID_CONV
#define GMP_DROID_CONV
#include "gmp-video-host.h"
#include "gmp-video-frame-i420.h"
#include "droidmediacodec.h"
#include "droidmediaconvert.h"
#include "droidmediaconstants.h"
class DroidColourConvert
{
public:
virtual ~DroidColourConvert () { }
virtual GMPErr Convert (GMPVideoHost * host, DroidMediaData * in,
GMPVideoi420Frame * out) = 0;
static DroidColourConvert *GetConverter (DroidMediaCodecMetaData * md,
DroidMediaRect * rect, const char **conv_name);
virtual void SetFormat (DroidMediaRect * rect, int32_t width, int32_t height)
{
m_stride = width;
m_slice_height = height;
m_top = rect->top;
m_left = rect->left;
m_width = rect->right - rect->left;
m_height = rect->bottom - rect->top;
}
int32_t m_stride = 0;
int32_t m_slice_height = 0;
int32_t m_width = 0;
int32_t m_height = 0;
int32_t m_top = 0;
int32_t m_left = 0;
};
#endif