FFMPEGMediaPlayer: Decode audio frames.

Re-enable code to decode audio frame.

Throw a runtime exception for unimplemented sp_avcodec_decode_audio3 fallback.

Fix pts calculation to prevent division by zero caused by type truncation.
Fix aPTS calculation to use valid data.

Hide pts & aPTS info while running non-verbose.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: Use the Audio codec to decode audio. Also prevent double free of packet memory.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: Lookup decoded audio data_size using av_samples_get_buffer_size

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: Decode all frames inside video packet.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: Workaround dropped video frames while decoding audio.

A temporal solution before we implement video decode and frame cache
in a separate thread.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: Workaround forward seek delay caused by video sync.

Prevent the video sync code to delay a frame more than 1 second.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: Add updateSound callback for passing decoded jni audio frames to java.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
partial implementation of Java Sound output
FFMPEGMediaPlayer: blocking Java Sound output
FFMPEGMediaPlayer: Poor mans audio/video sync.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: Limit video sync delay to 47ms in order to fix audio buffer underrun.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: fix audio pts for varying audio frame format.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
Merge remote-tracking branch 'xranby/github/FFMPEGMediaPlayer-audio' into FFMPEGMediaPlayer
FFMPEGMediaPlayer: Add AudioSink interface.

Use ALAudioSink when available and fallback to
JavaSoundAudioSink when JOAL are not found on classpath.

Java Sound playback moved from FFMPEGMediaPlayer into JavaSoundAudioSink.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
ALAudioSink: Buffer and playback audio data.

There is still something wrong with the buffering part;
OpenAL will complain at runtime.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
Merge remote-tracking branch 'xranby-github/FFMPEGMediaPlayer'

Conflicts:
	src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
	src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
ALAudioSink: Fill buffers before sourcing them.

Fixes OpenAL invalid argument error when trying to fill buffers.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
AudioSink: interface add isAudioSinkAvailable

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
FFMPEGMediaPlayer: Only instance ALAudioSink if JOAL is found on the classpath.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
ALAudioSink: Reduce exessive CPU usage caused by polling alGetSourcei.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>