new ffmpeg libs, reduced size and without debug info. Fix decoder output sizes. Fix NPE when hangup calls.

cusax-fix
Damian Minkov 18 years ago
parent 1a7899eab7
commit fb27c40e89

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -636,7 +636,6 @@ private void calculateSupportedEncodings()
}
else if (format instanceof VideoFormat)
{
System.out.println("format " + format + "/" + encoding + "/" + sdp);
if (!transmittableVideoEncodings.contains(sdp))
{
if (logger.isDebugEnabled())

@ -56,6 +56,9 @@ public class NativeDecoder
new Dimension(128, 96)
};
// index of default size (output format)
private static final int defaultSizeIx = 2;
/**
* Constructs new h264 decoder
*/
@ -71,21 +74,7 @@ public NativeDecoder()
{
new RGBFormat()
};
PLUGIN_NAME = "H.264 Decoder";
AVFORMAT = AVFormatLibrary.INSTANCE;
AVCODEC = AVCodecLibrary.INSTANCE;
AVUTIL = AVUtilLibrary.INSTANCE;
AVFORMAT.av_register_all();
AVCODEC.avcodec_init();
}
protected Format[] getMatchingOutputFormats(Format in)
{
VideoFormat ivf = (VideoFormat) in;
supportedOutputFormats = new VideoFormat[supportedSizes.length];
for (int i = 0; i < supportedSizes.length; i++)
@ -97,18 +86,46 @@ protected Format[] getMatchingOutputFormats(Format in)
size,
-1,
Format.intArray,
ivf.getFrameRate(),
Format.NOT_SPECIFIED,
32,
0xFF0000,
0xFF00,
0xFF00,
0xFF,
1,
size.width,
Format.FALSE,
Format.NOT_SPECIFIED);
}
PLUGIN_NAME = "H.264 Decoder";
AVFORMAT = AVFormatLibrary.INSTANCE;
AVCODEC = AVCodecLibrary.INSTANCE;
AVUTIL = AVUtilLibrary.INSTANCE;
AVFORMAT.av_register_all();
AVCODEC.avcodec_init();
}
protected Format[] getMatchingOutputFormats(Format in)
{
VideoFormat ivf = (VideoFormat) in;
// return the default size/currently decoder and encoder
//set to transmit/receive at this size
if(ivf.getSize() == null)
return new Format[]{supportedOutputFormats[defaultSizeIx]};
for (int i = 0; i < supportedOutputFormats.length; i++)
{
RGBFormat f = (RGBFormat)supportedOutputFormats[i];
if(f.getSize().equals(ivf.getSize()))
return new Format[]{f};
}
return supportedOutputFormats;
return null;
}
/**

@ -385,8 +385,8 @@ public synchronized void open() throws ResourceUnavailableException
avcontext.qcompress = 1;
//int _bitRate = 267000;
//avcontext.bit_rate = (_bitRate * 3) >> 2; // average bit rate
int _bitRate = 267000;
avcontext.bit_rate = (_bitRate * 3) >> 2; // average bit rate
AVUTIL.av_log_set_callback(new AVUtilLibrary.LogCallback(){

Loading…
Cancel
Save