diff options
author | Andrew Comminos <andrewcomminos@gmail.com> | 2013-10-19 08:11:33 +0400 |
---|---|---|
committer | Andrew Comminos <andrewcomminos@gmail.com> | 2013-10-19 08:11:33 +0400 |
commit | 970790dfe209174312a6484073571f5be7ab9daf (patch) | |
tree | b56a55004dcec5ed958abe9a91cf9aaa03c12f09 /src/main/java | |
parent | dd77642eefd2c02c46c2a2a8b9b8ae2895252c64 (diff) |
In-progress native code work.
Diffstat (limited to 'src/main/java')
5 files changed, 127 insertions, 131 deletions
diff --git a/src/main/java/com/morlunk/jumble/audio/AudioOutput.java b/src/main/java/com/morlunk/jumble/audio/AudioOutput.java index eab3d53..1d7689c 100644 --- a/src/main/java/com/morlunk/jumble/audio/AudioOutput.java +++ b/src/main/java/com/morlunk/jumble/audio/AudioOutput.java @@ -79,6 +79,8 @@ public class AudioOutput extends JumbleMessageHandler.Stub implements Runnable, public void stopPlaying() { mRunning = false; mThread = null; + for(AudioOutputSpeech s : mAudioOutputs.values()) + s.destroy(); } @Override @@ -153,11 +155,11 @@ public class AudioOutput extends JumbleMessageHandler.Stub implements Runnable, System.arraycopy(data, 1, voiceData, 0, voiceData.length); PacketDataStream pds = new PacketDataStream(voiceData, voiceData.length); - int session = pds.next(); + int session = (int) pds.readLong(); User user = mService.getUserHandler().getUser(session); if(user != null && !user.isLocalMuted()) { // TODO check for whispers here - int seq = pds.next(); + int seq = (int) pds.readLong(); ByteBuffer packet = ByteBuffer.allocate(pds.left() + 1); packet.put((byte)msgFlags); packet.put(pds.dataBlock(pds.left())); diff --git a/src/main/java/com/morlunk/jumble/audio/AudioOutputSpeech.java b/src/main/java/com/morlunk/jumble/audio/AudioOutputSpeech.java index e072199..91eb4ae 100644 --- a/src/main/java/com/morlunk/jumble/audio/AudioOutputSpeech.java +++ b/src/main/java/com/morlunk/jumble/audio/AudioOutputSpeech.java @@ -16,9 +16,6 @@ package com.morlunk.jumble.audio; -import android.util.Log; - -import com.morlunk.jumble.Constants; import com.morlunk.jumble.audio.celt11.CELT11; import com.morlunk.jumble.audio.celt7.CELT7; import com.morlunk.jumble.audio.opus.Opus; @@ -107,14 +104,12 @@ public class AudioOutputSpeech { return; PacketDataStream pds = new PacketDataStream(data, data.length); - - // skip flags - pds.next(); + pds.next(); // skip flags int samples = 0; if(mCodec == JumbleUDPMessageType.UDPVoiceOpus) { - int size = pds.next(); - size &= 0x1fff; + long header = pds.readLong(); + int size = (int) (header & ((1 << 13) - 1)); byte[] packet = pds.dataBlock(size); int frames = Opus.opus_packet_get_nb_frames(packet, size); @@ -132,11 +127,7 @@ public class AudioOutputSpeech { } if(pds.isValid()) { - JitterBufferPacket jbp = new JitterBufferPacket(); - jbp.setData(data); - jbp.setLen(data.length); - jbp.setSpan(samples); - jbp.setTimestamp(Audio.FRAME_SIZE * seq); + JitterBufferPacket jbp = Speex.wrap_create_jitter_buffer_packet(data, Audio.FRAME_SIZE*seq, samples); synchronized(mJitterBuffer) { Speex.jitter_buffer_put(mJitterBuffer, jbp); } @@ -180,11 +171,7 @@ public class AudioOutputSpeech { } if(mFrames.isEmpty()) { - byte[] data = new byte[4096]; - JitterBufferPacket jbp = new JitterBufferPacket(); - jbp.setData(data); - jbp.setLen(4096); - + JitterBufferPacket jbp = Speex.wrap_create_jitter_buffer_packet(new byte[4096], 0, 0); int[] startofs = new int[1]; int result = 0; @@ -193,17 +180,19 @@ public class AudioOutputSpeech { } if(result == SpeexConstants.JITTER_BUFFER_OK) { - PacketDataStream pds = new PacketDataStream(jbp.getData(), (int)jbp.getLen()); + byte[] data = jbp.getData(); + PacketDataStream pds = new PacketDataStream(data, (int)jbp.getLen()); mMissCount = 0; ucFlags = pds.next(); mHasTerminator = false; if(mCodec == JumbleUDPMessageType.UDPVoiceOpus) { - int size = pds.next(); + long header = pds.readLong(); + int size = (int) (header & ((1 << 13) - 1)); - mHasTerminator = (size & 0x2000) > 0; - mFrames.add(pds.dataBlock(size & 0x1fff)); + mHasTerminator = (header & (1 << 13)) > 0; + mFrames.add(pds.dataBlock(size)); } else { int header; do { @@ -260,7 +249,7 @@ public class AudioOutputSpeech { if(mFrames.isEmpty()) synchronized (mJitterBuffer) { - Speex.jitter_buffer_update_delay(mJitterBuffer, null, null); + Speex.jitter_buffer_update_delay(mJitterBuffer, null, new int[] { 0 }); } if(mFrames.isEmpty() && mHasTerminator) diff --git a/src/main/java/com/morlunk/jumble/audio/speex/Speex.java b/src/main/java/com/morlunk/jumble/audio/speex/Speex.java index a226288..b04d182 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/Speex.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/Speex.java @@ -160,51 +160,6 @@ public class Speex implements SpeexConstants { SpeexJNI.speex_bits_insert_terminator(SpeexBits.getCPtr(bits), bits); } - public static SWIGTYPE_p_JitterBuffer_ jitter_buffer_init(int step_size) { - long cPtr = SpeexJNI.jitter_buffer_init(step_size); - return (cPtr == 0) ? null : new SWIGTYPE_p_JitterBuffer_(cPtr, false); - } - - public static void jitter_buffer_reset(SWIGTYPE_p_JitterBuffer_ jitter) { - SpeexJNI.jitter_buffer_reset(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter)); - } - - public static void jitter_buffer_destroy(SWIGTYPE_p_JitterBuffer_ jitter) { - SpeexJNI.jitter_buffer_destroy(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter)); - } - - public static void jitter_buffer_put(SWIGTYPE_p_JitterBuffer_ jitter, JitterBufferPacket packet) { - SpeexJNI.jitter_buffer_put(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), JitterBufferPacket.getCPtr(packet), packet); - } - - public static int jitter_buffer_get(SWIGTYPE_p_JitterBuffer_ jitter, JitterBufferPacket packet, int desired_span, int[] start_offset) { - return SpeexJNI.jitter_buffer_get(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), JitterBufferPacket.getCPtr(packet), packet, desired_span, start_offset); - } - - public static int jitter_buffer_get_another(SWIGTYPE_p_JitterBuffer_ jitter, JitterBufferPacket packet) { - return SpeexJNI.jitter_buffer_get_another(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), JitterBufferPacket.getCPtr(packet), packet); - } - - public static int jitter_buffer_get_pointer_timestamp(SWIGTYPE_p_JitterBuffer_ jitter) { - return SpeexJNI.jitter_buffer_get_pointer_timestamp(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter)); - } - - public static void jitter_buffer_tick(SWIGTYPE_p_JitterBuffer_ jitter) { - SpeexJNI.jitter_buffer_tick(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter)); - } - - public static void jitter_buffer_remaining_span(SWIGTYPE_p_JitterBuffer_ jitter, long rem) { - SpeexJNI.jitter_buffer_remaining_span(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), rem); - } - - public static int jitter_buffer_ctl(SWIGTYPE_p_JitterBuffer_ jitter, int request, int[] ptr) { - return SpeexJNI.jitter_buffer_ctl(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), request, ptr); - } - - public static int jitter_buffer_update_delay(SWIGTYPE_p_JitterBuffer_ jitter, JitterBufferPacket packet, int[] start_offset) { - return SpeexJNI.jitter_buffer_update_delay(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), JitterBufferPacket.getCPtr(packet), packet, start_offset); - } - public static SWIGTYPE_p_SpeexEchoState_ speex_echo_state_init(int frame_size, int filter_length) { long cPtr = SpeexJNI.speex_echo_state_init(frame_size, filter_length); return (cPtr == 0) ? null : new SWIGTYPE_p_SpeexEchoState_(cPtr, false); @@ -346,4 +301,53 @@ public class Speex implements SpeexConstants { return SpeexJNI.speex_resampler_strerror(err); } + public static SWIGTYPE_p_JitterBuffer_ jitter_buffer_init(int step_size) { + long cPtr = SpeexJNI.jitter_buffer_init(step_size); + return (cPtr == 0) ? null : new SWIGTYPE_p_JitterBuffer_(cPtr, false); + } + + public static void jitter_buffer_reset(SWIGTYPE_p_JitterBuffer_ jitter) { + SpeexJNI.jitter_buffer_reset(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter)); + } + + public static void jitter_buffer_destroy(SWIGTYPE_p_JitterBuffer_ jitter) { + SpeexJNI.jitter_buffer_destroy(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter)); + } + + public static void jitter_buffer_put(SWIGTYPE_p_JitterBuffer_ jitter, JitterBufferPacket packet) { + SpeexJNI.jitter_buffer_put(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), JitterBufferPacket.getCPtr(packet), packet); + } + + public static int jitter_buffer_get(SWIGTYPE_p_JitterBuffer_ jitter, JitterBufferPacket packet, int desired_span, int[] start_offset) { + return SpeexJNI.jitter_buffer_get(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), JitterBufferPacket.getCPtr(packet), packet, desired_span, start_offset); + } + + public static int jitter_buffer_get_another(SWIGTYPE_p_JitterBuffer_ jitter, JitterBufferPacket packet) { + return SpeexJNI.jitter_buffer_get_another(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), JitterBufferPacket.getCPtr(packet), packet); + } + + public static int jitter_buffer_get_pointer_timestamp(SWIGTYPE_p_JitterBuffer_ jitter) { + return SpeexJNI.jitter_buffer_get_pointer_timestamp(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter)); + } + + public static void jitter_buffer_tick(SWIGTYPE_p_JitterBuffer_ jitter) { + SpeexJNI.jitter_buffer_tick(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter)); + } + + public static void jitter_buffer_remaining_span(SWIGTYPE_p_JitterBuffer_ jitter, long rem) { + SpeexJNI.jitter_buffer_remaining_span(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), rem); + } + + public static int jitter_buffer_ctl(SWIGTYPE_p_JitterBuffer_ jitter, int request, int[] ptr) { + return SpeexJNI.jitter_buffer_ctl(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), request, ptr); + } + + public static int jitter_buffer_update_delay(SWIGTYPE_p_JitterBuffer_ jitter, JitterBufferPacket packet, int[] start_offset) { + return SpeexJNI.jitter_buffer_update_delay(SWIGTYPE_p_JitterBuffer_.getCPtr(jitter), JitterBufferPacket.getCPtr(packet), packet, start_offset); + } + + public static JitterBufferPacket wrap_create_jitter_buffer_packet(byte[] data, long timestamp, long span) { + return new JitterBufferPacket(SpeexJNI.wrap_create_jitter_buffer_packet(data, timestamp, span), true); + } + } diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java b/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java index dab4a6d..aecdddb 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexConstants.java @@ -62,6 +62,23 @@ public interface SpeexConstants { public final static int SPEEX_MODEID_NB = SpeexJNI.SPEEX_MODEID_NB_get(); public final static int SPEEX_MODEID_WB = SpeexJNI.SPEEX_MODEID_WB_get(); public final static int SPEEX_MODEID_UWB = SpeexJNI.SPEEX_MODEID_UWB_get(); + public final static int SPEEX_ECHO_GET_FRAME_SIZE = SpeexJNI.SPEEX_ECHO_GET_FRAME_SIZE_get(); + public final static int SPEEX_ECHO_SET_SAMPLING_RATE = SpeexJNI.SPEEX_ECHO_SET_SAMPLING_RATE_get(); + public final static int SPEEX_ECHO_GET_SAMPLING_RATE = SpeexJNI.SPEEX_ECHO_GET_SAMPLING_RATE_get(); + public final static int SPEEX_ECHO_GET_IMPULSE_RESPONSE_SIZE = SpeexJNI.SPEEX_ECHO_GET_IMPULSE_RESPONSE_SIZE_get(); + public final static int SPEEX_ECHO_GET_IMPULSE_RESPONSE = SpeexJNI.SPEEX_ECHO_GET_IMPULSE_RESPONSE_get(); + public final static int SPEEX_RESAMPLER_QUALITY_MAX = SpeexJNI.SPEEX_RESAMPLER_QUALITY_MAX_get(); + public final static int SPEEX_RESAMPLER_QUALITY_MIN = SpeexJNI.SPEEX_RESAMPLER_QUALITY_MIN_get(); + public final static int SPEEX_RESAMPLER_QUALITY_DEFAULT = SpeexJNI.SPEEX_RESAMPLER_QUALITY_DEFAULT_get(); + public final static int SPEEX_RESAMPLER_QUALITY_VOIP = SpeexJNI.SPEEX_RESAMPLER_QUALITY_VOIP_get(); + public final static int SPEEX_RESAMPLER_QUALITY_DESKTOP = SpeexJNI.SPEEX_RESAMPLER_QUALITY_DESKTOP_get(); + public final static int RESAMPLER_ERR_SUCCESS = SpeexJNI.RESAMPLER_ERR_SUCCESS_get(); + public final static int RESAMPLER_ERR_ALLOC_FAILED = SpeexJNI.RESAMPLER_ERR_ALLOC_FAILED_get(); + public final static int RESAMPLER_ERR_BAD_STATE = SpeexJNI.RESAMPLER_ERR_BAD_STATE_get(); + public final static int RESAMPLER_ERR_INVALID_ARG = SpeexJNI.RESAMPLER_ERR_INVALID_ARG_get(); + public final static int RESAMPLER_ERR_PTR_OVERLAP = SpeexJNI.RESAMPLER_ERR_PTR_OVERLAP_get(); + public final static int RESAMPLER_ERR_MAX_ERROR = SpeexJNI.RESAMPLER_ERR_MAX_ERROR_get(); + public final static int JITTER_BUFFER_OK = SpeexJNI.JITTER_BUFFER_OK_get(); public final static int JITTER_BUFFER_MISSING = SpeexJNI.JITTER_BUFFER_MISSING_get(); public final static int JITTER_BUFFER_INSERTION = SpeexJNI.JITTER_BUFFER_INSERTION_get(); @@ -81,21 +98,4 @@ public interface SpeexConstants { public final static int JITTER_BUFFER_GET_MAX_LATE_RATE = SpeexJNI.JITTER_BUFFER_GET_MAX_LATE_RATE_get(); public final static int JITTER_BUFFER_SET_LATE_COST = SpeexJNI.JITTER_BUFFER_SET_LATE_COST_get(); public final static int JITTER_BUFFER_GET_LATE_COST = SpeexJNI.JITTER_BUFFER_GET_LATE_COST_get(); - public final static int SPEEX_ECHO_GET_FRAME_SIZE = SpeexJNI.SPEEX_ECHO_GET_FRAME_SIZE_get(); - public final static int SPEEX_ECHO_SET_SAMPLING_RATE = SpeexJNI.SPEEX_ECHO_SET_SAMPLING_RATE_get(); - public final static int SPEEX_ECHO_GET_SAMPLING_RATE = SpeexJNI.SPEEX_ECHO_GET_SAMPLING_RATE_get(); - public final static int SPEEX_ECHO_GET_IMPULSE_RESPONSE_SIZE = SpeexJNI.SPEEX_ECHO_GET_IMPULSE_RESPONSE_SIZE_get(); - public final static int SPEEX_ECHO_GET_IMPULSE_RESPONSE = SpeexJNI.SPEEX_ECHO_GET_IMPULSE_RESPONSE_get(); - public final static int SPEEX_RESAMPLER_QUALITY_MAX = SpeexJNI.SPEEX_RESAMPLER_QUALITY_MAX_get(); - public final static int SPEEX_RESAMPLER_QUALITY_MIN = SpeexJNI.SPEEX_RESAMPLER_QUALITY_MIN_get(); - public final static int SPEEX_RESAMPLER_QUALITY_DEFAULT = SpeexJNI.SPEEX_RESAMPLER_QUALITY_DEFAULT_get(); - public final static int SPEEX_RESAMPLER_QUALITY_VOIP = SpeexJNI.SPEEX_RESAMPLER_QUALITY_VOIP_get(); - public final static int SPEEX_RESAMPLER_QUALITY_DESKTOP = SpeexJNI.SPEEX_RESAMPLER_QUALITY_DESKTOP_get(); - public final static int RESAMPLER_ERR_SUCCESS = SpeexJNI.RESAMPLER_ERR_SUCCESS_get(); - public final static int RESAMPLER_ERR_ALLOC_FAILED = SpeexJNI.RESAMPLER_ERR_ALLOC_FAILED_get(); - public final static int RESAMPLER_ERR_BAD_STATE = SpeexJNI.RESAMPLER_ERR_BAD_STATE_get(); - public final static int RESAMPLER_ERR_INVALID_ARG = SpeexJNI.RESAMPLER_ERR_INVALID_ARG_get(); - public final static int RESAMPLER_ERR_PTR_OVERLAP = SpeexJNI.RESAMPLER_ERR_PTR_OVERLAP_get(); - public final static int RESAMPLER_ERR_MAX_ERROR = SpeexJNI.RESAMPLER_ERR_MAX_ERROR_get(); - } diff --git a/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java b/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java index 65efba3..46fcf84 100644 --- a/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java +++ b/src/main/java/com/morlunk/jumble/audio/speex/SpeexJNI.java @@ -151,50 +151,6 @@ public class SpeexJNI { public final static native void speex_bits_advance(long jarg1, SpeexBits jarg1_, int jarg2); public final static native int speex_bits_remaining(long jarg1, SpeexBits jarg1_); public final static native void speex_bits_insert_terminator(long jarg1, SpeexBits jarg1_); - public final static native void JitterBufferPacket_data_set(long jarg1, JitterBufferPacket jarg1_, byte[] jarg2); - public final static native byte[] JitterBufferPacket_data_get(long jarg1, JitterBufferPacket jarg1_); - public final static native void JitterBufferPacket_len_set(long jarg1, JitterBufferPacket jarg1_, long jarg2); - public final static native long JitterBufferPacket_len_get(long jarg1, JitterBufferPacket jarg1_); - public final static native void JitterBufferPacket_timestamp_set(long jarg1, JitterBufferPacket jarg1_, long jarg2); - public final static native long JitterBufferPacket_timestamp_get(long jarg1, JitterBufferPacket jarg1_); - public final static native void JitterBufferPacket_span_set(long jarg1, JitterBufferPacket jarg1_, long jarg2); - public final static native long JitterBufferPacket_span_get(long jarg1, JitterBufferPacket jarg1_); - public final static native void JitterBufferPacket_sequence_set(long jarg1, JitterBufferPacket jarg1_, int jarg2); - public final static native int JitterBufferPacket_sequence_get(long jarg1, JitterBufferPacket jarg1_); - public final static native void JitterBufferPacket_user_data_set(long jarg1, JitterBufferPacket jarg1_, long jarg2); - public final static native long JitterBufferPacket_user_data_get(long jarg1, JitterBufferPacket jarg1_); - public final static native long new_JitterBufferPacket(); - public final static native void delete_JitterBufferPacket(long jarg1); - public final static native int JITTER_BUFFER_OK_get(); - public final static native int JITTER_BUFFER_MISSING_get(); - public final static native int JITTER_BUFFER_INSERTION_get(); - public final static native int JITTER_BUFFER_INTERNAL_ERROR_get(); - public final static native int JITTER_BUFFER_BAD_ARGUMENT_get(); - public final static native int JITTER_BUFFER_SET_MARGIN_get(); - public final static native int JITTER_BUFFER_GET_MARGIN_get(); - public final static native int JITTER_BUFFER_GET_AVAILABLE_COUNT_get(); - public final static native int JITTER_BUFFER_GET_AVALIABLE_COUNT_get(); - public final static native int JITTER_BUFFER_SET_DESTROY_CALLBACK_get(); - public final static native int JITTER_BUFFER_GET_DESTROY_CALLBACK_get(); - public final static native int JITTER_BUFFER_SET_DELAY_STEP_get(); - public final static native int JITTER_BUFFER_GET_DELAY_STEP_get(); - public final static native int JITTER_BUFFER_SET_CONCEALMENT_SIZE_get(); - public final static native int JITTER_BUFFER_GET_CONCEALMENT_SIZE_get(); - public final static native int JITTER_BUFFER_SET_MAX_LATE_RATE_get(); - public final static native int JITTER_BUFFER_GET_MAX_LATE_RATE_get(); - public final static native int JITTER_BUFFER_SET_LATE_COST_get(); - public final static native int JITTER_BUFFER_GET_LATE_COST_get(); - public final static native long jitter_buffer_init(int jarg1); - public final static native void jitter_buffer_reset(long jarg1); - public final static native void jitter_buffer_destroy(long jarg1); - public final static native void jitter_buffer_put(long jarg1, long jarg2, JitterBufferPacket jarg2_); - public final static native int jitter_buffer_get(long jarg1, long jarg2, JitterBufferPacket jarg2_, int jarg3, int[] jarg4); - public final static native int jitter_buffer_get_another(long jarg1, long jarg2, JitterBufferPacket jarg2_); - public final static native int jitter_buffer_get_pointer_timestamp(long jarg1); - public final static native void jitter_buffer_tick(long jarg1); - public final static native void jitter_buffer_remaining_span(long jarg1, long jarg2); - public final static native int jitter_buffer_ctl(long jarg1, int jarg2, int[] jarg3); - public final static native int jitter_buffer_update_delay(long jarg1, long jarg2, JitterBufferPacket jarg2_, int[] jarg3); public final static native int SPEEX_ECHO_GET_FRAME_SIZE_get(); public final static native int SPEEX_ECHO_SET_SAMPLING_RATE_get(); public final static native int SPEEX_ECHO_GET_SAMPLING_RATE_get(); @@ -245,4 +201,49 @@ public class SpeexJNI { public final static native int speex_resampler_skip_zeros(long jarg1); public final static native int speex_resampler_reset_mem(long jarg1); public final static native byte[] speex_resampler_strerror(int jarg1); + public final static native void JitterBufferPacket_data_set(long jarg1, JitterBufferPacket jarg1_, byte[] jarg2); + public final static native byte[] JitterBufferPacket_data_get(long jarg1, JitterBufferPacket jarg1_); + public final static native void JitterBufferPacket_len_set(long jarg1, JitterBufferPacket jarg1_, long jarg2); + public final static native long JitterBufferPacket_len_get(long jarg1, JitterBufferPacket jarg1_); + public final static native void JitterBufferPacket_timestamp_set(long jarg1, JitterBufferPacket jarg1_, long jarg2); + public final static native long JitterBufferPacket_timestamp_get(long jarg1, JitterBufferPacket jarg1_); + public final static native void JitterBufferPacket_span_set(long jarg1, JitterBufferPacket jarg1_, long jarg2); + public final static native long JitterBufferPacket_span_get(long jarg1, JitterBufferPacket jarg1_); + public final static native void JitterBufferPacket_sequence_set(long jarg1, JitterBufferPacket jarg1_, int jarg2); + public final static native int JitterBufferPacket_sequence_get(long jarg1, JitterBufferPacket jarg1_); + public final static native void JitterBufferPacket_user_data_set(long jarg1, JitterBufferPacket jarg1_, long jarg2); + public final static native long JitterBufferPacket_user_data_get(long jarg1, JitterBufferPacket jarg1_); + public final static native long new_JitterBufferPacket(); + public final static native void delete_JitterBufferPacket(long jarg1); + public final static native int JITTER_BUFFER_OK_get(); + public final static native int JITTER_BUFFER_MISSING_get(); + public final static native int JITTER_BUFFER_INSERTION_get(); + public final static native int JITTER_BUFFER_INTERNAL_ERROR_get(); + public final static native int JITTER_BUFFER_BAD_ARGUMENT_get(); + public final static native int JITTER_BUFFER_SET_MARGIN_get(); + public final static native int JITTER_BUFFER_GET_MARGIN_get(); + public final static native int JITTER_BUFFER_GET_AVAILABLE_COUNT_get(); + public final static native int JITTER_BUFFER_GET_AVALIABLE_COUNT_get(); + public final static native int JITTER_BUFFER_SET_DESTROY_CALLBACK_get(); + public final static native int JITTER_BUFFER_GET_DESTROY_CALLBACK_get(); + public final static native int JITTER_BUFFER_SET_DELAY_STEP_get(); + public final static native int JITTER_BUFFER_GET_DELAY_STEP_get(); + public final static native int JITTER_BUFFER_SET_CONCEALMENT_SIZE_get(); + public final static native int JITTER_BUFFER_GET_CONCEALMENT_SIZE_get(); + public final static native int JITTER_BUFFER_SET_MAX_LATE_RATE_get(); + public final static native int JITTER_BUFFER_GET_MAX_LATE_RATE_get(); + public final static native int JITTER_BUFFER_SET_LATE_COST_get(); + public final static native int JITTER_BUFFER_GET_LATE_COST_get(); + public final static native long jitter_buffer_init(int jarg1); + public final static native void jitter_buffer_reset(long jarg1); + public final static native void jitter_buffer_destroy(long jarg1); + public final static native void jitter_buffer_put(long jarg1, long jarg2, JitterBufferPacket jarg2_); + public final static native int jitter_buffer_get(long jarg1, long jarg2, JitterBufferPacket jarg2_, int jarg3, int[] jarg4); + public final static native int jitter_buffer_get_another(long jarg1, long jarg2, JitterBufferPacket jarg2_); + public final static native int jitter_buffer_get_pointer_timestamp(long jarg1); + public final static native void jitter_buffer_tick(long jarg1); + public final static native void jitter_buffer_remaining_span(long jarg1, long jarg2); + public final static native int jitter_buffer_ctl(long jarg1, int jarg2, int[] jarg3); + public final static native int jitter_buffer_update_delay(long jarg1, long jarg2, JitterBufferPacket jarg2_, int[] jarg3); + public final static native long wrap_create_jitter_buffer_packet(byte[] jarg1, long jarg3, long jarg4); } |