summaryrefslogtreecommitdiffstats
path: root/src/jogl/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/native')
-rw-r--r--src/jogl/native/openmax/jogamp_opengl_omx_OMXGLMediaPlayer.c (renamed from src/jogl/native/openmax/jogamp.opengl.omx.OMXGLMediaPlayer.c)8
-rw-r--r--src/jogl/native/openmax/omx_tool.c14
-rw-r--r--src/jogl/native/openmax/omx_tool.h4
3 files changed, 13 insertions, 13 deletions
diff --git a/src/jogl/native/openmax/jogamp.opengl.omx.OMXGLMediaPlayer.c b/src/jogl/native/openmax/jogamp_opengl_omx_OMXGLMediaPlayer.c
index 00c0ca562..86307ae59 100644
--- a/src/jogl/native/openmax/jogamp.opengl.omx.OMXGLMediaPlayer.c
+++ b/src/jogl/native/openmax/jogamp_opengl_omx_OMXGLMediaPlayer.c
@@ -115,7 +115,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_opengl_omx_OMXGLMediaPlayer__1createInstance
pOMXAV->jni_env=(intptr_t)env;
pOMXAV->jni_instance=(intptr_t)instance;
- pOMXAV = OMXToolBasicAV_CreateInstance((intptr_t)env, (intptr_t)instance);
+ pOMXAV = OMXToolBasicAV_CreateInstance((EGLDisplay)(intptr_t)env);
if(NULL!=pOMXAV) {
jclass cls = (*env)->GetObjectClass(env, instance);
pOMXAV->jni_mid_saveAttributes = (intptr_t) (*env)->GetMethodID(env, cls, "saveAttributes", "()V");
@@ -213,8 +213,8 @@ JNIEXPORT void JNICALL Java_jogamp_opengl_omx_OMXGLMediaPlayer__1stop
OMXToolBasicAV_PlayStop(pOMXAV);
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_omx_OMXGLMediaPlayer__1seek
- (JNIEnv *env, jobject instance, jlong ptr, jfloat pos)
+JNIEXPORT jlong JNICALL Java_jogamp_opengl_omx_OMXGLMediaPlayer__1seek
+ (JNIEnv *env, jobject instance, jlong ptr, jlong pos)
{
OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr));
OMXToolBasicAV_PlaySeek(pOMXAV, pos);
@@ -232,7 +232,7 @@ JNIEXPORT jint JNICALL Java_jogamp_opengl_omx_OMXGLMediaPlayer__1getNextTextureI
return textureID;
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_omx_OMXGLMediaPlayer__1getCurrentPosition
+JNIEXPORT jlong JNICALL Java_jogamp_opengl_omx_OMXGLMediaPlayer__1getCurrentPosition
(JNIEnv *env, jobject instance, jlong ptr)
{
OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr));
diff --git a/src/jogl/native/openmax/omx_tool.c b/src/jogl/native/openmax/omx_tool.c
index 1f2ce7da7..784d6facf 100644
--- a/src/jogl/native/openmax/omx_tool.c
+++ b/src/jogl/native/openmax/omx_tool.c
@@ -627,14 +627,14 @@ static int StartClock(OMXToolBasicAV_t * pOMXAV, KDboolean start, KDfloat32 time
return (OMX_ErrorNotReady == eError)?-1:0;
}
-static KDint GetClockPosition(OMXToolBasicAV_t * pOMXAV)
+static KDint64 GetClockPosition(OMXToolBasicAV_t * pOMXAV)
{
OMX_TIME_CONFIG_TIMESTAMPTYPE stamp;
INIT_PARAM(stamp);
stamp.nPortIndex = 0;
OMX_GetConfig(pOMXAV->comp[OMXAV_H_CLOCK], OMX_IndexConfigTimeCurrentMediaTime, &stamp);
- return (int) ( stamp.nTimestamp / 1000 );
+ return (KDint64) ( stamp.nTimestamp / 1000L );
}
static KDfloat32 GetClockScale(OMXToolBasicAV_t * pOMXAV)
@@ -656,13 +656,13 @@ static KDint SetClockScale(OMXToolBasicAV_t * pOMXAV, KDfloat32 scale)
return 0;
}
-static int SetMediaPosition(OMXToolBasicAV_t * pOMXAV, KDfloat32 time) {
+static int SetMediaPosition(OMXToolBasicAV_t * pOMXAV, KDint64 time) {
OMX_ERRORTYPE eError = OMX_ErrorNone;
OMX_TIME_CONFIG_TIMESTAMPTYPE timestamp;
int loop=STATE_TIMEOUT_LOOP;
INIT_PARAM(timestamp);
timestamp.nPortIndex = 0;
- timestamp.nTimestamp = (OMX_TICKS) (time * 1000.0 * 1000.0);
+ timestamp.nTimestamp = (OMX_TICKS) (time * 1000L);
eError = OMX_SetConfig(pOMXAV->comp[OMXAV_H_READER], OMX_IndexConfigTimePosition, &timestamp);
while (loop>0 && OMX_ErrorNotReady == eError)
@@ -1334,7 +1334,7 @@ void OMXToolBasicAV_PlayPause(OMXToolBasicAV_t * pOMXAV)
kdThreadMutexUnlock(pOMXAV->mutex);
}
-void OMXToolBasicAV_PlaySeek(OMXToolBasicAV_t * pOMXAV, KDfloat32 time)
+void OMXToolBasicAV_PlaySeek(OMXToolBasicAV_t * pOMXAV, KDint64 time)
{
int res;
@@ -1474,8 +1474,8 @@ GLuint OMXToolBasicAV_GetNextTextureID(OMXToolBasicAV_t * pOMXAV) {
return texID;
}
-KDint OMXToolBasicAV_GetCurrentPosition(OMXToolBasicAV_t * pOMXAV) {
- KDfloat32 res = -1.0f;
+KDint64 OMXToolBasicAV_GetCurrentPosition(OMXToolBasicAV_t * pOMXAV) {
+ KDint64 res = 0L;
if(NULL==pOMXAV) {
java_throwNewRuntimeException(0, "OMX instance null\n");
return res;
diff --git a/src/jogl/native/openmax/omx_tool.h b/src/jogl/native/openmax/omx_tool.h
index cb0f125ec..be5b8f175 100644
--- a/src/jogl/native/openmax/omx_tool.h
+++ b/src/jogl/native/openmax/omx_tool.h
@@ -138,10 +138,10 @@ void OMXToolBasicAV_SetPlaySpeed(OMXToolBasicAV_t * pOMXAV, KDfloat32 scale);
void OMXToolBasicAV_PlayStart(OMXToolBasicAV_t * pOMXAV); // #5
void OMXToolBasicAV_PlayPause(OMXToolBasicAV_t * pOMXAV);
void OMXToolBasicAV_PlayStop(OMXToolBasicAV_t * pOMXAV);
-void OMXToolBasicAV_PlaySeek(OMXToolBasicAV_t * pOMXAV, KDfloat32 time);
+void OMXToolBasicAV_PlaySeek(OMXToolBasicAV_t * pOMXAV, KDint64 time);
GLuint OMXToolBasicAV_GetNextTextureID(OMXToolBasicAV_t * pOMXAV);
-KDint OMXToolBasicAV_GetCurrentPosition(OMXToolBasicAV_t * pOMXAV);
+KDint64 OMXToolBasicAV_GetCurrentPosition(OMXToolBasicAV_t * pOMXAV);
void OMXToolBasicAV_DestroyInstance(OMXToolBasicAV_t * pOMXAV);