[android] Removed obsolete VideoTimer.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako 2024-06-20 00:40:21 -03:00 committed by Viktor Havaka
parent 594ecb9834
commit b892e56fe0
2 changed files with 0 additions and 117 deletions

View file

@ -1,84 +0,0 @@
#include "VideoTimer.hpp"
#include "app/organicmaps/core/jni_helper.hpp"
#include "base/assert.hpp"
#include "base/logging.hpp"
android::VideoTimer * g_timer = 0;
namespace android
{
VideoTimer::VideoTimer(TFrameFn frameFn)
: ::VideoTimer(frameFn)
{
ASSERT(g_timer == 0, ());
g_timer = this;
}
VideoTimer::~VideoTimer()
{
stop();
g_timer = 0;
}
void VideoTimer::SetParentObject(jobject videoTimer)
{
m_videoTimer = videoTimer;
}
void VideoTimer::start()
{
/*JNIEnv * env;
m_javaVM->AttachCurrentThread(&env, NULL);
env->CallVoidMethod(m_videoTimer, jni::GetJavaMethodID(env, m_videoTimer, "start", "()V"));*/
m_state = ERunning;
}
void VideoTimer::resume()
{
/*JNIEnv * env;
m_javaVM->AttachCurrentThread(&env, NULL);
env->CallVoidMethod(m_videoTimer, jni::GetJavaMethodID(env, m_videoTimer, "resume", "()V"));*/
m_state = ERunning;
}
void VideoTimer::pause()
{
/*JNIEnv * env;
m_javaVM->AttachCurrentThread(&env, NULL);
env->CallVoidMethod(m_videoTimer, jni::GetJavaMethodID(env, m_videoTimer, "pause", "()V"));*/
m_state = EPaused;
}
void VideoTimer::stop()
{
/*JNIEnv * env;
m_javaVM->AttachCurrentThread(&env, NULL);
env->CallVoidMethod(m_videoTimer, jni::GetJavaMethodID(env, m_videoTimer, "stop", "()V"));*/
m_state = EStopped;
}
void VideoTimer::perform()
{
//m_frameFn();
}
}
extern "C"
{
JNIEXPORT void JNICALL
Java_app_organicmaps_VideoTimer_nativeRun(JNIEnv * env, jobject thiz)
{
ASSERT ( g_timer, ());
g_timer->perform();
}
JNIEXPORT void JNICALL
Java_app_organicmaps_VideoTimer_nativeInit(JNIEnv * env, jobject thiz)
{
ASSERT ( g_timer, ());
g_timer->SetParentObject(thiz);
}
}

View file

@ -1,33 +0,0 @@
#pragma once
#include <jni.h>
#include "platform/video_timer.hpp"
namespace android
{
class VideoTimer : public ::VideoTimer
{
private:
jobject m_videoTimer;
public:
explicit VideoTimer(TFrameFn frameFn);
~VideoTimer();
void SetParentObject(jobject videoTimer);
void start();
void stop();
void resume();
void pause();
void perform();
};
}
extern android::VideoTimer * g_timer;