From e46c57e0aeba0e6bb989b23872f8448ac7db1971 Mon Sep 17 00:00:00 2001 From: fyhertz Date: Sat, 2 Nov 2013 19:20:29 -0400 Subject: [PATCH 01/51] Better support of the MediaCodec API, but still disabled by default. Some major bug fixes in the RtpSocket and the implementation of RTCP. --- .../streaming/MediaStream.java | 35 +-- .../streaming/audio/AACStream.java | 2 +- .../streaming/mp4/MP4Config.java | 13 + .../streaming/mp4/MP4Parser.java | 22 +- .../streaming/rtcp/SenderReport.java | 86 ++++-- .../streaming/rtp/AACADTSPacketizer.java | 9 - .../streaming/rtp/AACLATMPacketizer.java | 27 +- .../streaming/rtp/AMRNBPacketizer.java | 26 +- .../streaming/rtp/AbstractPacketizer.java | 22 +- .../streaming/rtp/H263Packetizer.java | 24 +- .../streaming/rtp/H264Packetizer.java | 94 +++--- .../streaming/rtp/MediaCodecInputStream.java | 25 +- .../streaming/rtp/RtpSocket.java | 70 +++-- .../streaming/rtsp/RtspClient.java | 5 +- .../streaming/rtsp/UriParser.java | 37 ++- .../streaming/video/CodecManager.java | 265 +++++++++++++++++ .../streaming/video/H263Stream.java | 2 + .../streaming/video/H264Stream.java | 261 ++++++++++++++--- .../streaming/video/VideoQuality.java | 2 +- .../streaming/video/VideoStream.java | 273 ++++++++++++++---- 20 files changed, 993 insertions(+), 307 deletions(-) create mode 100644 src/net/majorkernelpanic/streaming/video/CodecManager.java diff --git a/src/net/majorkernelpanic/streaming/MediaStream.java b/src/net/majorkernelpanic/streaming/MediaStream.java index 764855e2..54afa77d 100644 --- a/src/net/majorkernelpanic/streaming/MediaStream.java +++ b/src/net/majorkernelpanic/streaming/MediaStream.java @@ -42,10 +42,13 @@ public abstract class MediaStream implements Stream { protected static final String TAG = "MediaStream"; /** MediaStream forwards data to a packetizer through a LocalSocket. */ - public static final int MODE_MEDIARECORDER_API = 0x00; + public static final byte MODE_MEDIARECORDER_API = 0x01; - /** MediaStream uses the new MediaCodec API introduced in JB 4.2 to stream audio/video. */ - public static final int MODE_MEDIACODEC_API = 0x01; + /** MediaStream uses the new MediaCodec API introduced in JB 4.1 to stream audio/video. */ + public static final byte MODE_MEDIACODEC_API = 0x02; + + /** MediaStream uses the new features of the MediaCodec API introduced in JB 4.3 to stream audio/video. */ + public static final byte MODE_MEDIACODEC_API_2 = 0x05; /** The packetizer that will read the output of the camera and send RTP packets over the networkd. */ protected AbstractPacketizer mPacketizer = null; @@ -56,8 +59,8 @@ public abstract class MediaStream implements Stream { private int mSocketId; protected boolean mStreaming = false; - protected int mMode = MODE_MEDIARECORDER_API; - protected static int sSuggestedMode = MODE_MEDIARECORDER_API; + protected byte mMode = MODE_MEDIARECORDER_API; + protected static byte sSuggestedMode = MODE_MEDIARECORDER_API; private LocalServerSocket mLss = null; protected LocalSocket mReceiver, mSender = null; @@ -81,15 +84,6 @@ public abstract class MediaStream implements Stream { public MediaStream() { mMode = sSuggestedMode; } - - /** - * By default, the API that will be used to encode video or audio is choosen automatically depending - * on the capabilities of the phone, and what have been implemented in libstreaming. - * @param mode {@link MediaStream#MODE_MEDIACODEC_API} or {@link MediaStream#MODE_MEDIACODEC_API} - */ - public void setAPI(int mode) { - mMode = mode; - } /** * Sets the destination ip address of the stream. @@ -163,7 +157,7 @@ public int[] getLocalPorts() { * If the mode is set to {@link #MODE_MEDIARECORDER_API}, video is forwarded to a UDP socket. * @param mode Either {@link #MODE_MEDIARECORDER_API} or {@link #MODE_MEDIACODEC_API} */ - public void setMode(int mode) throws IllegalStateException { + public void setMode(byte mode) throws IllegalStateException { if (mStreaming) throw new IllegalStateException("Can't be called while streaming !"); this.mMode = mode; } @@ -200,14 +194,11 @@ public synchronized void start() throws IllegalStateException, IOException { if (mRtpPort<=0 || mRtcpPort<=0) throw new IllegalStateException("No destination ports set for the stream !"); - switch (mMode) { - case MODE_MEDIARECORDER_API: - encodeWithMediaRecorder(); - break; - case MODE_MEDIACODEC_API: + if ((mMode&MODE_MEDIACODEC_API)!=0) { encodeWithMediaCodec(); - break; - }; + } else { + encodeWithMediaRecorder(); + } } diff --git a/src/net/majorkernelpanic/streaming/audio/AACStream.java b/src/net/majorkernelpanic/streaming/audio/AACStream.java index c7ce9137..a14220b0 100644 --- a/src/net/majorkernelpanic/streaming/audio/AACStream.java +++ b/src/net/majorkernelpanic/streaming/audio/AACStream.java @@ -211,7 +211,7 @@ public void run() { /** Stops the stream. */ public synchronized void stop() { if (mStreaming) { - if (mMode == MODE_MEDIACODEC_API) { + if ((mMode&MODE_MEDIACODEC_API)!=0) { Log.d(TAG, "Interrupting threads..."); mThread.interrupt(); mAudioRecord.stop(); diff --git a/src/net/majorkernelpanic/streaming/mp4/MP4Config.java b/src/net/majorkernelpanic/streaming/mp4/MP4Config.java index 9157298f..c2866dc2 100644 --- a/src/net/majorkernelpanic/streaming/mp4/MP4Config.java +++ b/src/net/majorkernelpanic/streaming/mp4/MP4Config.java @@ -22,11 +22,16 @@ import java.io.FileNotFoundException; import java.io.IOException; +import android.util.Base64; +import android.util.Log; + /** * Finds SPS & PPS parameters in mp4 file. */ public class MP4Config { + public final static String TAG = "MP4Config"; + private MP4Parser mp4Parser; private String mProfilLevel, mPPS, mSPS; @@ -35,6 +40,12 @@ public MP4Config(String profil, String sps, String pps) { mPPS = pps; mSPS = sps; } + + public MP4Config(byte[] sps, byte[] pps) { + mPPS = Base64.encodeToString(pps, 0, pps.length, Base64.NO_WRAP); + mSPS = Base64.encodeToString(sps, 0, sps.length, Base64.NO_WRAP); + mProfilLevel = MP4Parser.toHexString(sps,1,3); + } /** * Finds sps & pps parameters inside a .mp4. @@ -72,10 +83,12 @@ public String getProfileLevel() { } public String getB64PPS() { + Log.d(TAG, "PPS: "+mPPS); return mPPS; } public String getB64SPS() { + Log.d(TAG, "SPS: "+mSPS); return mSPS; } diff --git a/src/net/majorkernelpanic/streaming/mp4/MP4Parser.java b/src/net/majorkernelpanic/streaming/mp4/MP4Parser.java index fe647879..8f53324b 100644 --- a/src/net/majorkernelpanic/streaming/mp4/MP4Parser.java +++ b/src/net/majorkernelpanic/streaming/mp4/MP4Parser.java @@ -133,6 +133,16 @@ private boolean validBoxName(byte[] buffer) { } return true; } + + static String toHexString(byte[] buffer,int start, int len) { + String c; + StringBuilder s = new StringBuilder(); + for (int i=start;i0) { + if (delta>=interval) { + // We send a Sender Report + send(ntpts,rtpts); + delta = 0; + } + } + } public void setSSRC(int ssrc) { @@ -140,6 +145,17 @@ public int getSSRC() { return ssrc; } + /** + * Resets the reports (total number of bytes sent, number of packets sent, etc.) + */ + public void reset() { + packetCount = 0; + octetCount = 0; + setLong(packetCount, 20, 24); + setLong(octetCount, 24, 28); + delta = now = oldnow = 0; + } + private void setLong(long n, int begin, int end) { for (end--; end >= begin; end--) { buffer[end] = (byte) (n % 256); @@ -147,4 +163,16 @@ private void setLong(long n, int begin, int end) { } } + /** Sends the RTCP packet over the network. */ + private void send(long ntpts, long rtpts) throws IOException { + long hb = ntpts/1000000000; + long lb = ( ( ntpts - hb*1000000000 ) * 4294967296L )/1000000000; + setLong(hb, 8, 12); + setLong(lb, 12, 16); + setLong(rtpts, 16, 20); + upack.setLength(28); + usock.send(upack); + } + + } diff --git a/src/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.java b/src/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.java index 406f2300..a3693777 100644 --- a/src/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.java @@ -127,15 +127,6 @@ public void run() { // We update the RTP timestamp ts += 1024L*1000000000L/samplingRate; //stats.average(); - // We send one RTCP Sender Report every 5 secs - now = SystemClock.elapsedRealtime(); - if (intervalBetweenReports>0) { - if (now-oldtime>=intervalBetweenReports) { - oldtime = now; - report.send(System.nanoTime(),ts*samplingRate/1000000000L); - } - } - //Log.d(TAG,"frameLength: "+frameLength+" protection: "+protection+" p: "+profile+" sr: "+samplingRate); sum = 0; diff --git a/src/net/majorkernelpanic/streaming/rtp/AACLATMPacketizer.java b/src/net/majorkernelpanic/streaming/rtp/AACLATMPacketizer.java index 44caea76..3efd01ff 100644 --- a/src/net/majorkernelpanic/streaming/rtp/AACLATMPacketizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/AACLATMPacketizer.java @@ -44,7 +44,6 @@ public class AACLATMPacketizer extends AbstractPacketizer implements Runnable { private final static int MAXPACKETSIZE = 1400; private Thread t; - private int samplingRate = 8000; public AACLATMPacketizer() throws IOException { super(); @@ -71,7 +70,6 @@ public void stop() { } public void setSamplingRate(int samplingRate) { - this.samplingRate = samplingRate; socket.setClockFrequency(samplingRate); } @@ -81,7 +79,7 @@ public void run() { Log.d(TAG,"AAC LATM packetizer started !"); int length = 0; - long oldtime = SystemClock.elapsedRealtime(), now = oldtime; + long oldts; BufferInfo bufferInfo; try { @@ -93,7 +91,15 @@ public void run() { bufferInfo = ((MediaCodecInputStream)is).getLastBufferInfo(); //Log.d(TAG,"length: "+length+" ts: "+bufferInfo.presentationTimeUs); + oldts = ts; ts = bufferInfo.presentationTimeUs*1000; + + // Seems to happen sometimes + if (oldts>ts) { + socket.commitBuffer(); + continue; + } + socket.markNextPacket(); socket.updateTimestamp(ts); @@ -112,20 +118,13 @@ public void run() { buffer[rtphl+3] |= 0x00; send(rtphl+length+4); - } - - // We send one RTCP Sender Report every 5 secs - now = SystemClock.elapsedRealtime(); - if (intervalBetweenReports>0) { - if (now-oldtime>=intervalBetweenReports) { - oldtime = now; - report.send(System.nanoTime(),ts*samplingRate/1000000000L); - } - } + + } else { + socket.commitBuffer(); + } } } catch (IOException e) { - e.printStackTrace(); } catch (ArrayIndexOutOfBoundsException e) { Log.e(TAG,"ArrayIndexOutOfBoundsException: "+(e.getMessage()!=null?e.getMessage():"unknown error")); e.printStackTrace(); diff --git a/src/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.java b/src/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.java index e7e58568..057bc42a 100644 --- a/src/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.java @@ -59,11 +59,16 @@ public void start() { } public void stop() { - try { - is.close(); - } catch (IOException ignore) {} - t.interrupt(); - t = null; + if (t != null) { + try { + is.close(); + } catch (IOException ignore) {} + t.interrupt(); + try { + t.join(); + } catch (InterruptedException e) {} + t = null; + } } public void run() { @@ -105,19 +110,8 @@ public void run() { socket.updateTimestamp(ts); socket.markNextPacket(); - // We wait a little to avoid sending to many packets too quickly - now = System.nanoTime(); - delta += (now-oldtime)/1000000; - oldtime = now; //Log.d(TAG,"expected: "+ expected + " measured: "+measured); - if (intervalBetweenReports>0) { - if (delta>=intervalBetweenReports) { - delta = 0; - report.send(now,ts*samplingRate/1000000000L); - } - } - send(rtphl+1+AMR_FRAME_HEADER_LENGTH+frameLength); } diff --git a/src/net/majorkernelpanic/streaming/rtp/AbstractPacketizer.java b/src/net/majorkernelpanic/streaming/rtp/AbstractPacketizer.java index 3562f051..7ed7f38b 100644 --- a/src/net/majorkernelpanic/streaming/rtp/AbstractPacketizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/AbstractPacketizer.java @@ -39,19 +39,16 @@ abstract public class AbstractPacketizer { protected static final int rtphl = RtpSocket.RTP_HEADER_LENGTH; protected RtpSocket socket = null; - protected SenderReport report = null; protected InputStream is = null; protected byte[] buffer; - protected long ts = 0, intervalBetweenReports = 5000, delta = 0; + protected long ts = 0; public AbstractPacketizer() throws IOException { int ssrc = new Random().nextInt(); ts = new Random().nextInt(); socket = new RtpSocket(); - report = new SenderReport(); socket.setSSRC(ssrc); - report.setSSRC(ssrc); } public RtpSocket getRtpSocket() { @@ -59,13 +56,12 @@ public RtpSocket getRtpSocket() { } public SenderReport getRtcpSocket() { - return report; + return socket.getRtcpSocket(); } public void setSSRC(int ssrc) { socket.setSSRC(ssrc); - report.setSSRC(ssrc); } public int getSSRC() { @@ -87,20 +83,9 @@ public void setTimeToLive(int ttl) throws IOException { * @param rtcpPort Destination port that will be used for RTCP */ public void setDestination(InetAddress dest, int rtpPort, int rtcpPort) { - socket.setDestination(dest, rtpPort); - report.setDestination(dest, rtcpPort); + socket.setDestination(dest, rtpPort, rtcpPort); } - /** - * Sets the temporal interval between two RTCP Sender Reports. - * Default interval is set to 5 secondes. - * Set 0 to disable RTCP. - * @param interval The interval in milliseconds - */ - public void setSenderReportsInterval(long interval) { - intervalBetweenReports = interval; - } - /** Starts the packetizer. */ public abstract void start() throws IOException; @@ -110,7 +95,6 @@ public void setSenderReportsInterval(long interval) { /** Updates data for RTCP SR and sends the packet. */ protected void send(int length) throws IOException { socket.commitBuffer(length); - report.update(length); } /** For debugging purposes. */ diff --git a/src/net/majorkernelpanic/streaming/rtp/H263Packetizer.java b/src/net/majorkernelpanic/streaming/rtp/H263Packetizer.java index f31069a8..b82dc691 100644 --- a/src/net/majorkernelpanic/streaming/rtp/H263Packetizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/H263Packetizer.java @@ -54,12 +54,16 @@ public void start() throws IOException { } public void stop() { - try { - is.close(); - } catch (IOException ignore) {} - t.interrupt(); - t = null; - + if (t != null) { + try { + is.close(); + } catch (IOException ignore) {} + t.interrupt(); + try { + t.join(); + } catch (InterruptedException e) {} + t = null; + } } public void run() { @@ -109,14 +113,6 @@ public void run() { buffer[rtphl] = 0; } if (j>0) { - // We send one RTCP Sender Report every 5 secs - delta += duration/1000000; - if (intervalBetweenReports>0) { - if (delta>=intervalBetweenReports && duration/1000000>10) { - delta = 0; - report.send(System.nanoTime(),ts*90/1000000); - } - } // We have found the end of the frame stats.push(duration); ts+= stats.average(); duration = 0; diff --git a/src/net/majorkernelpanic/streaming/rtp/H264Packetizer.java b/src/net/majorkernelpanic/streaming/rtp/H264Packetizer.java index 88f0fcec..150efaba 100644 --- a/src/net/majorkernelpanic/streaming/rtp/H264Packetizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/H264Packetizer.java @@ -22,6 +22,7 @@ import java.io.IOException; +import android.annotation.SuppressLint; import android.util.Log; /** @@ -39,15 +40,16 @@ public class H264Packetizer extends AbstractPacketizer implements Runnable { public final static String TAG = "H264Packetizer"; private final static int MAXPACKETSIZE = 1400; - + private Thread t = null; private int naluLength = 0; private long delay = 0, oldtime = 0; private Statistics stats = new Statistics(); private byte[] sps = null, pps = null; private int count = 0; - - + private int streamType = 1; + + public H264Packetizer() throws IOException { super(); socket.setClockFrequency(90000); @@ -62,9 +64,12 @@ public void start() throws IOException { public void stop() { if (t != null) { + try { + is.close(); + } catch (IOException e) {} t.interrupt(); try { - t.join(1000); + t.join(); } catch (InterruptedException e) {} t = null; } @@ -74,26 +79,14 @@ public void setStreamParameters(byte[] pps, byte[] sps) { this.pps = pps; this.sps = sps; } - + public void run() { long duration = 0, delta2 = 0; Log.d(TAG,"H264 packetizer started !"); stats.reset(); count = 0; - - // This will skip the MPEG4 header if this step fails we can't stream anything :( - try { - byte buffer[] = new byte[4]; - // Skip all atoms preceding mdat atom - while (!Thread.interrupted()) { - while (is.read() != 'm'); - is.read(buffer,0,3); - if (buffer[0] == 'd' && buffer[1] == 'a' && buffer[2] == 't') break; - } - } catch (IOException e) { - Log.e(TAG,"Couldn't skip mp4 header :/"); - return; - } + + if (is instanceof MediaCodecInputStream) streamType = 1; else streamType = 0; try { while (!Thread.interrupted()) { @@ -103,16 +96,7 @@ public void run() { send(); // We measure how long it took to receive NAL units from the phone duration = System.nanoTime() - oldtime; - - // We regulary send RTSP Sender Report to the decoder - delta += duration/1000000; - if (intervalBetweenReports>0) { - if (delta>=intervalBetweenReports) { - // We send a Sender Report - report.send(oldtime+duration,(ts/100)*90/10000); - } - } - + // Every 5 secondes, we send two packets containing NALU type 7 (sps) and 8 (pps) // Those should allow the H264 stream to be decoded even if no SDP was sent to the decoder. delta2 += duration/1000000; @@ -133,7 +117,7 @@ public void run() { super.send(rtphl+pps.length); } } - + stats.push(duration); // Computes the average duration of a NAL unit delay = stats.average(); @@ -151,23 +135,45 @@ public void run() { * Reads a NAL unit in the FIFO and sends it. * If it is too big, we split it in FU-A units (RFC 3984). */ + @SuppressLint("NewApi") private void send() throws IOException, InterruptedException { int sum = 1, len = 0, type; byte[] header = new byte[5]; - // Read NAL unit length (4 bytes) and NAL unit header (1 byte) - fill(header,0,5); - naluLength = header[3]&0xFF | (header[2]&0xFF)<<8 | (header[1]&0xFF)<<16 | (header[0]&0xFF)<<24; - //naluLength = is.available(); - - if (naluLength>100000 || naluLength<0) resync(); + if (streamType == 0) { + // NAL units are preceeded by their length, we parse the length + fill(header,0,5); + ts += delay; + naluLength = header[3]&0xFF | (header[2]&0xFF)<<8 | (header[1]&0xFF)<<16 | (header[0]&0xFF)<<24; + if (naluLength>100000 || naluLength<0) resync(); + } else if (streamType == 1) { + // NAL units are preceeded with 0x00000001 + fill(header,0,5); + ts = ((MediaCodecInputStream)is).getLastBufferInfo().presentationTimeUs*1000L; + //ts += delay; + naluLength = is.available()+1; + if (!(header[0]==0 && header[1]==0 && header[2]==0)) { + // Turns out, the NAL units are not preceeded with 0x00000001 + Log.e(TAG, "NAL units are not preceeded by 0x00000001"); + streamType = 2; + return; + } + } else { + // Nothing preceededs the NAL units + fill(header,0,1); + header[4] = header[0]; + ts = ((MediaCodecInputStream)is).getLastBufferInfo().presentationTimeUs*1000L; + //ts += delay; + naluLength = is.available()+1; + } // Parses the NAL unit type - type = header[4]&0x1F; - + type = header[0]&0x1F; + // The stream already contains NAL unit type 7 or 8, we don't need // to add them to the stream ourselves if (type == 7 || type == 8) { + Log.v(TAG,"SPS or PPS present in the stream."); count++; if (count>4) { sps = null; @@ -175,9 +181,6 @@ private void send() throws IOException, InterruptedException { } } - // Updates the timestamp - ts += delay; - //Log.d(TAG,"- Nal unit length: " + naluLength + " delay: "+delay/1000000+" type: "+type); // Small NAL unit => Single NAL unit @@ -239,8 +242,8 @@ private void resync() throws IOException { byte[] header = new byte[5]; int type; - Log.e(TAG,"Packetizer out of sync ! Let's try to fix that..."); - + Log.e(TAG,"Packetizer out of sync ! Let's try to fix that...(NAL length: "+naluLength+")"); + while (true) { header[0] = header[1]; @@ -258,6 +261,11 @@ private void resync() throws IOException { Log.e(TAG,"A NAL unit may have been found in the bit stream !"); break; } + if (naluLength==0) { + Log.e(TAG,"NAL unit with NULL size found..."); + } else if (header[3]==0xFF && header[2]==0xFF && header[1]==0xFF && header[0]==0xFF) { + Log.e(TAG,"NAL unit with 0xFFFFFFFF size found..."); + } } } diff --git a/src/net/majorkernelpanic/streaming/rtp/MediaCodecInputStream.java b/src/net/majorkernelpanic/streaming/rtp/MediaCodecInputStream.java index 884dd78d..dddee352 100644 --- a/src/net/majorkernelpanic/streaming/rtp/MediaCodecInputStream.java +++ b/src/net/majorkernelpanic/streaming/rtp/MediaCodecInputStream.java @@ -69,11 +69,10 @@ public int read() throws IOException { public int read(byte[] buffer, int offset, int length) throws IOException { int min = 0; - if (mClosed) throw new IOException("This InputStream was closed"); try { - if (mBuffer==null || mBufferInfo.size-mBuffer.position() <= 0) { - while (!Thread.interrupted()) { - mIndex = mMediaCodec.dequeueOutputBuffer(mBufferInfo, 100000); + if (mBuffer==null) { + while (!Thread.interrupted() && !mClosed) { + mIndex = mMediaCodec.dequeueOutputBuffer(mBufferInfo, 500000); if (mIndex>=0 ){ //Log.d(TAG,"Index: "+mIndex+" Time: "+mBufferInfo.presentationTimeUs+" size: "+mBufferInfo.size); mBuffer = mBuffers[mIndex]; @@ -85,20 +84,24 @@ public int read(byte[] buffer, int offset, int length) throws IOException { mMediaFormat = mMediaCodec.getOutputFormat(); Log.i(TAG,mMediaFormat.toString()); } else if (mIndex == MediaCodec.INFO_TRY_AGAIN_LATER) { - //Log.e(TAG,"No buffer available..."); - return 0; + Log.v(TAG,"No buffer available..."); + //return 0; } else { Log.e(TAG,"Message: "+mIndex); - return 0; + //return 0; } } } + if (mClosed) throw new IOException("This InputStream was closed"); + min = length < mBufferInfo.size - mBuffer.position() ? length : mBufferInfo.size - mBuffer.position(); mBuffer.get(buffer, offset, min); - if (mBufferInfo.size>=mBuffer.position()) { + if (mBuffer.position()>=mBufferInfo.size) { mMediaCodec.releaseOutputBuffer(mIndex, false); + mBuffer = null; } + } catch (RuntimeException e) { e.printStackTrace(); } @@ -107,8 +110,10 @@ public int read(byte[] buffer, int offset, int length) throws IOException { } public int available() { - if (mBuffer != null) return mBufferInfo.size - mBuffer.position(); - else return 0; + if (mBuffer != null) + return mBufferInfo.size - mBuffer.position(); + else + return 0; } public BufferInfo getLastBufferInfo() { diff --git a/src/net/majorkernelpanic/streaming/rtp/RtpSocket.java b/src/net/majorkernelpanic/streaming/rtp/RtpSocket.java index 032e0f55..472fb5cd 100644 --- a/src/net/majorkernelpanic/streaming/rtp/RtpSocket.java +++ b/src/net/majorkernelpanic/streaming/rtp/RtpSocket.java @@ -27,6 +27,7 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; +import net.majorkernelpanic.streaming.rtcp.SenderReport; import android.os.SystemClock; import android.util.Log; @@ -48,6 +49,8 @@ public class RtpSocket implements Runnable { private byte[][] mBuffers; private long[] mTimestamps; + private SenderReport mReport; + private Semaphore mBufferRequested, mBufferCommitted; private Thread mThread; @@ -58,22 +61,21 @@ public class RtpSocket implements Runnable { private long mBitRate = 0, mOctetCount = 0; private int mSsrc, mSeq = 0, mPort = -1; private int mBufferCount, mBufferIn, mBufferOut; + private int mCount = 0; /** * This RTP socket implements a buffering mechanism relying on a FIFO of buffers and a Thread. * @throws IOException */ public RtpSocket() throws IOException { - + mCacheSize = 400; mBufferCount = 300; // TODO: reajust that when the FIFO is full - mBufferIn = 0; - mBufferOut = 0; mBuffers = new byte[mBufferCount][]; mPackets = new DatagramPacket[mBufferCount]; - mTimestamps = new long[mBufferCount]; - mBufferRequested = new Semaphore(mBufferCount); - mBufferCommitted = new Semaphore(0); + mReport = new SenderReport(); + + resetFifo(); for (int i=0; i=mBufferCount) mBufferIn = 0; + mBufferCommitted.release(); + + } + /** Sends the RTP packet over the network. */ public void commitBuffer(int length) throws IOException { - updateSequence(); mPackets[mBufferIn].setLength(length); @@ -178,14 +208,14 @@ public void commitBuffer(int length) throws IOException { mOldTime = mTime; } - mBufferCommitted.release(); if (++mBufferIn>=mBufferCount) mBufferIn = 0; + mBufferCommitted.release(); if (mThread == null) { mThread = new Thread(this); mThread.start(); - } - + } + } /** Returns an approximation of the bitrate of the RTP stream in bit per seconde. */ @@ -219,17 +249,20 @@ public void run() { try { // Caches mCacheSize milliseconds of the stream in the FIFO. Thread.sleep(mCacheSize); + Log.d(TAG,"permits: "+mBufferCommitted.availablePermits()); long delta = 0; while (mBufferCommitted.tryAcquire(4,TimeUnit.SECONDS)) { if (mOldTimestamp != 0) { - // We use our knowledge of the clock rate of the stream and the difference between two timestamp to - // compute the temporal length of the packet. + // We use our knowledge of the clock rate of the stream and the difference between two timestamps to + // compute the time lapse that the packet represents. if ((mTimestamps[mBufferOut]-mOldTimestamp)>0) { stats.push(mTimestamps[mBufferOut]-mOldTimestamp); long d = stats.average()/1000000; //Log.d(TAG,"delay: "+d+" d: "+(mTimestamps[mBufferOut]-mOldTimestamp)/1000000); // We ensure that packets are sent at a constant and suitable rate no matter how the RtpSocket is used. - Thread.sleep(d); + if (mCacheSize>0) Thread.sleep(d); + } else if ((mTimestamps[mBufferOut]-mOldTimestamp)<0) { + Log.e(TAG, "TS: "+mTimestamps[mBufferOut]+" OLD: "+mOldTimestamp); } delta += mTimestamps[mBufferOut]-mOldTimestamp; if (delta>500000000 || delta<0) { @@ -237,8 +270,10 @@ public void run() { delta = 0; } } + mReport.update(mPackets[mBufferOut].getLength(), System.nanoTime(),(mTimestamps[mBufferOut]/100L)*(mClock/1000L)/10000L); mOldTimestamp = mTimestamps[mBufferOut]; - mSocket.send(mPackets[mBufferOut]); + if (mCount == 0) Log.e(TAG,"C: "+mClock+" TS: "+SystemClock.elapsedRealtime()); + if (mCount++>30) mSocket.send(mPackets[mBufferOut]); if (++mBufferOut>=mBufferCount) mBufferOut = 0; mBufferRequested.release(); } @@ -246,6 +281,7 @@ public void run() { e.printStackTrace(); } mThread = null; + resetFifo(); } private void setLong(byte[] buffer, long n, int begin, int end) { diff --git a/src/net/majorkernelpanic/streaming/rtsp/RtspClient.java b/src/net/majorkernelpanic/streaming/rtsp/RtspClient.java index 4601679a..b4335062 100644 --- a/src/net/majorkernelpanic/streaming/rtsp/RtspClient.java +++ b/src/net/majorkernelpanic/streaming/rtsp/RtspClient.java @@ -139,7 +139,7 @@ public synchronized void startStream(int retries) throws RuntimeException, Illeg mBufferedReader = new BufferedReader(new InputStreamReader(mSocket.getInputStream())); mOutputStream = mSocket.getOutputStream(); mSession.setDestination(InetAddress.getByName(mHost)); - + sendRequestAnnounce(); sendRequestSetup(); sendRequestRecord(); @@ -301,8 +301,7 @@ private String addHeaders() { return "CSeq: " + (++mCSeq) + "\r\n" + "Content-Length: 0\r\n" + "Session: " + mSessionID + "\r\n" + - (mAuthorization != null ? "Authorization: " + mAuthorization + "\r\n":"") + - "\r\n"; + (mAuthorization != null ? "Authorization: " + mAuthorization + "\r\n":""); } final protected static char[] hexArray = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; diff --git a/src/net/majorkernelpanic/streaming/rtsp/UriParser.java b/src/net/majorkernelpanic/streaming/rtsp/UriParser.java index 7e1ca351..feea317b 100644 --- a/src/net/majorkernelpanic/streaming/rtsp/UriParser.java +++ b/src/net/majorkernelpanic/streaming/rtsp/UriParser.java @@ -34,6 +34,7 @@ import java.util.Iterator; import java.util.List; +import net.majorkernelpanic.streaming.MediaStream; import net.majorkernelpanic.streaming.Session; import net.majorkernelpanic.streaming.SessionBuilder; import net.majorkernelpanic.streaming.audio.AudioQuality; @@ -43,7 +44,6 @@ import org.apache.http.client.utils.URLEncodedUtils; import android.hardware.Camera.CameraInfo; -import android.util.Log; /** * This class parses URIs received by the RTSP server and configures a Session accordingly. @@ -66,6 +66,7 @@ public class UriParser { */ public static Session parse(String uri) throws IllegalStateException, IOException { SessionBuilder builder = SessionBuilder.getInstance().clone(); + byte audioApi = 0, videoApi = 0; List params = URLEncodedUtils.parse(URI.create(uri),"UTF-8"); if (params.size()>0) { @@ -123,6 +124,28 @@ else if (param.getName().equalsIgnoreCase("unicast")) { } } } + + // VIDEOAPI -> can be used to specify what api will be used to encode video (the MediaRecorder API or the MediaCodec API) + else if (param.getName().equalsIgnoreCase("videoapi")) { + if (param.getValue()!=null) { + if (param.getValue().equalsIgnoreCase("mr")) { + videoApi = MediaStream.MODE_MEDIARECORDER_API; + } else if (param.getValue().equalsIgnoreCase("mc")) { + videoApi = MediaStream.MODE_MEDIACODEC_API; + } + } + } + + // AUDIOAPI -> can be used to specify what api will be used to encode audio (the MediaRecorder API or the MediaCodec API) + else if (param.getName().equalsIgnoreCase("audioapi")) { + if (param.getValue()!=null) { + if (param.getValue().equalsIgnoreCase("mr")) { + audioApi = MediaStream.MODE_MEDIARECORDER_API; + } else if (param.getValue().equalsIgnoreCase("mc")) { + audioApi = MediaStream.MODE_MEDIACODEC_API; + } + } + } // TTL -> the client can modify the time to live of packets // By default ttl=64 @@ -172,7 +195,17 @@ else if (param.getName().equalsIgnoreCase("aac")) { builder.setAudioEncoder(b.getAudioEncoder()); } - return builder.build(); + Session session = builder.build(); + + if (videoApi>0 && session.getVideoTrack() != null) { + session.getVideoTrack().setMode(videoApi); + } + + if (audioApi>0 && session.getAudioTrack() != null) { + session.getAudioTrack().setMode(audioApi); + } + + return session; } diff --git a/src/net/majorkernelpanic/streaming/video/CodecManager.java b/src/net/majorkernelpanic/streaming/video/CodecManager.java new file mode 100644 index 00000000..0d9d4cc8 --- /dev/null +++ b/src/net/majorkernelpanic/streaming/video/CodecManager.java @@ -0,0 +1,265 @@ +/* + * Copyright (C) 2011-2013 GUIGUI Simon, fyhertz@gmail.com + * + * This file is part of Spydroid (http://code.google.com/p/spydroid-ipcamera/) + * + * Spydroid is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This source code is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this source code; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package net.majorkernelpanic.streaming.video; + +import java.util.ArrayList; +import java.util.HashMap; + +import android.annotation.SuppressLint; +import android.media.MediaCodecInfo; +import android.media.MediaCodecList; +import android.os.Build; +import android.util.Log; +import android.util.SparseArray; + +@SuppressLint("InlinedApi") +public class CodecManager { + + public final static String TAG = "CodecManager"; + + public static final int[] SUPPORTED_COLOR_FORMATS = { + MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Planar, + MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420SemiPlanar + }; + + /** + * There currently is no way to know if an encoder is software or hardware from the MediaCodecInfo class, + * so we need to maintain a list of known software encoders. + */ + public static final String[] SOFTWARE_ENCODERS = { + "OMX.google.h264.encoder" + }; + + /** + * Contains a list of encoders and color formats that we may use with a {@link CodecManager.Translator}. + */ + static class Codecs { + /** A hardware encoder supporting a color format we can use. */ + public String hardwareCodec; + public int hardwareColorFormat; + /** A software encoder supporting a color format we can use. */ + public String softwareCodec; + public int softwareColorFormat; + } + + /** + * Contains helper functions to choose an encoder and a color format. + */ + static class Selector { + + private static HashMap>> sHardwareCodecs = new HashMap>>(); + private static HashMap>> sSoftwareCodecs = new HashMap>>(); + + /** + * Determines the most appropriate encoder to compress the video from the Camera + */ + public static Codecs findCodecsFormMimeType(String mimeType, boolean tryColorFormatSurface) { + findSupportedColorFormats(mimeType); + SparseArray> hardwareCodecs = sHardwareCodecs.get(mimeType); + SparseArray> softwareCodecs = sSoftwareCodecs.get(mimeType); + Codecs list = new Codecs(); + + // On devices running 4.3, we need an encoder supporting the color format used to work with a Surface + if (Build.VERSION.SDK_INT>=18 && tryColorFormatSurface) { + int colorFormatSurface = MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface; + try { + // We want a hardware encoder + list.hardwareCodec = hardwareCodecs.get(colorFormatSurface).get(0); + list.hardwareColorFormat = colorFormatSurface; + } catch (Exception e) {} + try { + // We want a software encoder + list.softwareCodec = softwareCodecs.get(colorFormatSurface).get(0); + list.softwareColorFormat = colorFormatSurface; + } catch (Exception e) {} + + if (list.hardwareCodec != null) { + Log.v(TAG,"Choosen primary codec: "+list.hardwareCodec+" with color format: "+list.hardwareColorFormat); + } else { + Log.e(TAG,"No supported hardware codec found !"); + } + if (list.softwareCodec != null) { + Log.v(TAG,"Choosen secondary codec: "+list.hardwareCodec+" with color format: "+list.hardwareColorFormat); + } else { + Log.e(TAG,"No supported software codec found !"); + } + return list; + } + + for (int i=0;i> softwareCodecs = new SparseArray>(); + SparseArray> hardwareCodecs = new SparseArray>(); + + if (sSoftwareCodecs.containsKey(mimeType)) { + return; + } + + Log.v(TAG,"Searching supported color formats for mime type \""+mimeType+"\"..."); + + // We loop through the encoders, apparently this can take up to a sec (testes on a GS3) + for(int j = MediaCodecList.getCodecCount() - 1; j >= 0; j--){ + MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(j); + if (!codecInfo.isEncoder()) continue; + + String[] types = codecInfo.getSupportedTypes(); + for (int i = 0; i < types.length; i++) { + if (types[i].equalsIgnoreCase(mimeType)) { + MediaCodecInfo.CodecCapabilities capabilities = codecInfo.getCapabilitiesForType(mimeType); + + boolean software = false; + for (int k=0;k()); + softwareCodecs.get(format).add(codecInfo.getName()); + } else { + if (hardwareCodecs.get(format) == null) hardwareCodecs.put(format, new ArrayList()); + hardwareCodecs.get(format).add(codecInfo.getName()); + } + } + + } + } + } + + // Logs the supported color formats on the phone + StringBuilder e = new StringBuilder(); + e.append("Supported color formats on this phone: "); + for (int i=0;i=0) { + inputBuffers[bufferIndex].clear(); + int min = inputBuffers[bufferIndex].capacity()=0) { + + len = info.size; + if (len<128) { + + buffers[index].get(buffer,0,len); + if (len>0 && buffer[0]==0 && buffer[1]==0 && buffer[2]==0 && buffer[3]==1) { + // Parses the SPS and PPS, they could be in two different packets and in a different order + //depending on the phone so we don't make any assumption about that + while (p=len) p=len; + if ((buffer[q]&0x1F)==7) { + sps = new byte[p-q]; + System.arraycopy(buffer, q, sps, 0, p-q); + } else { + pps = new byte[p-q]; + System.arraycopy(buffer, q, pps, 0, p-q); + } + p += 4; + q = p; + } + } + } + mMediaCodec.releaseOutputBuffer(index, false); + } + } + + if (pps == null || sps == null) throw new RuntimeException("Could not determine the SPS & PPS."); + + } finally { + if (mMediaCodec != null) { + mMediaCodec.stop(); + mMediaCodec.release(); + mMediaCodec = null; + } + if (mCamera != null) mCamera.setPreviewCallbackWithBuffer(null); + if (!cameraOpen) destroyCamera(); + mFlashState = savedFlashState; + } + MP4Config config = new MP4Config(sps, pps); + + // Save test result if (mSettings != null) { - if (mSettings.contains("h264"+mQuality.framerate+","+mQuality.resX+","+mQuality.resY)) { - String[] s = mSettings.getString("h264"+mQuality.framerate+","+mQuality.resX+","+mQuality.resY, "").split(","); + Editor editor = mSettings.edit(); + editor.putString(prefix+mQuality.framerate+","+mQuality.resX+","+mQuality.resY, config.getProfileLevel()+","+config.getB64SPS()+","+config.getB64PPS()); + editor.commit(); + } + + return config; + } + + + // Should not be called by the UI thread + private MP4Config testMediaRecorderAPI() throws RuntimeException, IOException { + + if (mSettings != null) { + if (mSettings.contains("h264-mr"+mQuality.framerate+","+mQuality.resX+","+mQuality.resY)) { + String[] s = mSettings.getString("h264-mr"+mQuality.framerate+","+mQuality.resX+","+mQuality.resY, "").split(","); return new MP4Config(s[0],s[1],s[2]); } } @@ -123,8 +288,9 @@ private MP4Config testH264() throws IllegalStateException, IOException { boolean savedFlashState = mFlashState; mFlashState = false; + boolean cameraOpen = mCamera!=null; createCamera(); - + // Stops the preview if needed if (mPreviewStarted) { lockCamera(); @@ -133,51 +299,52 @@ private MP4Config testH264() throws IllegalStateException, IOException { } catch (Exception e) {} mPreviewStarted = false; } - + try { - Thread.sleep(5000); + Thread.sleep(100); } catch (InterruptedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } - + unlockCamera(); - mMediaRecorder = new MediaRecorder(); - mMediaRecorder.setCamera(mCamera); - mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); - mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); - mMediaRecorder.setMaxDuration(1000); - //mMediaRecorder.setMaxFileSize(Integer.MAX_VALUE); - mMediaRecorder.setVideoEncoder(mVideoEncoder); - mMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface()); - mMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY); - mMediaRecorder.setVideoFrameRate(mQuality.framerate); - mMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate); - mMediaRecorder.setOutputFile(TESTFILE); - - // We wait a little and stop recording - mMediaRecorder.setOnInfoListener(new MediaRecorder.OnInfoListener() { - public void onInfo(MediaRecorder mr, int what, int extra) { - Log.d(TAG,"MediaRecorder callback called !"); - if (what==MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) { - Log.d(TAG,"MediaRecorder: MAX_DURATION_REACHED"); - } else if (what==MediaRecorder.MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED) { - Log.d(TAG,"MediaRecorder: MAX_FILESIZE_REACHED"); - } else if (what==MediaRecorder.MEDIA_RECORDER_INFO_UNKNOWN) { - Log.d(TAG,"MediaRecorder: INFO_UNKNOWN"); - } else { - Log.d(TAG,"WTF ?"); + try { + + mMediaRecorder = new MediaRecorder(); + mMediaRecorder.setCamera(mCamera); + mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); + mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); + mMediaRecorder.setMaxDuration(1000); + //mMediaRecorder.setMaxFileSize(Integer.MAX_VALUE); + mMediaRecorder.setVideoEncoder(mVideoEncoder); + mMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface()); + mMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY); + mMediaRecorder.setVideoFrameRate(mQuality.framerate); + mMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate); + mMediaRecorder.setOutputFile(TESTFILE); + + // We wait a little and stop recording + mMediaRecorder.setOnInfoListener(new MediaRecorder.OnInfoListener() { + public void onInfo(MediaRecorder mr, int what, int extra) { + Log.d(TAG,"MediaRecorder callback called !"); + if (what==MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) { + Log.d(TAG,"MediaRecorder: MAX_DURATION_REACHED"); + } else if (what==MediaRecorder.MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED) { + Log.d(TAG,"MediaRecorder: MAX_FILESIZE_REACHED"); + } else if (what==MediaRecorder.MEDIA_RECORDER_INFO_UNKNOWN) { + Log.d(TAG,"MediaRecorder: INFO_UNKNOWN"); + } else { + Log.d(TAG,"WTF ?"); + } + mLock.release(); } - mLock.release(); - } - }); + }); - // Start recording - mMediaRecorder.prepare(); - mMediaRecorder.start(); + // Start recording + mMediaRecorder.prepare(); + mMediaRecorder.start(); - try { if (mLock.tryAcquire(6,TimeUnit.SECONDS)) { Log.d(TAG,"MediaRecorder callback was called :)"); Thread.sleep(400); @@ -193,6 +360,9 @@ public void onInfo(MediaRecorder mr, int what, int extra) { mMediaRecorder.release(); mMediaRecorder = null; lockCamera(); + if (!cameraOpen) destroyCamera(); + // Restore flash state + mFlashState = savedFlashState; } // Retrieve SPS & PPS & ProfileId with MP4Config @@ -202,18 +372,15 @@ public void onInfo(MediaRecorder mr, int what, int extra) { File file = new File(TESTFILE); if (!file.delete()) Log.e(TAG,"Temp file could not be erased"); - // Restore flash state - mFlashState = savedFlashState; - Log.i(TAG,"H264 Test succeded..."); // Save test result if (mSettings != null) { Editor editor = mSettings.edit(); - editor.putString("h264"+mQuality.framerate+","+mQuality.resX+","+mQuality.resY, config.getProfileLevel()+","+config.getB64SPS()+","+config.getB64PPS()); + editor.putString("h264-mr"+mQuality.framerate+","+mQuality.resX+","+mQuality.resY, config.getProfileLevel()+","+config.getB64SPS()+","+config.getB64PPS()); editor.commit(); } - + return config; } diff --git a/src/net/majorkernelpanic/streaming/video/VideoQuality.java b/src/net/majorkernelpanic/streaming/video/VideoQuality.java index 2b1803aa..bb205e2f 100644 --- a/src/net/majorkernelpanic/streaming/video/VideoQuality.java +++ b/src/net/majorkernelpanic/streaming/video/VideoQuality.java @@ -78,7 +78,7 @@ public boolean equals(VideoQuality quality) { } public VideoQuality clone() { - return new VideoQuality(resX,resY,framerate,bitrate); + return new VideoQuality(resX,resY,framerate,bitrate,orientation); } public static VideoQuality parseQuality(String str) { diff --git a/src/net/majorkernelpanic/streaming/video/VideoStream.java b/src/net/majorkernelpanic/streaming/video/VideoStream.java index 8a5f7bb5..b9585924 100644 --- a/src/net/majorkernelpanic/streaming/video/VideoStream.java +++ b/src/net/majorkernelpanic/streaming/video/VideoStream.java @@ -21,7 +21,10 @@ package net.majorkernelpanic.streaming.video; import java.io.IOException; +import java.io.InputStream; import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -38,7 +41,9 @@ import android.media.MediaCodecList; import android.media.MediaFormat; import android.media.MediaRecorder; +import android.os.Build; import android.util.Log; +import android.util.SparseArray; import android.view.SurfaceHolder; import android.view.SurfaceHolder.Callback; @@ -49,17 +54,27 @@ public abstract class VideoStream extends MediaStream { protected final static String TAG = "VideoStream"; + private static HashMap>> sSupportedColorFormats = new HashMap>>(); + protected VideoQuality mQuality = VideoQuality.DEFAULT_VIDEO_QUALITY.clone(); protected SurfaceHolder.Callback mSurfaceHolderCallback = null; protected SurfaceHolder mSurfaceHolder = null; protected int mVideoEncoder, mCameraId = 0; protected Camera mCamera; + protected boolean mCameraOpenedManually = true; protected boolean mFlashState = false; protected boolean mSurfaceReady = false; protected boolean mUnlocked = false; protected boolean mPreviewStarted = false; + protected CodecManager.Codecs mCodecs; + protected String mMimeType; + protected String mEncoderName; + protected int mEncoderColorFormat; + protected int mCameraImageFormat; + protected int mMaxFps = 0; + /** * Don't use this class directly. * Uses CAMERA_FACING_BACK by default. @@ -72,13 +87,49 @@ public VideoStream() { * Don't use this class directly * @param camera Can be either CameraInfo.CAMERA_FACING_BACK or CameraInfo.CAMERA_FACING_FRONT */ + @SuppressLint("InlinedApi") public VideoStream(int camera) { super(); setCamera(camera); - // TODO: Remove this when encoding with the MediaCodec API is ready - setMode(MODE_MEDIARECORDER_API); } + /** + * Called by subclasses. + */ + protected void init(String mimeType) { + mCameraImageFormat = ImageFormat.YV12; + mMimeType = mimeType; + + if (sSuggestedMode == MODE_MEDIACODEC_API) { + mCodecs = CodecManager.Selector.findCodecsFormMimeType(mMimeType, false); + + if (mCodecs.hardwareCodec == null && mCodecs.softwareCodec == null ) { + mMode = MODE_MEDIARECORDER_API; + Log.e(TAG,"No encoder can be used on this phone, we will use the MediaRecorder API"); + + } else if (Build.VERSION.SDK_INT<18) { + if (mCodecs.softwareCodec != null) { + // On android 4.1 and 4.2, hardware encoders can behave oddly... + mEncoderColorFormat = mCodecs.softwareColorFormat; + mEncoderName = mCodecs.softwareCodec; + } else { + mMode = MODE_MEDIARECORDER_API; + Log.e(TAG,"Not using the hardware encoder because phone is running 4.1 or 4.2, we will use the MediaRecorder API"); + } + + } else { + if (mCodecs.hardwareCodec != null) { + mEncoderColorFormat = mCodecs.hardwareColorFormat; + mEncoderName = mCodecs.hardwareCodec; + } else { + mEncoderColorFormat = mCodecs.softwareColorFormat; + mEncoderName = mCodecs.softwareCodec; + } + } + + } + } + /** * Sets the camera that will be used to capture video. * You can call this method at any time and changes will take effect next time you start the stream. @@ -243,7 +294,7 @@ public void setVideoEncodingBitrate(int bitrate) { */ public void setVideoQuality(VideoQuality videoQuality) { if (!mQuality.equals(videoQuality)) { - mQuality = videoQuality; + mQuality = videoQuality.clone(); } } @@ -276,7 +327,7 @@ public synchronized void start() throws IllegalStateException, IOException { /** Stops the stream. */ public synchronized void stop() { if (mCamera != null) { - if (mMode == MODE_MEDIACODEC_API) { + if ((mMode&MODE_MEDIACODEC_API)!=0) { mCamera.setPreviewCallback(null); } super.stop(); @@ -348,7 +399,9 @@ protected void encodeWithMediaRecorder() throws IOException { mMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface()); mMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY); mMediaRecorder.setVideoFrameRate(mQuality.framerate); - mMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate); + + // The bandwidth actually consumed is often above what was requested + mMediaRecorder.setVideoEncodingBitRate((int)(mQuality.bitrate*0.8)); // We write the ouput of the camera in a local socket instead of a file ! // This one little trick makes streaming feasible quiet simply: data from the camera @@ -358,6 +411,21 @@ protected void encodeWithMediaRecorder() throws IOException { mMediaRecorder.prepare(); mMediaRecorder.start(); + // This will skip the MPEG4 header if this step fails we can't stream anything :( + InputStream is = mReceiver.getInputStream(); + try { + byte buffer[] = new byte[4]; + // Skip all atoms preceding mdat atom + while (!Thread.interrupted()) { + while (is.read() != 'm'); + is.read(buffer,0,3); + if (buffer[0] == 'd' && buffer[1] == 'a' && buffer[2] == 't') break; + } + } catch (IOException e) { + Log.e(TAG,"Couldn't skip mp4 header :/"); + stop(); + } + try { // mReceiver.getInputStream contains the data from the camera // the mPacketizer encapsulates this stream in an RTP stream and send it over the network @@ -372,14 +440,28 @@ protected void encodeWithMediaRecorder() throws IOException { } + /** * Encoding of the audio/video is done by a MediaCodec. */ - @SuppressLint({ "InlinedApi", "NewApi" }) protected void encodeWithMediaCodec() throws RuntimeException, IOException { + if ((mMode&MODE_MEDIACODEC_API_2)!=0) { + // Uses the method MediaCodec.createInputSurface to feed the encoder + encodeWithMediaCodecMethod2(); + } else { + // Uses dequeueInputBuffer to feed the encoder + encodeWithMediaCodecMethod1(); + } + } - // Opens the camera if needed + /** + * Encoding of the audio/video is done by a MediaCodec. + */ + @SuppressLint("NewApi") + protected void encodeWithMediaCodecMethod1() throws RuntimeException, IOException { + // Reopens the camera if needed createCamera(); + updateCamera(); // Starts the preview if needed if (!mPreviewStarted) { @@ -392,31 +474,45 @@ protected void encodeWithMediaCodec() throws RuntimeException, IOException { } } - mMediaCodec = MediaCodec.createEncoderByType("video/avc"); + final CodecManager.Translator convertor = new CodecManager.Translator(mEncoderColorFormat,mQuality.resX,mQuality.resY); + + mMediaCodec = MediaCodec.createByCodecName(mEncoderName); MediaFormat mediaFormat = MediaFormat.createVideoFormat("video/avc", mQuality.resX, mQuality.resY); mediaFormat.setInteger(MediaFormat.KEY_BIT_RATE, mQuality.bitrate); mediaFormat.setInteger(MediaFormat.KEY_FRAME_RATE, mQuality.framerate); - mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT,MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420SemiPlanar); + mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT,mEncoderColorFormat); mediaFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 4); mMediaCodec.configure(mediaFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE); mMediaCodec.start(); final ByteBuffer[] inputBuffers = mMediaCodec.getInputBuffers(); - mCamera.setPreviewCallback(new Camera.PreviewCallback() { + for (int i=0;i<10;i++) mCamera.addCallbackBuffer(new byte[convertor.getBufferSize()]); + + mCamera.setPreviewCallbackWithBuffer(new Camera.PreviewCallback() { + private long now = System.nanoTime()/1000, oldnow = 0; + private int bufferIndex; @Override public void onPreviewFrame(byte[] data, Camera camera) { - long now = System.nanoTime()/1000, timeout = 1000000/mQuality.framerate; - int bufferIndex = mMediaCodec.dequeueInputBuffer(timeout); - - if (bufferIndex>=0) { - inputBuffers[bufferIndex].clear(); - inputBuffers[bufferIndex].put(data, 0, data.length); - mMediaCodec.queueInputBuffer(bufferIndex, 0, data.length, System.nanoTime()/1000, 0); - } else { - Log.e(TAG,"No buffer available !"); + oldnow = now; + now = System.nanoTime()/1000; + //Log.d(TAG,"Measured: "+1000000L/(now-oldnow)+" fps."); + try { + bufferIndex = mMediaCodec.dequeueInputBuffer(0); + if (bufferIndex>=0) { + byte[] buffer = convertor.translate(data); + int min = inputBuffers[bufferIndex].capacity()> findSupportedColorFormats(String mimeType) { + SparseArray> list = new SparseArray>(); + + if (sSupportedColorFormats.containsKey(mimeType)) { + return sSupportedColorFormats.get(mimeType); + } + + Log.v(TAG,"Searching supported color formats for mime type "+mimeType); + + // We loop through the encoders, apparently this can take up to a sec (testes on a GS3) for(int j = MediaCodecList.getCodecCount() - 1; j >= 0; j--){ MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(j); - if (codecInfo.isEncoder()) { - MediaCodecInfo.CodecCapabilities capabilities = codecInfo.getCapabilitiesForType("video/avc"); - for (int i = 0; i < capabilities.colorFormats.length; i++) { - int format = capabilities.colorFormats[i]; - Log.e(TAG, codecInfo.getName()+" with color format " + format); + if (!codecInfo.isEncoder()) continue; + + String[] types = codecInfo.getSupportedTypes(); + for (int i = 0; i < types.length; i++) { + if (types[i].equalsIgnoreCase(mimeType)) { + MediaCodecInfo.CodecCapabilities capabilities = codecInfo.getCapabilitiesForType(mimeType); + // And through the color formats supported + for (int k = 0; k < capabilities.colorFormats.length; k++) { + int format = capabilities.colorFormats[k]; + if (list.get(format) == null) list.put(format, new ArrayList()); + list.get(format).add(codecInfo.getName()); + } } - /*for (int i = 0; i < capabilities.profileLevels; i++) { - int format = capabilities.colorFormats[i]; - Log.e(TAG, codecInfo.getName()+" with color format " + format); - }*/ } } + + // Logs the supported color formats on the phone + StringBuilder e = new StringBuilder(); + e.append("Supported color formats on this phone: "); + for (int i=0;i supportedSizes = parameters.getSupportedPreviewSizes(); for (Iterator it = supportedSizes.iterator(); it.hasNext();) { Size size = it.next(); supportedSizesStr += size.width+"x"+size.height+(it.hasNext()?", ":""); + int dist = Math.abs(mQuality.resX - size.width); + if (dist supportedFrameRates = parameters.getSupportedPreviewFrameRates(); for (Iterator it = supportedFrameRates.iterator(); it.hasNext();) { supportedFrameRatesStr += it.next()+"fps"+(it.hasNext()?", ":""); } - //Log.v(TAG,supportedFrameRatesStr); + Log.v(TAG,supportedFrameRatesStr); + + // Frame rates + String supportedFpsRangesStr = "Supported frame rates: "; + int maxFps = 0; + List supportedFpsRanges = parameters.getSupportedPreviewFpsRange(); + for (Iterator it = supportedFpsRanges.iterator(); it.hasNext();) { + int[] interval = it.next(); + supportedFpsRangesStr += interval[0]+"-"+interval[1]+"fps"+(it.hasNext()?", ":""); + if (interval[1]/1000>maxFps) maxFps = interval[1]/1000; + } + this.mMaxFps = maxFps; + Log.v(TAG,supportedFpsRangesStr); int minDist = Integer.MAX_VALUE, newFps = mQuality.framerate; if (!supportedFrameRates.contains(mQuality.framerate)) { @@ -562,9 +738,8 @@ private void getClosestSupportedQuality(Camera.Parameters parameters) { } } Log.v(TAG,"Frame rate modified: "+mQuality.framerate+"->"+newFps); - //mQuality.framerate = newFps; + mQuality.framerate = newFps; } - } protected void lockCamera() { From 19b02715b80933bb9f6f2225036d9731fb650f4f Mon Sep 17 00:00:00 2001 From: Leo B Date: Wed, 8 Jan 2014 11:55:10 +0100 Subject: [PATCH 02/51] Mavenize library for easy inclusion in other projects --- pom.xml | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 pom.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..c5152961 --- /dev/null +++ b/pom.xml @@ -0,0 +1,80 @@ + + + + 4.0.0 + + net.majorkernelpanic + libstreaming + libstreaming + 3.0 + apklib + libstreaming is an API that allows you, with only a few lines of code, to stream the camera and/or microphone of an android powered device using RTP over UDP. + https://github.com/fyhertz/libstreaming + 2013 + + + https://github.com/fyhertz/libstreaming + scm:git:git://github.com/fyhertz/libstreaming + + + + + fyhertz + fyhertz@gmail.com + fyhertz + + developer + + + + + + + GNU General Public License Version 3 + http://www.gnu.org/licenses/gpl.html + repo + + + + + GitHub Issues + https://github.com/fyhertz/libstreaming/issues + + + + + com.google.android + android + 4.3_r2 + provided + + + + + src + test + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + + + 18 + + + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + + + + + + From dd0ddbd0a6719265407805b99009ec7fbf459466 Mon Sep 17 00:00:00 2001 From: fyhertz Date: Sat, 8 Feb 2014 03:10:16 -0500 Subject: [PATCH 03/51] libstreaming requires android 4.0 --- AndroidManifest.xml | 4 ++-- project.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 31a434f5..9e2e14dc 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -4,7 +4,7 @@ android:versionName="4.0" > + android:minSdkVersion="14" + android:targetSdkVersion="19" /> diff --git a/project.properties b/project.properties index 7002f279..8e4bc5fd 100644 --- a/project.properties +++ b/project.properties @@ -8,5 +8,5 @@ # project structure. # Project target. -target=android-18 +target=android-19 android.library=true From 84ea97ffaa2025a3ccb03e59dab549c9bcb2d4a6 Mon Sep 17 00:00:00 2001 From: fyhertz Date: Sat, 8 Feb 2014 03:20:55 -0500 Subject: [PATCH 04/51] Git forgot some stuff during the merge. --- doc/allclasses-frame.html | 3 +- doc/allclasses-noframe.html | 3 +- doc/constant-values.html | 21 +- doc/deprecated-list.html | 2 +- doc/help-doc.html | 2 +- doc/index-all.html | 15 +- doc/index.html | 2 +- .../streaming/MediaStream.html | 2 +- .../streaming/Session.Callback.html | 2 +- .../majorkernelpanic/streaming/Session.html | 2 +- .../streaming/SessionBuilder.html | 2 +- .../majorkernelpanic/streaming/Stream.html | 2 +- .../audio/AACNotSupportedException.html | 253 --------- .../streaming/audio/AACStream.html | 2 +- .../streaming/audio/AMRNBStream.html | 2 +- .../streaming/audio/AudioQuality.html | 2 +- .../streaming/audio/AudioStream.html | 2 +- .../streaming/audio/package-frame.html | 2 +- .../streaming/audio/package-summary.html | 2 +- .../streaming/audio/package-tree.html | 2 +- .../exceptions/CameraInUseException.html | 2 +- .../exceptions/ConfNotSupportedException.html | 2 +- .../exceptions/InvalidSurfaceException.html | 2 +- .../StorageUnavailableException.html | 2 +- .../streaming/exceptions/package-frame.html | 2 +- .../streaming/exceptions/package-summary.html | 2 +- .../streaming/exceptions/package-tree.html | 2 +- .../streaming/gl/SurfaceManager.html | 2 +- .../streaming/gl/SurfaceView.html | 2 +- .../streaming/gl/TextureManager.html | 2 +- .../streaming/gl/package-frame.html | 2 +- .../streaming/gl/package-summary.html | 2 +- .../streaming/gl/package-tree.html | 2 +- .../streaming/hw/CodecManager.html | 2 +- .../streaming/hw/EncoderDebugger.html | 2 +- .../streaming/hw/NV21Convertor.html | 2 +- .../streaming/hw/package-frame.html | 2 +- .../streaming/hw/package-summary.html | 2 +- .../streaming/hw/package-tree.html | 2 +- .../streaming/mp4/MP4Config.html | 2 +- .../streaming/mp4/package-frame.html | 2 +- .../streaming/mp4/package-summary.html | 2 +- .../streaming/mp4/package-tree.html | 2 +- .../streaming/package-frame.html | 2 +- .../streaming/package-summary.html | 2 +- .../streaming/package-tree.html | 2 +- .../streaming/rtcp/SenderReport.html | 2 +- .../streaming/rtcp/package-frame.html | 2 +- .../streaming/rtcp/package-summary.html | 2 +- .../streaming/rtcp/package-tree.html | 2 +- .../streaming/rtp/AACADTSPacketizer.html | 2 +- .../streaming/rtp/AACLATMPacketizer.html | 2 +- .../streaming/rtp/AMRNBPacketizer.html | 2 +- .../streaming/rtp/AbstractPacketizer.html | 2 +- .../streaming/rtp/H263Packetizer.html | 2 +- .../streaming/rtp/H264Packetizer.html | 2 +- .../streaming/rtp/MediaCodecInputStream.html | 2 +- .../streaming/rtp/RtpSocket.Statistics.html | 314 ----------- .../streaming/rtp/RtpSocket.html | 2 +- .../streaming/rtp/package-frame.html | 2 +- .../streaming/rtp/package-summary.html | 2 +- .../streaming/rtp/package-tree.html | 2 +- .../streaming/rtsp/RtspClient.Callback.html | 2 +- .../streaming/rtsp/RtspClient.html | 2 +- .../rtsp/RtspServer.CallbackListener.html | 2 +- .../rtsp/RtspServer.LocalBinder.html | 2 +- .../streaming/rtsp/RtspServer.html | 2 +- .../streaming/rtsp/UriParser.html | 2 +- .../streaming/rtsp/package-frame.html | 2 +- .../streaming/rtsp/package-summary.html | 2 +- .../streaming/rtsp/package-tree.html | 2 +- .../streaming/video/CodecManager.html | 79 ++- .../video/ColorFormatTranslator.html | 299 ---------- .../streaming/video/H263Stream.html | 6 +- .../streaming/video/H264Stream.html | 4 +- .../streaming/video/VideoQuality.html | 2 +- .../streaming/video/VideoStream.html | 2 +- .../streaming/video/package-frame.html | 3 +- .../streaming/video/package-summary.html | 12 +- .../streaming/video/package-tree.html | 3 +- doc/overview-frame.html | 2 +- doc/overview-summary.html | 2 +- doc/overview-tree.html | 3 +- doc/resources/inherit.gif | Bin 57 -> 0 bytes doc/serialized-form.html | 2 +- doc/stylesheet.css | 522 ++++++++++++++++-- .../streaming/rtcp/SenderReport.java | 3 - .../streaming/rtp/RtpSocket.java | 1 - .../streaming/video/H263Stream.java | 2 - .../streaming/video/H264Stream.java | 6 - .../streaming/video/VideoQuality.java | 2 +- .../streaming/video/VideoStream.java | 37 -- 92 files changed, 638 insertions(+), 1093 deletions(-) delete mode 100644 doc/net/majorkernelpanic/streaming/audio/AACNotSupportedException.html delete mode 100644 doc/net/majorkernelpanic/streaming/rtp/RtpSocket.Statistics.html delete mode 100644 doc/net/majorkernelpanic/streaming/video/ColorFormatTranslator.html delete mode 100644 doc/resources/inherit.gif diff --git a/doc/allclasses-frame.html b/doc/allclasses-frame.html index 3748072f..bd33307e 100644 --- a/doc/allclasses-frame.html +++ b/doc/allclasses-frame.html @@ -2,7 +2,7 @@ - + All Classes @@ -21,6 +21,7 @@

All Classes

  • AudioStream
  • CameraInUseException
  • CodecManager
  • +
  • CodecManager
  • ConfNotSupportedException
  • EncoderDebugger
  • H263Packetizer
  • diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html index 734dc3ea..5f129e9a 100644 --- a/doc/allclasses-noframe.html +++ b/doc/allclasses-noframe.html @@ -2,7 +2,7 @@ - + All Classes @@ -21,6 +21,7 @@

    All Classes

  • AudioStream
  • CameraInUseException
  • CodecManager
  • +
  • CodecManager
  • ConfNotSupportedException
  • EncoderDebugger
  • H263Packetizer
  • diff --git a/doc/constant-values.html b/doc/constant-values.html index bb2a3b27..5cd7530c 100644 --- a/doc/constant-values.html +++ b/doc/constant-values.html @@ -2,7 +2,7 @@ - + Constant Field Values @@ -662,6 +662,25 @@

    net.majorkernelpanic.*

    • + + + + + + + + + + + + + +
      net.majorkernelpanic.streaming.video.CodecManager 
      Modifier and TypeConstant FieldValue
      + +public static final java.lang.StringTAG"CodecManager"
      +
    • +
    • + diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html index fdb771e8..e072983a 100644 --- a/doc/deprecated-list.html +++ b/doc/deprecated-list.html @@ -2,7 +2,7 @@ - +Deprecated List diff --git a/doc/help-doc.html b/doc/help-doc.html index af856106..8c4f2acb 100644 --- a/doc/help-doc.html +++ b/doc/help-doc.html @@ -2,7 +2,7 @@ - +API Help diff --git a/doc/index-all.html b/doc/index-all.html index 3b2de3b8..f91f8332 100644 --- a/doc/index-all.html +++ b/doc/index-all.html @@ -2,7 +2,7 @@ - +Index @@ -200,6 +200,10 @@

      C

       
      CodecManager() - Constructor for class net.majorkernelpanic.streaming.hw.CodecManager
       
      +
      CodecManager - Class in net.majorkernelpanic.streaming.video
      +
       
      +
      CodecManager() - Constructor for class net.majorkernelpanic.streaming.video.CodecManager
      +
       
      commitBuffer() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
      Puts the buffer back into the FIFO without sending the packet.
      @@ -1216,6 +1220,11 @@

      S

      setYPadding(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
       
      +
      SOFTWARE_ENCODERS - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
      +
      +
      There currently is no way to know if an encoder is software or hardware from the MediaCodecInfo class, + so we need to maintain a list of known software encoders.
      +
      start() - Method in class net.majorkernelpanic.streaming.audio.AACStream
       
      start() - Method in class net.majorkernelpanic.streaming.audio.AMRNBStream
      @@ -1337,6 +1346,8 @@

      S

       
      SUPPORTED_COLOR_FORMATS - Static variable in class net.majorkernelpanic.streaming.hw.CodecManager
       
      +
      SUPPORTED_COLOR_FORMATS - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
      +
       
      surfaceChanged(SurfaceHolder, int, int, int) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
       
      surfaceCreated(SurfaceHolder) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
      @@ -1421,6 +1432,8 @@

      T

       
      TAG - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
       
      +
      TAG - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
      +
       
      TAG - Static variable in class net.majorkernelpanic.streaming.video.H264Stream
       
      TAG - Static variable in class net.majorkernelpanic.streaming.video.VideoQuality
      diff --git a/doc/index.html b/doc/index.html index c22861e7..32df4f7a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,7 +2,7 @@ - +Generated Documentation (Untitled) - - - - - - -
      -
      net.majorkernelpanic.streaming.audio
      -

      Class AACNotSupportedException

      -
      -
      -
        -
      • java.lang.Object
      • -
      • -
          -
        • java.lang.Throwable
        • -
        • -
            -
          • java.lang.Exception
          • -
          • -
              -
            • java.lang.RuntimeException
            • -
            • -
                -
              • net.majorkernelpanic.streaming.audio.AACNotSupportedException
              • -
              -
            • -
            -
          • -
          -
        • -
        -
      • -
      -
      -
        -
      • -
        -
        All Implemented Interfaces:
        -
        java.io.Serializable
        -
        -
        -
        -
        public class AACNotSupportedException
        -extends java.lang.RuntimeException
        -
        See Also:
        Serialized Form
        -
      • -
      -
      -
      -
        -
      • - -
          -
        • - - -

          Constructor Summary

          -
      net.majorkernelpanic.streaming.video.H264Stream 
      Modifier and Type
      - - - - - - - -
      Constructors 
      Constructor and Description
      AACNotSupportedException() 
      -
    • -
    - -
      -
    • - - -

      Method Summary

      -
        -
      • - - -

        Methods inherited from class java.lang.Throwable

        -addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • -
      -
    • -
    - - - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          AACNotSupportedException

          -
          public AACNotSupportedException()
          -
        • -
        -
      • -
      -
    • -
    -
    - - - - - - - - diff --git a/doc/net/majorkernelpanic/streaming/audio/AACStream.html b/doc/net/majorkernelpanic/streaming/audio/AACStream.html index 3b8d12a0..e36ca989 100644 --- a/doc/net/majorkernelpanic/streaming/audio/AACStream.html +++ b/doc/net/majorkernelpanic/streaming/audio/AACStream.html @@ -2,7 +2,7 @@ - + AACStream diff --git a/doc/net/majorkernelpanic/streaming/audio/AMRNBStream.html b/doc/net/majorkernelpanic/streaming/audio/AMRNBStream.html index 679eadbe..edc44a0b 100644 --- a/doc/net/majorkernelpanic/streaming/audio/AMRNBStream.html +++ b/doc/net/majorkernelpanic/streaming/audio/AMRNBStream.html @@ -2,7 +2,7 @@ - + AMRNBStream diff --git a/doc/net/majorkernelpanic/streaming/audio/AudioQuality.html b/doc/net/majorkernelpanic/streaming/audio/AudioQuality.html index 6d5e8832..d592c1a7 100644 --- a/doc/net/majorkernelpanic/streaming/audio/AudioQuality.html +++ b/doc/net/majorkernelpanic/streaming/audio/AudioQuality.html @@ -2,7 +2,7 @@ - + AudioQuality diff --git a/doc/net/majorkernelpanic/streaming/audio/AudioStream.html b/doc/net/majorkernelpanic/streaming/audio/AudioStream.html index 6d11cb9c..03b86a67 100644 --- a/doc/net/majorkernelpanic/streaming/audio/AudioStream.html +++ b/doc/net/majorkernelpanic/streaming/audio/AudioStream.html @@ -2,7 +2,7 @@ - + AudioStream diff --git a/doc/net/majorkernelpanic/streaming/audio/package-frame.html b/doc/net/majorkernelpanic/streaming/audio/package-frame.html index 6a460f72..283f4bf0 100644 --- a/doc/net/majorkernelpanic/streaming/audio/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/audio/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.audio diff --git a/doc/net/majorkernelpanic/streaming/audio/package-summary.html b/doc/net/majorkernelpanic/streaming/audio/package-summary.html index 04cd4416..1d57166d 100644 --- a/doc/net/majorkernelpanic/streaming/audio/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/audio/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.audio diff --git a/doc/net/majorkernelpanic/streaming/audio/package-tree.html b/doc/net/majorkernelpanic/streaming/audio/package-tree.html index 927f1c98..e37d254a 100644 --- a/doc/net/majorkernelpanic/streaming/audio/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/audio/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.audio Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/exceptions/CameraInUseException.html b/doc/net/majorkernelpanic/streaming/exceptions/CameraInUseException.html index 641c3776..7ec473b1 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/CameraInUseException.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/CameraInUseException.html @@ -2,7 +2,7 @@ - + CameraInUseException diff --git a/doc/net/majorkernelpanic/streaming/exceptions/ConfNotSupportedException.html b/doc/net/majorkernelpanic/streaming/exceptions/ConfNotSupportedException.html index 98b75f1d..a8ae563b 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/ConfNotSupportedException.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/ConfNotSupportedException.html @@ -2,7 +2,7 @@ - + ConfNotSupportedException diff --git a/doc/net/majorkernelpanic/streaming/exceptions/InvalidSurfaceException.html b/doc/net/majorkernelpanic/streaming/exceptions/InvalidSurfaceException.html index fc0b8cd0..cdbb46ac 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/InvalidSurfaceException.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/InvalidSurfaceException.html @@ -2,7 +2,7 @@ - + InvalidSurfaceException diff --git a/doc/net/majorkernelpanic/streaming/exceptions/StorageUnavailableException.html b/doc/net/majorkernelpanic/streaming/exceptions/StorageUnavailableException.html index 80ba449b..a9bcb2f1 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/StorageUnavailableException.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/StorageUnavailableException.html @@ -2,7 +2,7 @@ - + StorageUnavailableException diff --git a/doc/net/majorkernelpanic/streaming/exceptions/package-frame.html b/doc/net/majorkernelpanic/streaming/exceptions/package-frame.html index 008e6ce8..9f151b4e 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.exceptions diff --git a/doc/net/majorkernelpanic/streaming/exceptions/package-summary.html b/doc/net/majorkernelpanic/streaming/exceptions/package-summary.html index 9bd4d248..c441a762 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.exceptions diff --git a/doc/net/majorkernelpanic/streaming/exceptions/package-tree.html b/doc/net/majorkernelpanic/streaming/exceptions/package-tree.html index 7f2c3752..c13fab08 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.exceptions Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/gl/SurfaceManager.html b/doc/net/majorkernelpanic/streaming/gl/SurfaceManager.html index 051f9aef..f00083d8 100644 --- a/doc/net/majorkernelpanic/streaming/gl/SurfaceManager.html +++ b/doc/net/majorkernelpanic/streaming/gl/SurfaceManager.html @@ -2,7 +2,7 @@ - + SurfaceManager diff --git a/doc/net/majorkernelpanic/streaming/gl/SurfaceView.html b/doc/net/majorkernelpanic/streaming/gl/SurfaceView.html index 8eb96f75..fe4de14b 100644 --- a/doc/net/majorkernelpanic/streaming/gl/SurfaceView.html +++ b/doc/net/majorkernelpanic/streaming/gl/SurfaceView.html @@ -2,7 +2,7 @@ - + SurfaceView diff --git a/doc/net/majorkernelpanic/streaming/gl/TextureManager.html b/doc/net/majorkernelpanic/streaming/gl/TextureManager.html index 4465527b..ba3f0a8f 100644 --- a/doc/net/majorkernelpanic/streaming/gl/TextureManager.html +++ b/doc/net/majorkernelpanic/streaming/gl/TextureManager.html @@ -2,7 +2,7 @@ - + TextureManager diff --git a/doc/net/majorkernelpanic/streaming/gl/package-frame.html b/doc/net/majorkernelpanic/streaming/gl/package-frame.html index 59c68774..c462f002 100644 --- a/doc/net/majorkernelpanic/streaming/gl/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/gl/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.gl diff --git a/doc/net/majorkernelpanic/streaming/gl/package-summary.html b/doc/net/majorkernelpanic/streaming/gl/package-summary.html index 60cc5506..d8834b57 100644 --- a/doc/net/majorkernelpanic/streaming/gl/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/gl/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.gl diff --git a/doc/net/majorkernelpanic/streaming/gl/package-tree.html b/doc/net/majorkernelpanic/streaming/gl/package-tree.html index 6f8aab95..27b76c1f 100644 --- a/doc/net/majorkernelpanic/streaming/gl/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/gl/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.gl Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/hw/CodecManager.html b/doc/net/majorkernelpanic/streaming/hw/CodecManager.html index 2a4a1691..4030e12d 100644 --- a/doc/net/majorkernelpanic/streaming/hw/CodecManager.html +++ b/doc/net/majorkernelpanic/streaming/hw/CodecManager.html @@ -2,7 +2,7 @@ - + CodecManager diff --git a/doc/net/majorkernelpanic/streaming/hw/EncoderDebugger.html b/doc/net/majorkernelpanic/streaming/hw/EncoderDebugger.html index 69216c37..4e33dcb2 100644 --- a/doc/net/majorkernelpanic/streaming/hw/EncoderDebugger.html +++ b/doc/net/majorkernelpanic/streaming/hw/EncoderDebugger.html @@ -2,7 +2,7 @@ - + EncoderDebugger diff --git a/doc/net/majorkernelpanic/streaming/hw/NV21Convertor.html b/doc/net/majorkernelpanic/streaming/hw/NV21Convertor.html index 9d1d7ad9..4f110f4d 100644 --- a/doc/net/majorkernelpanic/streaming/hw/NV21Convertor.html +++ b/doc/net/majorkernelpanic/streaming/hw/NV21Convertor.html @@ -2,7 +2,7 @@ - + NV21Convertor diff --git a/doc/net/majorkernelpanic/streaming/hw/package-frame.html b/doc/net/majorkernelpanic/streaming/hw/package-frame.html index 90f94f10..e303cb27 100644 --- a/doc/net/majorkernelpanic/streaming/hw/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/hw/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.hw diff --git a/doc/net/majorkernelpanic/streaming/hw/package-summary.html b/doc/net/majorkernelpanic/streaming/hw/package-summary.html index 0ea9d1d7..a975db3d 100644 --- a/doc/net/majorkernelpanic/streaming/hw/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/hw/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.hw diff --git a/doc/net/majorkernelpanic/streaming/hw/package-tree.html b/doc/net/majorkernelpanic/streaming/hw/package-tree.html index 648332d3..c2099f31 100644 --- a/doc/net/majorkernelpanic/streaming/hw/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/hw/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.hw Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/mp4/MP4Config.html b/doc/net/majorkernelpanic/streaming/mp4/MP4Config.html index c6e14259..18a4a6eb 100644 --- a/doc/net/majorkernelpanic/streaming/mp4/MP4Config.html +++ b/doc/net/majorkernelpanic/streaming/mp4/MP4Config.html @@ -2,7 +2,7 @@ - + MP4Config diff --git a/doc/net/majorkernelpanic/streaming/mp4/package-frame.html b/doc/net/majorkernelpanic/streaming/mp4/package-frame.html index 5d297f75..b24e310b 100644 --- a/doc/net/majorkernelpanic/streaming/mp4/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/mp4/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.mp4 diff --git a/doc/net/majorkernelpanic/streaming/mp4/package-summary.html b/doc/net/majorkernelpanic/streaming/mp4/package-summary.html index d1c68b7d..3eea47fb 100644 --- a/doc/net/majorkernelpanic/streaming/mp4/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/mp4/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.mp4 diff --git a/doc/net/majorkernelpanic/streaming/mp4/package-tree.html b/doc/net/majorkernelpanic/streaming/mp4/package-tree.html index 28a3a4a3..4c267260 100644 --- a/doc/net/majorkernelpanic/streaming/mp4/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/mp4/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.mp4 Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/package-frame.html b/doc/net/majorkernelpanic/streaming/package-frame.html index de69a2a4..90ef4638 100644 --- a/doc/net/majorkernelpanic/streaming/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming diff --git a/doc/net/majorkernelpanic/streaming/package-summary.html b/doc/net/majorkernelpanic/streaming/package-summary.html index e227dbd3..1ea1fa10 100644 --- a/doc/net/majorkernelpanic/streaming/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming diff --git a/doc/net/majorkernelpanic/streaming/package-tree.html b/doc/net/majorkernelpanic/streaming/package-tree.html index d399fc5a..03a5100c 100644 --- a/doc/net/majorkernelpanic/streaming/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/rtcp/SenderReport.html b/doc/net/majorkernelpanic/streaming/rtcp/SenderReport.html index cfc8b519..a365994f 100644 --- a/doc/net/majorkernelpanic/streaming/rtcp/SenderReport.html +++ b/doc/net/majorkernelpanic/streaming/rtcp/SenderReport.html @@ -2,7 +2,7 @@ - + SenderReport diff --git a/doc/net/majorkernelpanic/streaming/rtcp/package-frame.html b/doc/net/majorkernelpanic/streaming/rtcp/package-frame.html index 46c795fe..23f7e2b2 100644 --- a/doc/net/majorkernelpanic/streaming/rtcp/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/rtcp/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtcp diff --git a/doc/net/majorkernelpanic/streaming/rtcp/package-summary.html b/doc/net/majorkernelpanic/streaming/rtcp/package-summary.html index b3a84792..a45c3372 100644 --- a/doc/net/majorkernelpanic/streaming/rtcp/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/rtcp/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtcp diff --git a/doc/net/majorkernelpanic/streaming/rtcp/package-tree.html b/doc/net/majorkernelpanic/streaming/rtcp/package-tree.html index c176caf3..4f5cc371 100644 --- a/doc/net/majorkernelpanic/streaming/rtcp/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/rtcp/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtcp Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html b/doc/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html index bd7364c2..fa0c2743 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html +++ b/doc/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html @@ -2,7 +2,7 @@ - + AACADTSPacketizer diff --git a/doc/net/majorkernelpanic/streaming/rtp/AACLATMPacketizer.html b/doc/net/majorkernelpanic/streaming/rtp/AACLATMPacketizer.html index f825aef1..98cc0e3d 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/AACLATMPacketizer.html +++ b/doc/net/majorkernelpanic/streaming/rtp/AACLATMPacketizer.html @@ -2,7 +2,7 @@ - + AACLATMPacketizer diff --git a/doc/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.html b/doc/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.html index 1c3bae6d..f2c80403 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.html +++ b/doc/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.html @@ -2,7 +2,7 @@ - + AMRNBPacketizer diff --git a/doc/net/majorkernelpanic/streaming/rtp/AbstractPacketizer.html b/doc/net/majorkernelpanic/streaming/rtp/AbstractPacketizer.html index 7b06e566..3b4635f9 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/AbstractPacketizer.html +++ b/doc/net/majorkernelpanic/streaming/rtp/AbstractPacketizer.html @@ -2,7 +2,7 @@ - + AbstractPacketizer diff --git a/doc/net/majorkernelpanic/streaming/rtp/H263Packetizer.html b/doc/net/majorkernelpanic/streaming/rtp/H263Packetizer.html index ba3a4223..1b861a66 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/H263Packetizer.html +++ b/doc/net/majorkernelpanic/streaming/rtp/H263Packetizer.html @@ -2,7 +2,7 @@ - + H263Packetizer diff --git a/doc/net/majorkernelpanic/streaming/rtp/H264Packetizer.html b/doc/net/majorkernelpanic/streaming/rtp/H264Packetizer.html index 706881eb..6feff4a6 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/H264Packetizer.html +++ b/doc/net/majorkernelpanic/streaming/rtp/H264Packetizer.html @@ -2,7 +2,7 @@ - + H264Packetizer diff --git a/doc/net/majorkernelpanic/streaming/rtp/MediaCodecInputStream.html b/doc/net/majorkernelpanic/streaming/rtp/MediaCodecInputStream.html index 33d0f512..6ad7f669 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/MediaCodecInputStream.html +++ b/doc/net/majorkernelpanic/streaming/rtp/MediaCodecInputStream.html @@ -2,7 +2,7 @@ - + MediaCodecInputStream diff --git a/doc/net/majorkernelpanic/streaming/rtp/RtpSocket.Statistics.html b/doc/net/majorkernelpanic/streaming/rtp/RtpSocket.Statistics.html deleted file mode 100644 index 19915694..00000000 --- a/doc/net/majorkernelpanic/streaming/rtp/RtpSocket.Statistics.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - -RtpSocket.Statistics - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    - -
    - - - -
    - -

    - -net.majorkernelpanic.streaming.rtp -
    -Class RtpSocket.Statistics

    -
    -java.lang.Object
    -  extended by net.majorkernelpanic.streaming.rtp.RtpSocket.Statistics
    -
    -
    -
    Enclosing class:
    RtpSocket
    -
    -
    -
    -
    public static class RtpSocket.Statistics
    extends java.lang.Object
    - - -

    -Computes the proper rate at which packets are sent. -

    - -

    -


    - -

    - - - - - - - - - - - -
    -Field Summary
    -static java.lang.StringTAG - -
    -           
    -  - - - - - - - - - - -
    -Constructor Summary
    RtpSocket.Statistics(int count, - int period) - -
    -           
    -  - - - - - - - - - - - - - - - -
    -Method Summary
    - longaverage() - -
    -           
    - voidpush(long value) - -
    -           
    - - - - - - - -
    Methods inherited from class java.lang.Object
    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    -  -

    - - - - - - - - -
    -Field Detail
    - -

    -TAG

    -
    -public static final java.lang.String TAG
    -
    -
    -
    See Also:
    Constant Field Values
    -
    - - - - - - - - -
    -Constructor Detail
    - -

    -RtpSocket.Statistics

    -
    -public RtpSocket.Statistics(int count,
    -                            int period)
    -
    -
    - - - - - - - - -
    -Method Detail
    - -

    -push

    -
    -public void push(long value)
    -
    -
    -
    -
    -
    -
    - -

    -average

    -
    -public long average()
    -
    -
    -
    -
    -
    - -
    - - - - - - - - - - - - - - - - - - - -
    - -
    - - - -
    - - - diff --git a/doc/net/majorkernelpanic/streaming/rtp/RtpSocket.html b/doc/net/majorkernelpanic/streaming/rtp/RtpSocket.html index cd506807..e4040109 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/RtpSocket.html +++ b/doc/net/majorkernelpanic/streaming/rtp/RtpSocket.html @@ -2,7 +2,7 @@ - + RtpSocket diff --git a/doc/net/majorkernelpanic/streaming/rtp/package-frame.html b/doc/net/majorkernelpanic/streaming/rtp/package-frame.html index 7348cf00..cb8b47d6 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/rtp/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtp diff --git a/doc/net/majorkernelpanic/streaming/rtp/package-summary.html b/doc/net/majorkernelpanic/streaming/rtp/package-summary.html index b6d22bfe..e159aa87 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/rtp/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtp diff --git a/doc/net/majorkernelpanic/streaming/rtp/package-tree.html b/doc/net/majorkernelpanic/streaming/rtp/package-tree.html index ca3f11f6..af68b255 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/rtp/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtp Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html index 28eb8c6f..d831ae5e 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html @@ -2,7 +2,7 @@ - + RtspClient.Callback diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.html index 3bd8ae9d..68501e4f 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.html @@ -2,7 +2,7 @@ - + RtspClient diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html index eff2d19d..eea6c624 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html @@ -2,7 +2,7 @@ - + RtspServer.CallbackListener diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.LocalBinder.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.LocalBinder.html index 151bd7aa..a5d9b91c 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.LocalBinder.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.LocalBinder.html @@ -2,7 +2,7 @@ - + RtspServer.LocalBinder diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.html index f2bf965a..235e3911 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.html @@ -2,7 +2,7 @@ - + RtspServer diff --git a/doc/net/majorkernelpanic/streaming/rtsp/UriParser.html b/doc/net/majorkernelpanic/streaming/rtsp/UriParser.html index 4a368239..fd8161fd 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/UriParser.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/UriParser.html @@ -2,7 +2,7 @@ - + UriParser diff --git a/doc/net/majorkernelpanic/streaming/rtsp/package-frame.html b/doc/net/majorkernelpanic/streaming/rtsp/package-frame.html index d8efdbd4..4c70af3b 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/package-frame.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtsp diff --git a/doc/net/majorkernelpanic/streaming/rtsp/package-summary.html b/doc/net/majorkernelpanic/streaming/rtsp/package-summary.html index 72e2184b..39beb35d 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/package-summary.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtsp diff --git a/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html b/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html index 718ab605..deea524c 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html @@ -2,7 +2,7 @@ - + net.majorkernelpanic.streaming.rtsp Class Hierarchy diff --git a/doc/net/majorkernelpanic/streaming/video/CodecManager.html b/doc/net/majorkernelpanic/streaming/video/CodecManager.html index 4cd22775..d375b9ff 100644 --- a/doc/net/majorkernelpanic/streaming/video/CodecManager.html +++ b/doc/net/majorkernelpanic/streaming/video/CodecManager.html @@ -2,9 +2,9 @@ - + CodecManager - + @@ -36,7 +36,7 @@ @@ -116,6 +116,17 @@

    Field Summary

    Field and Description +static java.lang.String[] +
    SOFTWARE_ENCODERS +
    There currently is no way to know if an encoder is software or hardware from the MediaCodecInfo class, + so we need to maintain a list of known software encoders.
    + + + +static int[] +SUPPORTED_COLOR_FORMATS  + + static java.lang.String TAG  @@ -145,20 +156,6 @@

    Constructor Summary

    Method Summary

    - - - - - - - - - - -
    Methods 
    Modifier and TypeMethod and Description
    static voidfindSupportedColorFormats(java.lang.String mimeType) -
    Iterates through the list of encoders present on the phone, execution of this method can be slow, - it should be called off the main thread.
    -
    + + + +
      +
    • +

      TRANSPORT_UDP

      +
      public static final int TRANSPORT_UDP
      +
      Use this to use UDP for the transport protocol.
      +
      See Also:
      Constant Field Values
      +
    • +
    + + + +
      +
    • +

      TRANSPORT_TCP

      +
      public static final int TRANSPORT_TCP
      +
      Use this to use TCP for the transport protocol.
      +
      See Also:
      Constant Field Values
      +
    • +
    @@ -433,6 +474,18 @@

    setStreamPath

    Parameters:
    path - The path
    + + + +
      +
    • +

      setTransportMode

      +
      public void setTransportMode(int mode)
      +
      Call this with TRANSPORT_TCP or 0 to choose the + transport protocol that will be used to send RTP/RTCP packets. + Not ready yet !
      +
    • +
    diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html index 0ec74d9b..2d68cfb1 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html @@ -2,9 +2,9 @@ - + RtspServer.CallbackListener - + diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.LocalBinder.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.LocalBinder.html index d044deec..71d02dba 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.LocalBinder.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.LocalBinder.html @@ -2,9 +2,9 @@ - + RtspServer.LocalBinder - + diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.html index 0ac13384..339da805 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspServer.html @@ -2,9 +2,9 @@ - + RtspServer - + diff --git a/doc/net/majorkernelpanic/streaming/rtsp/UriParser.html b/doc/net/majorkernelpanic/streaming/rtsp/UriParser.html index 2fca5e41..0674aa3a 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/UriParser.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/UriParser.html @@ -2,9 +2,9 @@ - + UriParser - + diff --git a/doc/net/majorkernelpanic/streaming/rtsp/package-frame.html b/doc/net/majorkernelpanic/streaming/rtsp/package-frame.html index 6ca736c9..fac17172 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/package-frame.html @@ -2,9 +2,9 @@ - + net.majorkernelpanic.streaming.rtsp - + diff --git a/doc/net/majorkernelpanic/streaming/rtsp/package-summary.html b/doc/net/majorkernelpanic/streaming/rtsp/package-summary.html index 5067a3c0..6a4e3a60 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/package-summary.html @@ -2,9 +2,9 @@ - + net.majorkernelpanic.streaming.rtsp - + diff --git a/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html b/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html index ef55618a..a4318520 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html @@ -2,9 +2,9 @@ - + net.majorkernelpanic.streaming.rtsp Class Hierarchy - + diff --git a/doc/net/majorkernelpanic/streaming/video/CodecManager.html b/doc/net/majorkernelpanic/streaming/video/CodecManager.html index a6ec15b9..6fd74e4c 100644 --- a/doc/net/majorkernelpanic/streaming/video/CodecManager.html +++ b/doc/net/majorkernelpanic/streaming/video/CodecManager.html @@ -2,9 +2,9 @@ - + CodecManager - + diff --git a/doc/net/majorkernelpanic/streaming/video/H263Stream.html b/doc/net/majorkernelpanic/streaming/video/H263Stream.html index 2f300e7b..ce181502 100644 --- a/doc/net/majorkernelpanic/streaming/video/H263Stream.html +++ b/doc/net/majorkernelpanic/streaming/video/H263Stream.html @@ -2,9 +2,9 @@ - + H263Stream - + @@ -204,7 +204,7 @@

    Methods inherited from class net.majorkernelpanic.streaming.video.

    Methods inherited from class net.majorkernelpanic.streaming.MediaStream

    -getBitrate, getDestinationPorts, getLocalPorts, getPacketizer, getSSRC, isStreaming, setDestinationAddress, setDestinationPorts, setDestinationPorts, setStreamingMethod, setTimeToLive +getBitrate, getDestinationPorts, getLocalPorts, getPacketizer, getSSRC, isStreaming, setDestinationAddress, setDestinationPorts, setDestinationPorts, setOutputStream, setStreamingMethod, setTimeToLive @@ -392,7 +397,8 @@

    setFlashState

  • toggleFlash

    public void toggleFlash()
    -
    Toggle the LED of the phone if it has one.
    +
  • diff --git a/doc/net/majorkernelpanic/streaming/video/package-frame.html b/doc/net/majorkernelpanic/streaming/video/package-frame.html index fcccfc10..3a560d16 100644 --- a/doc/net/majorkernelpanic/streaming/video/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/video/package-frame.html @@ -2,9 +2,9 @@ - + net.majorkernelpanic.streaming.video - + diff --git a/doc/net/majorkernelpanic/streaming/video/package-summary.html b/doc/net/majorkernelpanic/streaming/video/package-summary.html index be538ee6..64811b8d 100644 --- a/doc/net/majorkernelpanic/streaming/video/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/video/package-summary.html @@ -2,9 +2,9 @@ - + net.majorkernelpanic.streaming.video - + diff --git a/doc/net/majorkernelpanic/streaming/video/package-tree.html b/doc/net/majorkernelpanic/streaming/video/package-tree.html index 17bbec34..a5bc8b77 100644 --- a/doc/net/majorkernelpanic/streaming/video/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/video/package-tree.html @@ -2,9 +2,9 @@ - + net.majorkernelpanic.streaming.video Class Hierarchy - + diff --git a/doc/overview-frame.html b/doc/overview-frame.html index 48b4cc30..47a05d99 100644 --- a/doc/overview-frame.html +++ b/doc/overview-frame.html @@ -2,9 +2,9 @@ - + Overview List - + diff --git a/doc/overview-summary.html b/doc/overview-summary.html index a55db8fa..4802c8a7 100644 --- a/doc/overview-summary.html +++ b/doc/overview-summary.html @@ -2,9 +2,9 @@ - + Overview - + diff --git a/doc/overview-tree.html b/doc/overview-tree.html index b1cdd2cf..b73e4f2d 100644 --- a/doc/overview-tree.html +++ b/doc/overview-tree.html @@ -2,9 +2,9 @@ - + Class Hierarchy - + @@ -135,6 +135,7 @@

    Class Hierarchy

  • net.majorkernelpanic.streaming.mp4.MP4Config
  • +
  • net.majorkernelpanic.streaming.mp4.MP4Parser
  • net.majorkernelpanic.streaming.hw.NV21Convertor
  • net.majorkernelpanic.streaming.rtp.RtpSocket (implements java.lang.Runnable)
  • net.majorkernelpanic.streaming.rtsp.RtspClient
  • @@ -142,6 +143,7 @@

    Class Hierarchy

  • net.majorkernelpanic.streaming.Session
  • net.majorkernelpanic.streaming.SessionBuilder
  • net.majorkernelpanic.streaming.gl.SurfaceManager
  • +
  • net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
  • net.majorkernelpanic.streaming.gl.TextureManager
  • java.lang.Throwable (implements java.io.Serializable)
      diff --git a/doc/serialized-form.html b/doc/serialized-form.html index 071bd4b8..f62a7d77 100644 --- a/doc/serialized-form.html +++ b/doc/serialized-form.html @@ -2,9 +2,9 @@ - + Serialized Form - + diff --git a/src/net/majorkernelpanic/streaming/Session.java b/src/net/majorkernelpanic/streaming/Session.java index 3994d8ac..85b46ac8 100644 --- a/src/net/majorkernelpanic/streaming/Session.java +++ b/src/net/majorkernelpanic/streaming/Session.java @@ -35,6 +35,7 @@ import net.majorkernelpanic.streaming.rtsp.RtspClient; import net.majorkernelpanic.streaming.video.VideoQuality; import net.majorkernelpanic.streaming.video.VideoStream; +import android.hardware.Camera.CameraInfo; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; @@ -44,7 +45,7 @@ * This is the class you will want to use to stream audio and or video to some peer using RTP.
      * * It holds a {@link VideoStream} and a {@link AudioStream} together and provides - * syncronous and asyncrounous functions to start and stop those steams. + * synchronous and asynchronous functions to start and stop those steams. * You should implement a callback interface {@link Callback} to receive notifications and error reports.
      * * If you want to stream to a RTSP server, you will need an instance of this class and hand it to a {@link RtspClient}. @@ -77,7 +78,7 @@ public class Session { /** * The internal storage of the phone is not ready. - * Libstreaming tried to store a test file on the sdcard but couldn't. + * libstreaming tried to store a test file on the sdcard but couldn't. * See H264Stream and AACStream to find out why libstreaming would want to something like that. */ public final static int ERROR_STORAGE_NOT_READY = 0x02; @@ -96,7 +97,7 @@ public class Session { public final static int ERROR_UNKNOWN_HOST = 0x05; /** - * Some other error occured ! + * Some other error occurred ! */ public final static int ERROR_OTHER = 0x06; @@ -235,7 +236,7 @@ public void setCallback(Callback callback) { /** * The origin address of the session. - * It appears in the sessionn description. + * It appears in the session description. * @param origin The origin address */ public void setOrigin(String origin) { @@ -243,7 +244,7 @@ public void setOrigin(String origin) { } /** - * The destination address for all the streams of the session. + * The destination address for all the streams of the session.
      * Changes will be taken into account the next time you start the session. * @param destination The destination address */ @@ -252,7 +253,7 @@ public void setDestination(String destination) { } /** - * Set the TTL of all packets sent during the session. + * Set the TTL of all packets sent during the session.
      * Changes will be taken into account the next time you start the session. * @param ttl The Time To Live */ @@ -261,8 +262,9 @@ public void setTimeToLive(int ttl) { } /** - * Sets the configuration of the stream. You can call this method at any time - * and changes will take effect next time you call {@link #configure()}. + * Sets the configuration of the stream.
      + * You can call this method at any time and changes will take + * effect next time you call {@link #configure()}. * @param quality Quality of the stream */ public void setVideoQuality(VideoQuality quality) { @@ -272,8 +274,9 @@ public void setVideoQuality(VideoQuality quality) { } /** - * Sets a Surface to show a preview of recorded media (video). - * You can call this method at any time and changes will take effect next time you call {@link #start()} or {@link #startPreview()}. + * Sets a Surface to show a preview of recorded media (video).
      + * You can call this method at any time and changes will take + * effect next time you call {@link #start()} or {@link #startPreview()}. */ public void setSurfaceView(final SurfaceView view) { sHandler.post(new Runnable() { @@ -287,8 +290,9 @@ public void run() { } /** - * Sets the orientation of the preview. You can call this method at any time - * and changes will take effect next time you call {@link #configure()}. + * Sets the orientation of the preview.
      + * You can call this method at any time and changes will take + * effect next time you call {@link #configure()}. * @param orientation The orientation of the preview */ public void setPreviewOrientation(int orientation) { @@ -298,8 +302,9 @@ public void setPreviewOrientation(int orientation) { } /** - * Sets the configuration of the stream. You can call this method at any time - * and changes will take effect next time you call {@link #configure()}. + * Sets the configuration of the stream.
      + * You can call this method at any time and changes will take + * effect next time you call {@link #configure()}. * @param quality Quality of the stream */ public void setAudioQuality(AudioQuality quality) { @@ -352,7 +357,7 @@ public String getDestination() { return mDestination; } - /** Returns an approximation of the bandwidth consumed by the session in bit per seconde. */ + /** Returns an approximation of the bandwidth consumed by the session in bit per second. */ public long getBitrate() { long sum = 0; if (mAudioStream != null) sum += mAudioStream.getBitrate(); @@ -383,7 +388,7 @@ public void run() { } /** - * Does the same thing as {@link #configure()}, but in a syncronous manner. + * Does the same thing as {@link #configure()}, but in a synchronous manner.
      * Throws exceptions in addition to calling a callback * {@link Callback#onSessionError(int, int, Exception)} when * an error occurs. @@ -426,7 +431,7 @@ public void syncConfigure() } /** - * Asyncronously starts all streams of the session. + * Asynchronously starts all streams of the session. **/ public void start() { sHandler.post(new Runnable() { @@ -440,7 +445,7 @@ public void run() { } /** - * Starts a stream in a syncronous manner. + * Starts a stream in a synchronous manner.
      * Throws exceptions in addition to calling a callback. * @param id The id of the stream to start **/ @@ -492,7 +497,7 @@ public void syncStart(int id) } /** - * Does the same thing as {@link #start()}, but in a syncronous manner. + * Does the same thing as {@link #start()}, but in a synchronous manner.
      * Throws exceptions in addition to calling a callback. **/ public void syncStart() @@ -527,7 +532,7 @@ public void run() { } /** - * Stops one stream in a syncronous manner. + * Stops one stream in a synchronous manner. * @param id The id of the stream to stop **/ private void syncStop(final int id) { @@ -537,13 +542,19 @@ private void syncStop(final int id) { } } - /** Stops all existing streams in a syncronous manner. */ + /** Stops all existing streams in a synchronous manner. */ public void syncStop() { syncStop(0); syncStop(1); postSessionStopped(); } + /** + * Asynchronously starts the camera preview.
      + * You should of course pass a {@link SurfaceView} to {@link #setSurfaceView(SurfaceView)} + * before calling this method. Otherwise, the {@link Callback#onSessionError(int, int, Exception)} + * callback will be called with {@link #ERROR_INVALID_SURFACE}. + */ public void startPreview() { sHandler.post(new Runnable() { @Override @@ -571,6 +582,9 @@ public void run() { }); } + /** + * Asynchronously stops the camera preview. + */ public void stopPreview() { sHandler.post(new Runnable() { @Override @@ -582,6 +596,11 @@ public void run() { }); } + /** Switch between the front facing and the back facing camera of the phone.
      + * If {@link #startPreview()} has been called, the preview will be briefly interrupted.
      + * If {@link #start()} has been called, the stream will be briefly interrupted.
      + * To find out which camera is currently selected, use {@link #getCamera()} + **/ public void switchCamera() { sHandler.post(new Runnable() { @Override @@ -606,11 +625,21 @@ public void run() { }); } + /** + * Returns the id of the camera currently selected. + * It can be either {@link CameraInfo#CAMERA_FACING_BACK} or + * {@link CameraInfo#CAMERA_FACING_FRONT}. + */ public int getCamera() { return mVideoStream != null ? mVideoStream.getCamera() : 0; } + /** + * Toggles the LED of the phone if it has one. + * You can get the current state of the flash with + * {@link Session#getVideoTrack()} and {@link VideoStream#getFlashState()}. + **/ public void toggleFlash() { sHandler.post(new Runnable() { @Override diff --git a/src/net/majorkernelpanic/streaming/video/VideoStream.java b/src/net/majorkernelpanic/streaming/video/VideoStream.java index 59e90c3e..dd5dd7b9 100644 --- a/src/net/majorkernelpanic/streaming/video/VideoStream.java +++ b/src/net/majorkernelpanic/streaming/video/VideoStream.java @@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit; import net.majorkernelpanic.streaming.MediaStream; +import net.majorkernelpanic.streaming.Session; import net.majorkernelpanic.streaming.Stream; import net.majorkernelpanic.streaming.exceptions.CameraInUseException; import net.majorkernelpanic.streaming.exceptions.ConfNotSupportedException; @@ -135,6 +136,11 @@ public void switchCamera() throws RuntimeException, IOException { if (streaming) start(); } + /** + * Returns the id of the camera currently selected. + * Can be either {@link CameraInfo#CAMERA_FACING_BACK} or + * {@link CameraInfo#CAMERA_FACING_FRONT}. + */ public int getCamera() { return mCameraId; } @@ -204,7 +210,10 @@ public synchronized void setFlashState(boolean state) { } } - /** Toggle the LED of the phone if it has one. */ + /** + * Toggles the LED of the phone if it has one. + * You can get the current state of the flash with {@link VideoStream#getFlashState()}. + */ public synchronized void toggleFlash() { setFlashState(!mFlashEnabled); } From 047218043f211e1974b2872f68310e0876effc45 Mon Sep 17 00:00:00 2001 From: fyhertz Date: Thu, 24 Apr 2014 17:35:53 -0400 Subject: [PATCH 23/51] Some bug fixes, some unecessary calls to the Camera API are now avoided. --- .../majorkernelpanic/streaming/Session.java | 22 ++++++------- .../streaming/hw/NV21Convertor.java | 4 ++- .../streaming/video/H264Stream.java | 10 +++++- .../streaming/video/VideoQuality.java | 8 +++-- .../streaming/video/VideoStream.java | 31 ++++++++++--------- 5 files changed, 46 insertions(+), 29 deletions(-) diff --git a/src/net/majorkernelpanic/streaming/Session.java b/src/net/majorkernelpanic/streaming/Session.java index 85b46ac8..e601e656 100644 --- a/src/net/majorkernelpanic/streaming/Session.java +++ b/src/net/majorkernelpanic/streaming/Session.java @@ -73,7 +73,7 @@ public class Session { /** Some app is already using a camera (Camera.open() has failed). */ public final static int ERROR_CAMERA_ALREADY_IN_USE = 0x00; - /** The phone may not support some streaming parameters that you are using (bit rate, frame rate...s). */ + /** The phone may not support some streaming parameters that you are trying to use (bit rate, frame rate, resolution...). */ public final static int ERROR_CONFIGURATION_NOT_SUPPORTED = 0x01; /** @@ -111,7 +111,7 @@ public class Session { private Callback mCallback; private Handler mMainHandler; - + private static CountDownLatch sSignal; private static Handler sHandler; @@ -126,7 +126,7 @@ protected void onLooperPrepared() { } }.start(); } - + /** * Creates a streaming session that can be customized by adding tracks. */ @@ -135,7 +135,7 @@ public Session() { mMainHandler = new Handler(Looper.getMainLooper()); mTimestamp = (uptime/1000)<<32 & (((uptime-((uptime/1000)*1000))>>32)/1000); // NTP timestamp mOrigin = "127.0.0.1"; - + // Me make sure that we won't send Runnables to a non existing thread try { sSignal.await(); @@ -300,7 +300,7 @@ public void setPreviewOrientation(int orientation) { mVideoStream.setPreviewOrientation(orientation); } } - + /** * Sets the configuration of the stream.
      * You can call this method at any time and changes will take @@ -312,7 +312,7 @@ public void setAudioQuality(AudioQuality quality) { mAudioStream.setAudioQuality(quality); } } - + /** * Returns the {@link Callback} interface that was set with * {@link #setCallback(Callback)} or null if none was set. @@ -364,7 +364,7 @@ public long getBitrate() { if (mVideoStream != null) sum += mVideoStream.getBitrate(); return sum; } - + /** Indicates if a track is currently running. */ public boolean isStreaming() { if ( (mAudioStream!=null && mAudioStream.isStreaming()) || (mVideoStream!=null && mVideoStream.isStreaming()) ) @@ -456,7 +456,7 @@ public void syncStart(int id) InvalidSurfaceException, UnknownHostException, IOException { - + Stream stream = id==0 ? mAudioStream : mVideoStream; if (stream!=null && !stream.isStreaming()) { try { @@ -541,7 +541,7 @@ private void syncStop(final int id) { stream.stop(); } } - + /** Stops all existing streams in a synchronous manner. */ public void syncStop() { syncStop(0); @@ -561,9 +561,9 @@ public void startPreview() { public void run() { if (mVideoStream != null) { try { - mVideoStream.configure(); mVideoStream.startPreview(); postPreviewStarted(); + mVideoStream.configure(); } catch (CameraInUseException e) { postError(ERROR_CAMERA_ALREADY_IN_USE , STREAM_VIDEO, e); } catch (ConfNotSupportedException e) { @@ -626,7 +626,7 @@ public void run() { } /** - * Returns the id of the camera currently selected. + * Returns the id of the camera currently selected.
      * It can be either {@link CameraInfo#CAMERA_FACING_BACK} or * {@link CameraInfo#CAMERA_FACING_FRONT}. */ diff --git a/src/net/majorkernelpanic/streaming/hw/NV21Convertor.java b/src/net/majorkernelpanic/streaming/hw/NV21Convertor.java index 01559ba1..f6cc81a5 100644 --- a/src/net/majorkernelpanic/streaming/hw/NV21Convertor.java +++ b/src/net/majorkernelpanic/streaming/hw/NV21Convertor.java @@ -23,6 +23,7 @@ import java.nio.ByteBuffer; import android.media.MediaCodecInfo; +import android.util.Log; /** * Converts from NV21 to YUV420 semi planar or planar. @@ -106,7 +107,8 @@ public boolean getUVPanesReversed() { public void convert(byte[] data, ByteBuffer buffer) { byte[] result = convert(data); - buffer.put(result, 0, result.length); + int min = buffer.capacity() < data.length?buffer.capacity() : data.length; + buffer.put(result, 0, min); } public byte[] convert(byte[] data) { diff --git a/src/net/majorkernelpanic/streaming/video/H264Stream.java b/src/net/majorkernelpanic/streaming/video/H264Stream.java index d03d7fbf..f40b1da0 100644 --- a/src/net/majorkernelpanic/streaming/video/H264Stream.java +++ b/src/net/majorkernelpanic/streaming/video/H264Stream.java @@ -88,7 +88,7 @@ public synchronized String getSessionDescription() throws IllegalStateException /** * Starts the stream. - * This will also open the camera and dispay the preview if {@link #startPreview()} has not aready been called. + * This will also open the camera and display the preview if {@link #startPreview()} has not aready been called. */ public synchronized void start() throws IllegalStateException, IOException { if (!mStreaming) { @@ -169,6 +169,8 @@ private MP4Config testMediaRecorderAPI() throws RuntimeException, IOException { boolean savedFlashState = mFlashEnabled; mFlashEnabled = false; + boolean previewStarted = mPreviewStarted; + boolean cameraOpen = mCamera!=null; createCamera(); @@ -247,6 +249,12 @@ public void onInfo(MediaRecorder mr, int what, int extra) { if (!cameraOpen) destroyCamera(); // Restore flash state mFlashEnabled = savedFlashState; + if (previewStarted) { + // If the preview was started before the test, we try to restart it. + try { + startPreview(); + } catch (Exception e) {} + } } // Retrieve SPS & PPS & ProfileId with MP4Config diff --git a/src/net/majorkernelpanic/streaming/video/VideoQuality.java b/src/net/majorkernelpanic/streaming/video/VideoQuality.java index 5f38509b..2165e15a 100644 --- a/src/net/majorkernelpanic/streaming/video/VideoQuality.java +++ b/src/net/majorkernelpanic/streaming/video/VideoQuality.java @@ -72,8 +72,8 @@ public VideoQuality(int resX, int resY, int framerate, int bitrate) { public boolean equals(VideoQuality quality) { if (quality==null) return false; - return (quality.resX == this.resX & - quality.resY == this.resY & + return (quality.resX == this.resX & + quality.resY == this.resY & quality.framerate == this.framerate & quality.bitrate == this.bitrate); } @@ -97,6 +97,10 @@ public static VideoQuality parseQuality(String str) { return quality; } + public String toString() { + return resX+"x"+resY+" px, "+framerate+" fps, "+bitrate/1000+" kbps"; + } + /** * Checks if the requested resolution is supported by the camera. * If not, it modifies it by supported parameters. diff --git a/src/net/majorkernelpanic/streaming/video/VideoStream.java b/src/net/majorkernelpanic/streaming/video/VideoStream.java index dd5dd7b9..5f35d4b5 100644 --- a/src/net/majorkernelpanic/streaming/video/VideoStream.java +++ b/src/net/majorkernelpanic/streaming/video/VideoStream.java @@ -27,7 +27,6 @@ import java.util.concurrent.TimeUnit; import net.majorkernelpanic.streaming.MediaStream; -import net.majorkernelpanic.streaming.Session; import net.majorkernelpanic.streaming.Stream; import net.majorkernelpanic.streaming.exceptions.CameraInUseException; import net.majorkernelpanic.streaming.exceptions.ConfNotSupportedException; @@ -75,7 +74,8 @@ public abstract class VideoStream extends MediaStream { protected boolean mSurfaceReady = false; protected boolean mUnlocked = false; protected boolean mPreviewStarted = false; - + protected boolean mUpdated = false; + protected String mMimeType; protected String mEncoderName; protected int mEncoderColorFormat; @@ -229,6 +229,7 @@ public boolean getFlashState() { */ public void setPreviewOrientation(int orientation) { mRequestedOrientation = orientation; + mUpdated = false; } /** @@ -237,7 +238,10 @@ public void setPreviewOrientation(int orientation) { * @param videoQuality Quality of the stream */ public void setVideoQuality(VideoQuality videoQuality) { - mRequestedQuality = videoQuality.clone(); + if (!mRequestedQuality.equals(videoQuality)) { + mRequestedQuality = videoQuality.clone(); + mUpdated = false; + } } /** @@ -301,20 +305,12 @@ public synchronized void stop() { public synchronized void startPreview() throws CameraInUseException, InvalidSurfaceException, - ConfNotSupportedException, RuntimeException { mCameraOpenedManually = true; if (!mPreviewStarted) { createCamera(); updateCamera(); - try { - mCamera.startPreview(); - mPreviewStarted = true; - } catch (RuntimeException e) { - destroyCamera(); - throw e; - } } } @@ -329,7 +325,7 @@ public synchronized void stopPreview() { /** * Video encoding is done by a MediaRecorder. */ - protected void encodeWithMediaRecorder() throws IOException { + protected void encodeWithMediaRecorder() throws IOException, ConfNotSupportedException { Log.d(TAG,"Video encoded using the MediaRecorder API"); @@ -459,6 +455,7 @@ public void onPreviewFrame(byte[] data, Camera camera) { int bufferIndex = mMediaCodec.dequeueInputBuffer(500000); if (bufferIndex>=0) { inputBuffers[bufferIndex].clear(); + if (data == null) Log.d(TAG,"ERRORRR"); convertor.convert(data, inputBuffers[bufferIndex]); mMediaCodec.queueInputBuffer(bufferIndex, 0, inputBuffers[bufferIndex].position(), now, 0); } else { @@ -469,7 +466,7 @@ public void onPreviewFrame(byte[] data, Camera camera) { } } }; - + for (int i=0;i<10;i++) mCamera.addCallbackBuffer(new byte[convertor.getBufferSize()]); mCamera.setPreviewCallbackWithBuffer(callback); @@ -561,6 +558,7 @@ protected synchronized void createCamera() throws RuntimeException { if (mCamera == null) { openCamera(); + mUpdated = false; mUnlocked = false; mCamera.setErrorCallback(new Camera.ErrorCallback() { @Override @@ -582,7 +580,7 @@ public void onError(int error, Camera camera) { try { // If the phone has a flash, we turn it on/off according to mFlashEnabled - // setRecordingHint(true) is a very nice optimisation if you plane to only use the Camera for recording + // setRecordingHint(true) is a very nice optimization if you plane to only use the Camera for recording Parameters parameters = mCamera.getParameters(); if (parameters.getFlashMode()!=null) { parameters.setFlashMode(mFlashEnabled?Parameters.FLASH_MODE_TORCH:Parameters.FLASH_MODE_OFF); @@ -628,6 +626,10 @@ protected synchronized void destroyCamera() { } protected synchronized void updateCamera() throws RuntimeException { + + // The camera is already correctly configured + if (mUpdated) return; + if (mPreviewStarted) { mPreviewStarted = false; mCamera.stopPreview(); @@ -649,6 +651,7 @@ protected synchronized void updateCamera() throws RuntimeException { mCamera.setDisplayOrientation(mOrientation); mCamera.startPreview(); mPreviewStarted = true; + mUpdated = true; } catch (RuntimeException e) { destroyCamera(); throw e; From e1758aabba8a961de4138a1ba82f5d0c012d06f7 Mon Sep 17 00:00:00 2001 From: brunosiqueira Date: Mon, 19 May 2014 15:23:16 -0300 Subject: [PATCH 24/51] New handler created for each session instance. Otherwise, it gives a "dead handler" exception. --- .../majorkernelpanic/streaming/Session.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/net/majorkernelpanic/streaming/Session.java b/src/net/majorkernelpanic/streaming/Session.java index e601e656..d44e2cfe 100644 --- a/src/net/majorkernelpanic/streaming/Session.java +++ b/src/net/majorkernelpanic/streaming/Session.java @@ -115,22 +115,18 @@ public class Session { private static CountDownLatch sSignal; private static Handler sHandler; - static { - // Creates the Thread that will be used when asynchronous methods of a Session are called - sSignal = new CountDownLatch(1); - new HandlerThread("net.majorkernelpanic.streaming.Session"){ - @Override - protected void onLooperPrepared() { - sHandler = new Handler(); - sSignal.countDown(); - } - }.start(); - } - /** * Creates a streaming session that can be customized by adding tracks. */ public Session() { + sSignal = new CountDownLatch(1); + new HandlerThread("net.majorkernelpanic.streaming.Session"){ + @Override + protected void onLooperPrepared() { + sHandler = new Handler(); + sSignal.countDown(); + } + }.start(); long uptime = System.currentTimeMillis(); mMainHandler = new Handler(Looper.getMainLooper()); mTimestamp = (uptime/1000)<<32 & (((uptime-((uptime/1000)*1000))>>32)/1000); // NTP timestamp From f95f91b38e215c6e2e2c279bf9d345ea753515bd Mon Sep 17 00:00:00 2001 From: fyhertz Date: Wed, 28 May 2014 12:12:40 -0400 Subject: [PATCH 25/51] FOund a cleaner way to solve the dead thread issue. --- .../majorkernelpanic/streaming/Session.java | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/src/net/majorkernelpanic/streaming/Session.java b/src/net/majorkernelpanic/streaming/Session.java index d44e2cfe..c156d1d0 100644 --- a/src/net/majorkernelpanic/streaming/Session.java +++ b/src/net/majorkernelpanic/streaming/Session.java @@ -112,30 +112,21 @@ public class Session { private Callback mCallback; private Handler mMainHandler; - private static CountDownLatch sSignal; - private static Handler sHandler; + private Handler mHandler; /** * Creates a streaming session that can be customized by adding tracks. */ public Session() { - sSignal = new CountDownLatch(1); - new HandlerThread("net.majorkernelpanic.streaming.Session"){ - @Override - protected void onLooperPrepared() { - sHandler = new Handler(); - sSignal.countDown(); - } - }.start(); long uptime = System.currentTimeMillis(); + + HandlerThread thread = new HandlerThread("net.majorkernelpanic.streaming.Session"); + thread.start(); + + mHandler = new Handler(thread.getLooper()); mMainHandler = new Handler(Looper.getMainLooper()); mTimestamp = (uptime/1000)<<32 & (((uptime-((uptime/1000)*1000))>>32)/1000); // NTP timestamp mOrigin = "127.0.0.1"; - - // Me make sure that we won't send Runnables to a non existing thread - try { - sSignal.await(); - } catch (InterruptedException e) {} } /** @@ -275,7 +266,7 @@ public void setVideoQuality(VideoQuality quality) { * effect next time you call {@link #start()} or {@link #startPreview()}. */ public void setSurfaceView(final SurfaceView view) { - sHandler.post(new Runnable() { + mHandler.post(new Runnable() { @Override public void run() { if (mVideoStream != null) { @@ -373,7 +364,7 @@ public boolean isStreaming() { * Configures all streams of the session. **/ public void configure() { - sHandler.post(new Runnable() { + mHandler.post(new Runnable() { @Override public void run() { try { @@ -430,7 +421,7 @@ public void syncConfigure() * Asynchronously starts all streams of the session. **/ public void start() { - sHandler.post(new Runnable() { + mHandler.post(new Runnable() { @Override public void run() { try { @@ -464,7 +455,7 @@ public void syncStart(int id) postSessionStarted(); } if (getTrack(1-id) == null || !getTrack(1-id).isStreaming()) { - sHandler.post(mUpdateBitrate); + mHandler.post(mUpdateBitrate); } } catch (UnknownHostException e) { postError(ERROR_UNKNOWN_HOST, id, e); @@ -519,7 +510,7 @@ public void syncStart() /** Stops all existing streams. */ public void stop() { - sHandler.post(new Runnable() { + mHandler.post(new Runnable() { @Override public void run() { syncStop(); @@ -552,7 +543,7 @@ public void syncStop() { * callback will be called with {@link #ERROR_INVALID_SURFACE}. */ public void startPreview() { - sHandler.post(new Runnable() { + mHandler.post(new Runnable() { @Override public void run() { if (mVideoStream != null) { @@ -582,7 +573,7 @@ public void run() { * Asynchronously stops the camera preview. */ public void stopPreview() { - sHandler.post(new Runnable() { + mHandler.post(new Runnable() { @Override public void run() { if (mVideoStream != null) { @@ -598,7 +589,7 @@ public void run() { * To find out which camera is currently selected, use {@link #getCamera()} **/ public void switchCamera() { - sHandler.post(new Runnable() { + mHandler.post(new Runnable() { @Override public void run() { if (mVideoStream != null) { @@ -637,7 +628,7 @@ public int getCamera() { * {@link Session#getVideoTrack()} and {@link VideoStream#getFlashState()}. **/ public void toggleFlash() { - sHandler.post(new Runnable() { + mHandler.post(new Runnable() { @Override public void run() { if (mVideoStream != null) { @@ -655,7 +646,7 @@ public void run() { public void release() { removeAudioTrack(); removeVideoTrack(); - sHandler.getLooper().quit(); + mHandler.getLooper().quit(); } private void postPreviewStarted() { @@ -729,7 +720,7 @@ public void run() { public void run() { if (isStreaming()) { postBitRate(getBitrate()); - sHandler.postDelayed(mUpdateBitrate, 500); + mHandler.postDelayed(mUpdateBitrate, 500); } else { postBitRate(0); } From 2e62cbc6e682ce37a0f24b04f1b5a648f3fcaf1c Mon Sep 17 00:00:00 2001 From: pnemonic78 Date: Mon, 2 Jun 2014 10:27:14 +0300 Subject: [PATCH 26/51] fix "ERROR: resource directory 'libstreaming/res' does not exist" --- res/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 res/.gitkeep diff --git a/res/.gitkeep b/res/.gitkeep new file mode 100644 index 00000000..e69de29b From b369ce89da0aa9cf3e6ab1265a656cce6e3719a8 Mon Sep 17 00:00:00 2001 From: pnemonic78 Date: Mon, 2 Jun 2014 11:03:09 +0300 Subject: [PATCH 27/51] 5 bits for the object type / 4 bits for the sampling rate / 4 bits for the channel / padding --- src/net/majorkernelpanic/streaming/audio/AACStream.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/majorkernelpanic/streaming/audio/AACStream.java b/src/net/majorkernelpanic/streaming/audio/AACStream.java index 76282ac4..69390478 100644 --- a/src/net/majorkernelpanic/streaming/audio/AACStream.java +++ b/src/net/majorkernelpanic/streaming/audio/AACStream.java @@ -173,7 +173,7 @@ public synchronized void configure() throws IllegalStateException, IOException { mProfile = 2; // AAC LC mChannel = 1; - mConfig = mProfile<<11 | mSamplingRateIndex<<7 | mChannel<<3; + mConfig = (mProfile & 0x1F) << 11 | (mSamplingRateIndex & 0x0F) << 7 | (mChannel & 0x0F) << 3; mSessionDescription = "m=audio "+String.valueOf(getDestinationPorts()[0])+" RTP/AVP 96\r\n" + "a=rtpmap:96 mpeg4-generic/"+mQuality.samplingRate+"\r\n"+ @@ -354,7 +354,7 @@ private void testADTS() throws IllegalStateException, IOException { mQuality.samplingRate = AUDIO_SAMPLING_RATES[mSamplingRateIndex]; // 5 bits for the object type / 4 bits for the sampling rate / 4 bits for the channel / padding - mConfig = mProfile<<11 | mSamplingRateIndex<<7 | mChannel<<3; + mConfig = (mProfile & 0x1F) << 11 | (mSamplingRateIndex & 0x0F) << 7 | (mChannel & 0x0F) << 3; Log.i(TAG,"MPEG VERSION: " + ( (buffer[0]&0x08) >> 3 ) ); Log.i(TAG,"PROTECTION: " + (buffer[0]&0x01) ); From 2758df61c0f8fe54209f0ac1d01487aade74455b Mon Sep 17 00:00:00 2001 From: pnemonic78 Date: Mon, 2 Jun 2014 11:47:05 +0300 Subject: [PATCH 28/51] spelling. --- .../majorkernelpanic/streaming/MediaStream.java | 8 ++++---- src/net/majorkernelpanic/streaming/Session.java | 4 ++-- .../streaming/audio/AACStream.java | 2 +- .../streaming/audio/AMRNBStream.java | 4 ++-- .../streaming/audio/AudioQuality.java | 2 +- .../majorkernelpanic/streaming/gl/SurfaceView.java | 10 +++++----- .../majorkernelpanic/streaming/mp4/MP4Config.java | 2 +- .../majorkernelpanic/streaming/mp4/MP4Parser.java | 6 ++---- .../streaming/rtcp/SenderReport.java | 13 +++++++++++-- .../streaming/rtp/AACADTSPacketizer.java | 2 +- .../streaming/rtp/AMRNBPacketizer.java | 4 ++-- .../streaming/rtp/H264Packetizer.java | 2 +- .../majorkernelpanic/streaming/rtp/RtpSocket.java | 8 ++++---- .../streaming/rtsp/RtspClient.java | 14 +++++++------- .../streaming/video/H264Stream.java | 2 +- .../streaming/video/VideoQuality.java | 1 + .../streaming/video/VideoStream.java | 2 +- 17 files changed, 47 insertions(+), 39 deletions(-) diff --git a/src/net/majorkernelpanic/streaming/MediaStream.java b/src/net/majorkernelpanic/streaming/MediaStream.java index 27e1b898..4bf9fdb5 100644 --- a/src/net/majorkernelpanic/streaming/MediaStream.java +++ b/src/net/majorkernelpanic/streaming/MediaStream.java @@ -37,7 +37,7 @@ import android.util.Log; /** - * A MediaRecorder that streams what it records using a packetizer from the rtp package. + * A MediaRecorder that streams what it records using a packetizer from the RTP package. * You can't use this class directly ! */ public abstract class MediaStream implements Stream { @@ -56,7 +56,7 @@ public abstract class MediaStream implements Stream { /** Prefix that will be used for all shared preferences saved by libstreaming */ protected static final String PREF_PREFIX = "libstreaming-"; - /** The packetizer that will read the output of the camera and send RTP packets over the networkd. */ + /** The packetizer that will read the output of the camera and send RTP packets over the networked. */ protected AbstractPacketizer mPacketizer = null; protected static byte sSuggestedMode = MODE_MEDIARECORDER_API; @@ -75,7 +75,7 @@ public abstract class MediaStream implements Stream { protected MediaCodec mMediaCodec; static { - // We determine wether or not the MediaCodec API should be used + // We determine whether or not the MediaCodec API should be used try { Class.forName("android.media.MediaCodec"); // Will be set to MODE_MEDIACODEC_API at some point... @@ -275,7 +275,7 @@ public synchronized void stop() { /** * Returns a description of the stream using SDP. * This method can only be called after {@link Stream#configure()}. - * @throws IllegalStateException Thrown when {@link Stream#configure()} wa not called. + * @throws IllegalStateException Thrown when {@link Stream#configure()} was not called. */ public abstract String getSessionDescription(); diff --git a/src/net/majorkernelpanic/streaming/Session.java b/src/net/majorkernelpanic/streaming/Session.java index c156d1d0..a904fd4f 100644 --- a/src/net/majorkernelpanic/streaming/Session.java +++ b/src/net/majorkernelpanic/streaming/Session.java @@ -139,7 +139,7 @@ public interface Callback { * Called periodically to inform you on the bandwidth * consumption of the streams when streaming. */ - public void onBitrareUpdate(long bitrate); + public void onBitrateUpdate(long bitrate); /** Called when some error occurs. */ public void onSessionError(int reason, int streamType, Exception e); @@ -709,7 +709,7 @@ private void postBitRate(final long bitrate) { @Override public void run() { if (mCallback != null) { - mCallback.onBitrareUpdate(bitrate); + mCallback.onBitrateUpdate(bitrate); } } }); diff --git a/src/net/majorkernelpanic/streaming/audio/AACStream.java b/src/net/majorkernelpanic/streaming/audio/AACStream.java index 69390478..655cb803 100644 --- a/src/net/majorkernelpanic/streaming/audio/AACStream.java +++ b/src/net/majorkernelpanic/streaming/audio/AACStream.java @@ -150,7 +150,7 @@ public synchronized void configure() throws IllegalStateException, IOException { mPacketizer = new AACADTSPacketizer(); } else { mPacketizer = new AACLATMPacketizer(); - } + } mPacketizer.setDestination(mDestination, mRtpPort, mRtcpPort); mPacketizer.getRtpSocket().setOutputStream(mOutputStream, mChannelIdentifier); } diff --git a/src/net/majorkernelpanic/streaming/audio/AMRNBStream.java b/src/net/majorkernelpanic/streaming/audio/AMRNBStream.java index 1a7b5574..05f50ec7 100644 --- a/src/net/majorkernelpanic/streaming/audio/AMRNBStream.java +++ b/src/net/majorkernelpanic/streaming/audio/AMRNBStream.java @@ -65,13 +65,13 @@ public synchronized void start() throws IllegalStateException, IOException { super.start(); } } - + public synchronized void configure() throws IllegalStateException, IOException { super.configure(); mMode = MODE_MEDIARECORDER_API; mQuality = mRequestedQuality.clone(); } - + /** * Returns a description of the stream using SDP. It can then be included in an SDP file. */ diff --git a/src/net/majorkernelpanic/streaming/audio/AudioQuality.java b/src/net/majorkernelpanic/streaming/audio/AudioQuality.java index b0ce5fc3..0fce0044 100644 --- a/src/net/majorkernelpanic/streaming/audio/AudioQuality.java +++ b/src/net/majorkernelpanic/streaming/audio/AudioQuality.java @@ -21,7 +21,7 @@ package net.majorkernelpanic.streaming.audio; /** - * A class that represents the quality of an audio stream. + * A class that represents the quality of an audio stream. */ public class AudioQuality { diff --git a/src/net/majorkernelpanic/streaming/gl/SurfaceView.java b/src/net/majorkernelpanic/streaming/gl/SurfaceView.java index 772f6246..d78b1721 100644 --- a/src/net/majorkernelpanic/streaming/gl/SurfaceView.java +++ b/src/net/majorkernelpanic/streaming/gl/SurfaceView.java @@ -53,7 +53,7 @@ */ public class SurfaceView extends android.view.SurfaceView implements Runnable, OnFrameAvailableListener, SurfaceHolder.Callback { - public final static String TAG = "GLSurfaceView"; + public final static String TAG = "SurfaceView"; /** * The aspect ratio of the surface view will be equal @@ -68,8 +68,8 @@ public class SurfaceView extends android.view.SurfaceView implements Runnable, O private Handler mHandler = null; private boolean mFrameAvailable = false; private boolean mRunning = true; - private int mAspectRatioMode = 0; - + private int mAspectRatioMode = ASPECT_RATIO_STRETCH; + // The surface in which the preview is rendered private SurfaceManager mViewSurfaceManager = null; @@ -80,8 +80,8 @@ public class SurfaceView extends android.view.SurfaceView implements Runnable, O // from the camera, onto a Surface private TextureManager mTextureManager = null; - private Semaphore mLock = new Semaphore(0); - private Object mSyncObject = new Object(); + private final Semaphore mLock = new Semaphore(0); + private final Object mSyncObject = new Object(); // Allows to force the aspect ratio of the preview private ViewAspectRatioMeasurer mVARM = new ViewAspectRatioMeasurer(); diff --git a/src/net/majorkernelpanic/streaming/mp4/MP4Config.java b/src/net/majorkernelpanic/streaming/mp4/MP4Config.java index 33723c5e..3457ce6e 100644 --- a/src/net/majorkernelpanic/streaming/mp4/MP4Config.java +++ b/src/net/majorkernelpanic/streaming/mp4/MP4Config.java @@ -54,7 +54,7 @@ public MP4Config(byte[] sps, byte[] pps) { } /** - * Finds sps & pps parameters inside a .mp4. + * Finds SPS & PPS parameters inside a .mp4. * @param path Path to the file to analyze * @throws IOException * @throws FileNotFoundException diff --git a/src/net/majorkernelpanic/streaming/mp4/MP4Parser.java b/src/net/majorkernelpanic/streaming/mp4/MP4Parser.java index 95e78d3d..54ad215e 100644 --- a/src/net/majorkernelpanic/streaming/mp4/MP4Parser.java +++ b/src/net/majorkernelpanic/streaming/mp4/MP4Parser.java @@ -194,7 +194,7 @@ private boolean findSPSandPPS() { * You may find really useful information about this box * in the document ISO-IEC 14496-15, part 5.2.4.1.1 * The box's structure is described there - * + *
       		 *  aligned(8) class AVCDecoderConfigurationRecord {
       		 *		unsigned int(8) configurationVersion = 1;
       		 *		unsigned int(8) AVCProfileIndication;
      @@ -214,9 +214,7 @@ private boolean findSPSandPPS() {
       		 *			bit(8*pictureParameterSetLength) pictureParameterSetNALUnit;
       		 *		}
       		 *	}
      -		 *
      -		 *  
      -		 *  
      +		 *  
      */ try { diff --git a/src/net/majorkernelpanic/streaming/rtcp/SenderReport.java b/src/net/majorkernelpanic/streaming/rtcp/SenderReport.java index 2efb9042..7f91be04 100644 --- a/src/net/majorkernelpanic/streaming/rtcp/SenderReport.java +++ b/src/net/majorkernelpanic/streaming/rtcp/SenderReport.java @@ -104,7 +104,7 @@ public void close() { /** * Sets the temporal interval between two RTCP Sender Reports. - * Default interval is set to 3 secondes. + * Default interval is set to 3 seconds. * Set 0 to disable RTCP. * @param interval The interval in milliseconds */ @@ -115,6 +115,8 @@ public void setInterval(long interval) { /** * Updates the number of packets sent, and the total amount of data sent. * @param length The length of the packet + * @param rtpts + * The RTP timestamp. * @throws IOException **/ public void update(int length, long rtpts) throws IOException { @@ -193,7 +195,14 @@ private void setLong(long n, int begin, int end) { } } - /** Sends the RTCP packet over the network. */ + /** + * Sends the RTCP packet over the network. + * + * @param ntpts + * the NTP timestamp. + * @param rtpts + * the RTP timestamp. + */ private void send(long ntpts, long rtpts) throws IOException { long hb = ntpts/1000000000; long lb = ( ( ntpts - hb*1000000000 ) * 4294967296L )/1000000000; diff --git a/src/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.java b/src/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.java index 355f7a60..bbff5861 100644 --- a/src/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.java @@ -82,7 +82,7 @@ public void run() { // marker bit in the RTP header is 1 on the last fragment of an Access // Unit, and 0 on all other fragments." RFC 3640 - // Adts header fields that we need to parse + // ADTS header fields that we need to parse boolean protection; int frameLength, sum, length, nbau, nbpk, samplingRateIndex, profile; long oldtime = SystemClock.elapsedRealtime(), now = oldtime; diff --git a/src/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.java b/src/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.java index 3c3bfa7f..5ad14639 100644 --- a/src/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/AMRNBPacketizer.java @@ -30,7 +30,7 @@ * * AMR Streaming over RTP. * - * Must be fed with an InputStream containing raw amr nb + * Must be fed with an InputStream containing raw AMR NB * Stream must begin with a 6 bytes long header: "#!AMR\n", it will be skipped * */ @@ -78,7 +78,7 @@ public void run() { try { - // Skip raw amr header + // Skip raw AMR header fill(header,0,AMR_HEADER_LENGTH); if (header[5] != '\n') { diff --git a/src/net/majorkernelpanic/streaming/rtp/H264Packetizer.java b/src/net/majorkernelpanic/streaming/rtp/H264Packetizer.java index df830e27..4b38666d 100644 --- a/src/net/majorkernelpanic/streaming/rtp/H264Packetizer.java +++ b/src/net/majorkernelpanic/streaming/rtp/H264Packetizer.java @@ -177,7 +177,7 @@ private void send() throws IOException, InterruptedException { } } - // We send two packets containing NALU type 7 (sps) and 8 (pps) + // We send two packets containing NALU type 7 (SPS) and 8 (PPS) // Those should allow the H264 stream to be decoded even if no SDP was sent to the decoder. if (type == 5 && sps != null && pps != null) { buffer = socket.requestBuffer(); diff --git a/src/net/majorkernelpanic/streaming/rtp/RtpSocket.java b/src/net/majorkernelpanic/streaming/rtp/RtpSocket.java index 11ec3a1e..9ae91e95 100644 --- a/src/net/majorkernelpanic/streaming/rtp/RtpSocket.java +++ b/src/net/majorkernelpanic/streaming/rtp/RtpSocket.java @@ -79,8 +79,8 @@ public class RtpSocket implements Runnable { */ public RtpSocket() { - mCacheSize = 00; - mBufferCount = 300; // TODO: reajust that when the FIFO is full + mCacheSize = 0; + mBufferCount = 300; // TODO: readjust that when the FIFO is full mBuffers = new byte[mBufferCount][]; mPackets = new DatagramPacket[mBufferCount]; mReport = new SenderReport(); @@ -151,7 +151,7 @@ public int getSSRC() { return mSsrc; } - /** Sets the clock frquency of the stream in Hz. */ + /** Sets the clock frequency of the stream in Hz. */ public void setClockFrequency(long clock) { mClock = clock; } @@ -246,7 +246,7 @@ public void commitBuffer(int length) throws IOException { } - /** Returns an approximation of the bitrate of the RTP stream in bit per seconde. */ + /** Returns an approximation of the bitrate of the RTP stream in bits per second. */ public long getBitrate() { return mAverageBitrate.average(); } diff --git a/src/net/majorkernelpanic/streaming/rtsp/RtspClient.java b/src/net/majorkernelpanic/streaming/rtsp/RtspClient.java index 1e79ebc5..d85fd4ec 100644 --- a/src/net/majorkernelpanic/streaming/rtsp/RtspClient.java +++ b/src/net/majorkernelpanic/streaming/rtsp/RtspClient.java @@ -250,7 +250,7 @@ public void run() { tryConnection(); } catch (Exception e) { postError(ERROR_CONNECTION_FAILED, e); - abord(); + abort(); return; } @@ -261,7 +261,7 @@ public void run() { mHandler.post(mConnectionMonitor); } } catch (Exception e) { - abord(); + abort(); } } @@ -281,7 +281,7 @@ public void run() { } if (mState != STATE_STOPPED) { mState = STATE_STOPPING; - abord(); + abort(); } } }); @@ -292,7 +292,7 @@ public void release() { mHandler.getLooper().quit(); } - private void abord() { + private void abort() { try { sendRequestTeardown(); } catch (Exception ignore) {} @@ -502,7 +502,7 @@ public void run() { mHandler.post(mConnectionMonitor); postMessage(MESSAGE_CONNECTION_RECOVERED); } catch (Exception e) { - abord(); + abort(); } } catch (IOException e) { mHandler.postDelayed(mRetryConnection,1000); @@ -574,12 +574,12 @@ static class Response { public int status; public HashMap headers = new HashMap(); - /** Parse the method, uri & headers of a RTSP request */ + /** Parse the method, URI & headers of a RTSP request */ public static Response parseResponse(BufferedReader input) throws IOException, IllegalStateException, SocketException { Response response = new Response(); String line; Matcher matcher; - // Parsing request method & uri + // Parsing request method & URI if ((line = input.readLine())==null) throw new SocketException("Connection lost"); matcher = regexStatus.matcher(line); matcher.find(); diff --git a/src/net/majorkernelpanic/streaming/video/H264Stream.java b/src/net/majorkernelpanic/streaming/video/H264Stream.java index f40b1da0..a45034e1 100644 --- a/src/net/majorkernelpanic/streaming/video/H264Stream.java +++ b/src/net/majorkernelpanic/streaming/video/H264Stream.java @@ -88,7 +88,7 @@ public synchronized String getSessionDescription() throws IllegalStateException /** * Starts the stream. - * This will also open the camera and display the preview if {@link #startPreview()} has not aready been called. + * This will also open the camera and display the preview if {@link #startPreview()} has not already been called. */ public synchronized void start() throws IllegalStateException, IOException { if (!mStreaming) { diff --git a/src/net/majorkernelpanic/streaming/video/VideoQuality.java b/src/net/majorkernelpanic/streaming/video/VideoQuality.java index 2165e15a..8c857f86 100644 --- a/src/net/majorkernelpanic/streaming/video/VideoQuality.java +++ b/src/net/majorkernelpanic/streaming/video/VideoQuality.java @@ -134,6 +134,7 @@ public static int[] determineMaximumSupportedFramerate(Camera.Parameters paramet List supportedFpsRanges = parameters.getSupportedPreviewFpsRange(); for (Iterator it = supportedFpsRanges.iterator(); it.hasNext();) { int[] interval = it.next(); + // Intervals are returned as integers, for example "29970" means "29.970" FPS. supportedFpsRangesStr += interval[0]/1000+"-"+interval[1]/1000+"fps"+(it.hasNext()?", ":""); if (interval[1]>maxFps[1] || (interval[0]>maxFps[0] && interval[1]==maxFps[1])) { maxFps = interval; diff --git a/src/net/majorkernelpanic/streaming/video/VideoStream.java b/src/net/majorkernelpanic/streaming/video/VideoStream.java index 5f35d4b5..3467f58e 100644 --- a/src/net/majorkernelpanic/streaming/video/VideoStream.java +++ b/src/net/majorkernelpanic/streaming/video/VideoStream.java @@ -480,7 +480,7 @@ public void onPreviewFrame(byte[] data, Camera camera) { /** * Video encoding is done by a MediaCodec. - * But here we will use the buffer-to-surface methode + * But here we will use the buffer-to-surface method */ @SuppressLint({ "InlinedApi", "NewApi" }) protected void encodeWithMediaCodecMethod2() throws RuntimeException, IOException { From 9c5df6c1a6d846dcbba3ab4bedc6fba05baf8abe Mon Sep 17 00:00:00 2001 From: fyhertz Date: Fri, 13 Jun 2014 19:15:06 -0400 Subject: [PATCH 29/51] Cleaner error message when the Callback buffer was to small error occurs... --- src/net/majorkernelpanic/streaming/MediaStream.java | 8 ++++++++ src/net/majorkernelpanic/streaming/video/VideoStream.java | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/net/majorkernelpanic/streaming/MediaStream.java b/src/net/majorkernelpanic/streaming/MediaStream.java index 27e1b898..d8fffabc 100644 --- a/src/net/majorkernelpanic/streaming/MediaStream.java +++ b/src/net/majorkernelpanic/streaming/MediaStream.java @@ -186,6 +186,14 @@ public void setStreamingMethod(byte mode) { mRequestedMode = mode; } + /** + * Returns the streaming method in use, call this after + * {@link #configure()} to get an accurate response. + */ + public byte getStreamingMethod() { + return mMode; + } + /** * Returns the packetizer associated with the {@link MediaStream}. * @return The packetizer diff --git a/src/net/majorkernelpanic/streaming/video/VideoStream.java b/src/net/majorkernelpanic/streaming/video/VideoStream.java index 5f35d4b5..3c74f296 100644 --- a/src/net/majorkernelpanic/streaming/video/VideoStream.java +++ b/src/net/majorkernelpanic/streaming/video/VideoStream.java @@ -455,8 +455,8 @@ public void onPreviewFrame(byte[] data, Camera camera) { int bufferIndex = mMediaCodec.dequeueInputBuffer(500000); if (bufferIndex>=0) { inputBuffers[bufferIndex].clear(); - if (data == null) Log.d(TAG,"ERRORRR"); - convertor.convert(data, inputBuffers[bufferIndex]); + if (data == null) Log.e(TAG,"Symptom of the \"Callback buffer was to small\" problem..."); + else convertor.convert(data, inputBuffers[bufferIndex]); mMediaCodec.queueInputBuffer(bufferIndex, 0, inputBuffers[bufferIndex].position(), now, 0); } else { Log.e(TAG,"No buffer available !"); From 41b1818baacd1f76ac1b8eac0f7cbab00bd206ba Mon Sep 17 00:00:00 2001 From: fyhertz Date: Fri, 13 Jun 2014 19:28:33 -0400 Subject: [PATCH 30/51] Fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d49248a9..902d9203 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ This example is extracted from [this simple android app](https://github.com/fyhe } @Override - public void onBitrareUpdate(long bitrate) { + public void onBitrateUpdate(long bitrate) { // Informs you of the bandwidth consumption of the streams Log.d(TAG,"Bitrate: "+bitrate); } From d8a6498bb794802bc97573119b4419bd30a9fff7 Mon Sep 17 00:00:00 2001 From: fyhertz Date: Fri, 13 Jun 2014 19:31:09 -0400 Subject: [PATCH 31/51] Updated javadoc. --- doc/allclasses-frame.html | 4 +- doc/allclasses-noframe.html | 4 +- doc/constant-values.html | 6 +-- doc/deprecated-list.html | 4 +- doc/help-doc.html | 4 +- doc/index-all.html | 23 ++++++---- doc/index.html | 2 +- .../streaming/MediaStream.html | 42 +++++++++++++------ .../streaming/Session.Callback.html | 12 +++--- .../majorkernelpanic/streaming/Session.html | 10 ++--- .../streaming/SessionBuilder.html | 4 +- .../majorkernelpanic/streaming/Stream.html | 4 +- .../streaming/audio/AACStream.html | 8 ++-- .../streaming/audio/AMRNBStream.html | 6 +-- .../streaming/audio/AudioQuality.html | 4 +- .../streaming/audio/AudioStream.html | 6 +-- .../streaming/audio/package-frame.html | 4 +- .../streaming/audio/package-summary.html | 4 +- .../streaming/audio/package-tree.html | 4 +- .../exceptions/CameraInUseException.html | 4 +- .../exceptions/ConfNotSupportedException.html | 4 +- .../exceptions/InvalidSurfaceException.html | 4 +- .../StorageUnavailableException.html | 4 +- .../streaming/exceptions/package-frame.html | 4 +- .../streaming/exceptions/package-summary.html | 4 +- .../streaming/exceptions/package-tree.html | 4 +- .../streaming/gl/SurfaceManager.html | 4 +- .../SurfaceView.ViewAspectRatioMeasurer.html | 4 +- .../streaming/gl/SurfaceView.html | 4 +- .../streaming/gl/TextureManager.html | 4 +- .../streaming/gl/package-frame.html | 4 +- .../streaming/gl/package-summary.html | 4 +- .../streaming/gl/package-tree.html | 4 +- .../streaming/hw/CodecManager.html | 4 +- .../streaming/hw/EncoderDebugger.html | 4 +- .../streaming/hw/NV21Convertor.html | 4 +- .../streaming/hw/package-frame.html | 4 +- .../streaming/hw/package-summary.html | 4 +- .../streaming/hw/package-tree.html | 4 +- .../streaming/mp4/MP4Config.html | 8 ++-- .../streaming/mp4/MP4Parser.html | 4 +- .../streaming/mp4/package-frame.html | 4 +- .../streaming/mp4/package-summary.html | 4 +- .../streaming/mp4/package-tree.html | 4 +- .../streaming/package-frame.html | 4 +- .../streaming/package-summary.html | 6 +-- .../streaming/package-tree.html | 4 +- .../streaming/rtcp/SenderReport.html | 8 ++-- .../streaming/rtcp/package-frame.html | 4 +- .../streaming/rtcp/package-summary.html | 4 +- .../streaming/rtcp/package-tree.html | 4 +- .../streaming/rtp/AACADTSPacketizer.html | 4 +- .../streaming/rtp/AACLATMPacketizer.html | 4 +- .../streaming/rtp/AMRNBPacketizer.html | 6 +-- .../streaming/rtp/AbstractPacketizer.html | 4 +- .../streaming/rtp/H263Packetizer.html | 4 +- .../streaming/rtp/H264Packetizer.html | 4 +- .../streaming/rtp/MediaCodecInputStream.html | 4 +- .../streaming/rtp/RtpSocket.html | 12 +++--- .../streaming/rtp/package-frame.html | 4 +- .../streaming/rtp/package-summary.html | 4 +- .../streaming/rtp/package-tree.html | 4 +- .../streaming/rtsp/RtspClient.Callback.html | 4 +- .../streaming/rtsp/RtspClient.html | 4 +- .../rtsp/RtspServer.CallbackListener.html | 4 +- .../rtsp/RtspServer.LocalBinder.html | 4 +- .../streaming/rtsp/RtspServer.html | 4 +- .../streaming/rtsp/UriParser.html | 4 +- .../streaming/rtsp/package-frame.html | 4 +- .../streaming/rtsp/package-summary.html | 4 +- .../streaming/rtsp/package-tree.html | 4 +- .../streaming/video/CodecManager.html | 4 +- .../streaming/video/H263Stream.html | 6 +-- .../streaming/video/H264Stream.html | 8 ++-- .../streaming/video/VideoQuality.html | 23 ++++++++-- .../streaming/video/VideoStream.html | 8 ++-- .../streaming/video/package-frame.html | 4 +- .../streaming/video/package-summary.html | 4 +- .../streaming/video/package-tree.html | 4 +- doc/overview-frame.html | 4 +- doc/overview-summary.html | 4 +- doc/overview-tree.html | 4 +- doc/serialized-form.html | 4 +- 83 files changed, 250 insertions(+), 210 deletions(-) diff --git a/doc/allclasses-frame.html b/doc/allclasses-frame.html index 58978ee3..dc6d201e 100644 --- a/doc/allclasses-frame.html +++ b/doc/allclasses-frame.html @@ -2,9 +2,9 @@ - + All Classes - + diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html index bc7ae6b3..f888483c 100644 --- a/doc/allclasses-noframe.html +++ b/doc/allclasses-noframe.html @@ -2,9 +2,9 @@ - + All Classes - + diff --git a/doc/constant-values.html b/doc/constant-values.html index 808301ee..9fc20757 100644 --- a/doc/constant-values.html +++ b/doc/constant-values.html @@ -2,9 +2,9 @@ - + Constant Field Values - + @@ -319,7 +319,7 @@

      net.majorkernelpanic.*

      public static final java.lang.String TAG -"GLSurfaceView" +"SurfaceView" diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html index 53ebb772..7ce35b3c 100644 --- a/doc/deprecated-list.html +++ b/doc/deprecated-list.html @@ -2,9 +2,9 @@ - + Deprecated List - + diff --git a/doc/help-doc.html b/doc/help-doc.html index cad93f22..aa04d4cb 100644 --- a/doc/help-doc.html +++ b/doc/help-doc.html @@ -2,9 +2,9 @@ - + API Help - + diff --git a/doc/index-all.html b/doc/index-all.html index d00fc41c..e55a1e80 100644 --- a/doc/index-all.html +++ b/doc/index-all.html @@ -2,9 +2,9 @@ - + Index - + @@ -319,7 +319,7 @@

      E

      ERROR_CONFIGURATION_NOT_SUPPORTED - Static variable in class net.majorkernelpanic.streaming.Session
      -
      The phone may not support some streaming parameters that you are using (bit rate, frame rate...s).
      +
      The phone may not support some streaming parameters that you are trying to use (bit rate, frame rate, resolution...).
      ERROR_CONNECTION_FAILED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
      @@ -408,7 +408,7 @@

      G

      getBitrate() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
      -
      Returns an approximation of the bitrate of the RTP stream in bit per seconde.
      +
      Returns an approximation of the bitrate of the RTP stream in bits per second.
      getBitrate() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
      @@ -589,6 +589,11 @@

      G

      Returns the SSRC of the underlying RtpSocket.
      +
      getStreamingMethod() - Method in class net.majorkernelpanic.streaming.MediaStream
      +
      +
      Returns the streaming method in use, call this after + MediaStream.configure() to get an accurate response.
      +
      getStride() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
       
      getStsdBox() - Method in class net.majorkernelpanic.streaming.mp4.MP4Parser
      @@ -747,7 +752,7 @@

      M

       
      MediaStream - Class in net.majorkernelpanic.streaming
      -
      A MediaRecorder that streams what it records using a packetizer from the rtp package.
      +
      A MediaRecorder that streams what it records using a packetizer from the RTP package.
      MediaStream() - Constructor for class net.majorkernelpanic.streaming.MediaStream
       
      @@ -789,7 +794,7 @@

      M

       
      MP4Config(String) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
      -
      Finds sps & pps parameters inside a .mp4.
      +
      Finds SPS & PPS parameters inside a .mp4.
      MP4Parser - Class in net.majorkernelpanic.streaming.mp4
      @@ -839,7 +844,7 @@

      O

      onBind(Intent) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
       
      -
      onBitrareUpdate(long) - Method in interface net.majorkernelpanic.streaming.Session.Callback
      +
      onBitrateUpdate(long) - Method in interface net.majorkernelpanic.streaming.Session.Callback
      Called periodically to inform you on the bandwidth consumption of the streams when streaming.
      @@ -1083,7 +1088,7 @@

      S

      setClockFrequency(long) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
      -
      Sets the clock frquency of the stream in Hz.
      +
      Sets the clock frequency of the stream in Hz.
      setColorPanesReversed(boolean) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
       
      @@ -1550,6 +1555,8 @@

      T

      Toggles the LED of the phone if it has one.
      +
      toString() - Method in class net.majorkernelpanic.streaming.video.VideoQuality
      +
       
      trackExists(int) - Method in class net.majorkernelpanic.streaming.Session
       
      TRANSPORT_TCP - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
      diff --git a/doc/index.html b/doc/index.html index 9c5d9358..b4be5ca9 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,7 +2,7 @@ - + Generated Documentation (Untitled) -

      All Classes

      +

      All Classes

      • AACADTSPacketizer
      • @@ -36,15 +37,15 @@

        All Classes

      • NV21Convertor
      • RtpSocket
      • RtspClient
      • -
      • RtspClient.Callback
      • +
      • RtspClient.Callback
      • RtspServer
      • -
      • RtspServer.CallbackListener
      • +
      • RtspServer.CallbackListener
      • SenderReport
      • Session
      • -
      • Session.Callback
      • +
      • Session.Callback
      • SessionBuilder
      • StorageUnavailableException
      • -
      • Stream
      • +
      • Stream
      • SurfaceManager
      • SurfaceView
      • TextureManager
      • diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html index c26efdd6..89a8ef5f 100644 --- a/doc/allclasses-noframe.html +++ b/doc/allclasses-noframe.html @@ -2,13 +2,14 @@ - + All Classes - + + -

        All Classes

        +

        All Classes

        • AACADTSPacketizer
        • @@ -36,15 +37,15 @@

          All Classes

        • NV21Convertor
        • RtpSocket
        • RtspClient
        • -
        • RtspClient.Callback
        • +
        • RtspClient.Callback
        • RtspServer
        • -
        • RtspServer.CallbackListener
        • +
        • RtspServer.CallbackListener
        • SenderReport
        • Session
        • -
        • Session.Callback
        • +
        • Session.Callback
        • SessionBuilder
        • StorageUnavailableException
        • -
        • Stream
        • +
        • Stream
        • SurfaceManager
        • SurfaceView
        • TextureManager
        • diff --git a/doc/constant-values.html b/doc/constant-values.html index 3d6d32b6..22c46765 100644 --- a/doc/constant-values.html +++ b/doc/constant-values.html @@ -2,15 +2,20 @@ - + Constant Field Values - + + @@ -18,9 +23,11 @@
          JavaScript is disabled on your browser.
          -
          +
          - + + +
          - +
          @@ -74,7 +81,7 @@

          Contents

          net.majorkernelpanic.*

          • - +
            @@ -121,7 +128,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.MediaStream 
            Modifier and Type
          • - +
            @@ -203,7 +210,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.Session 
            Modifier and Type
          • - +
            @@ -266,7 +273,7 @@

            net.majorkernelpanic.*

            • -
            net.majorkernelpanic.streaming.SessionBuilder 
            Modifier and Type
            +
            @@ -287,7 +294,7 @@

            net.majorkernelpanic.*

            • -
            net.majorkernelpanic.streaming.audio.AACStream 
            Modifier and Type
            +
            @@ -306,7 +313,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.gl.SurfaceManager 
            Modifier and Type
          • - +
            @@ -339,7 +346,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.gl.SurfaceView 
            Modifier and Type
          • - +
            @@ -360,7 +367,7 @@

            net.majorkernelpanic.*

            • -
            net.majorkernelpanic.streaming.gl.TextureManager 
            Modifier and Type
            +
            @@ -379,7 +386,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.hw.CodecManager 
            Modifier and Type
          • - +
            @@ -400,7 +407,7 @@

            net.majorkernelpanic.*

            • -
            net.majorkernelpanic.streaming.hw.EncoderDebugger 
            Modifier and Type
            +
            @@ -421,7 +428,7 @@

            net.majorkernelpanic.*

            • -
            net.majorkernelpanic.streaming.mp4.MP4Config 
            Modifier and Type
            +
            @@ -442,7 +449,7 @@

            net.majorkernelpanic.*

            • -
            net.majorkernelpanic.streaming.rtcp.SenderReport 
            Modifier and Type
            +
            @@ -461,7 +468,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.rtp.AMRNBPacketizer 
            Modifier and Type
          • - +
            @@ -480,7 +487,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.rtp.H263Packetizer 
            Modifier and Type
          • - +
            @@ -499,7 +506,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.rtp.H264Packetizer 
            Modifier and Type
          • - +
            @@ -518,7 +525,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.rtp.MediaCodecInputStream 
            Modifier and Type
          • - +
            @@ -567,7 +574,7 @@

            net.majorkernelpanic.*

            • -
            net.majorkernelpanic.streaming.rtp.RtpSocket 
            Modifier and Type
            +
            @@ -628,7 +635,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.rtsp.RtspClient 
            Modifier and Type
          • - +
            @@ -696,7 +703,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.rtsp.RtspServer 
            Modifier and Type
          • - +
            @@ -717,7 +724,7 @@

            net.majorkernelpanic.*

            • -
            net.majorkernelpanic.streaming.rtsp.UriParser 
            Modifier and Type
            +
            @@ -736,7 +743,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.video.CodecManager 
            Modifier and Type
          • - +
            @@ -755,7 +762,7 @@

            net.majorkernelpanic.*

            net.majorkernelpanic.streaming.video.H264Stream 
            Modifier and Type
          • - +
            @@ -776,9 +783,11 @@

            net.majorkernelpanic.*

            -
            +
            - + + +
            - +
            diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html index 4c6880c4..0313f15d 100644 --- a/doc/deprecated-list.html +++ b/doc/deprecated-list.html @@ -2,15 +2,20 @@ - + Deprecated List - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +
            @@ -66,9 +73,11 @@

            Deprecated API

            Contents

            -
            +
            - + + +
            - +
            diff --git a/doc/help-doc.html b/doc/help-doc.html index c40e585e..cbf11898 100644 --- a/doc/help-doc.html +++ b/doc/help-doc.html @@ -2,15 +2,20 @@ - + API Help - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +
            @@ -165,11 +172,13 @@

            Constant Field Values

            The Constant Field Values page lists the static final fields and their values.

            -This help file applies to API documentation generated using the standard doclet.
            +This help file applies to API documentation generated using the standard doclet.
            -
            +
            - + + +
            - +
            diff --git a/doc/index-all.html b/doc/index-all.html index 55bc26fb..4834f59c 100644 --- a/doc/index-all.html +++ b/doc/index-all.html @@ -2,15 +2,20 @@ - + Index - - + + + @@ -18,19 +23,21 @@
            JavaScript is disabled on your browser.
            -
            + -
            A B C D E F G H I K M N O P R S T U V  +
            A B C D E F G H I K L M N O P R S T U V 

            A

            -
            AACADTSPacketizer - Class in net.majorkernelpanic.streaming.rtp
            +
            AACADTSPacketizer - Class in net.majorkernelpanic.streaming.rtp
            RFC 3640.
            -
            AACADTSPacketizer() - Constructor for class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
            +
            AACADTSPacketizer() - Constructor for class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
             
            -
            AACLATMPacketizer - Class in net.majorkernelpanic.streaming.rtp
            +
            AACLATMPacketizer - Class in net.majorkernelpanic.streaming.rtp
            RFC 3640.
            -
            AACLATMPacketizer() - Constructor for class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
            +
            AACLATMPacketizer() - Constructor for class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
             
            -
            AACStream - Class in net.majorkernelpanic.streaming.audio
            +
            AACStream - Class in net.majorkernelpanic.streaming.audio
            A class for streaming AAC from the camera of an android device using RTP.
            -
            AACStream() - Constructor for class net.majorkernelpanic.streaming.audio.AACStream
            +
            AACStream() - Constructor for class net.majorkernelpanic.streaming.audio.AACStream
             
            -
            AbstractPacketizer - Class in net.majorkernelpanic.streaming.rtp
            +
            AbstractPacketizer - Class in net.majorkernelpanic.streaming.rtp
            Each packetizer inherits from this one and therefore uses RTP and UDP.
            -
            AbstractPacketizer() - Constructor for class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            AbstractPacketizer() - Constructor for class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
             
            -
            addCallbackListener(RtspServer.CallbackListener) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            addCallbackListener(RtspServer.CallbackListener) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            -
            See RtspServer.CallbackListener to check out what events will be fired once you set up a listener.
            +
            See RtspServer.CallbackListener to check out what events will be fired once you set up a listener.
            -
            addMediaCodecSurface(Surface) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            addMediaCodecSurface(Surface) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            AMRNBPacketizer - Class in net.majorkernelpanic.streaming.rtp
            +
            AMRNBPacketizer - Class in net.majorkernelpanic.streaming.rtp
            RFC 3267.
            -
            AMRNBPacketizer() - Constructor for class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
            +
            AMRNBPacketizer() - Constructor for class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
             
            -
            AMRNBStream - Class in net.majorkernelpanic.streaming.audio
            +
            AMRNBStream - Class in net.majorkernelpanic.streaming.audio
            A class for streaming AAC from the camera of an android device using RTP.
            -
            AMRNBStream() - Constructor for class net.majorkernelpanic.streaming.audio.AMRNBStream
            +
            AMRNBStream() - Constructor for class net.majorkernelpanic.streaming.audio.AMRNBStream
             
            -
            ASPECT_RATIO_PREVIEW - Static variable in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            ASPECT_RATIO_PREVIEW - Static variable in class net.majorkernelpanic.streaming.gl.SurfaceView
            The aspect ratio of the surface view will be equal to the aspect ration of the camera preview.
            -
            ASPECT_RATIO_STRETCH - Static variable in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            ASPECT_RATIO_STRETCH - Static variable in class net.majorkernelpanic.streaming.gl.SurfaceView
            The surface view will fill completely fill its parent.
            -
            asyncDebug(Context, int, int) - Static method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            asyncDebug(Context, int, int) - Static method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
             
            -
            AUDIO_AAC - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            +
            AUDIO_AAC - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            - +
            -
            AUDIO_AMRNB - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            +
            AUDIO_AMRNB - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            - +
            -
            AUDIO_NONE - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            +
            AUDIO_NONE - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            - +
            -
            AUDIO_SAMPLING_RATES - Static variable in class net.majorkernelpanic.streaming.audio.AACStream
            +
            AUDIO_SAMPLING_RATES - Static variable in class net.majorkernelpanic.streaming.audio.AACStream
            There are 13 supported frequencies by ADTS.
            -
            AudioQuality - Class in net.majorkernelpanic.streaming.audio
            +
            AudioQuality - Class in net.majorkernelpanic.streaming.audio
            A class that represents the quality of an audio stream.
            -
            AudioQuality() - Constructor for class net.majorkernelpanic.streaming.audio.AudioQuality
            +
            AudioQuality() - Constructor for class net.majorkernelpanic.streaming.audio.AudioQuality
            Represents a quality for a video stream.
            -
            AudioQuality(int, int) - Constructor for class net.majorkernelpanic.streaming.audio.AudioQuality
            +
            AudioQuality(int, int) - Constructor for class net.majorkernelpanic.streaming.audio.AudioQuality
            Represents a quality for an audio stream.
            -
            AudioStream - Class in net.majorkernelpanic.streaming.audio
            +
            AudioStream - Class in net.majorkernelpanic.streaming.audio
            Don't use this class directly.
            -
            AudioStream() - Constructor for class net.majorkernelpanic.streaming.audio.AudioStream
            +
            AudioStream() - Constructor for class net.majorkernelpanic.streaming.audio.AudioStream
             
            -
            available() - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
            +
            available() - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
             
            - +

            B

            -
            bitRate - Variable in class net.majorkernelpanic.streaming.audio.AudioQuality
            +
            bitRate - Variable in class net.majorkernelpanic.streaming.audio.AudioQuality
             
            -
            bitrate - Variable in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            bitrate - Variable in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            build() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            build() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Creates a new Session.
            +
            Creates a new Session.
            - +

            C

            -
            CameraInUseException - Exception in net.majorkernelpanic.streaming.exceptions
            +
            CameraInUseException - Exception in net.majorkernelpanic.streaming.exceptions
             
            -
            CameraInUseException(String) - Constructor for exception net.majorkernelpanic.streaming.exceptions.CameraInUseException
            +
            CameraInUseException(String) - Constructor for exception net.majorkernelpanic.streaming.exceptions.CameraInUseException
             
            -
            changeFragmentShader(String) - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            changeFragmentShader(String) - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            Replaces the fragment shader.
            -
            checkGlError(String) - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            checkGlError(String) - Method in class net.majorkernelpanic.streaming.gl.TextureManager
             
            -
            clone() - Method in class net.majorkernelpanic.streaming.audio.AudioQuality
            +
            clone() - Method in class net.majorkernelpanic.streaming.audio.AudioQuality
             
            -
            clone() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            clone() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns a new SessionBuilder with the same configuration.
            +
            Returns a new SessionBuilder with the same configuration.
            -
            clone() - Method in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            clone() - Method in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            close() - Method in class net.majorkernelpanic.streaming.mp4.MP4Parser
            +
            close() - Method in class net.majorkernelpanic.streaming.mp4.MP4Parser
             
            -
            close() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            close() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            close() - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
            +
            close() - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
             
            -
            close() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            close() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Closes the underlying socket.
            -
            CodecManager - Class in net.majorkernelpanic.streaming.hw
            +
            CodecManager - Class in net.majorkernelpanic.streaming.hw
             
            -
            CodecManager() - Constructor for class net.majorkernelpanic.streaming.hw.CodecManager
            +
            CodecManager() - Constructor for class net.majorkernelpanic.streaming.hw.CodecManager
             
            -
            CodecManager - Class in net.majorkernelpanic.streaming.video
            +
            CodecManager - Class in net.majorkernelpanic.streaming.video
             
            -
            CodecManager() - Constructor for class net.majorkernelpanic.streaming.video.CodecManager
            +
            CodecManager() - Constructor for class net.majorkernelpanic.streaming.video.CodecManager
             
            -
            commitBuffer() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            commitBuffer() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Puts the buffer back into the FIFO without sending the packet.
            -
            commitBuffer(int) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            commitBuffer(int) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Sends the RTP packet over the network.
            -
            configure() - Method in class net.majorkernelpanic.streaming.audio.AACStream
            +
            configure() - Method in class net.majorkernelpanic.streaming.audio.AACStream
             
            -
            configure() - Method in class net.majorkernelpanic.streaming.audio.AMRNBStream
            +
            configure() - Method in class net.majorkernelpanic.streaming.audio.AMRNBStream
             
            -
            configure() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            configure() - Method in class net.majorkernelpanic.streaming.MediaStream
            + setVideoQuality(net.majorkernelpanic.streaming.video.VideoQuality) + for a VideoStream and AudioStream.setAudioQuality(net.majorkernelpanic.streaming.audio.AudioQuality) + for a AudioStream.
            -
            configure() - Method in class net.majorkernelpanic.streaming.Session
            +
            configure() - Method in class net.majorkernelpanic.streaming.Session
            Configures all streams of the session.
            -
            configure() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            configure() - Method in interface net.majorkernelpanic.streaming.Stream
            Configures the stream.
            -
            configure() - Method in class net.majorkernelpanic.streaming.video.H263Stream
            +
            configure() - Method in class net.majorkernelpanic.streaming.video.H263Stream
             
            -
            configure() - Method in class net.majorkernelpanic.streaming.video.H264Stream
            +
            configure() - Method in class net.majorkernelpanic.streaming.video.H264Stream
            Configures the stream.
            -
            configure() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            configure() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Configures the stream.
            -
            ConfNotSupportedException - Exception in net.majorkernelpanic.streaming.exceptions
            +
            ConfNotSupportedException - Exception in net.majorkernelpanic.streaming.exceptions
             
            -
            ConfNotSupportedException(String) - Constructor for exception net.majorkernelpanic.streaming.exceptions.ConfNotSupportedException
            +
            ConfNotSupportedException(String) - Constructor for exception net.majorkernelpanic.streaming.exceptions.ConfNotSupportedException
             
            -
            convert(byte[], ByteBuffer) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            convert(byte[], ByteBuffer) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            convert(byte[]) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            convert(byte[]) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            createTexture() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            createTexture() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            Initializes GL state.
            - +

            D

            -
            debug(Context, int, int) - Static method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            debug(Context, int, int) - Static method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
             
            -
            debug(SharedPreferences, int, int) - Static method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            debug(SharedPreferences, int, int) - Static method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
             
            -
            DEFAULT_AUDIO_QUALITY - Static variable in class net.majorkernelpanic.streaming.audio.AudioQuality
            +
            DEFAULT_AUDIO_QUALITY - Static variable in class net.majorkernelpanic.streaming.audio.AudioQuality
            Default audio stream quality.
            -
            DEFAULT_RTSP_PORT - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            DEFAULT_RTSP_PORT - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Port used by default.
            -
            DEFAULT_VIDEO_QUALITY - Static variable in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            DEFAULT_VIDEO_QUALITY - Static variable in class net.majorkernelpanic.streaming.video.VideoQuality
            Default video stream quality.
            -
            determineClosestSupportedResolution(Camera.Parameters, VideoQuality) - Static method in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            determineClosestSupportedResolution(Camera.Parameters, VideoQuality) - Static method in class net.majorkernelpanic.streaming.video.VideoQuality
            Checks if the requested resolution is supported by the camera.
            -
            determineMaximumSupportedFramerate(Camera.Parameters) - Static method in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            determineMaximumSupportedFramerate(Camera.Parameters) - Static method in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            drawFrame() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            drawFrame() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
             
            - +

            E

            -
            EncoderDebugger - Class in net.majorkernelpanic.streaming.hw
            +
            EncoderDebugger - Class in net.majorkernelpanic.streaming.hw
            The purpose of this class is to detect and by-pass some bugs (or underspecified configuration) that encoders available through the MediaCodec API may have.
            -
            equals(AudioQuality) - Method in class net.majorkernelpanic.streaming.audio.AudioQuality
            +
            equals(AudioQuality) - Method in class net.majorkernelpanic.streaming.audio.AudioQuality
             
            -
            equals(VideoQuality) - Method in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            equals(VideoQuality) - Method in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            ERROR_BIND_FAILED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            ERROR_BIND_FAILED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Port already in use.
            -
            ERROR_CAMERA_ALREADY_IN_USE - Static variable in class net.majorkernelpanic.streaming.Session
            +
            ERROR_CAMERA_ALREADY_IN_USE - Static variable in class net.majorkernelpanic.streaming.Session
            Some app is already using a camera (Camera.open() has failed).
            -
            ERROR_CAMERA_HAS_NO_FLASH - Static variable in class net.majorkernelpanic.streaming.Session
            +
            ERROR_CAMERA_HAS_NO_FLASH - Static variable in class net.majorkernelpanic.streaming.Session
            The phone has no flash.
            -
            ERROR_CONFIGURATION_NOT_SUPPORTED - Static variable in class net.majorkernelpanic.streaming.Session
            +
            ERROR_CONFIGURATION_NOT_SUPPORTED - Static variable in class net.majorkernelpanic.streaming.Session
            The phone may not support some streaming parameters that you are trying to use (bit rate, frame rate, resolution...).
            -
            ERROR_CONNECTION_FAILED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            ERROR_CONNECTION_FAILED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Message sent when the connection to the RTSP server failed.
            -
            ERROR_CONNECTION_LOST - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            ERROR_CONNECTION_LOST - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Message sent when the connection with the RTSP server has been lost for some reason (for example, the user is going under a bridge).
            -
            ERROR_INVALID_SURFACE - Static variable in class net.majorkernelpanic.streaming.Session
            +
            ERROR_INVALID_SURFACE - Static variable in class net.majorkernelpanic.streaming.Session
            The supplied SurfaceView is not a valid surface, or has not been created yet.
            -
            ERROR_OTHER - Static variable in class net.majorkernelpanic.streaming.Session
            +
            ERROR_OTHER - Static variable in class net.majorkernelpanic.streaming.Session
            Some other error occurred !
            -
            ERROR_START_FAILED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            ERROR_START_FAILED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            A stream could not be started.
            -
            ERROR_STORAGE_NOT_READY - Static variable in class net.majorkernelpanic.streaming.Session
            +
            ERROR_STORAGE_NOT_READY - Static variable in class net.majorkernelpanic.streaming.Session
            The internal storage of the phone is not ready.
            -
            ERROR_UNKNOWN_HOST - Static variable in class net.majorkernelpanic.streaming.Session
            +
            ERROR_UNKNOWN_HOST - Static variable in class net.majorkernelpanic.streaming.Session
            -
            The destination set with Session.setDestination(String) could not be resolved.
            +
            The destination set with Session.setDestination(String) could not be resolved.
            -
            ERROR_WRONG_CREDENTIALS - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            ERROR_WRONG_CREDENTIALS - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Message sent when the credentials are wrong.
            - +

            F

            -
            findDecodersForMimeType(String) - Static method in class net.majorkernelpanic.streaming.hw.CodecManager
            +
            findDecodersForMimeType(String) - Static method in class net.majorkernelpanic.streaming.hw.CodecManager
            Lists all decoders that claim to support a color format that we know how to use.
            -
            findEncodersForMimeType(String) - Static method in class net.majorkernelpanic.streaming.hw.CodecManager
            +
            findEncodersForMimeType(String) - Static method in class net.majorkernelpanic.streaming.hw.CodecManager
            Lists all encoders that claim to support a color format that we know how to use.
            -
            framerate - Variable in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            framerate - Variable in class net.majorkernelpanic.streaming.video.VideoQuality
             
            - +

            G

            -
            getAspectRatio() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            +
            getAspectRatio() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
             
            -
            getAudioEncoder() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getAudioEncoder() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the audio encoder set with SessionBuilder.setAudioEncoder(int).
            +
            Returns the audio encoder set with SessionBuilder.setAudioEncoder(int).
            -
            getAudioQuality() - Method in class net.majorkernelpanic.streaming.audio.AudioStream
            +
            getAudioQuality() - Method in class net.majorkernelpanic.streaming.audio.AudioStream
            Returns the quality of the stream.
            -
            getAudioQuality() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getAudioQuality() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the AudioQuality set with SessionBuilder.setAudioQuality(AudioQuality).
            +
            Returns the AudioQuality set with SessionBuilder.setAudioQuality(AudioQuality).
            -
            getAudioTrack() - Method in class net.majorkernelpanic.streaming.Session
            +
            getAudioTrack() - Method in class net.majorkernelpanic.streaming.Session
            -
            Returns the underlying AudioStream used by the Session.
            +
            Returns the underlying AudioStream used by the Session.
            -
            getB64PPS() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            getB64PPS() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
             
            -
            getB64PPS() - Method in class net.majorkernelpanic.streaming.mp4.MP4Config
            +
            getB64PPS() - Method in class net.majorkernelpanic.streaming.mp4.MP4Config
             
            -
            getB64SPS() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            getB64SPS() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
             
            -
            getB64SPS() - Method in class net.majorkernelpanic.streaming.mp4.MP4Config
            +
            getB64SPS() - Method in class net.majorkernelpanic.streaming.mp4.MP4Config
             
            -
            getBitrate() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            getBitrate() - Method in class net.majorkernelpanic.streaming.MediaStream
            Returns an approximation of the bit rate consumed by the stream in bit per seconde.
            -
            getBitrate() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            getBitrate() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Returns an approximation of the bitrate of the RTP stream in bits per second.
            -
            getBitrate() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            getBitrate() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Returns the bandwidth consumed by the RTSP server in bits per second.
            -
            getBitrate() - Method in class net.majorkernelpanic.streaming.Session
            +
            getBitrate() - Method in class net.majorkernelpanic.streaming.Session
            Returns an approximation of the bandwidth consumed by the session in bit per second.
            -
            getBitrate() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            getBitrate() - Method in interface net.majorkernelpanic.streaming.Stream
            Returns an approximation of the bit rate consumed by the stream in bit per seconde.
            -
            getBoxPos(String) - Method in class net.majorkernelpanic.streaming.mp4.MP4Parser
            +
            getBoxPos(String) - Method in class net.majorkernelpanic.streaming.mp4.MP4Parser
             
            -
            getBufferSize() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            getBufferSize() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            getCallback() - Method in class net.majorkernelpanic.streaming.Session
            +
            getCallback() - Method in class net.majorkernelpanic.streaming.Session
            -
            Returns the Session.Callback interface that was set with - Session.setCallback(Callback) or null if none was set.
            +
            Returns the Session.Callback interface that was set with + Session.setCallback(Callback) or null if none was set.
            -
            getCamera() - Method in class net.majorkernelpanic.streaming.Session
            +
            getCamera() - Method in class net.majorkernelpanic.streaming.Session
            Returns the id of the camera currently selected.
            -
            getCamera() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getCamera() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the id of the Camera set with SessionBuilder.setCamera(int).
            +
            Returns the id of the android.hardware.Camera set with SessionBuilder.setCamera(int).
            -
            getCamera() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            getCamera() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Returns the id of the camera currently selected.
            -
            getContext() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getContext() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the context set with SessionBuilder.setContext(Context)
            +
            Returns the context set with SessionBuilder.setContext(Context)
            -
            getDestination() - Method in class net.majorkernelpanic.streaming.Session
            +
            getDestination() - Method in class net.majorkernelpanic.streaming.Session
            -
            Returns the destination set with Session.setDestination(String).
            +
            Returns the destination set with Session.setDestination(String).
            -
            getDestination() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getDestination() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the destination ip address set with SessionBuilder.setDestination(String).
            +
            Returns the destination ip address set with SessionBuilder.setDestination(String).
            -
            getDestinationPorts() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            getDestinationPorts() - Method in class net.majorkernelpanic.streaming.MediaStream
            Returns a pair of destination ports, the first one is the one used for RTP and the second one is used for RTCP.
            -
            getDestinationPorts() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            getDestinationPorts() - Method in interface net.majorkernelpanic.streaming.Stream
            Returns a pair of destination ports, the first one is the one used for RTP and the second one is used for RTCP.
            -
            getEncoderColorFormat() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            getEncoderColorFormat() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
             
            -
            getEncoderName() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            getEncoderName() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
             
            -
            getErrorLog() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            getErrorLog() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            A log of all the errors that occurred during the test.
            -
            getFlashState() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getFlashState() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the flash state set with SessionBuilder.setFlashEnabled(boolean).
            +
            Returns the flash state set with SessionBuilder.setFlashEnabled(boolean).
            -
            getFlashState() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            getFlashState() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Indicates whether or not the flash of the phone is on.
            -
            getInstance() - Static method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getInstance() - Static method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns a reference to the SessionBuilder.
            +
            Returns a reference to the SessionBuilder.
            -
            getLastBufferInfo() - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
            +
            getLastBufferInfo() - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
             
            -
            getLocalPort() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            getLocalPort() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            getLocalPorts() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            getLocalPorts() - Method in class net.majorkernelpanic.streaming.MediaStream
            Returns a pair of source ports, the first one is the one used for RTP and the second one is used for RTCP.
            -
            getLocalPorts() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            getLocalPorts() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
             
            -
            getLocalPorts() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            getLocalPorts() - Method in interface net.majorkernelpanic.streaming.Stream
            Returns a pair of source ports, the first one is the one used for RTP and the second one is used for RTCP.
            -
            getMeasuredHeight() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            +
            getMeasuredHeight() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            Get the height measured in the latest call to measure().
            -
            getMeasuredWidth() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            +
            getMeasuredWidth() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            Get the width measured in the latest call to measure().
            -
            getNV21Convertor() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            getNV21Convertor() - Method in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            -
            This NV21Convertor will do the necessary work to feed properly the encoder.
            +
            This NV21Convertor will do the necessary work to feed properly the encoder.
            -
            getOrigin() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getOrigin() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the origin ip address set with SessionBuilder.setOrigin(String).
            +
            Returns the origin ip address set with SessionBuilder.setOrigin(String).
            -
            getPacketizer() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            getPacketizer() - Method in class net.majorkernelpanic.streaming.MediaStream
            -
            Returns the packetizer associated with the MediaStream.
            +
            Returns the packetizer associated with the MediaStream.
            -
            getPlanar() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            getPlanar() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            getPort() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            getPort() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            getPort() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            getPort() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
             
            -
            getPort() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            getPort() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Returns the port used by the RTSP server.
            -
            getProfileLevel() - Method in class net.majorkernelpanic.streaming.mp4.MP4Config
            +
            getProfileLevel() - Method in class net.majorkernelpanic.streaming.mp4.MP4Config
             
            -
            getRtpSocket() - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            getRtpSocket() - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
             
            -
            getService() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer.LocalBinder
            +
            getService() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer.LocalBinder
             
            -
            getSession() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            getSession() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
             
            -
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.audio.AACStream
            +
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.audio.AACStream
            Returns a description of the stream using SDP.
            -
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.audio.AMRNBStream
            +
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.audio.AMRNBStream
            Returns a description of the stream using SDP.
            -
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.MediaStream
            Returns a description of the stream using SDP.
            -
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.Session
            +
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.Session
            Returns a Session Description that can be stored in a file or sent to a client with RTSP.
            -
            getSessionDescription() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            getSessionDescription() - Method in interface net.majorkernelpanic.streaming.Stream
            Returns a description of the stream using SDP.
            -
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.video.H263Stream
            +
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.video.H263Stream
            Returns a description of the stream using SDP.
            -
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.video.H264Stream
            +
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.video.H264Stream
            Returns a description of the stream using SDP.
            -
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            getSessionDescription() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Returns a description of the stream using SDP.
            -
            getSliceHeigth() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            getSliceHeigth() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            getSSRC() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            getSSRC() - Method in class net.majorkernelpanic.streaming.MediaStream
            -
            Returns the SSRC of the underlying RtpSocket.
            +
            Returns the SSRC of the underlying RtpSocket.
            -
            getSSRC() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            getSSRC() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            getSSRC() - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            getSSRC() - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
             
            -
            getSSRC() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            getSSRC() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Returns the SSRC of the stream.
            -
            getSSRC() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            getSSRC() - Method in interface net.majorkernelpanic.streaming.Stream
            -
            Returns the SSRC of the underlying RtpSocket.
            +
            Returns the SSRC of the underlying RtpSocket.
            -
            getStreamingMethod() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            getStreamingMethod() - Method in class net.majorkernelpanic.streaming.MediaStream
            Returns the streaming method in use, call this after - MediaStream.configure() to get an accurate response.
            + MediaStream.configure() to get an accurate response.
            -
            getStride() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            getStride() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            getStsdBox() - Method in class net.majorkernelpanic.streaming.mp4.MP4Parser
            +
            getStsdBox() - Method in class net.majorkernelpanic.streaming.mp4.MP4Parser
             
            -
            getSurfaceTexture() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            getSurfaceTexture() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            getSurfaceTexture() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            getSurfaceTexture() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
             
            -
            getSurfaceView() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getSurfaceView() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the SurfaceView set with SessionBuilder.setSurfaceView(SurfaceView).
            +
            Returns the SurfaceView set with SessionBuilder.setSurfaceView(SurfaceView).
            -
            getTextureId() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            getTextureId() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
             
            -
            getTimeToLive() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getTimeToLive() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the time to live set with SessionBuilder.setTimeToLive(int).
            +
            Returns the time to live set with SessionBuilder.setTimeToLive(int).
            -
            getTrack(int) - Method in class net.majorkernelpanic.streaming.Session
            +
            getTrack(int) - Method in class net.majorkernelpanic.streaming.Session
             
            -
            getUVPanesReversed() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            getUVPanesReversed() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            getVideoEncoder() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getVideoEncoder() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the video encoder set with SessionBuilder.setVideoEncoder(int).
            +
            Returns the video encoder set with SessionBuilder.setVideoEncoder(int).
            -
            getVideoQuality() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            getVideoQuality() - Method in class net.majorkernelpanic.streaming.SessionBuilder
            -
            Returns the VideoQuality set with SessionBuilder.setVideoQuality(VideoQuality).
            +
            Returns the VideoQuality set with SessionBuilder.setVideoQuality(VideoQuality).
            -
            getVideoQuality() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            getVideoQuality() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Returns the quality of the stream.
            -
            getVideoTrack() - Method in class net.majorkernelpanic.streaming.Session
            +
            getVideoTrack() - Method in class net.majorkernelpanic.streaming.Session
            -
            Returns the underlying VideoStream used by the Session.
            +
            Returns the underlying VideoStream used by the Session.
            -
            getYPadding() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            getYPadding() - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            - +

            H

            -
            H263Packetizer - Class in net.majorkernelpanic.streaming.rtp
            +
            H263Packetizer - Class in net.majorkernelpanic.streaming.rtp
            RFC 4629.
            -
            H263Packetizer() - Constructor for class net.majorkernelpanic.streaming.rtp.H263Packetizer
            +
            H263Packetizer() - Constructor for class net.majorkernelpanic.streaming.rtp.H263Packetizer
             
            -
            H263Stream - Class in net.majorkernelpanic.streaming.video
            +
            H263Stream - Class in net.majorkernelpanic.streaming.video
            A class for streaming H.263 from the camera of an android device using RTP.
            -
            H263Stream() - Constructor for class net.majorkernelpanic.streaming.video.H263Stream
            +
            H263Stream() - Constructor for class net.majorkernelpanic.streaming.video.H263Stream
            Constructs the H.263 stream.
            -
            H263Stream(int) - Constructor for class net.majorkernelpanic.streaming.video.H263Stream
            +
            H263Stream(int) - Constructor for class net.majorkernelpanic.streaming.video.H263Stream
            Constructs the H.263 stream.
            -
            H264Packetizer - Class in net.majorkernelpanic.streaming.rtp
            +
            H264Packetizer - Class in net.majorkernelpanic.streaming.rtp
            RFC 3984.
            -
            H264Packetizer() - Constructor for class net.majorkernelpanic.streaming.rtp.H264Packetizer
            +
            H264Packetizer() - Constructor for class net.majorkernelpanic.streaming.rtp.H264Packetizer
             
            -
            H264Stream - Class in net.majorkernelpanic.streaming.video
            +
            H264Stream - Class in net.majorkernelpanic.streaming.video
            A class for streaming H.264 from the camera of an android device using RTP.
            -
            H264Stream() - Constructor for class net.majorkernelpanic.streaming.video.H264Stream
            +
            H264Stream() - Constructor for class net.majorkernelpanic.streaming.video.H264Stream
            Constructs the H.264 stream.
            -
            H264Stream(int) - Constructor for class net.majorkernelpanic.streaming.video.H264Stream
            +
            H264Stream(int) - Constructor for class net.majorkernelpanic.streaming.video.H264Stream
            Constructs the H.264 stream.
            - +

            I

            -
            InvalidSurfaceException - Exception in net.majorkernelpanic.streaming.exceptions
            +
            InvalidSurfaceException - Exception in net.majorkernelpanic.streaming.exceptions
             
            -
            InvalidSurfaceException(String) - Constructor for exception net.majorkernelpanic.streaming.exceptions.InvalidSurfaceException
            +
            InvalidSurfaceException(String) - Constructor for exception net.majorkernelpanic.streaming.exceptions.InvalidSurfaceException
             
            -
            isEnabled() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            isEnabled() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
             
            -
            isStreaming() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            isStreaming() - Method in class net.majorkernelpanic.streaming.MediaStream
            -
            Indicates if the MediaStream is streaming.
            +
            Indicates if the MediaStream is streaming.
            -
            isStreaming() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            isStreaming() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
             
            -
            isStreaming() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            isStreaming() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Returns whether or not the RTSP server is streaming to some client(s).
            -
            isStreaming() - Method in class net.majorkernelpanic.streaming.Session
            +
            isStreaming() - Method in class net.majorkernelpanic.streaming.Session
            Indicates if a track is currently running.
            -
            isStreaming() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            isStreaming() - Method in interface net.majorkernelpanic.streaming.Stream
             
            - +

            K

            -
            KEY_ENABLED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            KEY_ENABLED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Key used in the SharedPreferences to store whether the RTSP server is enabled or not.
            -
            KEY_PORT - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            KEY_PORT - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Key used in the SharedPreferences for the port used by the RTSP server.
            - + + + +

            L

            +
            +
            LocalBinder() - Constructor for class net.majorkernelpanic.streaming.rtsp.RtspServer.LocalBinder
            +
             
            +
            +

            M

            -
            makeCurrent() - Method in class net.majorkernelpanic.streaming.gl.SurfaceManager
            +
            makeCurrent() - Method in class net.majorkernelpanic.streaming.gl.SurfaceManager
             
            -
            markNextPacket() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            markNextPacket() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Sets the marker in the RTP packet.
            -
            measure(int, int) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            +
            measure(int, int) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            Measure with the aspect ratio given at construction.

            - After measuring, get the width and height with the SurfaceView.ViewAspectRatioMeasurer.getMeasuredWidth() - and SurfaceView.ViewAspectRatioMeasurer.getMeasuredHeight() methods, respectively.
            + After measuring, get the width and height with the SurfaceView.ViewAspectRatioMeasurer.getMeasuredWidth() + and SurfaceView.ViewAspectRatioMeasurer.getMeasuredHeight() methods, respectively.
            -
            measure(int, int, double) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            +
            measure(int, int, double) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            Measure with a specific aspect ratio

            - After measuring, get the width and height with the SurfaceView.ViewAspectRatioMeasurer.getMeasuredWidth() - and SurfaceView.ViewAspectRatioMeasurer.getMeasuredHeight() methods, respectively.
            + After measuring, get the width and height with the SurfaceView.ViewAspectRatioMeasurer.getMeasuredWidth() + and SurfaceView.ViewAspectRatioMeasurer.getMeasuredHeight() methods, respectively.
            -
            MediaCodecInputStream - Class in net.majorkernelpanic.streaming.rtp
            +
            MediaCodecInputStream - Class in net.majorkernelpanic.streaming.rtp
            An InputStream that uses data from a MediaCodec.
            -
            MediaCodecInputStream(MediaCodec) - Constructor for class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
            +
            MediaCodecInputStream(MediaCodec) - Constructor for class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
             
            -
            MediaStream - Class in net.majorkernelpanic.streaming
            +
            MediaStream - Class in net.majorkernelpanic.streaming
            A MediaRecorder that streams what it records using a packetizer from the RTP package.
            -
            MediaStream() - Constructor for class net.majorkernelpanic.streaming.MediaStream
            +
            MediaStream() - Constructor for class net.majorkernelpanic.streaming.MediaStream
             
            -
            MESSAGE_CONNECTION_RECOVERED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            MESSAGE_CONNECTION_RECOVERED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Message sent when the connection with the RTSP server has been reestablished.
            -
            MESSAGE_STREAMING_STARTED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            MESSAGE_STREAMING_STARTED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Streaming started.
            -
            MESSAGE_STREAMING_STOPPED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            MESSAGE_STREAMING_STOPPED - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Streaming stopped.
            -
            mMediaFormat - Variable in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
            +
            mMediaFormat - Variable in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
             
            -
            MODE_MEDIACODEC_API - Static variable in class net.majorkernelpanic.streaming.MediaStream
            +
            MODE_MEDIACODEC_API - Static variable in class net.majorkernelpanic.streaming.MediaStream
            Raw audio/video will be encoded using the MediaCodec API with buffers.
            -
            MODE_MEDIACODEC_API_2 - Static variable in class net.majorkernelpanic.streaming.MediaStream
            +
            MODE_MEDIACODEC_API_2 - Static variable in class net.majorkernelpanic.streaming.MediaStream
            Raw audio/video will be encoded using the MediaCode API with a surface.
            -
            MODE_MEDIARECORDER_API - Static variable in class net.majorkernelpanic.streaming.MediaStream
            +
            MODE_MEDIARECORDER_API - Static variable in class net.majorkernelpanic.streaming.MediaStream
            Raw audio/video will be encoded using the MediaRecorder API.
            -
            MP4Config - Class in net.majorkernelpanic.streaming.mp4
            +
            MP4Config - Class in net.majorkernelpanic.streaming.mp4
            Finds SPS & PPS parameters in mp4 file.
            -
            MP4Config(String, String, String) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
            +
            MP4Config(String, String, String) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
             
            -
            MP4Config(String, String) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
            +
            MP4Config(String, String) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
             
            -
            MP4Config(byte[], byte[]) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
            +
            MP4Config(byte[], byte[]) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
             
            -
            MP4Config(String) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
            +
            MP4Config(String) - Constructor for class net.majorkernelpanic.streaming.mp4.MP4Config
            Finds SPS & PPS parameters inside a .mp4.
            -
            MP4Parser - Class in net.majorkernelpanic.streaming.mp4
            +
            MP4Parser - Class in net.majorkernelpanic.streaming.mp4
            Parse an mp4 file.
            -
            MTU - Static variable in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            MTU - Static variable in class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            MTU - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            MTU - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
             
            - +

            N

            -
            net.majorkernelpanic.streaming - package net.majorkernelpanic.streaming
            +
            net.majorkernelpanic.streaming - package net.majorkernelpanic.streaming
             
            -
            net.majorkernelpanic.streaming.audio - package net.majorkernelpanic.streaming.audio
            +
            net.majorkernelpanic.streaming.audio - package net.majorkernelpanic.streaming.audio
             
            -
            net.majorkernelpanic.streaming.exceptions - package net.majorkernelpanic.streaming.exceptions
            +
            net.majorkernelpanic.streaming.exceptions - package net.majorkernelpanic.streaming.exceptions
             
            -
            net.majorkernelpanic.streaming.gl - package net.majorkernelpanic.streaming.gl
            +
            net.majorkernelpanic.streaming.gl - package net.majorkernelpanic.streaming.gl
             
            -
            net.majorkernelpanic.streaming.hw - package net.majorkernelpanic.streaming.hw
            +
            net.majorkernelpanic.streaming.hw - package net.majorkernelpanic.streaming.hw
             
            -
            net.majorkernelpanic.streaming.mp4 - package net.majorkernelpanic.streaming.mp4
            +
            net.majorkernelpanic.streaming.mp4 - package net.majorkernelpanic.streaming.mp4
             
            -
            net.majorkernelpanic.streaming.rtcp - package net.majorkernelpanic.streaming.rtcp
            +
            net.majorkernelpanic.streaming.rtcp - package net.majorkernelpanic.streaming.rtcp
             
            -
            net.majorkernelpanic.streaming.rtp - package net.majorkernelpanic.streaming.rtp
            +
            net.majorkernelpanic.streaming.rtp - package net.majorkernelpanic.streaming.rtp
             
            -
            net.majorkernelpanic.streaming.rtsp - package net.majorkernelpanic.streaming.rtsp
            +
            net.majorkernelpanic.streaming.rtsp - package net.majorkernelpanic.streaming.rtsp
             
            -
            net.majorkernelpanic.streaming.video - package net.majorkernelpanic.streaming.video
            +
            net.majorkernelpanic.streaming.video - package net.majorkernelpanic.streaming.video
             
            -
            NV21Convertor - Class in net.majorkernelpanic.streaming.hw
            +
            NV21Convertor - Class in net.majorkernelpanic.streaming.hw
            Converts from NV21 to YUV420 semi planar or planar.
            -
            NV21Convertor() - Constructor for class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            NV21Convertor() - Constructor for class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            - +

            O

            -
            onBind(Intent) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            onBind(Intent) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
             
            -
            onBitrateUpdate(long) - Method in interface net.majorkernelpanic.streaming.Session.Callback
            +
            onBitrateUpdate(long) - Method in interface net.majorkernelpanic.streaming.Session.Callback
            Called periodically to inform you on the bandwidth consumption of the streams when streaming.
            -
            onCreate() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            onCreate() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
             
            -
            onDestroy() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            onDestroy() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
             
            -
            onError(RtspServer, Exception, int) - Method in interface net.majorkernelpanic.streaming.rtsp.RtspServer.CallbackListener
            +
            onError(RtspServer, Exception, int) - Method in interface net.majorkernelpanic.streaming.rtsp.RtspServer.CallbackListener
            Called when an error occurs.
            -
            onFrameAvailable(SurfaceTexture) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            onFrameAvailable(SurfaceTexture) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            onMessage(RtspServer, int) - Method in interface net.majorkernelpanic.streaming.rtsp.RtspServer.CallbackListener
            +
            onMessage(RtspServer, int) - Method in interface net.majorkernelpanic.streaming.rtsp.RtspServer.CallbackListener
            Called when streaming starts/stops.
            -
            onPreviewStarted() - Method in interface net.majorkernelpanic.streaming.Session.Callback
            +
            onPreviewStarted() - Method in interface net.majorkernelpanic.streaming.Session.Callback
            -
            Called when the previw of the VideoStream +
            Called when the previw of the VideoStream has correctly been started.
            -
            onRtspUpdate(int, Exception) - Method in interface net.majorkernelpanic.streaming.rtsp.RtspClient.Callback
            +
            onRtspUpdate(int, Exception) - Method in interface net.majorkernelpanic.streaming.rtsp.RtspClient.Callback
             
            -
            onSessionConfigured() - Method in interface net.majorkernelpanic.streaming.Session.Callback
            +
            onSessionConfigured() - Method in interface net.majorkernelpanic.streaming.Session.Callback
            Called when the session has correctly been configured - after calling Session.configure().
            + after calling Session.configure().
            -
            onSessionError(int, int, Exception) - Method in interface net.majorkernelpanic.streaming.Session.Callback
            +
            onSessionError(int, int, Exception) - Method in interface net.majorkernelpanic.streaming.Session.Callback
            Called when some error occurs.
            -
            onSessionStarted() - Method in interface net.majorkernelpanic.streaming.Session.Callback
            +
            onSessionStarted() - Method in interface net.majorkernelpanic.streaming.Session.Callback
            Called when the streams of the session have correctly been started.
            -
            onSessionStopped() - Method in interface net.majorkernelpanic.streaming.Session.Callback
            +
            onSessionStopped() - Method in interface net.majorkernelpanic.streaming.Session.Callback
            Called when the stream of the session have been stopped.
            -
            onStartCommand(Intent, int, int) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            onStartCommand(Intent, int, int) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
             
            - +

            P

            -
            parse(String) - Static method in class net.majorkernelpanic.streaming.mp4.MP4Parser
            +
            parse(String) - Static method in class net.majorkernelpanic.streaming.mp4.MP4Parser
            Parses the mp4 file.
            -
            parse(String) - Static method in class net.majorkernelpanic.streaming.rtsp.UriParser
            +
            parse(String) - Static method in class net.majorkernelpanic.streaming.rtsp.UriParser
            Configures a Session according to the given URI.
            -
            parseQuality(String) - Static method in class net.majorkernelpanic.streaming.audio.AudioQuality
            +
            parseQuality(String) - Static method in class net.majorkernelpanic.streaming.audio.AudioQuality
             
            -
            parseQuality(String) - Static method in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            parseQuality(String) - Static method in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            PIPE_API_LS - Static variable in class net.majorkernelpanic.streaming.MediaStream
            +
            PIPE_API_LS - Static variable in class net.majorkernelpanic.streaming.MediaStream
            A LocalSocket will be used to feed the MediaRecorder object
            -
            PIPE_API_PFD - Static variable in class net.majorkernelpanic.streaming.MediaStream
            +
            PIPE_API_PFD - Static variable in class net.majorkernelpanic.streaming.MediaStream
            A ParcelFileDescriptor will be used to feed the MediaRecorder object
            - +

            R

            -
            read() - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
            +
            read() - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
             
            -
            read(byte[], int, int) - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
            +
            read(byte[], int, int) - Method in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
             
            -
            release() - Method in class net.majorkernelpanic.streaming.gl.SurfaceManager
            +
            release() - Method in class net.majorkernelpanic.streaming.gl.SurfaceManager
            Discards all resources held by this class, notably the EGL context.
            -
            release() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            release() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
             
            -
            release() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            release() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
             
            -
            release() - Method in class net.majorkernelpanic.streaming.Session
            +
            release() - Method in class net.majorkernelpanic.streaming.Session
            Deletes all existing tracks & release associated resources.
            -
            removeCallbackListener(RtspServer.CallbackListener) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            removeCallbackListener(RtspServer.CallbackListener) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Removes the listener.
            -
            removeMediaCodecSurface() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            removeMediaCodecSurface() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            requestAspectRatio(double) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            requestAspectRatio(double) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            Requests a certain aspect ratio for the preview.
            -
            requestBuffer() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            requestBuffer() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Returns an available buffer from the FIFO, it can then be modified.
            -
            reset() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            reset() - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            Resets the reports (total number of bytes sent, number of packets sent, etc.)
            -
            resX - Variable in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            resX - Variable in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            resY - Variable in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            resY - Variable in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            RTP_HEADER_LENGTH - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            RTP_HEADER_LENGTH - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
             
            -
            RtpSocket - Class in net.majorkernelpanic.streaming.rtp
            +
            RtpSocket - Class in net.majorkernelpanic.streaming.rtp
            A basic implementation of an RTP socket.
            -
            RtpSocket() - Constructor for class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            RtpSocket() - Constructor for class net.majorkernelpanic.streaming.rtp.RtpSocket
            This RTP socket implements a buffering mechanism relying on a FIFO of buffers and a Thread.
            -
            RtspClient - Class in net.majorkernelpanic.streaming.rtsp
            +
            RtspClient - Class in net.majorkernelpanic.streaming.rtsp
            RFC 2326.
            -
            RtspClient() - Constructor for class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            RtspClient() - Constructor for class net.majorkernelpanic.streaming.rtsp.RtspClient
             
            -
            RtspClient.Callback - Interface in net.majorkernelpanic.streaming.rtsp
            +
            RtspClient.Callback - Interface in net.majorkernelpanic.streaming.rtsp
            The callback interface you need to implement to know what's going on with the RTSP server (for example your Wowza Media Server).
            -
            RtspServer - Class in net.majorkernelpanic.streaming.rtsp
            +
            RtspServer - Class in net.majorkernelpanic.streaming.rtsp
            Implementation of a subset of the RTSP protocol (RFC 2326).
            -
            RtspServer() - Constructor for class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            RtspServer() - Constructor for class net.majorkernelpanic.streaming.rtsp.RtspServer
             
            -
            RtspServer.CallbackListener - Interface in net.majorkernelpanic.streaming.rtsp
            +
            RtspServer.CallbackListener - Interface in net.majorkernelpanic.streaming.rtsp
            Be careful: those callbacks won't necessarily be called from the ui thread !
            -
            RtspServer.LocalBinder - Class in net.majorkernelpanic.streaming.rtsp
            +
            RtspServer.LocalBinder - Class in net.majorkernelpanic.streaming.rtsp
            The Binder you obtain when a connection with the Service is established.
            -
            RtspServer.LocalBinder() - Constructor for class net.majorkernelpanic.streaming.rtsp.RtspServer.LocalBinder
            +
            run() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            run() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            run() - Method in class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
             
            -
            run() - Method in class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
            +
            run() - Method in class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
             
            -
            run() - Method in class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
            +
            run() - Method in class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
             
            -
            run() - Method in class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
            +
            run() - Method in class net.majorkernelpanic.streaming.rtp.H263Packetizer
             
            -
            run() - Method in class net.majorkernelpanic.streaming.rtp.H263Packetizer
            +
            run() - Method in class net.majorkernelpanic.streaming.rtp.H264Packetizer
             
            -
            run() - Method in class net.majorkernelpanic.streaming.rtp.H264Packetizer
            -
             
            -
            run() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            run() - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            The Thread sends the packets in the FIFO one by one at a constant rate.
            - +

            S

            -
            samplingRate - Variable in class net.majorkernelpanic.streaming.audio.AudioQuality
            +
            samplingRate - Variable in class net.majorkernelpanic.streaming.audio.AudioQuality
             
            -
            SenderReport - Class in net.majorkernelpanic.streaming.rtcp
            +
            SenderReport - Class in net.majorkernelpanic.streaming.rtcp
            Implementation of Sender Report RTCP packets.
            -
            SenderReport(int) - Constructor for class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            SenderReport(int) - Constructor for class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            SenderReport() - Constructor for class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            SenderReport() - Constructor for class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            SERVER_NAME - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            SERVER_NAME - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            The server name that will appear in responses.
            -
            Session - Class in net.majorkernelpanic.streaming
            +
            Session - Class in net.majorkernelpanic.streaming
            -
            You should instantiate this class with the SessionBuilder.
            +
            You should instantiate this class with the SessionBuilder.
            This is the class you will want to use to stream audio and or video to some peer using RTP.
            - It holds a VideoStream and a AudioStream together and provides + It holds a VideoStream and a AudioStream together and provides synchronous and asynchronous functions to start and stop those steams.
            -
            Session() - Constructor for class net.majorkernelpanic.streaming.Session
            +
            Session() - Constructor for class net.majorkernelpanic.streaming.Session
            Creates a streaming session that can be customized by adding tracks.
            -
            Session.Callback - Interface in net.majorkernelpanic.streaming
            +
            Session.Callback - Interface in net.majorkernelpanic.streaming
            The callback interface you need to implement to get some feedback Those will be called from the UI thread.
            -
            SessionBuilder - Class in net.majorkernelpanic.streaming
            +
            SessionBuilder - Class in net.majorkernelpanic.streaming
            -
            Call SessionBuilder.getInstance() to get access to the SessionBuilder.
            +
            Call SessionBuilder.getInstance() to get access to the SessionBuilder.
            -
            setAspectRatio(double) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            +
            setAspectRatio(double) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
             
            -
            setAspectRatioMode(int) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            setAspectRatioMode(int) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            setAudioEncoder(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setAudioEncoder(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Sets the audio encoder.
            -
            setAudioQuality(AudioQuality) - Method in class net.majorkernelpanic.streaming.audio.AudioStream
            +
            setAudioQuality(AudioQuality) - Method in class net.majorkernelpanic.streaming.audio.AudioStream
             
            -
            setAudioQuality(AudioQuality) - Method in class net.majorkernelpanic.streaming.Session
            +
            setAudioQuality(AudioQuality) - Method in class net.majorkernelpanic.streaming.Session
            Sets the configuration of the stream.
            -
            setAudioQuality(AudioQuality) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setAudioQuality(AudioQuality) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Sets the audio quality.
            -
            setAudioSource(int) - Method in class net.majorkernelpanic.streaming.audio.AudioStream
            +
            setAudioSource(int) - Method in class net.majorkernelpanic.streaming.audio.AudioStream
             
            -
            setCacheSize(long) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            setAuthorization(String, String) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            +
            Set Basic authorization to access RTSP Stream
            +
            +
            setCacheSize(long) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Sets the size of the FIFO in ms.
            -
            setCallback(RtspClient.Callback) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            setCallback(RtspClient.Callback) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Sets the callback interface that will be called on status updates of the connection with the RTSP server.
            -
            setCallback(Session.Callback) - Method in class net.majorkernelpanic.streaming.Session
            +
            setCallback(Session.Callback) - Method in class net.majorkernelpanic.streaming.Session
            -
            Sets the callback interface that will be called by the Session.
            +
            Sets the callback interface that will be called by the Session.
            -
            setCallback(Session.Callback) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setCallback(Session.Callback) - Method in class net.majorkernelpanic.streaming.SessionBuilder
             
            -
            setCamera(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setCamera(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
             
            -
            setCamera(int) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            setCamera(int) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Sets the camera that will be used to capture video.
            -
            setClockFrequency(long) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            setClockFrequency(long) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Sets the clock frequency of the stream in Hz.
            -
            setColorPanesReversed(boolean) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            setColorPanesReversed(boolean) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            setContext(Context) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setContext(Context) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Access to the context is needed for the H264Stream class to store some stuff in the SharedPreferences.
            -
            setCredentials(String, String) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            setCredentials(String, String) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            -
            If authentication is enabled on the server, you need to call this with a valid username/password pair.
            +
            If authentication is enabled on the server, you need to call this with a valid login/password pair.
            -
            setDestination(InetAddress, int) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            setDestination(InetAddress, int) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            setDestination(InetAddress, int, int) - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            setDestination(InetAddress, int, int) - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            Sets the destination of the stream.
            -
            setDestination(InetAddress, int, int) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            setDestination(InetAddress, int, int) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Sets the destination address and to which the packets will be sent.
            -
            setDestination(String) - Method in class net.majorkernelpanic.streaming.Session
            +
            setDestination(String) - Method in class net.majorkernelpanic.streaming.Session
            The destination address for all the streams of the session.
            -
            setDestination(String) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setDestination(String) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Sets the destination of the session.
            -
            setDestinationAddress(InetAddress) - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            setDestinationAddress(InetAddress) - Method in class net.majorkernelpanic.streaming.MediaStream
            Sets the destination IP address of the stream.
            -
            setDestinationAddress(InetAddress) - Method in interface net.majorkernelpanic.streaming.Stream
            +
            setDestinationAddress(InetAddress) - Method in interface net.majorkernelpanic.streaming.Stream
            Sets the destination ip address of the stream.
            -
            setDestinationPorts(int) - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            setDestinationPorts(int) - Method in class net.majorkernelpanic.streaming.MediaStream
            Sets the destination ports of the stream.
            -
            setDestinationPorts(int, int) - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            setDestinationPorts(int, int) - Method in class net.majorkernelpanic.streaming.MediaStream
            Sets the destination ports of the stream.
            -
            setDestinationPorts(int) - Method in interface net.majorkernelpanic.streaming.Stream
            +
            setDestinationPorts(int) - Method in interface net.majorkernelpanic.streaming.Stream
            Sets the destination ports of the stream.
            -
            setDestinationPorts(int, int) - Method in interface net.majorkernelpanic.streaming.Stream
            +
            setDestinationPorts(int, int) - Method in interface net.majorkernelpanic.streaming.Stream
            Sets the destination ports of the stream.
            -
            setEncoderColorFormat(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            setEncoderColorFormat(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            setFlashEnabled(boolean) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setFlashEnabled(boolean) - Method in class net.majorkernelpanic.streaming.SessionBuilder
             
            -
            setFlashState(boolean) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            setFlashState(boolean) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Turns the LED on or off if phone has one.
            -
            setInputStream(InputStream) - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            setInputStream(InputStream) - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
             
            -
            setInterval(long) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            setInterval(long) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            Sets the temporal interval between two RTCP Sender Reports.
            -
            setOrigin(String) - Method in class net.majorkernelpanic.streaming.Session
            +
            setOrigin(String) - Method in class net.majorkernelpanic.streaming.Session
            The origin address of the session.
            -
            setOrigin(String) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setOrigin(String) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Sets the origin of the session.
            -
            setOutputStream(OutputStream, byte) - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            setOutputStream(OutputStream, byte) - Method in class net.majorkernelpanic.streaming.MediaStream
            If a TCP is used as the transport protocol for the RTP session, the output stream to which RTP packets will be written to must be specified with this method.
            -
            setOutputStream(OutputStream, byte) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            setOutputStream(OutputStream, byte) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            If a TCP is used as the transport protocol for the RTP session, the output stream to which RTP packets will be written to must be specified with this method.
            -
            setOutputStream(OutputStream, byte) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            setOutputStream(OutputStream, byte) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            If a TCP is used as the transport protocol for the RTP session, the output stream to which RTP packets will be written to must be specified with this method.
            -
            setOutputStream(OutputStream, byte) - Method in interface net.majorkernelpanic.streaming.Stream
            +
            setOutputStream(OutputStream, byte) - Method in interface net.majorkernelpanic.streaming.Stream
            If a TCP is used as the transport protocol for the RTP session, the output stream to which RTP packets will be written to must be specified with this method.
            -
            setPlanar(boolean) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            setPlanar(boolean) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            setPort(int) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            setPort(int) - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Sets the port for the RTSP server to use.
            -
            setPreferences(SharedPreferences) - Method in class net.majorkernelpanic.streaming.audio.AACStream
            +
            setPreferences(SharedPreferences) - Method in class net.majorkernelpanic.streaming.audio.AACStream
            -
            Some data (the actual sampling rate used by the phone and the AAC profile) needs to be stored once AACStream.getSessionDescription() is called.
            +
            Some data (the actual sampling rate used by the phone and the AAC profile) needs to be stored once AACStream.getSessionDescription() is called.
            -
            setPreferences(SharedPreferences) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            setPreferences(SharedPreferences) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            -
            Some data (SPS and PPS params) needs to be stored when getSessionDescription() is called
            +
            Some data (SPS and PPS params) needs to be stored when getSessionDescription() is called
            -
            setPresentationTime(long) - Method in class net.majorkernelpanic.streaming.gl.SurfaceManager
            +
            setPresentationTime(long) - Method in class net.majorkernelpanic.streaming.gl.SurfaceManager
            Sends the presentation time stamp to EGL.
            -
            setPreviewOrientation(int) - Method in class net.majorkernelpanic.streaming.Session
            +
            setPreviewOrientation(int) - Method in class net.majorkernelpanic.streaming.Session
            Sets the orientation of the preview.
            -
            setPreviewOrientation(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setPreviewOrientation(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Sets the orientation of the preview.
            -
            setPreviewOrientation(int) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            setPreviewOrientation(int) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Sets the orientation of the preview.
            -
            setSamplingRate(int) - Method in class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
            +
            setSamplingRate(int) - Method in class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
             
            -
            setSamplingRate(int) - Method in class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
            +
            setSamplingRate(int) - Method in class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
             
            -
            setServerAddress(String, int) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            setServerAddress(String, int) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Sets the destination address of the RTSP server.
            -
            setSession(Session) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            setSession(Session) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            -
            The Session that will be used to stream to the server.
            +
            The Session that will be used to stream to the server.
            -
            setSize(int, int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            setSize(int, int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            setSliceHeigth(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            setSliceHeigth(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            setSSRC(int) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            setSSRC(int) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
             
            -
            setSSRC(int) - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            setSSRC(int) - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
             
            -
            setSSRC(int) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            setSSRC(int) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Sets the SSRC of the stream.
            -
            setStreamingMethod(byte) - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            setStreamingMethod(byte) - Method in class net.majorkernelpanic.streaming.MediaStream
            Sets the streaming method that will be used.
            -
            setStreamParameters(byte[], byte[]) - Method in class net.majorkernelpanic.streaming.rtp.H264Packetizer
            +
            setStreamParameters(byte[], byte[]) - Method in class net.majorkernelpanic.streaming.rtp.H264Packetizer
             
            -
            setStreamPath(String) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            setStreamPath(String) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            The path to which the stream will be sent to.
            -
            setStride(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            setStride(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            setSurfaceView(SurfaceView) - Method in class net.majorkernelpanic.streaming.Session
            +
            setSurfaceView(SurfaceView) - Method in class net.majorkernelpanic.streaming.Session
            Sets a Surface to show a preview of recorded media (video).
            -
            setSurfaceView(SurfaceView) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setSurfaceView(SurfaceView) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Sets the SurfaceView required to preview the video stream.
            -
            setSurfaceView(SurfaceView) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            setSurfaceView(SurfaceView) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Sets a Surface to show a preview of recorded media (video).
            -
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.MediaStream
            Sets the Time To Live of packets sent over the network.
            -
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
             
            -
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Sets the Time To Live of the UDP packets.
            -
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.Session
            +
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.Session
            Set the TTL of all packets sent during the session.
            -
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setTimeToLive(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
             
            -
            setTimeToLive(int) - Method in interface net.majorkernelpanic.streaming.Stream
            +
            setTimeToLive(int) - Method in interface net.majorkernelpanic.streaming.Stream
            Sets the Time To Live of packets sent over the network.
            -
            setTransportMode(int) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            setTransportMode(int) - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            -
            Call this with RtspClient.TRANSPORT_TCP or 0 to choose the +
            Call this with RtspClient.TRANSPORT_TCP or 0 to choose the transport protocol that will be used to send RTP/RTCP packets.
            -
            setVideoEncoder(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setVideoEncoder(int) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Sets the default video encoder.
            -
            setVideoQuality(VideoQuality) - Method in class net.majorkernelpanic.streaming.Session
            +
            setVideoQuality(VideoQuality) - Method in class net.majorkernelpanic.streaming.Session
            Sets the configuration of the stream.
            -
            setVideoQuality(VideoQuality) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            +
            setVideoQuality(VideoQuality) - Method in class net.majorkernelpanic.streaming.SessionBuilder
            Sets the video stream quality.
            -
            setVideoQuality(VideoQuality) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            setVideoQuality(VideoQuality) - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Sets the configuration of the stream.
            -
            setYPadding(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
            +
            setYPadding(int) - Method in class net.majorkernelpanic.streaming.hw.NV21Convertor
             
            -
            SOFTWARE_ENCODERS - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
            +
            SOFTWARE_ENCODERS - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
            There currently is no way to know if an encoder is software or hardware from the MediaCodecInfo class, so we need to maintain a list of known software encoders.
            -
            start() - Method in class net.majorkernelpanic.streaming.audio.AACStream
            +
            start() - Method in class net.majorkernelpanic.streaming.audio.AACStream
             
            -
            start() - Method in class net.majorkernelpanic.streaming.audio.AMRNBStream
            +
            start() - Method in class net.majorkernelpanic.streaming.audio.AMRNBStream
            Starts the stream.
            -
            start() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            start() - Method in class net.majorkernelpanic.streaming.MediaStream
            Starts the stream.
            -
            start() - Method in class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
            +
            start() - Method in class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
             
            -
            start() - Method in class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
            +
            start() - Method in class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
             
            -
            start() - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            start() - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            Starts the packetizer.
            -
            start() - Method in class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
            +
            start() - Method in class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
             
            -
            start() - Method in class net.majorkernelpanic.streaming.rtp.H263Packetizer
            +
            start() - Method in class net.majorkernelpanic.streaming.rtp.H263Packetizer
             
            -
            start() - Method in class net.majorkernelpanic.streaming.rtp.H264Packetizer
            +
            start() - Method in class net.majorkernelpanic.streaming.rtp.H264Packetizer
             
            -
            start() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            start() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Starts (or restart if needed, if for example the configuration of the server has been modified) the RTSP server.
            -
            start() - Method in class net.majorkernelpanic.streaming.Session
            +
            start() - Method in class net.majorkernelpanic.streaming.Session
            Asynchronously starts all streams of the session.
            -
            start() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            start() - Method in interface net.majorkernelpanic.streaming.Stream
            Starts the stream.
            -
            start() - Method in class net.majorkernelpanic.streaming.video.H263Stream
            +
            start() - Method in class net.majorkernelpanic.streaming.video.H263Stream
            Starts the stream.
            -
            start() - Method in class net.majorkernelpanic.streaming.video.H264Stream
            +
            start() - Method in class net.majorkernelpanic.streaming.video.H264Stream
            Starts the stream.
            -
            start() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            start() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Starts the stream.
            -
            startGLThread() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            startGLThread() - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            startPreview() - Method in class net.majorkernelpanic.streaming.Session
            +
            startPreview() - Method in class net.majorkernelpanic.streaming.Session
            Asynchronously starts the camera preview.
            -
            startPreview() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            startPreview() - Method in class net.majorkernelpanic.streaming.video.VideoStream
             
            -
            startStream() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            startStream() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Connects to the RTSP server to publish the stream, and the effectively starts streaming.
            -
            stop() - Method in class net.majorkernelpanic.streaming.audio.AACStream
            +
            stop() - Method in class net.majorkernelpanic.streaming.audio.AACStream
            Stops the stream.
            -
            stop() - Method in class net.majorkernelpanic.streaming.MediaStream
            +
            stop() - Method in class net.majorkernelpanic.streaming.MediaStream
            Stops the stream.
            -
            stop() - Method in class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
            +
            stop() - Method in class net.majorkernelpanic.streaming.rtp.AACADTSPacketizer
             
            -
            stop() - Method in class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
            +
            stop() - Method in class net.majorkernelpanic.streaming.rtp.AACLATMPacketizer
             
            -
            stop() - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            +
            stop() - Method in class net.majorkernelpanic.streaming.rtp.AbstractPacketizer
            Stops the packetizer.
            -
            stop() - Method in class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
            +
            stop() - Method in class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
             
            -
            stop() - Method in class net.majorkernelpanic.streaming.rtp.H263Packetizer
            +
            stop() - Method in class net.majorkernelpanic.streaming.rtp.H263Packetizer
             
            -
            stop() - Method in class net.majorkernelpanic.streaming.rtp.H264Packetizer
            +
            stop() - Method in class net.majorkernelpanic.streaming.rtp.H264Packetizer
             
            -
            stop() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            stop() - Method in class net.majorkernelpanic.streaming.rtsp.RtspServer
            Stops the RTSP server but not the Android Service.
            -
            stop() - Method in class net.majorkernelpanic.streaming.Session
            +
            stop() - Method in class net.majorkernelpanic.streaming.Session
            Stops all existing streams.
            -
            stop() - Method in interface net.majorkernelpanic.streaming.Stream
            +
            stop() - Method in interface net.majorkernelpanic.streaming.Stream
            Stops the stream.
            -
            stop() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            stop() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Stops the stream.
            -
            stopPreview() - Method in class net.majorkernelpanic.streaming.Session
            +
            stopPreview() - Method in class net.majorkernelpanic.streaming.Session
            Asynchronously stops the camera preview.
            -
            stopPreview() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            stopPreview() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Stops the preview.
            -
            stopStream() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            stopStream() - Method in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Stops the stream, and informs the RTSP server.
            -
            StorageUnavailableException - Exception in net.majorkernelpanic.streaming.exceptions
            +
            StorageUnavailableException - Exception in net.majorkernelpanic.streaming.exceptions
             
            -
            StorageUnavailableException(String) - Constructor for exception net.majorkernelpanic.streaming.exceptions.StorageUnavailableException
            +
            StorageUnavailableException(String) - Constructor for exception net.majorkernelpanic.streaming.exceptions.StorageUnavailableException
             
            -
            Stream - Interface in net.majorkernelpanic.streaming
            +
            Stream - Interface in net.majorkernelpanic.streaming
            An interface that represents a Stream.
            -
            STREAM_AUDIO - Static variable in class net.majorkernelpanic.streaming.Session
            +
            STREAM_AUDIO - Static variable in class net.majorkernelpanic.streaming.Session
             
            -
            STREAM_VIDEO - Static variable in class net.majorkernelpanic.streaming.Session
            +
            STREAM_VIDEO - Static variable in class net.majorkernelpanic.streaming.Session
             
            -
            SUPPORTED_COLOR_FORMATS - Static variable in class net.majorkernelpanic.streaming.hw.CodecManager
            +
            SUPPORTED_COLOR_FORMATS - Static variable in class net.majorkernelpanic.streaming.hw.CodecManager
             
            -
            SUPPORTED_COLOR_FORMATS - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
            +
            SUPPORTED_COLOR_FORMATS - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
             
            -
            surfaceChanged(SurfaceHolder, int, int, int) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            surfaceChanged(SurfaceHolder, int, int, int) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            surfaceCreated(SurfaceHolder) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            surfaceCreated(SurfaceHolder) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            surfaceDestroyed(SurfaceHolder) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            surfaceDestroyed(SurfaceHolder) - Method in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            SurfaceManager - Class in net.majorkernelpanic.streaming.gl
            +
            SurfaceManager - Class in net.majorkernelpanic.streaming.gl
             
            -
            SurfaceManager(Surface, SurfaceManager) - Constructor for class net.majorkernelpanic.streaming.gl.SurfaceManager
            +
            SurfaceManager(Surface, SurfaceManager) - Constructor for class net.majorkernelpanic.streaming.gl.SurfaceManager
            Creates an EGL context and an EGL surface.
            -
            SurfaceManager(Surface) - Constructor for class net.majorkernelpanic.streaming.gl.SurfaceManager
            +
            SurfaceManager(Surface) - Constructor for class net.majorkernelpanic.streaming.gl.SurfaceManager
            Creates an EGL context and an EGL surface.
            -
            SurfaceView - Class in net.majorkernelpanic.streaming.gl
            +
            SurfaceView - Class in net.majorkernelpanic.streaming.gl
            An enhanced SurfaceView in which the camera preview will be rendered.
            -
            SurfaceView(Context, AttributeSet) - Constructor for class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            SurfaceView(Context, AttributeSet) - Constructor for class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            SurfaceView.ViewAspectRatioMeasurer - Class in net.majorkernelpanic.streaming.gl
            +
            SurfaceView.ViewAspectRatioMeasurer - Class in net.majorkernelpanic.streaming.gl
            This class is a helper to measure views that require a specific aspect ratio.
            -
            SurfaceView.ViewAspectRatioMeasurer() - Constructor for class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            +
            swapBuffer() - Method in class net.majorkernelpanic.streaming.gl.SurfaceManager
             
            -
            swapBuffer() - Method in class net.majorkernelpanic.streaming.gl.SurfaceManager
            -
             
            -
            switchCamera() - Method in class net.majorkernelpanic.streaming.Session
            +
            switchCamera() - Method in class net.majorkernelpanic.streaming.Session
            Switch between the front facing and the back facing camera of the phone.
            -
            switchCamera() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            switchCamera() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Switch between the front facing and the back facing camera of the phone.
            -
            syncConfigure() - Method in class net.majorkernelpanic.streaming.Session
            +
            syncConfigure() - Method in class net.majorkernelpanic.streaming.Session
            -
            Does the same thing as Session.configure(), but in a synchronous manner.
            +
            Does the same thing as Session.configure(), but in a synchronous manner.
            -
            syncStart(int) - Method in class net.majorkernelpanic.streaming.Session
            +
            syncStart(int) - Method in class net.majorkernelpanic.streaming.Session
            Starts a stream in a synchronous manner.
            -
            syncStart() - Method in class net.majorkernelpanic.streaming.Session
            +
            syncStart() - Method in class net.majorkernelpanic.streaming.Session
            -
            Does the same thing as Session.start(), but in a synchronous manner.
            +
            Does the same thing as Session.start(), but in a synchronous manner.
            -
            syncStop() - Method in class net.majorkernelpanic.streaming.Session
            +
            syncStop() - Method in class net.majorkernelpanic.streaming.Session
            Stops all existing streams in a synchronous manner.
            - +

            T

            -
            TAG - Static variable in class net.majorkernelpanic.streaming.audio.AACStream
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.audio.AACStream
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.gl.SurfaceManager
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.gl.SurfaceManager
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.gl.SurfaceView
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.gl.SurfaceView
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.gl.TextureManager
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.hw.CodecManager
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.hw.CodecManager
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.hw.EncoderDebugger
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.hw.EncoderDebugger
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.mp4.MP4Config
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.mp4.MP4Config
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.rtp.AMRNBPacketizer
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.rtp.H263Packetizer
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.rtp.H263Packetizer
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.rtp.H264Packetizer
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.rtp.H264Packetizer
             
            -
            TAG - Variable in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
            +
            TAG - Variable in class net.majorkernelpanic.streaming.rtp.MediaCodecInputStream
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspServer
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.rtsp.UriParser
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.rtsp.UriParser
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.Session
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.Session
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.video.CodecManager
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.video.H264Stream
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.video.H264Stream
             
            -
            TAG - Static variable in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            TAG - Static variable in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            TextureManager - Class in net.majorkernelpanic.streaming.gl
            +
            TextureManager - Class in net.majorkernelpanic.streaming.gl
            Code for rendering a texture onto a surface using OpenGL ES 2.0.
            -
            TextureManager() - Constructor for class net.majorkernelpanic.streaming.gl.TextureManager
            +
            TextureManager() - Constructor for class net.majorkernelpanic.streaming.gl.TextureManager
             
            -
            toggleFlash() - Method in class net.majorkernelpanic.streaming.Session
            +
            toggleFlash() - Method in class net.majorkernelpanic.streaming.Session
            Toggles the LED of the phone if it has one.
            -
            toggleFlash() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            +
            toggleFlash() - Method in class net.majorkernelpanic.streaming.video.VideoStream
            Toggles the LED of the phone if it has one.
            -
            toString() - Method in class net.majorkernelpanic.streaming.video.VideoQuality
            +
            toString() - Method in class net.majorkernelpanic.streaming.video.VideoQuality
             
            -
            trackExists(int) - Method in class net.majorkernelpanic.streaming.Session
            +
            trackExists(int) - Method in class net.majorkernelpanic.streaming.Session
             
            -
            TRANSPORT_TCP - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            TRANSPORT_TCP - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Use this to use TCP for the transport protocol.
            -
            TRANSPORT_TCP - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            TRANSPORT_TCP - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Use this to use TCP for the transport protocol.
            -
            TRANSPORT_UDP - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            TRANSPORT_UDP - Static variable in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Use this to use UDP for the transport protocol.
            -
            TRANSPORT_UDP - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            +
            TRANSPORT_UDP - Static variable in class net.majorkernelpanic.streaming.rtsp.RtspClient
            Use this to use UDP for the transport protocol.
            - +

            U

            -
            update(int, long) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            +
            update(int, long) - Method in class net.majorkernelpanic.streaming.rtcp.SenderReport
            Updates the number of packets sent, and the total amount of data sent.
            -
            updateFrame() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
            +
            updateFrame() - Method in class net.majorkernelpanic.streaming.gl.TextureManager
             
            -
            updateTimestamp(long) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            +
            updateTimestamp(long) - Method in class net.majorkernelpanic.streaming.rtp.RtpSocket
            Overwrites the timestamp in the packet.
            -
            UriParser - Class in net.majorkernelpanic.streaming.rtsp
            +
            UriParser - Class in net.majorkernelpanic.streaming.rtsp
            This class parses URIs received by the RTSP server and configures a Session accordingly.
            -
            UriParser() - Constructor for class net.majorkernelpanic.streaming.rtsp.UriParser
            +
            UriParser() - Constructor for class net.majorkernelpanic.streaming.rtsp.UriParser
             
            - +

            V

            -
            VIDEO_H263 - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            +
            VIDEO_H263 - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            - +
            -
            VIDEO_H264 - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            +
            VIDEO_H264 - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            - +
            -
            VIDEO_NONE - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            +
            VIDEO_NONE - Static variable in class net.majorkernelpanic.streaming.SessionBuilder
            - +
            -
            VideoQuality - Class in net.majorkernelpanic.streaming.video
            +
            VideoQuality - Class in net.majorkernelpanic.streaming.video
            A class that represents the quality of a video stream.
            -
            VideoQuality() - Constructor for class net.majorkernelpanic.streaming.video.VideoQuality
            +
            VideoQuality() - Constructor for class net.majorkernelpanic.streaming.video.VideoQuality
            Represents a quality for a video stream.
            -
            VideoQuality(int, int) - Constructor for class net.majorkernelpanic.streaming.video.VideoQuality
            +
            VideoQuality(int, int) - Constructor for class net.majorkernelpanic.streaming.video.VideoQuality
            Represents a quality for a video stream.
            -
            VideoQuality(int, int, int, int) - Constructor for class net.majorkernelpanic.streaming.video.VideoQuality
            +
            VideoQuality(int, int, int, int) - Constructor for class net.majorkernelpanic.streaming.video.VideoQuality
            Represents a quality for a video stream.
            -
            VideoStream - Class in net.majorkernelpanic.streaming.video
            +
            VideoStream - Class in net.majorkernelpanic.streaming.video
            Don't use this class directly.
            -
            VideoStream() - Constructor for class net.majorkernelpanic.streaming.video.VideoStream
            +
            VideoStream() - Constructor for class net.majorkernelpanic.streaming.video.VideoStream
            Don't use this class directly.
            -
            VideoStream(int) - Constructor for class net.majorkernelpanic.streaming.video.VideoStream
            +
            VideoStream(int) - Constructor for class net.majorkernelpanic.streaming.video.VideoStream
            Don't use this class directly
            +
            ViewAspectRatioMeasurer() - Constructor for class net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
            +
             
            -A B C D E F G H I K M N O P R S T U V  +A B C D E F G H I K L M N O P R S T U V  -
            + diff --git a/doc/index.html b/doc/index.html index 325349a5..30ded234 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,14 +2,15 @@ - + Generated Documentation (Untitled) -
            +
            - + + +
            net.majorkernelpanic.streaming.video.VideoQuality 
            Modifier and Type
            +
            @@ -104,9 +111,11 @@

            Package net.majorkernelpanic.streaming.au -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/audio/package-tree.html b/doc/net/majorkernelpanic/streaming/audio/package-tree.html index 9cd39d27..9131a032 100644 --- a/doc/net/majorkernelpanic/streaming/audio/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/audio/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.audio Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.audio

            -Package Hierarchies: +Package Hierarchies: @@ -73,13 +80,13 @@

            Class Hierarchy

            • java.lang.Object
                -
              • net.majorkernelpanic.streaming.audio.AudioQuality
              • -
              • net.majorkernelpanic.streaming.MediaStream (implements net.majorkernelpanic.streaming.Stream) +
              • net.majorkernelpanic.streaming.audio.AudioQuality
              • +
              • net.majorkernelpanic.streaming.MediaStream (implements net.majorkernelpanic.streaming.Stream) @@ -89,9 +96,11 @@

                Class Hierarchy

            -
            +
            - + + +
            - +
            diff --git a/doc/net/majorkernelpanic/streaming/exceptions/CameraInUseException.html b/doc/net/majorkernelpanic/streaming/exceptions/CameraInUseException.html index 3b9a8cd6..5b4fc1aa 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/CameraInUseException.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/CameraInUseException.html @@ -2,15 +2,20 @@ - + CameraInUseException - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +

            Class Summary 
            Class
            +
            @@ -96,9 +103,11 @@

            Package net.majorkernelpanic.streaming.ex -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/exceptions/package-tree.html b/doc/net/majorkernelpanic/streaming/exceptions/package-tree.html index 4c797775..3d2fd853 100644 --- a/doc/net/majorkernelpanic/streaming/exceptions/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/exceptions/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.exceptions Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.exceptions

            -Package Hierarchies: +Package Hierarchies: @@ -79,14 +86,14 @@

            Class Hierarchy

            @@ -98,9 +105,11 @@

            Class Hierarchy

            -
            +
            - + + +
            - +
            diff --git a/doc/net/majorkernelpanic/streaming/gl/SurfaceManager.html b/doc/net/majorkernelpanic/streaming/gl/SurfaceManager.html index af1f11a1..1081e283 100644 --- a/doc/net/majorkernelpanic/streaming/gl/SurfaceManager.html +++ b/doc/net/majorkernelpanic/streaming/gl/SurfaceManager.html @@ -2,25 +2,38 @@ - + SurfaceManager - + + -
            +
            - + + +

            Exception Summary 
            Exception
            +
            @@ -96,9 +103,11 @@

            Package net.majorkernelpanic.streaming.gl -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/gl/package-tree.html b/doc/net/majorkernelpanic/streaming/gl/package-tree.html index bc7eab44..546a83fc 100644 --- a/doc/net/majorkernelpanic/streaming/gl/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/gl/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.gl Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.gl

            -Package Hierarchies: +Package Hierarchies: @@ -73,26 +80,24 @@

            Class Hierarchy

            • java.lang.Object
                -
              • net.majorkernelpanic.streaming.gl.SurfaceManager
              • -
              • net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
              • -
              • net.majorkernelpanic.streaming.gl.TextureManager
              • -
              • android.view.View (implements android.view.accessibility.AccessibilityEventSource, android.graphics.drawable.Drawable.Callback, android.view.KeyEvent.Callback) -
                  +
                • net.majorkernelpanic.streaming.gl.SurfaceManager
                • android.view.SurfaceView
                    -
                  • net.majorkernelpanic.streaming.gl.SurfaceView (implements java.lang.Runnable, android.view.SurfaceHolder.Callback, android.graphics.SurfaceTexture.OnFrameAvailableListener)
                  • -
                  -
                • +
                • net.majorkernelpanic.streaming.gl.SurfaceView (implements java.lang.Runnable)
              • +
              • net.majorkernelpanic.streaming.gl.SurfaceView.ViewAspectRatioMeasurer
              • +
              • net.majorkernelpanic.streaming.gl.TextureManager
            -
            +
            - + + +
            - +
            diff --git a/doc/net/majorkernelpanic/streaming/hw/CodecManager.html b/doc/net/majorkernelpanic/streaming/hw/CodecManager.html index 18b07773..49600fdd 100644 --- a/doc/net/majorkernelpanic/streaming/hw/CodecManager.html +++ b/doc/net/majorkernelpanic/streaming/hw/CodecManager.html @@ -2,25 +2,38 @@ - + CodecManager - + + -
            +
            - + + +

            Class Summary 
            Class
            +
            @@ -97,9 +104,11 @@

            Package net.majorkernelpanic.streaming.hw -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/hw/package-tree.html b/doc/net/majorkernelpanic/streaming/hw/package-tree.html index b09feac2..df8bac81 100644 --- a/doc/net/majorkernelpanic/streaming/hw/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/hw/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.hw Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.hw

            -Package Hierarchies: +Package Hierarchies: @@ -73,17 +80,19 @@

            Class Hierarchy

            -
            +
            - + + +
            - +
            diff --git a/doc/net/majorkernelpanic/streaming/mp4/MP4Config.html b/doc/net/majorkernelpanic/streaming/mp4/MP4Config.html index d96de014..af1eb840 100644 --- a/doc/net/majorkernelpanic/streaming/mp4/MP4Config.html +++ b/doc/net/majorkernelpanic/streaming/mp4/MP4Config.html @@ -2,25 +2,38 @@ - + MP4Config - + + -
            +
            - + + +

            Class Summary 
            Class
            +
            @@ -92,9 +99,11 @@

            Package net.majorkernelpanic.streaming.mp -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/mp4/package-tree.html b/doc/net/majorkernelpanic/streaming/mp4/package-tree.html index e97f0414..428a6983 100644 --- a/doc/net/majorkernelpanic/streaming/mp4/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/mp4/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.mp4 Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.mp4

            -Package Hierarchies: +Package Hierarchies: @@ -73,16 +80,18 @@

            Class Hierarchy

            • java.lang.Object
                -
              • net.majorkernelpanic.streaming.mp4.MP4Config
              • -
              • net.majorkernelpanic.streaming.mp4.MP4Parser
              • +
              • net.majorkernelpanic.streaming.mp4.MP4Config
              • +
              • net.majorkernelpanic.streaming.mp4.MP4Parser
            -
            +
            - + + +
            - +
            diff --git a/doc/net/majorkernelpanic/streaming/package-frame.html b/doc/net/majorkernelpanic/streaming/package-frame.html index 4553b4b9..9835b689 100644 --- a/doc/net/majorkernelpanic/streaming/package-frame.html +++ b/doc/net/majorkernelpanic/streaming/package-frame.html @@ -2,18 +2,19 @@ - + net.majorkernelpanic.streaming - + +

            net.majorkernelpanic.streaming

            Interfaces

            Classes

              diff --git a/doc/net/majorkernelpanic/streaming/package-summary.html b/doc/net/majorkernelpanic/streaming/package-summary.html index 8c9cbc15..816273ac 100644 --- a/doc/net/majorkernelpanic/streaming/package-summary.html +++ b/doc/net/majorkernelpanic/streaming/package-summary.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming - + + @@ -18,9 +23,11 @@
              JavaScript is disabled on your browser.
              -
              +
              - + + +
              @@ -67,7 +74,7 @@

              Package net.majorkernelpanic.streaming
              • -

            Class Summary 
            Class
            +
            @@ -91,7 +98,7 @@

            Package net.majorkernelpanic.streaming
          • -
          • Interface Summary 
            Interface
            +
            @@ -117,7 +124,7 @@

            Package net.majorkernelpanic.streaming

            @@ -126,9 +133,11 @@

            Package net.majorkernelpanic.streaming -
            +
            - + + +

            Class Summary 
            ClassSessionBuilder -
            Call SessionBuilder.getInstance() to get access to the SessionBuilder.
            +
            Call SessionBuilder.getInstance() to get access to the SessionBuilder.
            +
            @@ -86,9 +93,11 @@

            Package net.majorkernelpanic.streaming.rt -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/rtcp/package-tree.html b/doc/net/majorkernelpanic/streaming/rtcp/package-tree.html index a3ca9cac..e19f0879 100644 --- a/doc/net/majorkernelpanic/streaming/rtcp/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/rtcp/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.rtcp Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.rtcp

            -Package Hierarchies: +Package Hierarchies: @@ -73,15 +80,17 @@

            Class Hierarchy

            -
            +
            - + + +
            - +
            diff --git a/doc/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html b/doc/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html index 31c9d0fa..b73e4dfe 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html +++ b/doc/net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html @@ -2,25 +2,38 @@ - + AACADTSPacketizer - + + -
            +
            - + + +

            Class Summary 
            Class
            +
            @@ -128,9 +135,11 @@

            Package net.majorkernelpanic.streaming.rt -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/rtp/package-tree.html b/doc/net/majorkernelpanic/streaming/rtp/package-tree.html index 13c9760b..b6c6d1b8 100644 --- a/doc/net/majorkernelpanic/streaming/rtp/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/rtp/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.rtp Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.rtp

            -Package Hierarchies: +Package Hierarchies: @@ -73,29 +80,31 @@

            Class Hierarchy

            • java.lang.Object
                -
              • net.majorkernelpanic.streaming.rtp.AbstractPacketizer +
              • net.majorkernelpanic.streaming.rtp.AbstractPacketizer
                  -
                • net.majorkernelpanic.streaming.rtp.AACADTSPacketizer (implements java.lang.Runnable)
                • -
                • net.majorkernelpanic.streaming.rtp.AACLATMPacketizer (implements java.lang.Runnable)
                • -
                • net.majorkernelpanic.streaming.rtp.AMRNBPacketizer (implements java.lang.Runnable)
                • -
                • net.majorkernelpanic.streaming.rtp.H263Packetizer (implements java.lang.Runnable)
                • -
                • net.majorkernelpanic.streaming.rtp.H264Packetizer (implements java.lang.Runnable)
                • +
                • net.majorkernelpanic.streaming.rtp.AACADTSPacketizer (implements java.lang.Runnable)
                • +
                • net.majorkernelpanic.streaming.rtp.AACLATMPacketizer (implements java.lang.Runnable)
                • +
                • net.majorkernelpanic.streaming.rtp.AMRNBPacketizer (implements java.lang.Runnable)
                • +
                • net.majorkernelpanic.streaming.rtp.H263Packetizer (implements java.lang.Runnable)
                • +
                • net.majorkernelpanic.streaming.rtp.H264Packetizer (implements java.lang.Runnable)
              • java.io.InputStream (implements java.io.Closeable)
              • -
              • net.majorkernelpanic.streaming.rtp.RtpSocket (implements java.lang.Runnable)
              • +
              • net.majorkernelpanic.streaming.rtp.RtpSocket (implements java.lang.Runnable)
            -
            +
            - + + +
            - +
            diff --git a/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html b/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html index 5e9fbf44..9e6d4853 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html @@ -2,25 +2,38 @@ - + RtspClient.Callback - + + -
            +
            - + + +

            Class Summary 
            Class
            +
            @@ -91,7 +98,7 @@

            Package net.majorkernelpanic.streaming.rt

            Interface Summary 
            Interface
          • - +
            @@ -122,9 +129,11 @@

            Package net.majorkernelpanic.streaming.rt -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html b/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html index 6120f36b..00d3cd30 100644 --- a/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/rtsp/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.rtsp Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.rtsp

            -Package Hierarchies: +Package Hierarchies: @@ -73,39 +80,33 @@

            Class Hierarchy

            • java.lang.Object
                -
              • android.os.Binder (implements android.os.IBinder) +
              • Binder
              • -
              • android.content.Context -
                  -
                • android.content.ContextWrapper +
                • net.majorkernelpanic.streaming.rtsp.RtspClient
                • +
                • Service
                    -
                  • android.app.Service (implements android.content.ComponentCallbacks2) -
                  • -
                  -
                • -
                -
              • -
              • net.majorkernelpanic.streaming.rtsp.RtspClient
              • -
              • net.majorkernelpanic.streaming.rtsp.UriParser
              • +
              • net.majorkernelpanic.streaming.rtsp.UriParser

            Interface Hierarchy

            -
            +
            - + + +
            - +
            diff --git a/doc/net/majorkernelpanic/streaming/video/CodecManager.html b/doc/net/majorkernelpanic/streaming/video/CodecManager.html index baad72fc..d05284ca 100644 --- a/doc/net/majorkernelpanic/streaming/video/CodecManager.html +++ b/doc/net/majorkernelpanic/streaming/video/CodecManager.html @@ -2,15 +2,20 @@ - + CodecManager - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +

            Class Summary 
            Class
            +
            @@ -108,9 +115,11 @@

            Package net.majorkernelpanic.streaming.vi -
            +
            - + + +
            diff --git a/doc/net/majorkernelpanic/streaming/video/package-tree.html b/doc/net/majorkernelpanic/streaming/video/package-tree.html index 984a23de..69f9de58 100644 --- a/doc/net/majorkernelpanic/streaming/video/package-tree.html +++ b/doc/net/majorkernelpanic/streaming/video/package-tree.html @@ -2,15 +2,20 @@ - + net.majorkernelpanic.streaming.video Class Hierarchy - + + @@ -18,9 +23,11 @@
            JavaScript is disabled on your browser.
            -
            +
            - + + +
            - +

            Hierarchy For Package net.majorkernelpanic.streaming.video

            -Package Hierarchies: +Package Hierarchies: @@ -73,26 +80,28 @@

            Class Hierarchy

            -
            +
            - + + +
            - +
            diff --git a/doc/overview-frame.html b/doc/overview-frame.html index 018162bd..fa0d2a2b 100644 --- a/doc/overview-frame.html +++ b/doc/overview-frame.html @@ -2,13 +2,14 @@ - + Overview List - + + - +

            Packages

              diff --git a/doc/overview-summary.html b/doc/overview-summary.html index 69a5ba16..757c436c 100644 --- a/doc/overview-summary.html +++ b/doc/overview-summary.html @@ -2,15 +2,20 @@ - + Overview - + + @@ -18,9 +23,11 @@
              JavaScript is disabled on your browser.
              -
              +
              - + + +
              - +
              @@ -113,9 +120,11 @@

            Class Summary 
            Class
          -
          +
          - + + +
          - +
          diff --git a/doc/overview-tree.html b/doc/overview-tree.html index 949d8801..710ff40d 100644 --- a/doc/overview-tree.html +++ b/doc/overview-tree.html @@ -2,15 +2,20 @@ - + Class Hierarchy - + + @@ -18,9 +23,11 @@
          JavaScript is disabled on your browser.
          -
          +
          - + + +
          - +

          Hierarchy For All Packages

          -Package Hierarchies: +Package Hierarchies:
          -
          +
          - + + +
          - +
          diff --git a/doc/serialized-form.html b/doc/serialized-form.html index ce154241..4faeda5d 100644 --- a/doc/serialized-form.html +++ b/doc/serialized-form.html @@ -2,15 +2,20 @@ - + Serialized Form - + + @@ -18,9 +23,11 @@
          JavaScript is disabled on your browser.
          -
          +
          - + + +
          - +
          @@ -110,9 +117,11 @@

          Class +
          - + + +
          - +
          diff --git a/project.properties b/project.properties index b756f448..4af4b084 100644 --- a/project.properties +++ b/project.properties @@ -8,5 +8,5 @@ # project structure. # Project target. -target=android-21 +target=android-24 android.library=true From 89e038254e1ac278bab7d5487b5a3182e9f72d5b Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 12 Mar 2018 19:50:20 -0400 Subject: [PATCH 50/51] Updated readme. --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 014d0166..21eb1997 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,4 @@ context.stopService(new Intent(this,RtspServer.class)); # Spydroid-ipcamera Visit [this github page](https://github.com/fyhertz/spydroid-ipcamera) to see how this streaming stack can be used and how it performs. -Further information about Spydroid can be found on the google page of the project [here](https://spydroid-ipcamera.googlecode.com). -The app. is also available on google play [here](https://play.google.com/store/apps/details?id=net.majorkernelpanic.spydroid). - From 0c2078d9ef6e8288ec10bd134af3ac4c1f822ab3 Mon Sep 17 00:00:00 2001 From: CORE Kien Date: Tue, 17 Apr 2018 11:09:53 +0900 Subject: [PATCH 51/51] The 'client_port' parameter's range specification (i.e RTCP port part) is optional in RtspServer * If not specified then use the specified RTP port + 1. --- src/net/majorkernelpanic/streaming/rtsp/RtspServer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/net/majorkernelpanic/streaming/rtsp/RtspServer.java b/src/net/majorkernelpanic/streaming/rtsp/RtspServer.java index f68bfd6e..9727eefe 100644 --- a/src/net/majorkernelpanic/streaming/rtsp/RtspServer.java +++ b/src/net/majorkernelpanic/streaming/rtsp/RtspServer.java @@ -505,7 +505,7 @@ else if (request.method.equalsIgnoreCase("SETUP")) { return response; } - p = Pattern.compile("client_port=(\\d+)-(\\d+)", Pattern.CASE_INSENSITIVE); + p = Pattern.compile("client_port=(\\d+)(?:-(\\d+))?", Pattern.CASE_INSENSITIVE); m = p.matcher(request.headers.get("transport")); if (!m.find()) { @@ -514,7 +514,11 @@ else if (request.method.equalsIgnoreCase("SETUP")) { p2 = ports[1]; } else { p1 = Integer.parseInt(m.group(1)); - p2 = Integer.parseInt(m.group(2)); + if (m.group(2) == null) { + p2 = p1+1; + } else { + p2 = Integer.parseInt(m.group(2)); + } } ssrc = mSession.getTrack(trackId).getSSRC();