Skip to content

Commit

Permalink
Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon committed Mar 12, 2018
1 parent fe23825 commit ba6dc86
Show file tree
Hide file tree
Showing 85 changed files with 5,713 additions and 4,592 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The first step you will need to achieve to start a streaming session to some pee
* With the RTSP server: in that case the phone will act as a RTSP server and wait for a RTSP client to request a stream. This use case is illustated in [the example 1](https://github.com/fyhertz/libstreaming-examples#example-1).
* Or you use libstreaming without using the RTSP protocol at all, and signal the session using SDP over a protocol you like. [The example 2](https://github.com/fyhertz/libstreaming-examples#example-2) illustrates that use case.

The full javadoc documentation of the API is available here: http://majorkernelpanic.com/libstreaming/doc-v4
The full javadoc documentation of the API is available here: http://guigui.us/libstreaming/doc

## How does it work? You should really read this, it's important!

Expand Down Expand Up @@ -42,15 +42,15 @@ The **MediaCodec** API do not present the limitations I just mentionned, but has
The buffer-to-buffer method uses calls to [**dequeueInputBuffer**](http://developer.android.com/reference/android/media/MediaCodec.html#dequeueInputBuffer(long)) and [**queueInputBuffer**](http://developer.android.com/reference/android/media/MediaCodec.html#queueInputBuffer(int, int, int, long, int)) to feed the encoder with raw data.
That seems easy right ? Well it's not, because video encoders that you get access to with this API are using different color formats and you need to support all of them. A list of those color formats is available [here](http://developer.android.com/reference/android/media/MediaCodecInfo.CodecCapabilities.html). Moreover, many encoders claim support for color formats they don't actually support properly or can present little glitches.

All the [**hw**](http://majorkernelpanic.com/libstreaming/doc-v4/net/majorkernelpanic/streaming/hw/package-summary.html) package is dedicated to solving those issues. See in particular [**EncoderDebugger**](http://majorkernelpanic.com/libstreaming/doc-v4/net/majorkernelpanic/streaming/hw/EncoderDebugger.html) class.
All the [**hw**](http://guigui.us/libstreaming/doc/net/majorkernelpanic/streaming/hw/package-summary.html) package is dedicated to solving those issues. See in particular [**EncoderDebugger**](http://guigui.us/libstreaming/doc/net/majorkernelpanic/streaming/hw/EncoderDebugger.html) class.

If streaming with that API fails, libstreaming fallbacks on streaming with the **MediaRecorder API**.

The surface-to-buffer method uses the [createInputSurface()](http://developer.android.com/reference/android/media/MediaCodec.html#createInputSurface()) method. This method is probably the best way to encode raw video from the camera but it requires android 4.3 and up.

The [**gl**](http://majorkernelpanic.com/libstreaming/doc-v4/net/majorkernelpanic/streaming/gl/package-summary.html) package is dedicated to using the MediaCodec API with a surface.
The [**gl**](http://guigui.us/libstreaming/doc/net/majorkernelpanic/streaming/gl/package-summary.html) package is dedicated to using the MediaCodec API with a surface.

It is not yet enabled by default in libstreaming but you can force it with the [**setStreamingMethod(byte)**](http://majorkernelpanic.com/libstreaming/doc-v4/net/majorkernelpanic/streaming/MediaStream.html#setStreamingMethod(byte)) method.
It is not yet enabled by default in libstreaming but you can force it with the [**setStreamingMethod(byte)**](http://guigui.us/libstreaming/doc/net/majorkernelpanic/streaming/MediaStream.html#setStreamingMethod(byte)) method.

### Packetization process

Expand All @@ -65,7 +65,7 @@ If you are looking for a basic implementation of one of the RFC mentionned above

RTCP packets are also sent to the receiver since version 2.0 of libstreaming. Only Sender Reports are implemented. They are actually needed for lip sync.

The [**rtp**](http://majorkernelpanic.com/libstreaming/doc-v4/net/majorkernelpanic/streaming/rtp/package-summary.html) package handles packetization of encoded data in RTP packets.
The [**rtp**](http://guigui.us/libstreaming/doc/net/majorkernelpanic/streaming/rtp/package-summary.html) package handles packetization of encoded data in RTP packets.

# Using libstreaming in your app

Expand Down
15 changes: 8 additions & 7 deletions doc/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_79) on Mon Jun 01 05:18:48 EDT 2015 -->
<!-- Generated by javadoc (1.8.0_151) on Mon Mar 12 19:14:58 EDT 2018 -->
<title>All Classes</title>
<meta name="date" content="2015-06-01">
<meta name="date" content="2018-03-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1 class="bar">All Classes</h1>
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html" title="class in net.majorkernelpanic.streaming.rtp" target="classFrame">AACADTSPacketizer</a></li>
Expand Down Expand Up @@ -36,15 +37,15 @@ <h1 class="bar">All Classes</h1>
<li><a href="net/majorkernelpanic/streaming/hw/NV21Convertor.html" title="class in net.majorkernelpanic.streaming.hw" target="classFrame">NV21Convertor</a></li>
<li><a href="net/majorkernelpanic/streaming/rtp/RtpSocket.html" title="class in net.majorkernelpanic.streaming.rtp" target="classFrame">RtpSocket</a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspClient.html" title="class in net.majorkernelpanic.streaming.rtsp" target="classFrame">RtspClient</a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html" title="interface in net.majorkernelpanic.streaming.rtsp" target="classFrame"><i>RtspClient.Callback</i></a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html" title="interface in net.majorkernelpanic.streaming.rtsp" target="classFrame"><span class="interfaceName">RtspClient.Callback</span></a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspServer.html" title="class in net.majorkernelpanic.streaming.rtsp" target="classFrame">RtspServer</a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html" title="interface in net.majorkernelpanic.streaming.rtsp" target="classFrame"><i>RtspServer.CallbackListener</i></a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html" title="interface in net.majorkernelpanic.streaming.rtsp" target="classFrame"><span class="interfaceName">RtspServer.CallbackListener</span></a></li>
<li><a href="net/majorkernelpanic/streaming/rtcp/SenderReport.html" title="class in net.majorkernelpanic.streaming.rtcp" target="classFrame">SenderReport</a></li>
<li><a href="net/majorkernelpanic/streaming/Session.html" title="class in net.majorkernelpanic.streaming" target="classFrame">Session</a></li>
<li><a href="net/majorkernelpanic/streaming/Session.Callback.html" title="interface in net.majorkernelpanic.streaming" target="classFrame"><i>Session.Callback</i></a></li>
<li><a href="net/majorkernelpanic/streaming/Session.Callback.html" title="interface in net.majorkernelpanic.streaming" target="classFrame"><span class="interfaceName">Session.Callback</span></a></li>
<li><a href="net/majorkernelpanic/streaming/SessionBuilder.html" title="class in net.majorkernelpanic.streaming" target="classFrame">SessionBuilder</a></li>
<li><a href="net/majorkernelpanic/streaming/exceptions/StorageUnavailableException.html" title="class in net.majorkernelpanic.streaming.exceptions" target="classFrame">StorageUnavailableException</a></li>
<li><a href="net/majorkernelpanic/streaming/Stream.html" title="interface in net.majorkernelpanic.streaming" target="classFrame"><i>Stream</i></a></li>
<li><a href="net/majorkernelpanic/streaming/Stream.html" title="interface in net.majorkernelpanic.streaming" target="classFrame"><span class="interfaceName">Stream</span></a></li>
<li><a href="net/majorkernelpanic/streaming/gl/SurfaceManager.html" title="class in net.majorkernelpanic.streaming.gl" target="classFrame">SurfaceManager</a></li>
<li><a href="net/majorkernelpanic/streaming/gl/SurfaceView.html" title="class in net.majorkernelpanic.streaming.gl" target="classFrame">SurfaceView</a></li>
<li><a href="net/majorkernelpanic/streaming/gl/TextureManager.html" title="class in net.majorkernelpanic.streaming.gl" target="classFrame">TextureManager</a></li>
Expand Down
15 changes: 8 additions & 7 deletions doc/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_79) on Mon Jun 01 05:18:48 EDT 2015 -->
<!-- Generated by javadoc (1.8.0_151) on Mon Mar 12 19:14:58 EDT 2018 -->
<title>All Classes</title>
<meta name="date" content="2015-06-01">
<meta name="date" content="2018-03-12">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1 class="bar">All Classes</h1>
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="net/majorkernelpanic/streaming/rtp/AACADTSPacketizer.html" title="class in net.majorkernelpanic.streaming.rtp">AACADTSPacketizer</a></li>
Expand Down Expand Up @@ -36,15 +37,15 @@ <h1 class="bar">All Classes</h1>
<li><a href="net/majorkernelpanic/streaming/hw/NV21Convertor.html" title="class in net.majorkernelpanic.streaming.hw">NV21Convertor</a></li>
<li><a href="net/majorkernelpanic/streaming/rtp/RtpSocket.html" title="class in net.majorkernelpanic.streaming.rtp">RtpSocket</a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspClient.html" title="class in net.majorkernelpanic.streaming.rtsp">RtspClient</a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html" title="interface in net.majorkernelpanic.streaming.rtsp"><i>RtspClient.Callback</i></a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspClient.Callback.html" title="interface in net.majorkernelpanic.streaming.rtsp"><span class="interfaceName">RtspClient.Callback</span></a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspServer.html" title="class in net.majorkernelpanic.streaming.rtsp">RtspServer</a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html" title="interface in net.majorkernelpanic.streaming.rtsp"><i>RtspServer.CallbackListener</i></a></li>
<li><a href="net/majorkernelpanic/streaming/rtsp/RtspServer.CallbackListener.html" title="interface in net.majorkernelpanic.streaming.rtsp"><span class="interfaceName">RtspServer.CallbackListener</span></a></li>
<li><a href="net/majorkernelpanic/streaming/rtcp/SenderReport.html" title="class in net.majorkernelpanic.streaming.rtcp">SenderReport</a></li>
<li><a href="net/majorkernelpanic/streaming/Session.html" title="class in net.majorkernelpanic.streaming">Session</a></li>
<li><a href="net/majorkernelpanic/streaming/Session.Callback.html" title="interface in net.majorkernelpanic.streaming"><i>Session.Callback</i></a></li>
<li><a href="net/majorkernelpanic/streaming/Session.Callback.html" title="interface in net.majorkernelpanic.streaming"><span class="interfaceName">Session.Callback</span></a></li>
<li><a href="net/majorkernelpanic/streaming/SessionBuilder.html" title="class in net.majorkernelpanic.streaming">SessionBuilder</a></li>
<li><a href="net/majorkernelpanic/streaming/exceptions/StorageUnavailableException.html" title="class in net.majorkernelpanic.streaming.exceptions">StorageUnavailableException</a></li>
<li><a href="net/majorkernelpanic/streaming/Stream.html" title="interface in net.majorkernelpanic.streaming"><i>Stream</i></a></li>
<li><a href="net/majorkernelpanic/streaming/Stream.html" title="interface in net.majorkernelpanic.streaming"><span class="interfaceName">Stream</span></a></li>
<li><a href="net/majorkernelpanic/streaming/gl/SurfaceManager.html" title="class in net.majorkernelpanic.streaming.gl">SurfaceManager</a></li>
<li><a href="net/majorkernelpanic/streaming/gl/SurfaceView.html" title="class in net.majorkernelpanic.streaming.gl">SurfaceView</a></li>
<li><a href="net/majorkernelpanic/streaming/gl/TextureManager.html" title="class in net.majorkernelpanic.streaming.gl">TextureManager</a></li>
Expand Down
Loading

0 comments on commit ba6dc86

Please sign in to comment.