Oke we solved the problem:
First we make a TCP connection to the drone:
try
{
socket_video_tcp = new Socket();
socket_video_tcp.connect(new InetSocketAddress(commandSender.droneInetAddress, commandSender.VIDEO_PORT));
}
Our class is Runnable what means that we also have a method run()
In this method we send a video_enable command and we also disable the dynamic video bitrate by sending this command: video:bitrate_ctrl_mode 0;
public void run()
{
commandSender.sendConfigCommand("VIDEO_ENABLE");
commandSender.sendConfigCommand("VIDEOBITRATE");
decode();
}
Our decode() method can be found here: https://github.com/xuggle/xuggle-xuggler/blob/master/src/com/xuggle/xuggler/demos/DecodeAndPlayVideo.java
In this decode method we have changed this:
if (container.open(filename, IContainer.Type.READ, null) < 0)
To this:
if (container.open(socket_video_tcp.getInputStream(), null) < 0)
That's all!!