author | Xiaoliang Wang <xiaoliang.wang@amlogic.com> | 2016-09-14 02:59:29 (GMT) |
---|---|---|
committer | Xiaoliang Wang <xiaoliang.wang@amlogic.com> | 2016-09-14 02:59:29 (GMT) |
commit | 998826e900ee4c253f60a04cb221454eeb4ceaf6 (patch) | |
tree | 1038a12c0f0ee82d3d8f20fb1015356891472e04 | |
parent | f7bf1438cfc3490bff74ebfcfdaaa5f3312db272 (diff) | |
download | SubTitle-998826e900ee4c253f60a04cb221454eeb4ceaf6.zip SubTitle-998826e900ee4c253f60a04cb221454eeb4ceaf6.tar.gz SubTitle-998826e900ee4c253f60a04cb221454eeb4ceaf6.tar.bz2 |
change for android n compile fail
Change-Id: I194b414c341026775593565bc4330715f62d9277
-rw-r--r-- | jni/subtitle/sub_jni.c | 8 | ||||
-rw-r--r-- | jni/subtitle/vob_sub.c | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/jni/subtitle/sub_jni.c b/jni/subtitle/sub_jni.c index 1fbf489..22ad6f9 100644 --- a/jni/subtitle/sub_jni.c +++ b/jni/subtitle/sub_jni.c @@ -298,7 +298,7 @@ JNIEXPORT jobject JNICALL getrawdata(JNIEnv *env, jclass cl, jint msec) } jbyteArray array = (*env)->NewByteArray(env, sub_size); (*env)->SetByteArrayRegion(env, array, 0, sub_size, - get_inter_spu_data()); + (jbyte *)get_inter_spu_data()); LOGE("getrawdata: SetByteArrayRegion finish"); jobject obj = (*env)->NewObject(env, cls, constrforstr, array, get_inter_spu_delay() / 90, 0); @@ -322,7 +322,7 @@ JNIEXPORT jobject JNICALL getrawdata(JNIEnv *env, jclass cl, jint msec) } jbyteArray array = (*env)->NewByteArray(env, sub_size); (*env)->SetByteArrayRegion(env, array, 0, sub_size, - get_inter_spu_data()); + (jbyte *)get_inter_spu_data()); int sub_start_pts = (get_inter_spu_pts() - get_subtitle_startpts()) / 90; jobject obj = @@ -347,7 +347,7 @@ JNIEXPORT jobject JNICALL getrawdata(JNIEnv *env, jclass cl, jint msec) //} jintArray array = (*env)->NewIntArray(env, sub_size); (*env)->SetIntArrayRegion(env, array, 0, sub_size, - get_inter_spu_data()); + (jint *)get_inter_spu_data()); LOGE("getrawdata: SetByteArrayRegion finish"); int sub_start_pts = (get_inter_spu_pts() - get_subtitle_startpts()) / 90; //- get_subtitle_startpts() adjust offset for pgs showing int delay_pts = get_inter_spu_delay(); @@ -389,7 +389,7 @@ JNIEXPORT jobject JNICALL getrawdata(JNIEnv *env, jclass cl, jint msec) get_inter_spu_width()); jintArray array = (*env)->NewIntArray(env, sub_size); (*env)->SetIntArrayRegion(env, array, 0, sub_size, - get_inter_spu_data()); + (jint *)get_inter_spu_data()); jobject obj = (*env)->NewObject(env, cls, constrforpgs, array, 1, get_inter_spu_width(), diff --git a/jni/subtitle/vob_sub.c b/jni/subtitle/vob_sub.c index 17f39da..60a19a0 100644 --- a/jni/subtitle/vob_sub.c +++ b/jni/subtitle/vob_sub.c @@ -2100,14 +2100,6 @@ void idxsub_close_subtitle() } } -//change data from 2bit to 32bit -void idxsub_parser_data(const unsigned char *source, long length, int linewidth, - unsigned int *dist, int subtitle_alpha) -{ - covert2bto32b(source, length, linewidth, dist, subtitle_alpha); - return 0; -} - void covert2bto32b(const unsigned char *source, long length, int bytesPerLine, unsigned int *dist, int subtitle_alpha) { @@ -2250,3 +2242,11 @@ void covert2bto32b(const unsigned char *source, long length, int bytesPerLine, // // LOGE("write bytes %d / %d ",bytes, length*16); } + +//change data from 2bit to 32bit +void idxsub_parser_data(const unsigned char *source, long length, int linewidth, + unsigned int *dist, int subtitle_alpha) +{ + covert2bto32b(source, length, linewidth, dist, subtitle_alpha); + return ; +} |