diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-03-25 04:49:04 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-03-25 04:49:04 +0000 |
commit | ceb8e40d146bd387e986d1ba4f54afbb07a300c1 (patch) | |
tree | e1fdcc650a2f74eed465001cf5e5b16cd9496597 /src/native | |
parent | 9f43e1b17472dce49d3b3825900c004ac28fdfc8 (diff) | |
download | jitsi-ceb8e40d146bd387e986d1ba4f54afbb07a300c1.zip jitsi-ceb8e40d146bd387e986d1ba4f54afbb07a300c1.tar.gz jitsi-ceb8e40d146bd387e986d1ba4f54afbb07a300c1.tar.bz2 |
Adds a few function to the JNI wrapper of FFmpeg which is to allow enabling faster transfer of frames from the H.264 decoder to the colorspace converter and scaler.
Diffstat (limited to 'src/native')
3 files changed, 267 insertions, 258 deletions
diff --git a/src/native/ffmpeg/Makefile b/src/native/ffmpeg/Makefile index 35ac4fc..586b137 100644 --- a/src/native/ffmpeg/Makefile +++ b/src/native/ffmpeg/Makefile @@ -1,8 +1,8 @@ -FFMPEG_HOME=/home/seb/svn_work/ffmpeg
-JAVA_HOME=/usr/lib/jvm/java-6-sun
+FFMPEG_HOME?=/home/seb/svn_work/ffmpeg
+JAVA_HOME?=/usr/lib/jvm/java-6-sun
#JAVA_HOME=/System/Library/Frameworks/JavaVM.framework
#JAVA_HOME=C:\Progra~1\jdk1.6.0_18
-X264_HOME=/home/seb/svn_work/x264-snapshot-20091208-2245
+X264_HOME?=/home/seb/svn_work/x264-snapshot-20091208-2245
CC=gcc
CPPFLAGS=-DJNI_IMPLEMENTATION \
diff --git a/src/native/ffmpeg/net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.c b/src/native/ffmpeg/net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.c index 85c8533..0e18018 100644 --- a/src/native/ffmpeg/net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.c +++ b/src/native/ffmpeg/net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.c @@ -60,25 +60,20 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1decode_ if (buf) {
jbyte *buf_ptr = (*jniEnv)->GetByteArrayElements (jniEnv, buf, NULL);
- if (buf_ptr)
- {
- AVPacket avpkt;
+ if (buf_ptr) {
+ AVPacket avpkt; +
av_init_packet(&avpkt);
- avpkt.data = (uint8_t *)buf_ptr;
- avpkt.size = (int)buf_size;
+ avpkt.data = (uint8_t *) buf_ptr;
+ avpkt.size = (int) buf_size; - ret = avcodec_decode_video2(
- (AVCodecContext *) avctx,
- (AVFrame *) frame,
- &n_got_picture,
- &avpkt);
+ ret + = avcodec_decode_video2(
+ (AVCodecContext *) avctx,
+ (AVFrame *) frame,
+ &n_got_picture,
+ &avpkt);
-/* if (buf_ptr) {
- ret = (jint)
- avcodec_decode_video ((AVCodecContext *) avctx,
- (AVFrame *) frame, &n_got_picture,
- (const uint8_t *) buf_ptr, (int) buf_size);
-*/
(*jniEnv)->ReleaseByteArrayElements (jniEnv, buf, buf_ptr, 0);
if (got_picture) {
@@ -128,9 +123,10 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1find_1e return (jlong) avcodec_find_encoder ((enum CodecID) id);
}
-/* empty log function to skip all the logs coming into the console */
+/* Empty log function to skip all logs coming out onto the terminal. */
static void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
-{}
+{ +}
JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodec_1init (
@@ -176,6 +172,12 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1 }
JNIEXPORT void JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1b_1frame_1strategy ( + JNIEnv *jniEnv, jclass clazz, jlong avctx, jint b_frame_strategy) {
+ ((AVCodecContext *) avctx)->b_frame_strategy = (int) b_frame_strategy;
+}
+
+JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1bit_1rate (
JNIEnv *jniEnv, jclass clazz, jlong avctx, jint bit_rate) {
((AVCodecContext *) avctx)->bit_rate = (int) bit_rate;
@@ -188,12 +190,24 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1 }
JNIEXPORT void JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1chromaoffset ( + JNIEnv *jniEnv, jclass clazz, jlong avctx, jint chromaoffset) {
+ ((AVCodecContext *) avctx)->chromaoffset = (int) chromaoffset;
+}
+
+JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1crf (
JNIEnv *jniEnv, jclass clazz, jlong avctx, jfloat crf) {
((AVCodecContext *) avctx)->crf = (float) crf;
}
JNIEXPORT void JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1deblockbeta ( + JNIEnv *jniEnv, jclass clazz, jlong avctx, jint deblockbeta) {
+ ((AVCodecContext *) avctx)->deblockbeta = (int) deblockbeta;
+}
+
+JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1gop_1size (
JNIEnv *jniEnv, jclass clazz, jlong avctx, jint gop_size) {
((AVCodecContext *) avctx)->gop_size = (int) gop_size;
@@ -206,6 +220,12 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1 }
JNIEXPORT void JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1max_1b_1frames ( + JNIEnv *jniEnv, jclass clazz, jlong avctx, jint max_b_frames) {
+ ((AVCodecContext *) avctx)->max_b_frames = (int) max_b_frames;
+}
+
+JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1mb_1decision (
JNIEnv *jniEnv, jclass clazz, jlong avctx, jint mb_decision) {
((AVCodecContext *) avctx)->mb_decision = (int) mb_decision;
@@ -290,6 +310,12 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1 }
JNIEXPORT void JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1refs ( + JNIEnv *jniEnv, jclass clazz, jlong avctx, jint refs) {
+ ((AVCodecContext *) avctx)->refs = (int) refs;
+}
+
+JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1sample_1aspect_1ratio (
JNIEnv *jniEnv, jclass clazz, jlong avctx, jint num, jint den) {
AVRational *sample_aspect_ratio =
@@ -322,6 +348,12 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1 }
JNIEXPORT void JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1ticks_1per_1frame ( + JNIEnv *jniEnv, jclass clazz, jlong avctx, jint ticks_per_frame) {
+ ((AVCodecContext *) avctx)->ticks_per_frame = (int) ticks_per_frame;
+}
+
+JNIEXPORT void JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1time_1base (
JNIEnv *jniEnv, jclass clazz, jlong avctx, jint num, jint den) {
AVRational *time_base = &(((AVCodecContext *) avctx)->time_base);
@@ -331,58 +363,15 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1 }
JNIEXPORT void JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1workaround_1bugs (
- JNIEnv *jniEnv, jclass clazz, jlong avctx, jint workaround_bugs) {
- ((AVCodecContext *) avctx)->workaround_bugs = (int) workaround_bugs;
-}
-
-JNIEXPORT void JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1max_1b_1frames
- (JNIEnv *jniEnv, jclass clazz, jlong avctx, jint max_b_frames)
-{
- ((AVCodecContext *) avctx)->max_b_frames = (int) max_b_frames;
-}
-
-JNIEXPORT void JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1b_1frame_1strategy
- (JNIEnv *jniEnv, jclass clazz, jlong avctx, jint b_frame_strategy)
-{
- ((AVCodecContext *) avctx)->b_frame_strategy = (int) b_frame_strategy;
-}
-
-JNIEXPORT void JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1trellis
- (JNIEnv *jniEnv, jclass clazz, jlong avctx, jint trellis)
-{
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1trellis ( + JNIEnv *jniEnv, jclass clazz, jlong avctx, jint trellis) {
((AVCodecContext *) avctx)->trellis = (int) trellis;
}
JNIEXPORT void JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1refs
- (JNIEnv *jniEnv, jclass clazz, jlong avctx, jint refs)
-{
- ((AVCodecContext *) avctx)->refs = (int) refs;
-}
-
-JNIEXPORT void JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1chromaoffset
- (JNIEnv *jniEnv, jclass clazz, jlong avctx, jint chromaoffset)
-{
- ((AVCodecContext *) avctx)->chromaoffset = (int) chromaoffset;
-}
-
-JNIEXPORT void JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1deblockbeta
- (JNIEnv *jniEnv, jclass clazz, jlong avctx, jint deblockbeta)
-{
- ((AVCodecContext *) avctx)->deblockbeta = (int) deblockbeta;
-}
-
-JNIEXPORT void JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1ticks_1per_1frame
- (JNIEnv *jniEnv, jclass clazz, jlong avctx, jint ticks_per_frame)
-{
- ((AVCodecContext *) avctx)->ticks_per_frame = (int) ticks_per_frame;
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1workaround_1bugs (
+ JNIEnv *jniEnv, jclass clazz, jlong avctx, jint workaround_bugs) {
+ ((AVCodecContext *) avctx)->workaround_bugs = (int) workaround_bugs;
}
JNIEXPORT void JNICALL
@@ -434,67 +423,131 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avpicture_1get_1 return (jint) avpicture_get_size ((int) pix_fmt, (int) width, (int) height);
}
-static int image_convert(
-AVPicture* dst, int dst_pix_fmt,
-const AVPicture* src, int pix_fmt, int width, int height, int newWidth, int newHeight)
-{
- struct SwsContext *img_convert_ctx =
- sws_getContext(
+JNIEXPORT jint JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getBGR32Format ( + JNIEnv *env, jclass clazz) {
+ return PIX_FMT_BGR32;
+}
+
+JNIEXPORT jint JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getBGR32_11Format ( + JNIEnv *env, jclass clazz) {
+ return PIX_FMT_BGR32_1;
+}
+
+JNIEXPORT jint JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB24Format ( + JNIEnv *jniEnv, jclass clazz) {
+ uint32_t test = 1;
+ int little_endian = *((uint8_t*)&test);
+ + return little_endian ? PIX_FMT_BGR24 : PIX_FMT_RGB24;
+}
+
+JNIEXPORT jint JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32Format ( + JNIEnv *env, jclass clazz) {
+ return PIX_FMT_RGB32;
+}
+
+JNIEXPORT jint JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32_11Format ( + JNIEnv *env, jclass clazz) {
+ return PIX_FMT_RGB32_1;
+}
+
+JNIEXPORT jint JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getYUV420PFormat ( + JNIEnv *env, jclass clazz) {
+ return PIX_FMT_YUV420P;
+}
+
+static int image_convert (AVPicture* dst, int dst_pix_fmt, const AVPicture* src, + int pix_fmt, int width, int height, int newWidth, int newHeight) {
+ struct SwsContext *img_convert_ctx
+ = sws_getContext(
width, height, pix_fmt,
- newWidth, newHeight, dst_pix_fmt, SWS_BICUBIC, NULL, NULL, NULL);
+ newWidth, newHeight, dst_pix_fmt, + SWS_BICUBIC, NULL, NULL, NULL);
+ int result + = sws_scale( + img_convert_ctx,
+ (uint8_t**)src->data, (int*)src->linesize, 0, height,
+ dst->data, dst->linesize); - int result = sws_scale(img_convert_ctx,
- (uint8_t**)src->data, (int*)src->linesize, 0, height,
- dst->data, dst->linesize);
sws_freeContext(img_convert_ctx);
-
return result;
}
JNIEXPORT jint JNICALL
Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert__JIJIII (
JNIEnv *jniEnv, jclass clazz, jlong dst, jint dst_pix_fmt, jlong src,
- jint pix_fmt, jint width, jint height)
-{
+ jint pix_fmt, jint width, jint height) {
return (jint)
image_convert (
- (AVPicture *) dst,
- (int) dst_pix_fmt,
- (const AVPicture *) src,
- (int) pix_fmt,
- (int) width,
- (int) height,
- (int) width,
- (int) height);
+ (AVPicture *) dst, (int) dst_pix_fmt,
+ (const AVPicture *) src, (int) pix_fmt,
+ (int) width, (int) height,
+ (int) width, (int) height);
}
JNIEXPORT jint JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert__Ljava_lang_Object_2ILjava_lang_Object_2IIIII
- (JNIEnv *jniEnv, jclass clazz, jobject dst, jint dst_pix_fmt,
- jobject src, jint pix_fmt, jint width, jint height, jint newWidth, jint newHeight)
-{
- uint8_t* src_buf = (*jniEnv)->GetPrimitiveArrayCritical(jniEnv, (jarray)src, 0);
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert__Ljava_lang_Object_2IJIIIII (
+ JNIEnv *jniEnv, jclass clazz, jobject dst, jint dst_pix_fmt,
+ jlong src, jint pix_fmt, jint width, jint height, jint newWidth, jint newHeight) {
uint8_t* dst_buf = (*jniEnv)->GetPrimitiveArrayCritical(jniEnv, (jarray)dst, 0);
- AVPicture dst_dummy;
- AVPicture src_dummy;
- int size = width * height;
- jint ret = 0;
+ jint ret;
- if(!src_buf || !dst_buf)
+ if (dst_buf)
{
- return -1;
+ AVPicture dst_dummy;
+
+ /* Turn the bytes into an AVPicture. */
+ avpicture_fill(
+ &dst_dummy,
+ dst_buf,
+ (int)dst_pix_fmt,
+ newWidth, newHeight);
+
+ ret
+ = image_convert(
+ &dst_dummy, (int) dst_pix_fmt,
+ (AVPicture *) src, (int) pix_fmt, (int) width, (int) height,
+ (int) newWidth, (int) newHeight);
+
+ (*jniEnv)->ReleasePrimitiveArrayCritical(jniEnv, dst, dst_buf, 0);
}
+ else
+ ret = -1;
+ return ret;
+}
+
+JNIEXPORT jint JNICALL
+Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert__Ljava_lang_Object_2ILjava_lang_Object_2IIIII ( + JNIEnv *jniEnv, jclass clazz, jobject dst, jint dst_pix_fmt, + jobject src, jint pix_fmt, jint width, jint height, jint newWidth, jint newHeight) {
+ uint8_t* src_buf = (*jniEnv)->GetPrimitiveArrayCritical(jniEnv, (jarray) src, 0);
+ jint ret;
+
+ if (src_buf)
+ {
+ AVPicture src_dummy;
- /* assign AVPicture with buffer */
- avpicture_fill(&dst_dummy, dst_buf, (int)dst_pix_fmt, newWidth, newHeight);
- avpicture_fill(&src_dummy, src_buf, (int)pix_fmt, width, height);
+ /* Turn the bytes into an AVPicture. */
+ avpicture_fill(&src_dummy, src_buf, (int) pix_fmt, width, height);
- ret = image_convert(&dst_dummy, (int)dst_pix_fmt, &src_dummy, (int)pix_fmt,
- (int)width, (int)height, (int)newWidth, (int)newHeight);
+ ret
+ = Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert__Ljava_lang_Object_2IJIIIII(
+ jniEnv, clazz,
+ dst, dst_pix_fmt,
+ (jlong) &src_dummy, pix_fmt, width, height,
+ newWidth, newHeight);
- /* release pointers */
- (*jniEnv)->ReleasePrimitiveArrayCritical(jniEnv, dst, dst_buf, 0);
- (*jniEnv)->ReleasePrimitiveArrayCritical(jniEnv, src, src_buf, 0);
+ /* Clean up. */
+ (*jniEnv)->ReleasePrimitiveArrayCritical(jniEnv, src, src_buf, 0);
+ }
+ else
+ ret = -1;
return ret;
}
@@ -512,56 +565,4 @@ Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_memcpy__J_3BII ( jint src_offset, jint src_length) {
(*jniEnv)->GetByteArrayRegion (jniEnv, src, src_offset, src_length,
(jbyte *) dst);
-}
-
-JNIEXPORT jint JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB24Format
- (JNIEnv *jniEnv, jclass clazz)
-{
- uint32_t test = 1;
- int little_endian = *((uint8_t*)&test);
-
- if(little_endian)
- {
- return PIX_FMT_BGR24;
- }
- else /* big endian */
- {
- return PIX_FMT_RGB24;
- }
-}
-
-JNIEXPORT jint JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32Format
- (JNIEnv *env, jclass clazz)
-{
- return PIX_FMT_RGB32;
-}
-
-JNIEXPORT jint JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32_11Format
- (JNIEnv *env, jclass clazz)
-{
- return PIX_FMT_RGB32_1;
-}
-
-JNIEXPORT jint JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getBGR32Format
- (JNIEnv *env, jclass clazz)
-{
- return PIX_FMT_BGR32;
-}
-
-JNIEXPORT jint JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getBGR32_11Format
- (JNIEnv *env, jclass clazz)
-{
- return PIX_FMT_BGR32_1;
-}
-
-JNIEXPORT jint JNICALL
-Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getYUV420PFormat
- (JNIEnv *env, jclass clazz)
-{
- return PIX_FMT_YUV420P;
-}
+} diff --git a/src/native/ffmpeg/net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.h b/src/native/ffmpeg/net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.h index 02b2ecf..98d3246 100644 --- a/src/native/ffmpeg/net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.h +++ b/src/native/ffmpeg/net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG.h @@ -23,54 +23,6 @@ extern "C" { #define net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_X264_RC_ABR 2L /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: getRGB32Format - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32Format - (JNIEnv *, jclass); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: getRGB32_1Format - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32_11Format - (JNIEnv *, jclass); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: getBGR32Format - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getBGR32Format - (JNIEnv *, jclass); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: getBGR32_1Format - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getBGR32_11Format - (JNIEnv *, jclass); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: getRGB24Format - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB24Format - (JNIEnv *, jclass); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: getYUV420PFormat - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getYUV420PFormat - (JNIEnv *, jclass); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG * Method: av_free * Signature: (J)V */ @@ -207,6 +159,14 @@ JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: avcodeccontext_set_b_frame_strategy + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1b_1frame_1strategy + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG * Method: avcodeccontext_set_bit_rate * Signature: (JI)V */ @@ -223,6 +183,14 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: avcodeccontext_set_chromaoffset + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1chromaoffset + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG * Method: avcodeccontext_set_crf * Signature: (JF)V */ @@ -231,6 +199,14 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: avcodeccontext_set_deblockbeta + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1deblockbeta + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG * Method: avcodeccontext_set_gop_size * Signature: (JI)V */ @@ -247,6 +223,14 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: avcodeccontext_set_max_b_frames + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1max_1b_1frames + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG * Method: avcodeccontext_set_mb_decision * Signature: (JI)V */ @@ -335,6 +319,14 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: avcodeccontext_set_refs + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1refs + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG * Method: avcodeccontext_set_sample_aspect_ratio * Signature: (JII)V */ @@ -367,35 +359,19 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: avcodeccontext_set_time_base - * Signature: (JII)V - */ -JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1time_1base - (JNIEnv *, jclass, jlong, jint, jint); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: avcodeccontext_set_workaround_bugs - * Signature: (JI)V - */ -JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1workaround_1bugs - (JNIEnv *, jclass, jlong, jint); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: avcodeccontext_set_max_b_frames + * Method: avcodeccontext_set_ticks_per_frame * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1max_1b_1frames +JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1ticks_1per_1frame (JNIEnv *, jclass, jlong, jint); /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: avcodeccontext_set_b_frame_strategy - * Signature: (JI)V + * Method: avcodeccontext_set_time_base + * Signature: (JII)V */ -JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1b_1frame_1strategy - (JNIEnv *, jclass, jlong, jint); +JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1time_1base + (JNIEnv *, jclass, jlong, jint, jint); /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG @@ -407,34 +383,10 @@ JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: avcodeccontext_set_refs - * Signature: (JI)V - */ -JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1refs - (JNIEnv *, jclass, jlong, jint); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: avcodeccontext_set_chromaoffset - * Signature: (JI)V - */ -JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1chromaoffset - (JNIEnv *, jclass, jlong, jint); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: avcodeccontext_set_deblockbeta - * Signature: (JI)V - */ -JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1deblockbeta - (JNIEnv *, jclass, jlong, jint); - -/* - * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG - * Method: avcodeccontext_set_ticks_per_frame + * Method: avcodeccontext_set_workaround_bugs * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1ticks_1per_1frame +JNIEXPORT void JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_avcodeccontext_1set_1workaround_1bugs (JNIEnv *, jclass, jlong, jint); /* @@ -487,6 +439,54 @@ JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: getRGB32Format + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32Format + (JNIEnv *, jclass); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: getRGB32_1Format + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB32_11Format + (JNIEnv *, jclass); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: getBGR32Format + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getBGR32Format + (JNIEnv *, jclass); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: getBGR32_1Format + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getBGR32_11Format + (JNIEnv *, jclass); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: getRGB24Format + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getRGB24Format + (JNIEnv *, jclass); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: getYUV420PFormat + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_getYUV420PFormat + (JNIEnv *, jclass); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG * Method: img_convert * Signature: (JIJIII)I */ @@ -496,6 +496,14 @@ JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_ /* * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG * Method: img_convert + * Signature: (Ljava/lang/Object;IJIIIII)I + */ +JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert__Ljava_lang_Object_2IJIIIII + (JNIEnv *, jclass, jobject, jint, jlong, jint, jint, jint, jint, jint); + +/* + * Class: net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG + * Method: img_convert * Signature: (Ljava/lang/Object;ILjava/lang/Object;IIIII)I */ JNIEXPORT jint JNICALL Java_net_java_sip_communicator_impl_neomedia_codec_video_FFMPEG_img_1convert__Ljava_lang_Object_2ILjava_lang_Object_2IIIII |