Skip to content

Commit c92905e

Browse files
author
fyhertz
committed
New example that demonstrate how libstreaming can be used with Wowza
1 parent 9c57eff commit c92905e

File tree

13 files changed

+245
-78
lines changed

13 files changed

+245
-78
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ Shows how to use the RTSP server.
1414

1515
Shows how to start a stream and obtain a SDP that you will then want to hand to the receiver.
1616

17+
### Example 3
1718

19+
**This examples shows how you can use libstreaming with a Wowza Media Server.**
20+
21+
The stream is published to the Wowza server using the RTSP protocol and the (RtspClient)[http://dallens.fr/majorkernelpanic/libstreaming/doc-v3/net/majorkernelpanic/streaming/rtsp/RtspClient.html] class of libstreaming. Follow [this tutorial](http://www.wowza.com/forums/content.php?354) to find out how to configure RTSP/RTP publishing access on your Wowza server, and how to playback the stream with RTMP in a flash player. The example3 also contains an example of how to use JW Player, you will need to get a free license for JW player to use it.

example1/AndroidManifest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
1616
<uses-permission android:name="android.permission.RECORD_AUDIO" />
1717
<uses-permission android:name="android.permission.CAMERA" />
18+
<uses-permission android:name="android.permission.WAKE_LOCK" />
1819

1920
<application
2021
android:allowBackup="true"
@@ -30,9 +31,8 @@
3031
<category android:name="android.intent.category.LAUNCHER" />
3132
</intent-filter>
3233
</activity>
33-
34-
<service android:name="net.majorkernelpanic.streaming.rtsp.RtspServer"/>
35-
34+
35+
<service android:name="net.majorkernelpanic.streaming.rtsp.RtspServer" />
3636
</application>
3737

38-
</manifest>
38+
</manifest>
79.7 KB
Binary file not shown.

example1/libs/libstreaming.jar

-61.6 KB
Binary file not shown.

example1/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212

1313
# Project target.
14-
target=android-17
14+
target=android-18

example1/src/net/majorkernelpanic/example1/MainActivity.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package net.majorkernelpanic.example1;
22

3-
import net.majorkernelpanic.streaming.Session;
43
import net.majorkernelpanic.streaming.SessionBuilder;
54
import net.majorkernelpanic.streaming.rtsp.RtspServer;
65
import android.app.Activity;
@@ -13,8 +12,6 @@
1312
import android.preference.PreferenceManager;
1413
import android.view.SurfaceHolder;
1514
import android.view.SurfaceView;
16-
import android.view.View.OnClickListener;
17-
import android.widget.EditText;
1815

1916
/**
2017
* A straightforward example of how to use the RTSP server included in libstreaming
@@ -24,8 +21,6 @@ public class MainActivity extends Activity {
2421
private final static String TAG = "MainActivity";
2522

2623
private SurfaceView mSurfaceView;
27-
private EditText mEditText;
28-
private Session mSession;
2924
private PowerManager.WakeLock mWakeLock;
3025

3126
@Override
@@ -50,8 +45,8 @@ protected void onCreate(Bundle savedInstanceState) {
5045
SessionBuilder.getInstance()
5146
.setSurfaceHolder(mSurfaceView.getHolder())
5247
.setContext(getApplicationContext())
53-
.setAudioEncoder(SessionBuilder.AUDIO_AMRNB)
54-
.setVideoEncoder(SessionBuilder.VIDEO_H263);
48+
.setAudioEncoder(SessionBuilder.AUDIO_NONE)
49+
.setVideoEncoder(SessionBuilder.VIDEO_H264);
5550

5651
// Starts the RTSP server
5752
this.startService(new Intent(this,RtspServer.class));

example2/AndroidManifest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
1616
<uses-permission android:name="android.permission.RECORD_AUDIO" />
1717
<uses-permission android:name="android.permission.CAMERA" />
18+
<uses-permission android:name="android.permission.WAKE_LOCK" />
1819

1920
<application
2021
android:allowBackup="true"
@@ -30,9 +31,8 @@
3031
<category android:name="android.intent.category.LAUNCHER" />
3132
</intent-filter>
3233
</activity>
33-
34-
<service android:name="net.majorkernelpanic.streaming.rtsp.RtspServer"/>
35-
34+
35+
<service android:name="net.majorkernelpanic.streaming.rtsp.RtspServer" />
3636
</application>
3737

38-
</manifest>
38+
</manifest>
79.7 KB
Binary file not shown.

example2/libs/libstreaming.jar

-61.6 KB
Binary file not shown.

example2/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212

1313
# Project target.
14-
target=android-17
14+
target=android-18

0 commit comments

Comments
 (0)