blob: 30dad68d5a9d6ac52f47f631d9dc14b03ea2603b (
plain)
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
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
package org.qtproject.qt.android.multimedia;
import android.view.SurfaceHolder;
public class QtSurfaceHolderCallback implements SurfaceHolder.Callback
{
private long m_id = -1;
public QtSurfaceHolderCallback(long id)
{
m_id = id;
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height)
{
}
@Override
public void surfaceCreated(SurfaceHolder holder)
{
notifySurfaceCreated(m_id);
}
@Override
public void surfaceDestroyed(SurfaceHolder holder)
{
notifySurfaceDestroyed(m_id);
}
private static native void notifySurfaceCreated(long id);
private static native void notifySurfaceDestroyed(long id);
}
|