Decrease h264 iframe interval, decrease packet sizes, fix windows exe as it wasn't setting java.library.path.

cusax-fix
Damian Minkov 17 years ago
parent b291830f35
commit 4b85461e69

@ -30,6 +30,8 @@
-->
<project name="sip-communicator-installer" basedir="." default="ant-usage">
<import file="../../build.xml"/>
<property file="${inst.resrc}/ant-build-config.properties"/>
<!-- Load installer properties -->
<!-- USERS NEED TO UPDATE THIS FILE -->

Binary file not shown.

@ -27,6 +27,8 @@
<javaProperties>
<name>java.library.path</name>
<value>./native</value>
</javaProperties>
<javaProperties>
<name>jna.library.path</name>
<value>./native</value>
</javaProperties>

@ -174,9 +174,6 @@ public void open() throws ResourceUnavailableException
avcontext = AVCODEC.avcodec_alloc_context();
if (AVCODEC.avcodec_open(avcontext, avcodec) < 0)
throw new RuntimeException("Could not open codec ");
avpicture = AVCODEC.avcodec_alloc_frame();
avcontext.lowres = 1;
@ -193,6 +190,9 @@ public void open() throws ResourceUnavailableException
// }
// });
if (AVCODEC.avcodec_open(avcontext, avcodec) < 0)
throw new RuntimeException("Could not open codec ");
frameRGB = AVCODEC.avcodec_alloc_frame();
opened = true;
@ -204,9 +204,9 @@ public void close()
{
opened = false;
super.close();
AVCODEC.avcodec_close(avcontext);
AVUTIL.av_free(avpicture.getPointer());
AVUTIL.av_free(avcontext.getPointer());
}
@ -215,7 +215,7 @@ public void close()
public int process(Buffer inputBuffer, Buffer outputBuffer)
{
if (!checkInputBuffer(inputBuffer))
{
{
return BUFFER_PROCESSED_FAILED;
}
@ -254,7 +254,7 @@ public int process(Buffer inputBuffer, Buffer outputBuffer)
{
outputBuffer.setDiscard(true);
AVUTIL.av_free(encBuf);
return BUFFER_PROCESSED_OK;
}

@ -31,7 +31,7 @@ public class NativeEncoder
// without the headers
// private final static int MAX_PAYLOAD_SIZE = 1400;
private final static int MAX_PAYLOAD_SIZE = 984;
private final static int MAX_PAYLOAD_SIZE = 512;
private final static int INPUT_BUFFER_PADDING_SIZE = 8;
@ -69,7 +69,8 @@ public class NativeEncoder
// the current rtp sequence
private int seq = 0;
private static int IFRAME_INTERVAL = 125;
// key frame every four seconds
private static int IFRAME_INTERVAL = TARGET_FRAME_RATE * 4;
private int framesSinceLastIFrame = 0;
@ -417,13 +418,12 @@ public synchronized void open() throws ResourceUnavailableException
avcontext.qmin = 10;
avcontext.qmax = 22;
avcontext.max_qdiff = 4;
avcontext.partitions |= 0x111;
//X264_PART_I4X4 0x001
//X264_PART_P8X8 0x010
//X264_PART_B8X8 0x100
avcontext.flags |= AVCodecLibrary.CODEC_FLAG_PASS1;
avcontext.mb_decision = AVCodecContext.FF_MB_DECISION_SIMPLE;
avcontext.rc_eq = "blurCplx^(1-qComp)";

Loading…
Cancel
Save