-
Notifications
You must be signed in to change notification settings - Fork 0
/
MCGeForce.h
111 lines (94 loc) · 3.38 KB
/
MCGeForce.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#pragma once
#include <jni.h>
/* Header for class dev_decobr_mcgeforce_bindings_MCGeForceHelper */
#ifndef _Included_dev_decobr_mcgeforce_bindings_MCGeForceHelper
#define _Included_dev_decobr_mcgeforce_bindings_MCGeForceHelper
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: dev_decobr_mcgeforce_bindings_MCGeForceHelper
* Method: init
* Signature: ()V
*/
JNIEXPORT jlong JNICALL Java_dev_decobr_mcgeforce_bindings_MCGeForceHelper_init
(JNIEnv*, jobject);
/*
* Class: dev_decobr_mcgeforce_bindings_MCGeForceHelper
* Method: setVideoHighlight
* Signature: (Ljava/lang/String;Ljava/lang/String;II)V
*/
JNIEXPORT void JNICALL Java_dev_decobr_mcgeforce_bindings_MCGeForceHelper_setVideoHighlight
(JNIEnv*, jobject, jlong, jstring, jstring, jint, jint);
/*
* Class: dev_decobr_mcgeforce_bindings_MCGeForceHelper
* Method: addGroup
* Signature: (Ljava/lang/String;Ljava/lang/String)V
*/
JNIEXPORT void JNICALL Java_dev_decobr_mcgeforce_bindings_MCGeForceHelper_addGroup
(JNIEnv*, jobject, jlong, jstring, jstring);
/*
* Class: dev_decobr_mcgeforce_bindings_MCGeForceHelper
* Method: showHighlightsEditor
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_dev_decobr_mcgeforce_bindings_MCGeForceHelper_showHighlightsEditor
(JNIEnv*, jobject, jlong, jstring);
/*
* Class: dev_decobr_mcgeforce_bindings_MCGeForceHelper
* Method: getNumOfHighlights
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_dev_decobr_mcgeforce_bindings_MCGeForceHelper_getNumOfHighlights
(JNIEnv*, jobject, jlong, jstring);
/*
* Class: dev_decobr_mcgeforce_bindings_MCGeForceHelper
* Method: closeGroup
* Signature: (Ljava/lang/String;Ljava/lang/Boolean;II)V
*/
JNIEXPORT void JNICALL Java_dev_decobr_mcgeforce_bindings_MCGeForceHelper_closeGroup
(JNIEnv*, jobject, jlong, jstring, jboolean);
#ifdef __cplusplus
}
#endif
#endif
#include <iostream>
#include <gfesdk/os_defines.h>
#include <gfesdk/sdk_types.h>
#include <gfesdk/sdk_types_ipc.h>
#include <gfesdk/config.h>
#include <gfesdk/isdk.h>
#include <gfesdk/highlights/ihighlights.h>
#include <functional>
#include <Windows.h>
using namespace std;
class JNIHelper {
public:
/*!
* \param env[in] - A valid JNIEnv returned from a JNI Call
* \param obj[in] - A valid jobject returned from a JNI call
*/
void init(JNIEnv* env, jobject obj);
jmethodID getMethod(const char* methodName, const char* signature);
jmethodID getStaticMethod(const char* methodName, const char* signature);
/*!
* \param methodName[in] - The name of the method to be called
* \param signature[in] - The signature of the method to be called
*/
void callVoidMethod(jmethodID method, ...);
/*!
* \param methodName[in] - The name of the method to be called
* \param signature[in] - The signature of the method to be called
*/
void callStaticVoidMethod(jmethodID method, ...);
jstring convertCharArrayToString(const char* charArray);
};
class MCGeForce {
public:
long init(void);
void addGroup(NVGSDK_HANDLE* handle, const char* id, const char* name);
void setVideoHighlight(NVGSDK_HANDLE* handle, const char* id, const char* groupID, int start, int end);
void showHighlightsEditor(NVGSDK_HANDLE* handle, const char* groupID);
void closeGroup(NVGSDK_HANDLE* handle, const char* groupID, bool deleteHighlights);
void getNumOfHighlights(NVGSDK_HANDLE* handle, const char* groupID);
};