├── .gitignore ├── RAppRTC-libs-src ├── README-api ├── autobanh-src │ ├── ByteBufferInputStream.java │ ├── ByteBufferOutputStream.java │ ├── Doxygen.java │ ├── NoCopyByteArrayOutputStream.java │ ├── PrefixMap.java │ ├── README.md │ ├── Utf8Validator.java │ ├── Wamp.java │ ├── WampConnection.java │ ├── WampConnectionHandler.java │ ├── WampCra.java │ ├── WampCraConnection.java │ ├── WampCraPermissions.java │ ├── WampCraPubSubPermission.java │ ├── WampCraRpcPermission.java │ ├── WampMessage.java │ ├── WampOptions.java │ ├── WampReader.java │ ├── WampWriter.java │ ├── WebSocket.java │ ├── WebSocketConnection.java │ ├── WebSocketConnectionHandler.java │ ├── WebSocketException.java │ ├── WebSocketMessage.java │ ├── WebSocketOptions.java │ ├── WebSocketReader.java │ ├── WebSocketWriter.java │ └── autobahn-android │ │ ├── Autobahn │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.jdt.core.prefs │ │ ├── AndroidManifest.xml │ │ ├── Doxyfile │ │ ├── README.md │ │ ├── SConstruct │ │ ├── libs │ │ │ ├── jackson-core-asl-1.9.7.jar │ │ │ └── jackson-mapper-asl-1.9.7.jar │ │ ├── pom.xml │ │ ├── proguard.cfg │ │ ├── project.properties │ │ └── src │ │ │ └── de │ │ │ └── tavendo │ │ │ └── autobahn │ │ │ ├── ByteBufferInputStream.java │ │ │ ├── ByteBufferOutputStream.java │ │ │ ├── Doxygen.java │ │ │ ├── NoCopyByteArrayOutputStream.java │ │ │ ├── PrefixMap.java │ │ │ ├── Utf8Validator.java │ │ │ ├── Wamp.java │ │ │ ├── WampConnection.java │ │ │ ├── WampConnectionHandler.java │ │ │ ├── WampCra.java │ │ │ ├── WampCraConnection.java │ │ │ ├── WampCraPermissions.java │ │ │ ├── WampCraPubSubPermission.java │ │ │ ├── WampCraRpcPermission.java │ │ │ ├── WampMessage.java │ │ │ ├── WampOptions.java │ │ │ ├── WampReader.java │ │ │ ├── WampWriter.java │ │ │ ├── WebSocket.java │ │ │ ├── WebSocketConnection.java │ │ │ ├── WebSocketConnectionHandler.java │ │ │ ├── WebSocketException.java │ │ │ ├── WebSocketMessage.java │ │ │ ├── WebSocketOptions.java │ │ │ ├── WebSocketReader.java │ │ │ └── WebSocketWriter.java │ │ ├── CONTRIBUTORS │ │ ├── Demo │ │ ├── BroadcastClient │ │ │ ├── .classpath │ │ │ ├── .gitignore │ │ │ ├── .project │ │ │ ├── AndroidManifest.xml │ │ │ ├── README.md │ │ │ ├── pom.xml │ │ │ ├── proguard.cfg │ │ │ ├── project.properties │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-ldpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── layout │ │ │ │ │ └── main.xml │ │ │ │ ├── menu │ │ │ │ │ └── main_menu.xml │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ │ └── de │ │ │ │ └── tavendo │ │ │ │ └── autobahn │ │ │ │ └── broadcastclient │ │ │ │ └── BroadcastClientActivity.java │ │ ├── CRAClient │ │ │ ├── .classpath │ │ │ ├── .gitignore │ │ │ ├── .project │ │ │ ├── AndroidManifest.xml │ │ │ ├── README.md │ │ │ ├── pom.xml │ │ │ ├── proguard.cfg │ │ │ ├── project.properties │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-ldpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── layout │ │ │ │ │ └── main.xml │ │ │ │ ├── menu │ │ │ │ │ └── main_menu.xml │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ │ └── de │ │ │ │ └── tavendo │ │ │ │ └── autobahn │ │ │ │ └── craclient │ │ │ │ └── CRAClientActivity.java │ │ ├── EchoClient │ │ │ ├── .classpath │ │ │ ├── .gitignore │ │ │ ├── .project │ │ │ ├── AndroidManifest.xml │ │ │ ├── README.md │ │ │ ├── pom.xml │ │ │ ├── proguard.cfg │ │ │ ├── project.properties │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-ldpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── layout │ │ │ │ │ └── main.xml │ │ │ │ ├── menu │ │ │ │ │ └── main_menu.xml │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ │ └── de │ │ │ │ └── tavendo │ │ │ │ └── autobahn │ │ │ │ └── echoclient │ │ │ │ └── EchoClientActivity.java │ │ ├── README.md │ │ ├── SimplePubSub │ │ │ ├── .classpath │ │ │ ├── .gitignore │ │ │ ├── .project │ │ │ ├── AndroidManifest.xml │ │ │ ├── README.md │ │ │ ├── pom.xml │ │ │ ├── proguard.cfg │ │ │ ├── project.properties │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-ldpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── layout │ │ │ │ │ └── main.xml │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ │ └── de │ │ │ │ └── tavendo │ │ │ │ └── autobahn │ │ │ │ └── simplepubsub │ │ │ │ └── SimplePubSubActivity.java │ │ ├── SimpleRpc │ │ │ ├── .classpath │ │ │ ├── .gitignore │ │ │ ├── .project │ │ │ ├── AndroidManifest.xml │ │ │ ├── README.md │ │ │ ├── pom.xml │ │ │ ├── proguard.cfg │ │ │ ├── project.properties │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-ldpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── layout │ │ │ │ │ └── main.xml │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ │ └── de │ │ │ │ └── tavendo │ │ │ │ └── autobahn │ │ │ │ └── simplerpc │ │ │ │ └── SimpleRpcActivity.java │ │ ├── TestSuiteClient │ │ │ ├── .classpath │ │ │ ├── .gitignore │ │ │ ├── .project │ │ │ ├── .settings │ │ │ │ └── org.eclipse.jdt.core.prefs │ │ │ ├── AndroidManifest.xml │ │ │ ├── README.md │ │ │ ├── pom.xml │ │ │ ├── proguard.cfg │ │ │ ├── project.properties │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-ldpi │ │ │ │ │ └── icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── icon.png │ │ │ │ ├── layout │ │ │ │ │ └── main.xml │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ │ └── de │ │ │ │ └── tavendo │ │ │ │ └── autobahn │ │ │ │ └── testsuiteclient │ │ │ │ └── MainActivity.java │ │ └── pom.xml │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── README.md │ │ ├── autobahnandroid.sublime.project │ │ ├── autobahnandroid.sublime.sublime-workspace │ │ └── doc │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.md │ │ ├── SConstruct │ │ ├── _static │ │ └── img │ │ │ ├── autobahn_eclipse0.png │ │ │ ├── autobahn_eclipse1.png │ │ │ ├── autobahn_eclipse2.png │ │ │ ├── autobahn_eclipse3.png │ │ │ ├── autobahn_eclipse4.png │ │ │ └── logo.png │ │ ├── _templates │ │ ├── layout.html │ │ └── side-primary.html │ │ ├── conf.py │ │ ├── contents.rst │ │ ├── examples.rst │ │ ├── gettingstarted.rst │ │ ├── index.rst │ │ ├── serve.py │ │ └── spelling_wordlist.txt ├── base_java-src │ ├── Logging.java │ ├── OWNERS │ ├── README.md │ ├── Size.java │ └── ThreadUtils.java ├── libjingle_peerconnection_java-src │ ├── AudioSource.java │ ├── AudioTrack.java │ ├── CallSessionFileRotatingLogSink.java │ ├── Camera1Capturer.java │ ├── Camera1Enumerator.java │ ├── Camera1Session.java │ ├── Camera2Capturer.java │ ├── Camera2Enumerator.java │ ├── Camera2Session.java │ ├── CameraCapturer.java │ ├── CameraEnumerationAndroid.java │ ├── CameraEnumerator.java │ ├── CameraSession.java │ ├── CameraVideoCapturer.java │ ├── DataChannel.java │ ├── EglBase.java │ ├── EglBase10.java │ ├── EglBase14.java │ ├── EglRenderer.java │ ├── FileVideoCapturer.java │ ├── GlRectDrawer.java │ ├── GlShader.java │ ├── GlTextureFrameBuffer.java │ ├── GlUtil.java │ ├── Histogram.java │ ├── IceCandidate.java │ ├── MediaCodecVideoDecoder.java │ ├── MediaCodecVideoEncoder.java │ ├── MediaConstraints.java │ ├── MediaSource.java │ ├── MediaStream.java │ ├── MediaStreamTrack.java │ ├── Metrics.java │ ├── NetworkMonitor.java │ ├── NetworkMonitorAutoDetect.java │ ├── OWNERS │ ├── PeerConnection.java │ ├── PeerConnectionFactory.java │ ├── RendererCommon.java │ ├── RtpParameters.java │ ├── RtpReceiver.java │ ├── RtpSender.java │ ├── ScreenBase.java │ ├── ScreenBaseActivity.java │ ├── ScreenBaseFragmentActivity.java │ ├── ScreenCapturer.java │ ├── ScreenCapturerAndroid.java │ ├── SdpObserver.java │ ├── SessionDescription.java │ ├── StatsObserver.java │ ├── StatsReport.java │ ├── SurfaceTextureHelper.java │ ├── SurfaceViewRenderer.java │ ├── VideoCapturer.java │ ├── VideoCapturerAndroid.java │ ├── VideoFileRenderer.java │ ├── VideoRenderer.java │ ├── VideoRendererGui.java │ ├── VideoSource.java │ ├── VideoTrack.java │ ├── YuvConverter.java │ └── voiceengine │ │ ├── BuildInfo.java │ │ ├── WebRtcAudioEffects.java │ │ ├── WebRtcAudioManager.java │ │ ├── WebRtcAudioRecord.java │ │ ├── WebRtcAudioTrack.java │ │ └── WebRtcAudioUtils.java └── libjingle_peerconnection_so-src │ ├── OWNERS │ ├── androidhistogram_jni.cc │ ├── androidmediacodeccommon.h │ ├── androidmediadecoder_jni.cc │ ├── androidmediadecoder_jni.h │ ├── androidmediaencoder_jni.cc │ ├── androidmediaencoder_jni.h │ ├── androidmetrics_jni.cc │ ├── androidnetworkmonitor_jni.cc │ ├── androidnetworkmonitor_jni.h │ ├── androidvideotracksource.cc │ ├── androidvideotracksource.h │ ├── androidvideotracksource_jni.cc │ ├── classreferenceholder.cc │ ├── classreferenceholder.h │ ├── jni_helpers.cc │ ├── jni_helpers.h │ ├── jni_onload.cc │ ├── native_handle_impl.cc │ ├── native_handle_impl.h │ ├── peerconnection_jni.cc │ ├── surfacetexturehelper_jni.cc │ └── surfacetexturehelper_jni.h ├── RAppRTC ├── .gitignore ├── .idea │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── runConfigurations.xml │ └── vcs.xml ├── app-debug.apk ├── app │ ├── .gitignore │ ├── app-debug.apk │ ├── app-release.apk │ ├── build.gradle │ ├── libs │ │ ├── arm64-v8a │ │ │ ├── libboringssl.cr.so │ │ │ ├── libc++_shared.so │ │ │ ├── libjingle_peerconnection_so.so │ │ │ └── libprotobuf_lite.cr.so │ │ ├── armeabi-v7a │ │ │ ├── libboringssl.cr.so │ │ │ ├── libc++_shared.so │ │ │ ├── libjingle_peerconnection_so.so │ │ │ └── libprotobuf_lite.cr.so │ │ ├── autobanh.jar │ │ ├── base_java.jar │ │ ├── libjingle_peerconnection_java.jar │ │ ├── x86 │ │ │ ├── libboringssl.cr.so │ │ │ ├── libc++_shared.so │ │ │ ├── libjingle_peerconnection_so.so │ │ │ └── libprotobuf_lite.cr.so │ │ └── x86_64 │ │ │ ├── libboringssl.cr.so │ │ │ ├── libc++_shared.so │ │ │ ├── libjingle_peerconnection_so.so │ │ │ └── libprotobuf_lite.cr.so │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── org │ │ │ └── appspot │ │ │ └── apprtc │ │ │ └── ApplicationTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── org │ │ │ │ └── appspot │ │ │ │ └── apprtc │ │ │ │ ├── AppRTCAudioManager.java │ │ │ │ ├── AppRTCClient.java │ │ │ │ ├── AppRTCProximitySensor.java │ │ │ │ ├── CallActivity.java │ │ │ │ ├── CallFragment.java │ │ │ │ ├── CaptureQualityController.java │ │ │ │ ├── ConnectActivity.java │ │ │ │ ├── CpuMonitor.java │ │ │ │ ├── DirectRTCClient.java │ │ │ │ ├── HudFragment.java │ │ │ │ ├── PeerConnectionClient.java │ │ │ │ ├── PercentFrameLayout.java │ │ │ │ ├── RoomParametersFetcher.java │ │ │ │ ├── SettingsActivity.java │ │ │ │ ├── SettingsFragment.java │ │ │ │ ├── TCPChannelClient.java │ │ │ │ ├── UnhandledExceptionHandler.java │ │ │ │ ├── WebSocketChannelClient.java │ │ │ │ ├── WebSocketRTCClient.java │ │ │ │ └── util │ │ │ │ ├── AppRTCUtils.java │ │ │ │ └── AsyncHttpURLConnection.java │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── disconnect.png │ │ │ ├── ic_action_full_screen.png │ │ │ ├── ic_action_return_from_full_screen.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_loopback_call.png │ │ │ ├── drawable-ldpi │ │ │ ├── disconnect.png │ │ │ ├── ic_action_full_screen.png │ │ │ ├── ic_action_return_from_full_screen.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_loopback_call.png │ │ │ ├── drawable-mdpi │ │ │ ├── disconnect.png │ │ │ ├── ic_action_full_screen.png │ │ │ ├── ic_action_return_from_full_screen.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_loopback_call.png │ │ │ ├── drawable-xhdpi │ │ │ ├── disconnect.png │ │ │ ├── ic_action_full_screen.png │ │ │ ├── ic_action_return_from_full_screen.png │ │ │ ├── ic_launcher.png │ │ │ └── ic_loopback_call.png │ │ │ ├── layout │ │ │ ├── activity_call.xml │ │ │ ├── activity_connect.xml │ │ │ ├── fragment_call.xml │ │ │ └── fragment_hud.xml │ │ │ ├── menu │ │ │ └── connect_menu.xml │ │ │ ├── values-v17 │ │ │ └── styles.xml │ │ │ ├── values-v21 │ │ │ └── styles.xml │ │ │ ├── values │ │ │ ├── arrays.xml │ │ │ └── strings.xml │ │ │ └── xml │ │ │ └── preferences.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── appspot │ │ └── apprtc │ │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── rmUnUseFile.sh ├── settings.gradle └── update.sh ├── README.md ├── apks ├── AppRTCMobile-arm.apk ├── AppRTCMobile-arm64.apk ├── AppRTCMobile-x64.apk ├── AppRTCMobile-x86.apk ├── README.md └── app-release.apk ├── compile.sh ├── getSource.sh ├── src ├── directories-dir-L1 ├── directories-dir-L2 └── webrtc │ └── directories-dir-L1 └── updateSrc.sh /.gitignore: -------------------------------------------------------------------------------- 1 | RAppRTC/*.iml 2 | RAppRTC/.gradle 3 | RAppRTC/local.properties 4 | RAppRTC/.idea/workspace.xml 5 | RAppRTC/.idea/libraries 6 | RAppRTC/.DS_Store 7 | RAppRTC/build 8 | RAppRTC/captures 9 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/README-api: -------------------------------------------------------------------------------- 1 | This directory holds a Java implementation of the webrtc::PeerConnection API, as 2 | well as the JNI glue C++ code that lets the Java implementation reuse the C++ 3 | implementation of the same API. 4 | 5 | To build the Java API and related tests, generate GN projects with: 6 | --args='target_os="android"' 7 | 8 | To use the Java API, start by looking at the public interface of 9 | org.webrtc.PeerConnection{,Factory} and the org.webrtc.PeerConnectionTest. 10 | 11 | To understand the implementation of the API, see the native code in jni/. 12 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/NoCopyByteArrayOutputStream.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2011-2012 Tavendo GmbH 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | import java.io.ByteArrayInputStream; 22 | import java.io.ByteArrayOutputStream; 23 | import java.io.InputStream; 24 | 25 | /** 26 | * OutputStream backed by a byte array. This class provides copyless access 27 | * to byte array backing the ByteArrayOutputStream 28 | */ 29 | public class NoCopyByteArrayOutputStream extends ByteArrayOutputStream { 30 | 31 | /** 32 | * Create new OutputStream backed by byte array. 33 | */ 34 | public NoCopyByteArrayOutputStream() { 35 | super(); 36 | } 37 | 38 | /** 39 | * Create new OutputStream backed by byte array. 40 | * 41 | * @param size Initial size of underlying byte array. 42 | */ 43 | public NoCopyByteArrayOutputStream(int size) { 44 | super(size); 45 | } 46 | 47 | /** 48 | * Wraps the underyling byte array into an InputStream. 49 | * 50 | * @return New InputStream wrapping byte buffer underlying this stream. 51 | */ 52 | public InputStream getInputStream() { 53 | return new ByteArrayInputStream(buf, 0, count); 54 | } 55 | 56 | /** 57 | * Get byte array underlying this OutputStream. This 58 | * does not copy any data, but return reference to the 59 | * underlying byte array. 60 | * 61 | * @return Underlying byte array by reference. 62 | */ 63 | public byte[] getByteArray() { 64 | return buf; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/README.md: -------------------------------------------------------------------------------- 1 | ### 说明 2 | 3 | AutobahnAndroid 是 Android 平台上的 WebSocket & WAMP (WebSocket Application Messaging Protocol) 实现。 4 | 5 | ### 特点: 6 | 7 | - WebSocket 和 WAMP 客户端 8 | - 实现了 WebSocket RFC6455, Draft Hybi-10+ and WAMP v1 9 | - 支持 Android 2.2+ 10 | - 良好遵循标准 11 | - 高性能异步设计 12 | - 易用的 API 13 | - 无缝集成 Android UI 应用 14 | - UI 线程上无网络 Activity 15 | 16 | ### 使用 17 | 18 | 在WebSocketChannelClient中使用。 19 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/WampConnectionHandler.java: -------------------------------------------------------------------------------- 1 | package de.tavendo.autobahn; 2 | 3 | public class WampConnectionHandler implements Wamp.ConnectionHandler { 4 | 5 | public void onOpen() { 6 | // TODO Auto-generated method stub 7 | 8 | } 9 | 10 | public void onClose(int code, String reason) { 11 | // TODO Auto-generated method stub 12 | 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/WampCra.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2012 Alejandro Hernandez 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public interface WampCra extends Wamp { 22 | 23 | /** 24 | * Auth handler. 25 | */ 26 | public interface AuthHandler { 27 | 28 | /** 29 | * Fired on successful completion of authentication. 30 | * 31 | * @param permissions The permissions obtained on successful authentication. 32 | */ 33 | public void onAuthSuccess(Object permissions); 34 | 35 | /** 36 | * Fired on authentication failure. 37 | * 38 | * @param errorUri The URI or CURIE of the error that occurred. 39 | * @param errorDesc A human readable description of the error. 40 | */ 41 | public void onAuthError(String errorUri, String errorDesc); 42 | } 43 | 44 | 45 | /** 46 | * Authenticate the WAMP Session. 47 | * 48 | * @param authHandler The handler to be invoked upon authentication completion. 49 | * @param authKey The user Key for authentication. 50 | * @param authSecret The user Secret for authentication. 51 | */ 52 | public void authenticate(AuthHandler authHandler, String authKey, String authSecret); 53 | 54 | /** 55 | * Authenticate the WAMP Session. 56 | * 57 | * @param authHandler The handler to be invoked upon authentication completion. 58 | * @param authKey The user Key for authentication. 59 | * @param authSecret The user Secret for authentication. 60 | * @param authExtra Zero, one or more extra arguments for the authentication. 61 | */ 62 | public void authenticate(AuthHandler authHandler, String authKey, String authSecret, Object authExtra); 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/WampCraPermissions.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2012 Alejandro Hernandez 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WampCraPermissions { 22 | 23 | public WampCraRpcPermission[] rpc; 24 | public WampCraPubSubPermission[] pubsub; 25 | 26 | public WampCraPermissions() { 27 | } 28 | 29 | public WampCraPermissions(WampCraRpcPermission[] rpc, WampCraPubSubPermission[] pubsub) { 30 | this.rpc = rpc; 31 | this.pubsub = pubsub; 32 | } 33 | 34 | public WampCraRpcPermission[] getRpc() { 35 | return rpc; 36 | } 37 | 38 | public void setRpc(WampCraRpcPermission[] rpc) { 39 | this.rpc = rpc; 40 | } 41 | 42 | public WampCraPubSubPermission[] getPubsub() { 43 | return pubsub; 44 | } 45 | 46 | public void setPubsub(WampCraPubSubPermission[] pubsub) { 47 | this.pubsub = pubsub; 48 | } 49 | 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/WampCraPubSubPermission.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2012 Alejandro Hernandez 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WampCraPubSubPermission{ 22 | 23 | boolean prefix; 24 | String uri; 25 | boolean pub; 26 | boolean sub; 27 | 28 | public WampCraPubSubPermission() { 29 | } 30 | 31 | public WampCraPubSubPermission(boolean prefix, String uri, boolean pub, boolean sub) { 32 | this.prefix = prefix; 33 | this.uri = uri; 34 | this.pub = pub; 35 | this.sub = sub; 36 | } 37 | 38 | public boolean isPrefix() { 39 | return prefix; 40 | } 41 | public void setPrefix(boolean prefix) { 42 | this.prefix = prefix; 43 | } 44 | public String getUri() { 45 | return uri; 46 | } 47 | public void setUri(String uri) { 48 | this.uri = uri; 49 | } 50 | public boolean isPub() { 51 | return pub; 52 | } 53 | public void setPub(boolean pub) { 54 | this.pub = pub; 55 | } 56 | public boolean isSub() { 57 | return sub; 58 | } 59 | public void setSub(boolean sub) { 60 | this.sub = sub; 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/WampCraRpcPermission.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2012 Alejandro Hernandez 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WampCraRpcPermission{ 22 | 23 | boolean call; 24 | String uri; 25 | 26 | public WampCraRpcPermission() { 27 | } 28 | 29 | public WampCraRpcPermission(boolean call, String uri) { 30 | this.call = call; 31 | this.uri = uri; 32 | } 33 | public boolean isCall() { 34 | return call; 35 | } 36 | public void setCall(boolean call) { 37 | this.call = call; 38 | } 39 | public String getUri() { 40 | return uri; 41 | } 42 | public void setUri(String uri) { 43 | this.uri = uri; 44 | } 45 | 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/WampOptions.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2011-2012 Tavendo GmbH 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WampOptions extends WebSocketOptions { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/WebSocketConnectionHandler.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2011-2012 Tavendo GmbH 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | /** 22 | * WebSockets event handler. Users will usually provide an instance of a class 23 | * derived from this to handle WebSockets received messages and open/close events 24 | */ 25 | public class WebSocketConnectionHandler implements WebSocket.ConnectionHandler { 26 | 27 | /** 28 | * Fired when the WebSockets connection has been established. 29 | * After this happened, messages may be sent. 30 | */ 31 | public void onOpen() { 32 | } 33 | 34 | /** 35 | * Fired when the WebSockets connection has deceased (or could 36 | * not established in the first place). 37 | * 38 | * @param code Close code. 39 | * @param reason Close reason (human-readable). 40 | */ 41 | public void onClose(int code, String reason) { 42 | } 43 | 44 | /** 45 | * Fired when a text message has been received (and text 46 | * messages are not set to be received raw). 47 | * 48 | * @param payload Text message payload or null (empty payload). 49 | */ 50 | public void onTextMessage(String payload) { 51 | } 52 | 53 | /** 54 | * Fired when a text message has been received (and text 55 | * messages are set to be received raw). 56 | * 57 | * @param payload Text message payload as raw UTF-8 or null (empty payload). 58 | */ 59 | public void onRawTextMessage(byte[] payload) { 60 | } 61 | 62 | /** 63 | * Fired when a binary message has been received. 64 | * 65 | * @param payload Binar message payload or null (empty payload). 66 | */ 67 | public void onBinaryMessage(byte[] payload) { 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/WebSocketException.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2011-2012 Tavendo GmbH 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WebSocketException extends Exception { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | public WebSocketException(String message) { 26 | super(message); 27 | } 28 | 29 | public WebSocketException(String message, Throwable t) { 30 | super(message, t); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | gen/* 3 | !gen/PLACEHOLDER 4 | *.jar 5 | !libs/* 6 | .sconsign.dblite 7 | _upload 8 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | autobahn 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Wed Sep 21 17:30:30 CEST 2011 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 4 | org.eclipse.jdt.core.compiler.compliance=1.5 5 | org.eclipse.jdt.core.compiler.source=1.5 6 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/README.md: -------------------------------------------------------------------------------- 1 | # Building 2 | 3 | Clean build 4 | 5 | mvn clean install 6 | 7 | # Deploying 8 | 9 | For Maven/Sonatype deployment docs, see [here](https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide). 10 | 11 | 1. To deploy via Maven, make sure Maven's `settings.xml` contains 12 | 13 | 14 | sonatype-nexus-snapshots 15 | oberstet 16 | mypassword 17 | 18 | 19 | sonatype-nexus-staging 20 | oberstet 21 | mypassword 22 | 23 | 24 | in the `servers` section. 25 | 26 | 2. Check the effective settings using `mvn help:effective-settings` 27 | 28 | ## Deploying Snapshots 29 | 30 | Clean build a snapshot using 31 | 32 | mvn clean deploy 33 | 34 | Snapshots should then appear [here](https://oss.sonatype.org/content/repositories/snapshots/de/tavendo/autobahn-android/). 35 | 36 | ## Deploying Releases 37 | 38 | Prepare the release 39 | 40 | mvn release:clean 41 | mvn release:prepare 42 | 43 | Publish the release 44 | 45 | mvn release:perform 46 | 47 | # Documentation 48 | 49 | The documentation is generated from source files using [Doxygen](http://www.stack.nl/~dimitri/doxygen/). To generate the documentation: 50 | 51 | cd Autobahn 52 | doxygen 53 | 54 | ## Publishing 55 | 56 | > Note: this section is only relevant for administrators of the [Autobahn web site](http://autobahn.ws/). 57 | 58 | To publish to the Autobahn web site ([here](http://autobahn.ws/android/reference/)), you will need [SCons](http://scons.org/) and [Taschenmesser](https://pypi.python.org/pypi/taschenmesser). 59 | 60 | Then do 61 | 62 | scons 63 | 64 | to build the docs and 65 | 66 | scons publish 67 | 68 | to build and publish the docs and 69 | 70 | scons -uc 71 | 72 | to cleanup. 73 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/SConstruct: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ## 3 | ## Copyright (C) 2014 Tavendo GmbH 4 | ## 5 | ## Licensed under the Apache License, Version 2.0 (the "License"); 6 | ## you may not use this file except in compliance with the License. 7 | ## You may obtain a copy of the License at 8 | ## 9 | ## http://www.apache.org/licenses/LICENSE-2.0 10 | ## 11 | ## Unless required by applicable law or agreed to in writing, software 12 | ## distributed under the License is distributed on an "AS IS" BASIS, 13 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | ## See the License for the specific language governing permissions and 15 | ## limitations under the License. 16 | ## 17 | ############################################################################### 18 | 19 | import os 20 | import json 21 | import pkg_resources 22 | 23 | taschenmesser = pkg_resources.resource_filename('taschenmesser', '..') 24 | #taschenmesser = "../../../infrequent/taschenmesser" 25 | env = Environment(tools = ['default', 'taschenmesser'], 26 | toolpath = [taschenmesser], 27 | ENV = os.environ) 28 | 29 | DOCSDIR = 'doc/html' 30 | S3DIR = '_upload' 31 | 32 | ## 33 | ## Doxygen Build 34 | ## 35 | docs = env.Command(DOCSDIR, [], "doxygen Doxyfile") 36 | env.AlwaysBuild(docs) 37 | Clean(docs, DOCSDIR) 38 | Default(docs) 39 | 40 | 41 | ## 42 | ## Upload to Amazon S3 43 | ## 44 | env['S3_RELPATH'] = DOCSDIR 45 | env['S3_BUCKET'] = 'autobahn.ws' 46 | env['S3_BUCKET_PREFIX'] = 'android/reference/' # note the trailing slash! 47 | env['S3_OBJECT_ACL'] = 'public-read' 48 | 49 | 50 | uploaded = [] 51 | import fnmatch 52 | 53 | for root, dirnames, filenames in os.walk(DOCSDIR): 54 | for filename in filenames: 55 | source = os.path.join(root, filename) 56 | target = os.path.join(S3DIR, source) 57 | uploaded.append(env.S3('{}.s3'.format(target), source)) 58 | 59 | Depends(uploaded, docs) 60 | Clean(docs, S3DIR) 61 | Alias("publish", uploaded) 62 | 63 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/libs/jackson-core-asl-1.9.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/libs/jackson-core-asl-1.9.7.jar -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/libs/jackson-mapper-asl-1.9.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/libs/jackson-mapper-asl-1.9.7.jar -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembernames class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembernames class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers enum * { 30 | public static **[] values(); 31 | public static ** valueOf(java.lang.String); 32 | } 33 | 34 | -keep class * implements android.os.Parcelable { 35 | public static final android.os.Parcelable$Creator *; 36 | } 37 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 12 | 13 | android.library=true 14 | # Project target. 15 | target=android-8 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/src/de/tavendo/autobahn/NoCopyByteArrayOutputStream.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2011-2012 Tavendo GmbH 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | import java.io.ByteArrayInputStream; 22 | import java.io.ByteArrayOutputStream; 23 | import java.io.InputStream; 24 | 25 | /** 26 | * OutputStream backed by a byte array. This class provides copyless access 27 | * to byte array backing the ByteArrayOutputStream 28 | */ 29 | public class NoCopyByteArrayOutputStream extends ByteArrayOutputStream { 30 | 31 | /** 32 | * Create new OutputStream backed by byte array. 33 | */ 34 | public NoCopyByteArrayOutputStream() { 35 | super(); 36 | } 37 | 38 | /** 39 | * Create new OutputStream backed by byte array. 40 | * 41 | * @param size Initial size of underlying byte array. 42 | */ 43 | public NoCopyByteArrayOutputStream(int size) { 44 | super(size); 45 | } 46 | 47 | /** 48 | * Wraps the underyling byte array into an InputStream. 49 | * 50 | * @return New InputStream wrapping byte buffer underlying this stream. 51 | */ 52 | public InputStream getInputStream() { 53 | return new ByteArrayInputStream(buf, 0, count); 54 | } 55 | 56 | /** 57 | * Get byte array underlying this OutputStream. This 58 | * does not copy any data, but return reference to the 59 | * underlying byte array. 60 | * 61 | * @return Underlying byte array by reference. 62 | */ 63 | public byte[] getByteArray() { 64 | return buf; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/src/de/tavendo/autobahn/WampConnectionHandler.java: -------------------------------------------------------------------------------- 1 | package de.tavendo.autobahn; 2 | 3 | public class WampConnectionHandler implements Wamp.ConnectionHandler { 4 | 5 | public void onOpen() { 6 | // TODO Auto-generated method stub 7 | 8 | } 9 | 10 | public void onClose(int code, String reason) { 11 | // TODO Auto-generated method stub 12 | 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/src/de/tavendo/autobahn/WampCraPermissions.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2012 Alejandro Hernandez 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WampCraPermissions { 22 | 23 | public WampCraRpcPermission[] rpc; 24 | public WampCraPubSubPermission[] pubsub; 25 | 26 | public WampCraPermissions() { 27 | } 28 | 29 | public WampCraPermissions(WampCraRpcPermission[] rpc, WampCraPubSubPermission[] pubsub) { 30 | this.rpc = rpc; 31 | this.pubsub = pubsub; 32 | } 33 | 34 | public WampCraRpcPermission[] getRpc() { 35 | return rpc; 36 | } 37 | 38 | public void setRpc(WampCraRpcPermission[] rpc) { 39 | this.rpc = rpc; 40 | } 41 | 42 | public WampCraPubSubPermission[] getPubsub() { 43 | return pubsub; 44 | } 45 | 46 | public void setPubsub(WampCraPubSubPermission[] pubsub) { 47 | this.pubsub = pubsub; 48 | } 49 | 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/src/de/tavendo/autobahn/WampCraPubSubPermission.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2012 Alejandro Hernandez 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WampCraPubSubPermission{ 22 | 23 | boolean prefix; 24 | String uri; 25 | boolean pub; 26 | boolean sub; 27 | 28 | public WampCraPubSubPermission() { 29 | } 30 | 31 | public WampCraPubSubPermission(boolean prefix, String uri, boolean pub, boolean sub) { 32 | this.prefix = prefix; 33 | this.uri = uri; 34 | this.pub = pub; 35 | this.sub = sub; 36 | } 37 | 38 | public boolean isPrefix() { 39 | return prefix; 40 | } 41 | public void setPrefix(boolean prefix) { 42 | this.prefix = prefix; 43 | } 44 | public String getUri() { 45 | return uri; 46 | } 47 | public void setUri(String uri) { 48 | this.uri = uri; 49 | } 50 | public boolean isPub() { 51 | return pub; 52 | } 53 | public void setPub(boolean pub) { 54 | this.pub = pub; 55 | } 56 | public boolean isSub() { 57 | return sub; 58 | } 59 | public void setSub(boolean sub) { 60 | this.sub = sub; 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/src/de/tavendo/autobahn/WampCraRpcPermission.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2012 Alejandro Hernandez 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WampCraRpcPermission{ 22 | 23 | boolean call; 24 | String uri; 25 | 26 | public WampCraRpcPermission() { 27 | } 28 | 29 | public WampCraRpcPermission(boolean call, String uri) { 30 | this.call = call; 31 | this.uri = uri; 32 | } 33 | public boolean isCall() { 34 | return call; 35 | } 36 | public void setCall(boolean call) { 37 | this.call = call; 38 | } 39 | public String getUri() { 40 | return uri; 41 | } 42 | public void setUri(String uri) { 43 | this.uri = uri; 44 | } 45 | 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/src/de/tavendo/autobahn/WampOptions.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2011-2012 Tavendo GmbH 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WampOptions extends WebSocketOptions { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/src/de/tavendo/autobahn/WebSocketConnectionHandler.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2011-2012 Tavendo GmbH 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | /** 22 | * WebSockets event handler. Users will usually provide an instance of a class 23 | * derived from this to handle WebSockets received messages and open/close events 24 | */ 25 | public class WebSocketConnectionHandler implements WebSocket.ConnectionHandler { 26 | 27 | /** 28 | * Fired when the WebSockets connection has been established. 29 | * After this happened, messages may be sent. 30 | */ 31 | public void onOpen() { 32 | } 33 | 34 | /** 35 | * Fired when the WebSockets connection has deceased (or could 36 | * not established in the first place). 37 | * 38 | * @param code Close code. 39 | * @param reason Close reason (human-readable). 40 | */ 41 | public void onClose(int code, String reason) { 42 | } 43 | 44 | /** 45 | * Fired when a text message has been received (and text 46 | * messages are not set to be received raw). 47 | * 48 | * @param payload Text message payload or null (empty payload). 49 | */ 50 | public void onTextMessage(String payload) { 51 | } 52 | 53 | /** 54 | * Fired when a text message has been received (and text 55 | * messages are set to be received raw). 56 | * 57 | * @param payload Text message payload as raw UTF-8 or null (empty payload). 58 | */ 59 | public void onRawTextMessage(byte[] payload) { 60 | } 61 | 62 | /** 63 | * Fired when a binary message has been received. 64 | * 65 | * @param payload Binar message payload or null (empty payload). 66 | */ 67 | public void onBinaryMessage(byte[] payload) { 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Autobahn/src/de/tavendo/autobahn/WebSocketException.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright 2011-2012 Tavendo GmbH 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | 19 | package de.tavendo.autobahn; 20 | 21 | public class WebSocketException extends Exception { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | public WebSocketException(String message) { 26 | super(message); 27 | } 28 | 29 | public WebSocketException(String message, Throwable t) { 30 | super(message, t); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/CONTRIBUTORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/CONTRIBUTORS -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | gen/* 3 | !gen/PLACEHOLDER 4 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | BroadcastClient 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/README.md: -------------------------------------------------------------------------------- 1 | WebSocket Broadcast Client 2 | ========================== 3 | 4 | This example implements a simple WebSocket client that receives message 5 | broadcast by a WebSocket broadcast server. Received messages are 6 | displayed in a scrollbox. The client also allows to send message to the 7 | broadcast server to received by other connected clients. 8 | 9 | For information on how to install AutobahnAndroid and get up and running, please 10 | check out the [Get Started](http://autobahn.ws/android/getstarted). 11 | 12 | WebSocket Broadcast Server 13 | -------------------------- 14 | 15 | When you don't have a WebSocket broadcast server around, you can use the 16 | [Broadcasting over WebSocket](http://autobahn.ws/python/tutorials/broadcast) example provided with AutobahnPython. 17 | 18 | 19 | cd scm/AutobahnPython/examples/websocket/broadcast 20 | python server.py 21 | 22 | 23 | Running 24 | ------- 25 | 26 | 1. Build and run the app. 27 | 2. Enter the IP and port of your WebSocket broadcast server. 28 | 3. Press "connect". 29 | 4. Enter your message and press "send". 30 | 31 | For convenience, the app will remember the server IP/port as app settings. 32 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | de.tavendo.autobahn.example 7 | autobahn-example-parent 8 | 1.0-SNAPSHOT 9 | 10 | 11 | broadcast-client-example 12 | apk 13 | 14 | Autobahn Example - Broadcast Client 15 | 16 | 17 | 18 | com.google.android 19 | android 20 | 21 | 22 | de.tavendo 23 | autobahn-android 24 | 25 | 26 | 27 | 28 | src 29 | 30 | 31 | com.jayway.maven.plugins.android.generation2 32 | android-maven-plugin 33 | true 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 12 | 13 | android.library.reference.1=../../Autobahn 14 | # Project target. 15 | target=android-8 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/menu/main_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #028ec9 4 | #cccccc 5 | #333333 6 | 7 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/BroadcastClient/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Autobahn Broadcast Client 4 | 5 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | gen/* 3 | !gen/PLACEHOLDER 4 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | CRAClient 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/README.md: -------------------------------------------------------------------------------- 1 | WAMP CRA Client 2 | ===================== 3 | 4 | This example implements a Wamp client that authenticates and tests RPC and PubSub. 5 | 6 | For information on how to install AutobahnAndroid and get up and running, please 7 | check out the [Get Started](http://autobahn.ws/android/getstarted). 8 | 9 | WebSocket Wamp Cra Server 10 | --------------------- 11 | 12 | When you don't have a Wamp Cra server around, you can use the 13 | [WAMP CRA example](http://github.com/crossbario/autobahn-python/tree/master/examples/wamp/authentication) provided with AutobahnPython. 14 | 15 | 16 | cd scm/AutobahnPython/examples/wamp/authentication/ 17 | python server.py 18 | 19 | 20 | Running 21 | ------- 22 | 23 | 1. Build and run the app. 24 | 2. Enter the IP and port of your WAMP-CRA server. 25 | 3. Press "connect". 26 | 27 | For convenience, the app will remember the server IP/port as app settings. 28 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | de.tavendo.autobahn.example 7 | autobahn-example-parent 8 | 1.0-SNAPSHOT 9 | 10 | 11 | cra-client-example 12 | apk 13 | 14 | Autobahn Example - CRA Client 15 | 16 | 17 | 18 | com.google.android 19 | android 20 | 21 | 22 | de.tavendo 23 | autobahn-android 24 | 25 | 26 | 27 | 28 | src 29 | 30 | 31 | com.jayway.maven.plugins.android.generation2 32 | android-maven-plugin 33 | true 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 12 | 13 | android.library.reference.1=../../Autobahn 14 | # Project target. 15 | target=android-8 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 20 | 21 | 26 | 27 | 28 | 34 | 35 | 36 | 42 | 43 | 44 | 45 | 46 | 50 | 51 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/menu/main_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #028ec9 4 | #cccccc 5 | #333333 6 | 7 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/CRAClient/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Autobahn CRA Client 4 | 5 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | gen/* 3 | !gen/PLACEHOLDER 4 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | EchoClient 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/README.md: -------------------------------------------------------------------------------- 1 | WebSocket Echo Client 2 | ===================== 3 | 4 | This example implements a simple WebSocket client that send message to 5 | a WebSocket server which is supposed to echo back the message. The message 6 | is then shown in a popup. 7 | 8 | For information on how to install AutobahnAndroid and get up and running, please 9 | check out the [Get Started](http://autobahn.ws/android/getstarted). 10 | 11 | WebSocket Echo Server 12 | --------------------- 13 | 14 | When you don't have a WebSocket echo server around, you can use the 15 | [WebSocket Echo example](http://autobahn.ws/python/tutorials/echo) provided with AutobahnPython. 16 | 17 | 18 | cd scm/AutobahnPython/examples/websocket/echo 19 | python server.py 20 | 21 | 22 | Running 23 | ------- 24 | 25 | 1. Build and run the app. 26 | 2. Enter the IP and port of your WebSocket echo server. 27 | 3. Press "connect". 28 | 4. Enter your message and press "send". 29 | 30 | For convenience, the app will remember the server IP/port as app settings. 31 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | de.tavendo.autobahn.example 7 | autobahn-example-parent 8 | 1.0-SNAPSHOT 9 | 10 | 11 | echo-client-example 12 | apk 13 | 14 | Autobahn Example - Echo Client 15 | 16 | 17 | 18 | com.google.android 19 | android 20 | 21 | 22 | de.tavendo 23 | autobahn-android 24 | 25 | 26 | 27 | 28 | src 29 | 30 | 31 | com.jayway.maven.plugins.android.generation2 32 | android-maven-plugin 33 | true 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 12 | 13 | android.library.reference.1=../../Autobahn 14 | # Project target. 15 | target=android-8 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/menu/main_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #028ec9 4 | #cccccc 5 | #333333 6 | 7 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/EchoClient/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Autobahn Echo Client 4 | 5 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/README.md: -------------------------------------------------------------------------------- 1 | AutobahnAndroid Examples 2 | ======================== 3 | 4 | This folder contains complete working code examples that demonstrate various 5 | features of AutobahnAndroid. 6 | 7 | Since AutobahnAndroid implements both standard WebSocket and WAMP, which provides asynchronous RPC and PubSub layered on top of WebSocket, there are examples for both: 8 | 9 | WebSocket Examples 10 | ------------------ 11 | 12 | * Echo Client 13 | * Broadcast Client 14 | * AutobahnTestsuite Client 15 | 16 | WAMP Examples 17 | ------------- 18 | 19 | * RPC Client 20 | * PubSub Client 21 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | gen/* 3 | !gen/PLACEHOLDER 4 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | SimplePubSub 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/README.md: -------------------------------------------------------------------------------- 1 | WAMP PubSub Client 2 | ================== 3 | 4 | This example implements a simple WAMP PubSub client. The client subscribes 5 | to a specific topic and upon receiving events on the subscribed topic, 6 | presents the received information. 7 | 8 | For information on how to install AutobahnAndroid and get up and running, please 9 | check out the [Get Started](http://autobahn.ws/android/getstarted). 10 | 11 | 12 | WAMP PubSub Server 13 | ------------------ 14 | 15 | Obviously, you will need a WAMP server that provides the PubSub topics 16 | and message brokering used by the client. 17 | 18 | To make this easy, we have included a special mode with [AutobahnTestsuite](http://autobahn.ws/testsuite) that 19 | provides an embedded WAMP server. 20 | 21 | Setting up AutobahnTestsuite is easy. Here is a complete [usage guide](http://autobahn.ws/testsuite/usage). 22 | 23 | For the impatient, here is the quick install: 24 | 25 | 1. Install Python 26 | 2. Install setuptools 27 | 3. easy_install autobahntestsuite 28 | 29 | You can then start the embedded WAMP server by doing 30 | 31 | wstest -d -m wampserver -w ws://localhost:9000 32 | 33 | 34 | Open a browser on 35 | 36 | http://localhost:9000 37 | 38 | You can open one or more browser windows/tabs to check out PubSub and also send events 39 | to the Android PubSub demo client (by pressing the middle button "Publish Event"). 40 | 41 | If you want to start hacking on your own WAMP server, have a look at [AutobahnPython](http://autobahn.ws/python) and the [WAMP PubSub tutorial](http://autobahn.ws/python/tutorials/pubsub) there 42 | or check out different [WAMP server implementations](http://wamp.ws/implementations). 43 | 44 | Running 45 | ------- 46 | 47 | 1. Build and run the app. 48 | 2. Enter the IP and port of your WAMP server. 49 | 3. Press "connect". 50 | 51 | The topic will be subscribed automatically and received event information is shown in popups. 52 | 53 | For convenience, the app will remember the server IP/port as app settings. 54 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | de.tavendo.autobahn.example 7 | autobahn-example-parent 8 | 1.0-SNAPSHOT 9 | 10 | 11 | simple-pupsub-client-example 12 | apk 13 | 14 | Autobahn Example - Simple PubSub Client 15 | 16 | 17 | 18 | com.google.android 19 | android 20 | 21 | 22 | de.tavendo 23 | autobahn-android 24 | 25 | 26 | 27 | 28 | src 29 | 30 | 31 | com.jayway.maven.plugins.android.generation2 32 | android-maven-plugin 33 | true 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 12 | 13 | android.library.reference.1=../../Autobahn 14 | # Project target. 15 | target=android-8 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #028ec9 4 | #cccccc 5 | #333333 6 | 7 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimplePubSub/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello World, SimplePubSubActivity! 4 | SimplePubSub 5 | 6 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | gen/* 3 | !gen/PLACEHOLDER 4 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | SimpleRpc 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/README.md: -------------------------------------------------------------------------------- 1 | WAMP RPC Client 2 | =============== 3 | 4 | This example implements a simple WAMP RPC client. The client issues a number 5 | of RPCs on a remote WAMP server and presents the results. 6 | 7 | For information on how to install AutobahnAndroid and get up and running, please 8 | check out the [Get Started](http://autobahn.ws/android/getstarted). 9 | 10 | 11 | WAMP RPC Server 12 | --------------- 13 | 14 | Obviously, you will need a WAMP server that provides the RPC endpoints 15 | called by the test client. 16 | 17 | To make this easy, we have included a special mode with [AutobahnTestsuite](http://autobahn.ws/testsuite) that 18 | provides an embedded WAMP server. 19 | 20 | Setting up AutobahnTestsuite is easy. Here is a complete [usage guide](http://autobahn.ws/testsuite/usage). 21 | 22 | For the impatient, here is the quick install: 23 | 24 | 1. Install Python 25 | 2. Install setuptools 26 | 3. easy_install autobahntestsuite 27 | 28 | You can then start the embedded WAMP server by doing 29 | 30 | wstest -d -m wampserver -w ws://localhost:9000 31 | 32 | 33 | If you want to create new RPC endpoint or start hacking on your own WAMP server, have 34 | a look at [AutobahnPython](http://autobahn.ws/python) and the [WAMP RPC tutorial](http://autobahn.ws/python/tutorials/rpc) there 35 | or check out different [WAMP server implementations](http://wamp.ws/implementations). 36 | 37 | Running 38 | ------- 39 | 40 | 1. Build and run the app. 41 | 2. Enter the IP and port of your WAMP server. 42 | 3. Press "connect". 43 | 44 | The RPCs will be fired automatically and the results shown as popups. 45 | 46 | For convenience, the app will remember the server IP/port as app settings. 47 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | de.tavendo.autobahn.example 7 | autobahn-example-parent 8 | 1.0-SNAPSHOT 9 | 10 | 11 | simple-rpc-client-example 12 | apk 13 | 14 | Autobahn Example - Simple RPC Client 15 | 16 | 17 | 18 | com.google.android 19 | android 20 | 21 | 22 | de.tavendo 23 | autobahn-android 24 | 25 | 26 | 27 | 28 | src 29 | 30 | 31 | com.jayway.maven.plugins.android.generation2 32 | android-maven-plugin 33 | true 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 12 | 13 | android.library.reference.1=../../Autobahn 14 | # Project target. 15 | target=android-8 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #028ec9 4 | #cccccc 5 | #333333 6 | 7 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/SimpleRpc/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | RPC Test 4 | Autobahn Rpc Demo 5 | 6 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | gen/* 3 | !gen/PLACEHOLDER 4 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestSuiteClient 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Wed Sep 21 17:48:15 CEST 2011 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 4 | org.eclipse.jdt.core.compiler.compliance=1.5 5 | org.eclipse.jdt.core.compiler.source=1.5 6 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/README.md: -------------------------------------------------------------------------------- 1 | AutobahnTestsuite Client 2 | ======================== 3 | 4 | This example implements a client for the [AutobahnTestsuite](http://autobahn.ws/testsuite) so that 5 | AutobahnAndroid can be tested for protocol compliance. 6 | 7 | 8 | Running 9 | ------- 10 | 11 | 1. Build and run the app. 12 | 2. Enter the IP and port of your AutobahnTestsuite fuzzing server. 13 | 3. Optionally, edit the client identification 14 | 4. Press "Start Tests". 15 | 16 | For convenience, the app will remember the server IP/port and client identifier as app settings. 17 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | de.tavendo.autobahn.example 7 | autobahn-example-parent 8 | 1.0-SNAPSHOT 9 | 10 | 11 | autobahn-testsuite-client 12 | apk 13 | 14 | Autobahn Example - Autobahn Testsuite Client 15 | 16 | 17 | 18 | com.google.android 19 | android 20 | 21 | 22 | de.tavendo 23 | autobahn-android 24 | 25 | 26 | 27 | 28 | src 29 | 30 | 31 | com.jayway.maven.plugins.android.generation2 32 | android-maven-plugin 33 | true 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembernames class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembernames class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers enum * { 30 | public static **[] values(); 31 | public static ** valueOf(java.lang.String); 32 | } 33 | 34 | -keep class * implements android.os.Parcelable { 35 | public static final android.os.Parcelable$Creator *; 36 | } 37 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt 12 | 13 | android.library.reference.1=../../Autobahn 14 | # Project target. 15 | target=android-8 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #028ec9 4 | #cccccc 5 | #333333 6 | 7 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/Demo/TestSuiteClient/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | WS Test 4 | Autobahn Test Client 5 | 6 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/NOTICE: -------------------------------------------------------------------------------- 1 | AutobahnAndroid 2 | Copyright 2011,2012 Tavendo GmbH. Licensed under Apache 2.0 3 | This product includes software developed at Tavendo GmbH http://www.tavendo.de 4 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/autobahnandroid.sublime.project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "follow_symlinks": false, 6 | "name": "Autobahn Android", 7 | "path": ".", 8 | "folder_exclude_patterns": ["build", "dist", "*.egg-info"], 9 | "file_exclude_patterns": ["*.pyc"] 10 | } 11 | ], 12 | "settings": 13 | { 14 | "tab_size": 3, 15 | "translate_tabs_to_spaces": true, 16 | "use_tab_stops": true, 17 | "detect_indentation": false, 18 | "trim_trailing_white_space_on_save": true, 19 | "ensure_newline_at_eof_on_save": true, 20 | "default_encoding": "UTF-8" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | _gen 3 | _upload 4 | _test 5 | _spelling 6 | _static/img/gen 7 | .sconsign.dblite 8 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo "Targets:" 3 | @echo "" 4 | @echo " clean : cleanup build artifacts" 5 | @echo " test : build everything and run locally" 6 | @echo " test_no_network : build everything for no network access and run locally" 7 | @echo " publish : build everything and publish to S3" 8 | @echo " copy : copy over shared files to other AutobahnXXX repos" 9 | @echo " install_deps : install build dependencies" 10 | @echo " spelling : run spell checking" 11 | @echo " doctest : run doctests" 12 | @echo "" 13 | 14 | build: 15 | scons 16 | 17 | build_no_network: 18 | scons --no_network 19 | 20 | test: build 21 | python serve.py --root ./_build --silence 22 | 23 | test_no_network: build_no_network 24 | python serve.py --root ./_build --silence 25 | 26 | clean: 27 | rm -rf _build 28 | rm -rf _build_uploaded 29 | rm -rf _static/img/gen 30 | rm -rf _test 31 | rm -rf _spelling 32 | 33 | publish: clean build 34 | scons publish 35 | 36 | doctest: 37 | PYTHONPATH=../autobahn sphinx-build -b doctest -v . _test 38 | 39 | copy_makefile: 40 | cp Makefile ../../AutobahnJS/doc/ 41 | cp Makefile ../../AutobahnAndroid/doc/ 42 | cp Makefile ../../AutobahnCpp/doc/ 43 | cp Makefile ../../AutobahnTestsuite/doc/ 44 | 45 | copy_gitignore: 46 | cp .gitignore ../../AutobahnJS/doc/ 47 | cp .gitignore ../../AutobahnAndroid/doc/ 48 | cp .gitignore ../../AutobahnCpp/doc/ 49 | cp .gitignore ../../AutobahnTestsuite/doc/ 50 | 51 | copy_serve: 52 | cp serve.py ../../AutobahnJS/doc/ 53 | cp serve.py ../../AutobahnAndroid/doc/ 54 | cp serve.py ../../AutobahnCpp/doc/ 55 | cp serve.py ../../AutobahnTestsuite/doc/ 56 | 57 | # copy_readme: 58 | # cp README.md ../../AutobahnJS/doc/ 59 | # cp README.md ../../AutobahnAndroid/doc/ 60 | # cp README.md ../../AutobahnCpp/doc/ 61 | # cp README.md ../../AutobahnTestsuite/doc/ 62 | 63 | copy: copy_makefile copy_gitignore copy_serve 64 | 65 | install_deps: 66 | pip install -U scour 67 | pip install -U taschenmesser 68 | #pip install -U scons 69 | pip install -U sphinx 70 | pip install -U sphinx-bootstrap-theme 71 | pip install -U pyenchant 72 | pip install -U sphinxcontrib-spelling 73 | pip install -U repoze.sphinx.autointerface 74 | 75 | spelling: 76 | PYTHONPATH=../autobahn sphinx-build -b spelling . _spelling 77 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | The documentation is generated using [Sphinx](http://sphinx.pocoo.org/) and the generated documentation is hosted [here](http://autobahn.ws/android). 4 | 5 | ## Prerequisites 6 | 7 | You will need to have Python and [SCons](http://www.scons.org/) installed. To install the rest of the build dependencies 8 | 9 | ```sh 10 | make install_deps 11 | ``` 12 | 13 | Then, to get help on available build targets, just type 14 | 15 | ```sh 16 | make 17 | ``` 18 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse0.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse1.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse2.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse3.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/autobahn_eclipse4.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_static/img/logo.png -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/_templates/side-primary.html: -------------------------------------------------------------------------------- 1 |
2 | 6 |

Autobahn|Android

7 | 8 | {% if not no_network %} 9 |

10 | 12 |

13 | {% else %} 14 | 15 | {% endif %} 16 |
17 | 23 | 24 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/contents.rst: -------------------------------------------------------------------------------- 1 | :tocdepth: 0 2 | :orphan: 3 | 4 | .. _site_contents: 5 | 6 | Site Contents 7 | ============= 8 | 9 | .. toctree:: 10 | :maxdepth: 3 11 | 12 | index 13 | gettingstarted 14 | examples 15 | _gen/packages 16 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/examples.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ========= 3 | 4 | .. container:: legacynotice 5 | 6 | |ab| implements version 1 of WAMP. 7 | 8 | This is incompatible with version 2 of WAMP which is already implemented in Autobahn|Python as well as Autobahn|JS 9 | 10 | Migration of |ab| to WAMP v2 is coming, but we cannot guarantee a release date. 11 | 12 | 13 | Tutorials and examples are here to showcase specific areas of Autobahn|Android . They include self-contained, fully working code, but may not cover all features available. For the latter, please consult the :doc:`API reference `. 14 | 15 | All tutorials and examples are hosted on `GitHub `_. 16 | 17 | WebSocket Programming 18 | ------------------------ 19 | 20 | * `Hello world: WebSocket Echo `_ 21 | * `Broadcasting over WebSocket `_ 22 | * `AutobahnTestsuite client `_ 23 | 24 | WAMP Programming 25 | ------------------- 26 | 27 | * `Remote Procedure Calls with AutobahnAndroid `_ 28 | * `Publish & Subscribe with AutobahnAndroid `_ 29 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/serve.py: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ## 3 | ## Copyright (C) 2014 Tavendo GmbH 4 | ## 5 | ## Licensed under the Apache License, Version 2.0 (the "License"); 6 | ## you may not use this file except in compliance with the License. 7 | ## You may obtain a copy of the License at 8 | ## 9 | ## http://www.apache.org/licenses/LICENSE-2.0 10 | ## 11 | ## Unless required by applicable law or agreed to in writing, software 12 | ## distributed under the License is distributed on an "AS IS" BASIS, 13 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | ## See the License for the specific language governing permissions and 15 | ## limitations under the License. 16 | ## 17 | ############################################################################### 18 | 19 | if __name__ == "__main__": 20 | 21 | import sys 22 | import argparse 23 | import mimetypes 24 | 25 | from twisted.python import log 26 | from twisted.internet import reactor 27 | from twisted.web.server import Site 28 | from twisted.web.static import File 29 | from twisted.internet.endpoints import serverFromString 30 | 31 | mimetypes.add_type('image/svg+xml', '.svg') 32 | mimetypes.add_type('text/javascript', '.jgz') 33 | 34 | parser = argparse.ArgumentParser() 35 | 36 | parser.add_argument("--root", type = str, default = ".", 37 | help = 'Web document root directory') 38 | 39 | parser.add_argument("--endpoint", type = str, default = "tcp:8080", 40 | help = 'Twisted server endpoint descriptor, e.g. "tcp:8080" or "unix:/tmp/mywebsocket".') 41 | 42 | parser.add_argument("-s", "--silence", action = "store_true", 43 | help = "Disable access logging.") 44 | 45 | args = parser.parse_args() 46 | log.startLogging(sys.stdout) 47 | 48 | factory = Site(File(args.root)) 49 | if args.silence: 50 | factory.log = lambda _: None 51 | factory.noisy = False 52 | 53 | server = serverFromString(reactor, args.endpoint) 54 | server.listen(factory) 55 | 56 | reactor.run() 57 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/autobanh-src/autobahn-android/doc/spelling_wordlist.txt: -------------------------------------------------------------------------------- 1 | Twisted 2 | asyncio 3 | Trollius 4 | inlineCallbacks 5 | Deferreds 6 | inline 7 | excludeMe 8 | wxPython 9 | Tox 10 | CPython 11 | stdlib 12 | timestamp 13 | Lua 14 | rawsocket 15 | serializer 16 | subprotocol 17 | subprotocols 18 | Hybi 19 | Hixie 20 | args 21 | kwargs 22 | unserialized 23 | unserialize 24 | serializable 25 | Testee 26 | Jython 27 | wallclock 28 | walltime 29 | mixin 30 | Mixin 31 | hostname 32 | serializers 33 | app 34 | apps 35 | util 36 | wamp 37 | WAMP 38 | Ctor 39 | Iff 40 | iff 41 | ping 42 | pong 43 | openHandshakeTimeout 44 | closeHandshakeTimeout 45 | wasClean 46 | logOctets 47 | logFrames 48 | reasonUtf 49 | sendMessage 50 | websocket 51 | validator 52 | Bjoern 53 | Hoehrmann 54 | codepoint 55 | currentIndex 56 | totalIndex 57 | websocket 58 | xormasker 59 | localhost 60 | polyfill 61 | useragent 62 | sendPing 63 | sendPong 64 | sendClose 65 | Nagle 66 | endsOnCodePoint 67 | Changelog 68 | changelog 69 | docstrings 70 | websockify 71 | ws 72 | wss 73 | slowsquare 74 | plugin 75 | pubsub 76 | Peticolas 77 | isSecure 78 | permessage 79 | Nagle 80 | endsOnCodePoint 81 | blog 82 | backport 83 | backports 84 | twistd 85 | frontend 86 | backend 87 | frontends 88 | backends 89 | setProtocolOptions 90 | serverConnectionDropTimeout 91 | reasonRaw 92 | serverStatus 93 | onConnect 94 | namespace 95 | unsubscribe 96 | bzip 97 | http 98 | uri 99 | longpoll 100 | choosereactor 101 | flashpolicy 102 | autoimport 103 | longpoll 104 | chopsize 105 | lifecycle 106 | Lifecycle 107 | Callees 108 | callees 109 | Testsuite 110 | testsuite 111 | Subpackages 112 | subpath 113 | subpaths 114 | pongs 115 | pings 116 | params 117 | unescaped 118 | utf 119 | acknowledgement 120 | unregistration 121 | unregister 122 | unregistered 123 | unsubscription 124 | unsubscribe 125 | unsubscribed 126 | deserialization 127 | deserialize 128 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/base_java-src/OWNERS: -------------------------------------------------------------------------------- 1 | magjed@webrtc.org 2 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/base_java-src/README.md: -------------------------------------------------------------------------------- 1 | ### base_java.jar源码 2 | 3 | 来自项目,路径为`/src/webrtc/base/java/src/org/webrtc` 4 | 5 | ### 分析 6 | 7 | #### Logging 8 | 9 | 日志输出类 10 | 11 | #### Size 12 | 13 | TODO 工具类,大小。 14 | 15 | #### ThreadUtils 16 | 17 | 检查方法是否运行在现在的进程中。 18 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/base_java-src/Size.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** 14 | * Class for representing size of an object. Very similar to android.util.Size but available on all 15 | * devices. 16 | */ 17 | public class Size { 18 | public int width; 19 | public int height; 20 | 21 | public Size(int width, int height) { 22 | this.width = width; 23 | this.height = height; 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return width + "x" + height; 29 | } 30 | 31 | @Override 32 | public boolean equals(Object other) { 33 | if (!(other instanceof Size)) { 34 | return false; 35 | } 36 | final Size otherSize = (Size) other; 37 | return width == otherSize.width && height == otherSize.height; 38 | } 39 | 40 | @Override 41 | public int hashCode() { 42 | // Use prime close to 2^16 to avoid collisions for normal values less than 2^16. 43 | return 1 + 65537 * width + height; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/AudioSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** 14 | * Java wrapper for a C++ AudioSourceInterface. Used as the source for one or 15 | * more {@code AudioTrack} objects. 16 | */ 17 | public class AudioSource extends MediaSource { 18 | public AudioSource(long nativeSource) { 19 | super(nativeSource); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/AudioTrack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** Java wrapper for a C++ AudioTrackInterface */ 14 | public class AudioTrack extends MediaStreamTrack { 15 | public AudioTrack(long nativeTrack) { 16 | super(nativeTrack); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/CallSessionFileRotatingLogSink.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | public class CallSessionFileRotatingLogSink { 14 | static { 15 | System.loadLibrary("jingle_peerconnection_so"); 16 | } 17 | 18 | private long nativeSink; 19 | 20 | public static byte[] getLogData(String dirPath) { 21 | return nativeGetLogData(dirPath); 22 | } 23 | 24 | public CallSessionFileRotatingLogSink( 25 | String dirPath, int maxFileSize, Logging.Severity severity) { 26 | nativeSink = nativeAddSink(dirPath, maxFileSize, severity.ordinal()); 27 | } 28 | 29 | public void dispose() { 30 | if (nativeSink != 0) { 31 | nativeDeleteSink(nativeSink); 32 | nativeSink = 0; 33 | } 34 | } 35 | 36 | private static native long nativeAddSink(String dirPath, int maxFileSize, int severity); 37 | private static native void nativeDeleteSink(long nativeSink); 38 | private static native byte[] nativeGetLogData(String dirPath); 39 | } 40 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/Camera1Capturer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | import org.webrtc.CameraEnumerationAndroid.CaptureFormat; 14 | 15 | import android.content.Context; 16 | 17 | import java.util.List; 18 | 19 | public class Camera1Capturer extends CameraCapturer { 20 | private final boolean captureToTexture; 21 | 22 | public Camera1Capturer( 23 | String cameraName, CameraEventsHandler eventsHandler, boolean captureToTexture) { 24 | super(cameraName, eventsHandler, new Camera1Enumerator(captureToTexture)); 25 | 26 | this.captureToTexture = captureToTexture; 27 | } 28 | 29 | @Override 30 | protected void createCameraSession(CameraSession.CreateSessionCallback createSessionCallback, 31 | CameraSession.Events events, Context applicationContext, 32 | SurfaceTextureHelper surfaceTextureHelper, String cameraName, int width, int height, 33 | int framerate) { 34 | Camera1Session.create(createSessionCallback, events, captureToTexture, applicationContext, 35 | surfaceTextureHelper, Camera1Enumerator.getCameraIndex(cameraName), width, height, 36 | framerate); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/Camera2Capturer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | import android.annotation.TargetApi; 14 | import android.content.Context; 15 | import android.hardware.camera2.CameraManager; 16 | 17 | @TargetApi(21) 18 | public class Camera2Capturer extends CameraCapturer { 19 | private final Context context; 20 | private final CameraManager cameraManager; 21 | 22 | public Camera2Capturer(Context context, String cameraName, CameraEventsHandler eventsHandler) { 23 | super(cameraName, eventsHandler, new Camera2Enumerator(context)); 24 | 25 | this.context = context; 26 | cameraManager = (CameraManager) context.getSystemService(Context.CAMERA_SERVICE); 27 | } 28 | 29 | @Override 30 | protected void createCameraSession(CameraSession.CreateSessionCallback createSessionCallback, 31 | CameraSession.Events events, Context applicationContext, 32 | SurfaceTextureHelper surfaceTextureHelper, String cameraName, int width, int height, 33 | int framerate) { 34 | Camera2Session.create(createSessionCallback, events, applicationContext, cameraManager, 35 | surfaceTextureHelper, cameraName, width, height, framerate); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/CameraEnumerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | import org.webrtc.CameraEnumerationAndroid.CaptureFormat; 14 | 15 | import java.util.List; 16 | 17 | public interface CameraEnumerator { 18 | public String[] getDeviceNames(); 19 | public boolean isFrontFacing(String deviceName); 20 | public boolean isBackFacing(String deviceName); 21 | public List getSupportedFormats(String deviceName); 22 | 23 | public CameraVideoCapturer createCapturer( 24 | String deviceName, CameraVideoCapturer.CameraEventsHandler eventsHandler); 25 | } 26 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/CameraSession.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | public interface CameraSession { 14 | // Callbacks are fired on the camera thread. 15 | public interface CreateSessionCallback { 16 | void onDone(CameraSession session); 17 | void onFailure(String error); 18 | } 19 | 20 | // Events are fired on the camera thread. 21 | public interface Events { 22 | void onCameraOpening(); 23 | void onCameraError(CameraSession session, String error); 24 | void onCameraDisconnected(CameraSession session); 25 | void onCameraClosed(CameraSession session); 26 | void onByteBufferFrameCaptured( 27 | CameraSession session, byte[] data, int width, int height, int rotation, long timestamp); 28 | void onTextureFrameCaptured(CameraSession session, int width, int height, int oesTextureId, 29 | float[] transformMatrix, int rotation, long timestamp); 30 | } 31 | 32 | /** 33 | * Stops the capture. Waits until no more calls to capture observer will be made. 34 | * If waitCameraStop is true, also waits for the camera to stop. 35 | */ 36 | void stop(); 37 | } 38 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/GlUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | import android.opengl.GLES20; 14 | 15 | import java.nio.ByteBuffer; 16 | import java.nio.ByteOrder; 17 | import java.nio.FloatBuffer; 18 | 19 | /** 20 | * Some OpenGL static utility functions. 21 | */ 22 | public class GlUtil { 23 | private GlUtil() {} 24 | 25 | // Assert that no OpenGL ES 2.0 error has been raised. 26 | public static void checkNoGLES2Error(String msg) { 27 | int error = GLES20.glGetError(); 28 | if (error != GLES20.GL_NO_ERROR) { 29 | throw new RuntimeException(msg + ": GLES20 error: " + error); 30 | } 31 | } 32 | 33 | public static FloatBuffer createFloatBuffer(float[] coords) { 34 | // Allocate a direct ByteBuffer, using 4 bytes per float, and copy coords into it. 35 | ByteBuffer bb = ByteBuffer.allocateDirect(coords.length * 4); 36 | bb.order(ByteOrder.nativeOrder()); 37 | FloatBuffer fb = bb.asFloatBuffer(); 38 | fb.put(coords); 39 | fb.position(0); 40 | return fb; 41 | } 42 | 43 | /** 44 | * Generate texture with standard parameters. 45 | */ 46 | public static int generateTexture(int target) { 47 | final int textureArray[] = new int[1]; 48 | GLES20.glGenTextures(1, textureArray, 0); 49 | final int textureId = textureArray[0]; 50 | GLES20.glBindTexture(target, textureId); 51 | GLES20.glTexParameterf(target, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR); 52 | GLES20.glTexParameterf(target, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR); 53 | GLES20.glTexParameterf(target, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE); 54 | GLES20.glTexParameterf(target, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE); 55 | checkNoGLES2Error("generateTexture"); 56 | return textureId; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/Histogram.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** 14 | * Class for holding the native pointer of a histogram. Since there is no way to destroy a 15 | * histogram, please don't create unnecessary instances of this object. This class is thread safe. 16 | * 17 | * Usage example: 18 | * private static final Histogram someMetricHistogram = 19 | * Histogram.createCounts("WebRTC.Video.SomeMetric", 1, 10000, 50); 20 | * someMetricHistogram.addSample(someVariable); 21 | */ 22 | class Histogram { 23 | private final long handle; 24 | 25 | private Histogram(long handle) { 26 | this.handle = handle; 27 | } 28 | 29 | static public Histogram createCounts(String name, int min, int max, int bucketCount) { 30 | return new Histogram(nativeCreateCounts(name, min, max, bucketCount)); 31 | } 32 | 33 | static public Histogram createEnumeration(String name, int max) { 34 | return new Histogram(nativeCreateEnumeration(name, max)); 35 | } 36 | 37 | public void addSample(int sample) { 38 | nativeAddSample(handle, sample); 39 | } 40 | 41 | private static native long nativeCreateCounts(String name, int min, int max, int bucketCount); 42 | private static native long nativeCreateEnumeration(String name, int max); 43 | private static native void nativeAddSample(long handle, int sample); 44 | } 45 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/IceCandidate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** 14 | * Representation of a single ICE Candidate, mirroring 15 | * {@code IceCandidateInterface} in the C++ API. 16 | */ 17 | public class IceCandidate { 18 | public final String sdpMid; 19 | public final int sdpMLineIndex; 20 | public final String sdp; 21 | 22 | public IceCandidate(String sdpMid, int sdpMLineIndex, String sdp) { 23 | this.sdpMid = sdpMid; 24 | this.sdpMLineIndex = sdpMLineIndex; 25 | this.sdp = sdp; 26 | } 27 | 28 | public String toString() { 29 | return sdpMid + ":" + sdpMLineIndex + ":" + sdp; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/MediaConstraints.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | import java.util.LinkedList; 14 | import java.util.List; 15 | 16 | /** 17 | * Description of media constraints for {@code MediaStream} and 18 | * {@code PeerConnection}. 19 | */ 20 | public class MediaConstraints { 21 | /** Simple String key/value pair. */ 22 | public static class KeyValuePair { 23 | private final String key; 24 | private final String value; 25 | 26 | public KeyValuePair(String key, String value) { 27 | this.key = key; 28 | this.value = value; 29 | } 30 | 31 | public String getKey() { 32 | return key; 33 | } 34 | 35 | public String getValue() { 36 | return value; 37 | } 38 | 39 | public String toString() { 40 | return key + ": " + value; 41 | } 42 | 43 | @Override 44 | public boolean equals(Object other) { 45 | if (this == other) { 46 | return true; 47 | } 48 | if (other == null || getClass() != other.getClass()) { 49 | return false; 50 | } 51 | KeyValuePair that = (KeyValuePair) other; 52 | return key.equals(that.key) && value.equals(that.value); 53 | } 54 | 55 | @Override 56 | public int hashCode() { 57 | return key.hashCode() + value.hashCode(); 58 | } 59 | } 60 | 61 | public final List mandatory; 62 | public final List optional; 63 | 64 | public MediaConstraints() { 65 | mandatory = new LinkedList(); 66 | optional = new LinkedList(); 67 | } 68 | 69 | private static String stringifyKeyValuePairList(List list) { 70 | StringBuilder builder = new StringBuilder("["); 71 | for (KeyValuePair pair : list) { 72 | if (builder.length() > 1) { 73 | builder.append(", "); 74 | } 75 | builder.append(pair.toString()); 76 | } 77 | return builder.append("]").toString(); 78 | } 79 | 80 | public String toString() { 81 | return "mandatory: " + stringifyKeyValuePairList(mandatory) + ", optional: " 82 | + stringifyKeyValuePairList(optional); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/MediaSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** Java wrapper for a C++ MediaSourceInterface. */ 14 | public class MediaSource { 15 | /** Tracks MediaSourceInterface.SourceState */ 16 | public enum State { INITIALIZING, LIVE, ENDED, MUTED } 17 | 18 | final long nativeSource; // Package-protected for PeerConnectionFactory. 19 | 20 | public MediaSource(long nativeSource) { 21 | this.nativeSource = nativeSource; 22 | } 23 | 24 | public State state() { 25 | return nativeState(nativeSource); 26 | } 27 | 28 | public void dispose() { 29 | free(nativeSource); 30 | } 31 | 32 | private static native State nativeState(long pointer); 33 | 34 | private static native void free(long nativeSource); 35 | } 36 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/MediaStreamTrack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** Java wrapper for a C++ MediaStreamTrackInterface. */ 14 | public class MediaStreamTrack { 15 | /** Tracks MediaStreamTrackInterface.TrackState */ 16 | public enum State { LIVE, ENDED } 17 | 18 | final long nativeTrack; 19 | 20 | public MediaStreamTrack(long nativeTrack) { 21 | this.nativeTrack = nativeTrack; 22 | } 23 | 24 | public String id() { 25 | return nativeId(nativeTrack); 26 | } 27 | 28 | public String kind() { 29 | return nativeKind(nativeTrack); 30 | } 31 | 32 | public boolean enabled() { 33 | return nativeEnabled(nativeTrack); 34 | } 35 | 36 | public boolean setEnabled(boolean enable) { 37 | return nativeSetEnabled(nativeTrack, enable); 38 | } 39 | 40 | public State state() { 41 | return nativeState(nativeTrack); 42 | } 43 | 44 | public void dispose() { 45 | free(nativeTrack); 46 | } 47 | 48 | private static native String nativeId(long nativeTrack); 49 | 50 | private static native String nativeKind(long nativeTrack); 51 | 52 | private static native boolean nativeEnabled(long nativeTrack); 53 | 54 | private static native boolean nativeSetEnabled(long nativeTrack, boolean enabled); 55 | 56 | private static native State nativeState(long nativeTrack); 57 | 58 | private static native void free(long nativeTrack); 59 | } 60 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/OWNERS: -------------------------------------------------------------------------------- 1 | per-file Camera*=sakal@webrtc.org 2 | per-file Histogram.java=sakal@webrtc.org 3 | per-file Metrics.java=sakal@webrtc.org 4 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/RtpParameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | import java.util.LinkedList; 14 | 15 | /** 16 | * The parameters for an {@code RtpSender}, as defined in 17 | * http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface. 18 | */ 19 | public class RtpParameters { 20 | public static class Encoding { 21 | public boolean active = true; 22 | // A null value means "no maximum bitrate". 23 | public Integer maxBitrateBps; 24 | } 25 | 26 | public static class Codec { 27 | int payloadType; 28 | String mimeType; 29 | int clockRate; 30 | int channels = 1; 31 | } 32 | 33 | public final LinkedList encodings; 34 | public final LinkedList codecs; 35 | 36 | public RtpParameters() { 37 | encodings = new LinkedList(); 38 | codecs = new LinkedList(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/RtpReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** Java wrapper for a C++ RtpReceiverInterface. */ 14 | public class RtpReceiver { 15 | final long nativeRtpReceiver; 16 | 17 | private MediaStreamTrack cachedTrack; 18 | 19 | public RtpReceiver(long nativeRtpReceiver) { 20 | this.nativeRtpReceiver = nativeRtpReceiver; 21 | long track = nativeGetTrack(nativeRtpReceiver); 22 | // We can assume that an RtpReceiver always has an associated track. 23 | cachedTrack = new MediaStreamTrack(track); 24 | } 25 | 26 | public MediaStreamTrack track() { 27 | return cachedTrack; 28 | } 29 | 30 | public boolean setParameters(RtpParameters parameters) { 31 | return nativeSetParameters(nativeRtpReceiver, parameters); 32 | } 33 | 34 | public RtpParameters getParameters() { 35 | return nativeGetParameters(nativeRtpReceiver); 36 | } 37 | 38 | public String id() { 39 | return nativeId(nativeRtpReceiver); 40 | } 41 | 42 | public void dispose() { 43 | cachedTrack.dispose(); 44 | free(nativeRtpReceiver); 45 | } 46 | 47 | // This should increment the reference count of the track. 48 | // Will be released in dispose(). 49 | private static native long nativeGetTrack(long nativeRtpReceiver); 50 | 51 | private static native boolean nativeSetParameters( 52 | long nativeRtpReceiver, RtpParameters parameters); 53 | 54 | private static native RtpParameters nativeGetParameters(long nativeRtpReceiver); 55 | 56 | private static native String nativeId(long nativeRtpReceiver); 57 | 58 | private static native void free(long nativeRtpReceiver); 59 | }; 60 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/ScreenBase.java: -------------------------------------------------------------------------------- 1 | package org.webrtc; 2 | 3 | /** 4 | * Screen Base, if you want to use screen capture, you should implement this ScreenBase. 5 | */ 6 | public interface ScreenBase { 7 | class ScreenBaseHealper { 8 | public static ScreenCapturer screenCapturer = null; 9 | public static final int START_SCREEN = 1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/ScreenBaseActivity.java: -------------------------------------------------------------------------------- 1 | package org.webrtc; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | 6 | /** 7 | * 屏幕录像基本Activity,若继承该Activity, 8 | */ 9 | public class ScreenBaseActivity extends Activity implements ScreenBase { 10 | /** 11 | * 提示用户请求录屏权限 12 | */ 13 | @Override 14 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 15 | super.onActivityResult(requestCode, resultCode, data); 16 | if (requestCode == ScreenBaseHealper.START_SCREEN) { 17 | if (resultCode == RESULT_OK) { 18 | ScreenBaseHealper.screenCapturer.startCapturerBegin(resultCode, data); 19 | } 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/ScreenBaseFragmentActivity.java: -------------------------------------------------------------------------------- 1 | package org.webrtc; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | 6 | public class ScreenBaseFragmentActivity extends Activity { 7 | public ScreenCapturer screenCapturer; 8 | 9 | private final int START_SCREEN = 1; 10 | 11 | /** 12 | * 提示用户请求录屏权限 13 | */ 14 | @Override 15 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 16 | super.onActivityResult(requestCode, resultCode, data); 17 | if (requestCode == START_SCREEN) { 18 | if (resultCode == RESULT_OK) { 19 | screenCapturer.startCapturerBegin(resultCode, data); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/SdpObserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** Interface for observing SDP-related events. */ 14 | public interface SdpObserver { 15 | /** Called on success of Create{Offer,Answer}(). */ 16 | public void onCreateSuccess(SessionDescription sdp); 17 | 18 | /** Called on success of Set{Local,Remote}Description(). */ 19 | public void onSetSuccess(); 20 | 21 | /** Called on error of Create{Offer,Answer}(). */ 22 | public void onCreateFailure(String error); 23 | 24 | /** Called on error of Set{Local,Remote}Description(). */ 25 | public void onSetFailure(String error); 26 | } 27 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/SessionDescription.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** 14 | * Description of an RFC 4566 Session. 15 | * SDPs are passed as serialized Strings in Java-land and are materialized 16 | * to SessionDescriptionInterface as appropriate in the JNI layer. 17 | */ 18 | public class SessionDescription { 19 | /** Java-land enum version of SessionDescriptionInterface's type() string. */ 20 | public static enum Type { 21 | OFFER, 22 | PRANSWER, 23 | ANSWER; 24 | 25 | public String canonicalForm() { 26 | return name().toLowerCase(); 27 | } 28 | 29 | public static Type fromCanonicalForm(String canonical) { 30 | return Type.valueOf(Type.class, canonical.toUpperCase()); 31 | } 32 | } 33 | 34 | public final Type type; 35 | public final String description; 36 | 37 | public SessionDescription(Type type, String description) { 38 | this.type = type; 39 | this.description = description; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/StatsObserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** Interface for observing Stats reports (see webrtc::StatsObservers). */ 14 | public interface StatsObserver { 15 | /** Called when the reports are ready.*/ 16 | public void onComplete(StatsReport[] reports); 17 | } 18 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/StatsReport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** Java version of webrtc::StatsReport. */ 14 | public class StatsReport { 15 | /** Java version of webrtc::StatsReport::Value. */ 16 | public static class Value { 17 | public final String name; 18 | public final String value; 19 | 20 | public Value(String name, String value) { 21 | this.name = name; 22 | this.value = value; 23 | } 24 | 25 | public String toString() { 26 | StringBuilder builder = new StringBuilder(); 27 | builder.append("[").append(name).append(": ").append(value).append("]"); 28 | return builder.toString(); 29 | } 30 | } 31 | 32 | public final String id; 33 | public final String type; 34 | // Time since 1970-01-01T00:00:00Z in milliseconds. 35 | public final double timestamp; 36 | public final Value[] values; 37 | 38 | public StatsReport(String id, String type, double timestamp, Value[] values) { 39 | this.id = id; 40 | this.type = type; 41 | this.timestamp = timestamp; 42 | this.values = values; 43 | } 44 | 45 | public String toString() { 46 | StringBuilder builder = new StringBuilder(); 47 | builder.append("id: ") 48 | .append(id) 49 | .append(", type: ") 50 | .append(type) 51 | .append(", timestamp: ") 52 | .append(timestamp) 53 | .append(", values: "); 54 | for (int i = 0; i < values.length; ++i) { 55 | builder.append(values[i].toString()).append(", "); 56 | } 57 | return builder.toString(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/VideoSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | /** 14 | * Java wrapper of native AndroidVideoTrackSource. 15 | */ 16 | public class VideoSource extends MediaSource { 17 | public VideoSource(long nativeSource) { 18 | super(nativeSource); 19 | } 20 | 21 | /** 22 | * Calling this function will cause frames to be scaled down to the requested resolution. Also, 23 | * frames will be cropped to match the requested aspect ratio, and frames will be dropped to match 24 | * the requested fps. The requested aspect ratio is orientation agnostic and will be adjusted to 25 | * maintain the input orientation, so it doesn't matter if e.g. 1280x720 or 720x1280 is requested. 26 | */ 27 | public void adaptOutputFormat(int width, int height, int fps) { 28 | nativeAdaptOutputFormat(nativeSource, width, height, fps); 29 | } 30 | 31 | private static native void nativeAdaptOutputFormat( 32 | long nativeSource, int width, int height, int fps); 33 | } 34 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/VideoTrack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc; 12 | 13 | import java.util.LinkedList; 14 | 15 | /** Java version of VideoTrackInterface. */ 16 | public class VideoTrack extends MediaStreamTrack { 17 | private final LinkedList renderers = new LinkedList(); 18 | 19 | public VideoTrack(long nativeTrack) { 20 | super(nativeTrack); 21 | } 22 | 23 | public void addRenderer(VideoRenderer renderer) { 24 | renderers.add(renderer); 25 | nativeAddRenderer(nativeTrack, renderer.nativeVideoRenderer); 26 | } 27 | 28 | public void removeRenderer(VideoRenderer renderer) { 29 | if (!renderers.remove(renderer)) { 30 | return; 31 | } 32 | nativeRemoveRenderer(nativeTrack, renderer.nativeVideoRenderer); 33 | renderer.dispose(); 34 | } 35 | 36 | public void dispose() { 37 | while (!renderers.isEmpty()) { 38 | removeRenderer(renderers.getFirst()); 39 | } 40 | super.dispose(); 41 | } 42 | 43 | private static native void free(long nativeTrack); 44 | 45 | private static native void nativeAddRenderer(long nativeTrack, long nativeRenderer); 46 | 47 | private static native void nativeRemoveRenderer(long nativeTrack, long nativeRenderer); 48 | } 49 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_java-src/voiceengine/BuildInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.webrtc.voiceengine; 12 | 13 | import android.os.Build; 14 | 15 | /** 16 | * 编译系统相关 17 | */ 18 | public final class BuildInfo { 19 | public static String getDevice() { 20 | return Build.DEVICE; 21 | } 22 | 23 | public static String getDeviceModel() { 24 | return Build.MODEL; 25 | } 26 | 27 | public static String getProduct() { 28 | return Build.PRODUCT; 29 | } 30 | 31 | public static String getBrand() { 32 | return Build.BRAND; 33 | } 34 | 35 | public static String getDeviceManufacturer() { 36 | return Build.MANUFACTURER; 37 | } 38 | 39 | public static String getAndroidBuildId() { 40 | return Build.ID; 41 | } 42 | 43 | public static String getBuildType() { 44 | return Build.TYPE; 45 | } 46 | 47 | public static String getBuildRelease() { 48 | return Build.VERSION.RELEASE; 49 | } 50 | 51 | public static String getSdkVersion() { 52 | return Integer.toString(Build.VERSION.SDK_INT); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_so-src/OWNERS: -------------------------------------------------------------------------------- 1 | per-file androidhistogram_jni.cc=sakal@webrtc.org 2 | per-file androidmetrics_jni.cc=sakal@webrtc.org 3 | per-file androidvideotracksource.*=sakal@webrtc.org 4 | per-file androidvideotracksource_jni.cc=sakal@webrtc.org 5 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_so-src/androidhistogram_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "webrtc/api/android/jni/classreferenceholder.h" 15 | #include "webrtc/api/android/jni/jni_helpers.h" 16 | #include "webrtc/api/android/jni/native_handle_impl.h" 17 | #include "webrtc/system_wrappers/include/metrics.h" 18 | 19 | // Enables collection of native histograms and creating them. 20 | namespace webrtc_jni { 21 | 22 | JOW(jlong, Histogram_nativeCreateCounts) 23 | (JNIEnv* jni, jclass, jstring j_name, jint min, jint max, jint buckets) { 24 | std::string name = JavaToStdString(jni, j_name); 25 | return jlongFromPointer( 26 | webrtc::metrics::HistogramFactoryGetCounts(name, min, max, buckets)); 27 | } 28 | 29 | JOW(jlong, Histogram_nativeCreateEnumeration) 30 | (JNIEnv* jni, jclass, jstring j_name, jint max) { 31 | std::string name = JavaToStdString(jni, j_name); 32 | return jlongFromPointer( 33 | webrtc::metrics::HistogramFactoryGetEnumeration(name, max)); 34 | } 35 | 36 | JOW(void, Histogram_nativeAddSample) 37 | (JNIEnv* jni, jclass, jlong histogram, jint sample) { 38 | if (histogram) { 39 | HistogramAdd(reinterpret_cast(histogram), 40 | sample); 41 | } 42 | } 43 | 44 | } // namespace webrtc_jni 45 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_so-src/androidmediadecoder_jni.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_ 12 | #define WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_ 13 | 14 | #include "webrtc/api/android/jni/jni_helpers.h" 15 | #include "webrtc/media/engine/webrtcvideodecoderfactory.h" 16 | 17 | namespace webrtc_jni { 18 | 19 | // Implementation of Android MediaCodec based decoder factory. 20 | class MediaCodecVideoDecoderFactory 21 | : public cricket::WebRtcVideoDecoderFactory { 22 | public: 23 | MediaCodecVideoDecoderFactory(); 24 | virtual ~MediaCodecVideoDecoderFactory(); 25 | 26 | void SetEGLContext(JNIEnv* jni, jobject render_egl_context); 27 | 28 | // WebRtcVideoDecoderFactory implementation. 29 | webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) 30 | override; 31 | 32 | void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) override; 33 | 34 | private: 35 | jobject egl_context_; 36 | std::vector supported_codec_types_; 37 | }; 38 | 39 | } // namespace webrtc_jni 40 | 41 | #endif // WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_ 42 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_so-src/androidmediaencoder_jni.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef WEBRTC_API_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_ 12 | #define WEBRTC_API_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_ 13 | 14 | #include 15 | 16 | #include "webrtc/api/android/jni/jni_helpers.h" 17 | #include "webrtc/media/engine/webrtcvideoencoderfactory.h" 18 | 19 | namespace webrtc_jni { 20 | 21 | // Implementation of Android MediaCodec based encoder factory. 22 | class MediaCodecVideoEncoderFactory 23 | : public cricket::WebRtcVideoEncoderFactory { 24 | public: 25 | MediaCodecVideoEncoderFactory(); 26 | virtual ~MediaCodecVideoEncoderFactory(); 27 | 28 | void SetEGLContext(JNIEnv* jni, jobject egl_context); 29 | 30 | // WebRtcVideoEncoderFactory implementation. 31 | webrtc::VideoEncoder* CreateVideoEncoder( 32 | const cricket::VideoCodec& codec) override; 33 | const std::vector& supported_codecs() const override; 34 | void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override; 35 | 36 | private: 37 | // Disable overloaded virtual function warning. TODO(magjed): Remove once 38 | // http://crbug/webrtc/6402 is fixed. 39 | using cricket::WebRtcVideoEncoderFactory::CreateVideoEncoder; 40 | 41 | jobject egl_context_; 42 | 43 | // Empty if platform support is lacking, const after ctor returns. 44 | std::vector supported_codecs_; 45 | }; 46 | 47 | } // namespace webrtc_jni 48 | 49 | #endif // WEBRTC_API_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_ 50 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_so-src/androidmetrics_jni.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "webrtc/api/android/jni/classreferenceholder.h" 15 | #include "webrtc/api/android/jni/jni_helpers.h" 16 | #include "webrtc/system_wrappers/include/metrics.h" 17 | #include "webrtc/system_wrappers/include/metrics_default.h" 18 | 19 | // Enables collection of native histograms and creating them. 20 | namespace webrtc_jni { 21 | 22 | JOW(void, Metrics_nativeEnable)(JNIEnv* jni, jclass) { 23 | webrtc::metrics::Enable(); 24 | } 25 | 26 | // Gets and clears native histograms. 27 | JOW(jobject, Metrics_nativeGetAndReset)(JNIEnv* jni, jclass) { 28 | jclass j_metrics_class = jni->FindClass("org/webrtc/Metrics"); 29 | jmethodID j_add = 30 | GetMethodID(jni, j_metrics_class, "add", 31 | "(Ljava/lang/String;Lorg/webrtc/Metrics$HistogramInfo;)V"); 32 | jclass j_info_class = jni->FindClass("org/webrtc/Metrics$HistogramInfo"); 33 | jmethodID j_add_sample = GetMethodID(jni, j_info_class, "addSample", "(II)V"); 34 | 35 | // Create |Metrics|. 36 | jobject j_metrics = jni->NewObject( 37 | j_metrics_class, GetMethodID(jni, j_metrics_class, "", "()V")); 38 | 39 | std::map> 40 | histograms; 41 | webrtc::metrics::GetAndReset(&histograms); 42 | for (const auto& kv : histograms) { 43 | // Create and add samples to |HistogramInfo|. 44 | jobject j_info = jni->NewObject( 45 | j_info_class, GetMethodID(jni, j_info_class, "", "(III)V"), 46 | kv.second->min, kv.second->max, 47 | static_cast(kv.second->bucket_count)); 48 | for (const auto& sample : kv.second->samples) { 49 | jni->CallVoidMethod(j_info, j_add_sample, sample.first, sample.second); 50 | } 51 | // Add |HistogramInfo| to |Metrics|. 52 | jstring j_name = jni->NewStringUTF(kv.first.c_str()); 53 | jni->CallVoidMethod(j_metrics, j_add, j_name, j_info); 54 | jni->DeleteLocalRef(j_name); 55 | jni->DeleteLocalRef(j_info); 56 | } 57 | CHECK_EXCEPTION(jni); 58 | return j_metrics; 59 | } 60 | 61 | } // namespace webrtc_jni 62 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_so-src/classreferenceholder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | // Android's FindClass() is trickier than usual because the app-specific 12 | // ClassLoader is not consulted when there is no app-specific frame on the 13 | // stack. Consequently, we only look up all classes once in app/webrtc. 14 | // http://developer.android.com/training/articles/perf-jni.html#faq_FindClass 15 | 16 | #ifndef WEBRTC_API_JAVA_JNI_CLASSREFERENCEHOLDER_H_ 17 | #define WEBRTC_API_JAVA_JNI_CLASSREFERENCEHOLDER_H_ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace webrtc_jni { 24 | 25 | // LoadGlobalClassReferenceHolder must be called in JNI_OnLoad. 26 | void LoadGlobalClassReferenceHolder(); 27 | // FreeGlobalClassReferenceHolder must be called in JNI_UnLoad. 28 | void FreeGlobalClassReferenceHolder(); 29 | 30 | // Returns a global reference guaranteed to be valid for the lifetime of the 31 | // process. 32 | jclass FindClass(JNIEnv* jni, const char* name); 33 | 34 | // Convenience macro defining JNI-accessible methods in the org.webrtc package. 35 | // Eliminates unnecessary boilerplate and line-wraps, reducing visual clutter. 36 | #define JOW(rettype, name) extern "C" rettype JNIEXPORT JNICALL \ 37 | Java_org_webrtc_##name 38 | 39 | } // namespace webrtc_jni 40 | 41 | #endif // WEBRTC_API_JAVA_JNI_CLASSREFERENCEHOLDER_H_ 42 | -------------------------------------------------------------------------------- /RAppRTC-libs-src/libjingle_peerconnection_so-src/jni_onload.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include 12 | #undef JNIEXPORT 13 | #define JNIEXPORT __attribute__((visibility("default"))) 14 | 15 | #include "webrtc/api/android/jni/classreferenceholder.h" 16 | #include "webrtc/api/android/jni/jni_helpers.h" 17 | #include "webrtc/base/ssladapter.h" 18 | 19 | namespace webrtc_jni { 20 | 21 | extern "C" jint JNIEXPORT JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) { 22 | jint ret = InitGlobalJniVariables(jvm); 23 | RTC_DCHECK_GE(ret, 0); 24 | if (ret < 0) 25 | return -1; 26 | 27 | RTC_CHECK(rtc::InitializeSSL()) << "Failed to InitializeSSL()"; 28 | LoadGlobalClassReferenceHolder(); 29 | 30 | return ret; 31 | } 32 | 33 | extern "C" void JNIEXPORT JNICALL JNI_OnUnLoad(JavaVM *jvm, void *reserved) { 34 | FreeGlobalClassReferenceHolder(); 35 | RTC_CHECK(rtc::CleanupSSL()) << "Failed to CleanupSSL()"; 36 | } 37 | 38 | } // namespace webrtc_jni 39 | -------------------------------------------------------------------------------- /RAppRTC/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /RAppRTC/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /RAppRTC/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /RAppRTC/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /RAppRTC/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /RAppRTC/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /RAppRTC/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /RAppRTC/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /RAppRTC/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /RAppRTC/app-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app-debug.apk -------------------------------------------------------------------------------- /RAppRTC/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /RAppRTC/app/app-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/app-debug.apk -------------------------------------------------------------------------------- /RAppRTC/app/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/app-release.apk -------------------------------------------------------------------------------- /RAppRTC/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion '24.0.3' 6 | 7 | sourceSets.main { 8 | jniLibs.srcDir 'libs' 9 | jni.srcDirs = [] //disable automatic ndk-build call 10 | } 11 | 12 | defaultConfig { 13 | applicationId "org.appspot.apprtc" 14 | minSdkVersion 21 15 | targetSdkVersion 24 16 | versionCode 1 17 | versionName "1.0" 18 | testApplicationId "org.appspot.apprtc.test" 19 | testInstrumentationRunner "android.test.InstrumentationTestRunner" 20 | } 21 | buildTypes { 22 | release { 23 | minifyEnabled true 24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 25 | } 26 | } 27 | 28 | lintOptions { 29 | abortOnError false 30 | } 31 | } 32 | 33 | dependencies { 34 | compile fileTree(include: ['*.jar'], dir: 'libs') 35 | testCompile 'junit:junit:4.12' 36 | compile 'com.android.support:appcompat-v7:24.1.1' 37 | compile files('libs/libjingle_peerconnection_java.jar') 38 | compile files('libs/base_java.jar') 39 | compile files('libs/autobanh.jar') 40 | } 41 | -------------------------------------------------------------------------------- /RAppRTC/app/libs/arm64-v8a/libboringssl.cr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/arm64-v8a/libboringssl.cr.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/arm64-v8a/libc++_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/arm64-v8a/libc++_shared.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/arm64-v8a/libjingle_peerconnection_so.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/arm64-v8a/libjingle_peerconnection_so.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/arm64-v8a/libprotobuf_lite.cr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/arm64-v8a/libprotobuf_lite.cr.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/armeabi-v7a/libboringssl.cr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/armeabi-v7a/libboringssl.cr.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/armeabi-v7a/libc++_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/armeabi-v7a/libc++_shared.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/armeabi-v7a/libjingle_peerconnection_so.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/armeabi-v7a/libjingle_peerconnection_so.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/armeabi-v7a/libprotobuf_lite.cr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/armeabi-v7a/libprotobuf_lite.cr.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/autobanh.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/autobanh.jar -------------------------------------------------------------------------------- /RAppRTC/app/libs/base_java.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/base_java.jar -------------------------------------------------------------------------------- /RAppRTC/app/libs/libjingle_peerconnection_java.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/libjingle_peerconnection_java.jar -------------------------------------------------------------------------------- /RAppRTC/app/libs/x86/libboringssl.cr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/x86/libboringssl.cr.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/x86/libc++_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/x86/libc++_shared.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/x86/libjingle_peerconnection_so.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/x86/libjingle_peerconnection_so.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/x86/libprotobuf_lite.cr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/x86/libprotobuf_lite.cr.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/x86_64/libboringssl.cr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/x86_64/libboringssl.cr.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/x86_64/libc++_shared.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/x86_64/libc++_shared.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/x86_64/libjingle_peerconnection_so.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/x86_64/libjingle_peerconnection_so.so -------------------------------------------------------------------------------- /RAppRTC/app/libs/x86_64/libprotobuf_lite.cr.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/libs/x86_64/libprotobuf_lite.cr.so -------------------------------------------------------------------------------- /RAppRTC/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/renyuzhuo/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -dontwarn android.support.** 19 | 20 | 21 | -keep class org.webrtc.** { *; } 22 | 23 | 24 | 25 | -keep class org.appspot.apprtc.** { *; } 26 | 27 | 28 | 29 | -keep class de.tavendo.autobahn.** { *; } 30 | 31 | 32 | 33 | -keepclasseswithmembernames class * { native ; } -------------------------------------------------------------------------------- /RAppRTC/app/src/androidTest/java/org/appspot/apprtc/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package org.appspot.apprtc; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /RAppRTC/app/src/main/java/org/appspot/apprtc/SettingsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.appspot.apprtc; 12 | 13 | import android.os.Bundle; 14 | import android.preference.PreferenceFragment; 15 | 16 | /** 17 | * Settings fragment for AppRTC. 18 | */ 19 | public class SettingsFragment extends PreferenceFragment { 20 | @Override 21 | public void onCreate(Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | // Load the preferences from an XML resource 24 | addPreferencesFromResource(R.xml.preferences); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /RAppRTC/app/src/main/java/org/appspot/apprtc/util/AppRTCUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | package org.appspot.apprtc.util; 12 | 13 | import android.os.Build; 14 | import android.util.Log; 15 | 16 | /** 17 | * AppRTCUtils provides helper functions for managing thread safety. 18 | */ 19 | public final class AppRTCUtils { 20 | private AppRTCUtils() {} 21 | 22 | /** Helper method which throws an exception when an assertion has failed. */ 23 | public static void assertIsTrue(boolean condition) { 24 | if (!condition) { 25 | throw new AssertionError("Expected condition to be true"); 26 | } 27 | } 28 | 29 | /** Helper method for building a string of thread information.*/ 30 | public static String getThreadInfo() { 31 | return "@[name=" + Thread.currentThread().getName() + ", id=" + Thread.currentThread().getId() 32 | + "]"; 33 | } 34 | 35 | /** Information about the current build, taken from system properties. */ 36 | public static void logDeviceInfo(String tag) { 37 | Log.d(tag, "Android SDK: " + Build.VERSION.SDK_INT + ", " 38 | + "Release: " + Build.VERSION.RELEASE + ", " 39 | + "Brand: " + Build.BRAND + ", " 40 | + "Device: " + Build.DEVICE + ", " 41 | + "Id: " + Build.ID + ", " 42 | + "Hardware: " + Build.HARDWARE + ", " 43 | + "Manufacturer: " + Build.MANUFACTURER + ", " 44 | + "Model: " + Build.MODEL + ", " 45 | + "Product: " + Build.PRODUCT); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-hdpi/disconnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-hdpi/disconnect.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-hdpi/ic_action_full_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-hdpi/ic_action_full_screen.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-hdpi/ic_action_return_from_full_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-hdpi/ic_action_return_from_full_screen.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-hdpi/ic_loopback_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-hdpi/ic_loopback_call.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-ldpi/disconnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-ldpi/disconnect.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-ldpi/ic_action_full_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-ldpi/ic_action_full_screen.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-ldpi/ic_action_return_from_full_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-ldpi/ic_action_return_from_full_screen.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-ldpi/ic_loopback_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-ldpi/ic_loopback_call.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-mdpi/disconnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-mdpi/disconnect.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-mdpi/ic_action_full_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-mdpi/ic_action_full_screen.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-mdpi/ic_action_return_from_full_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-mdpi/ic_action_return_from_full_screen.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-mdpi/ic_loopback_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-mdpi/ic_loopback_call.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-xhdpi/disconnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-xhdpi/disconnect.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-xhdpi/ic_action_full_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-xhdpi/ic_action_full_screen.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-xhdpi/ic_action_return_from_full_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-xhdpi/ic_action_return_from_full_screen.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/drawable-xhdpi/ic_loopback_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/app/src/main/res/drawable-xhdpi/ic_loopback_call.png -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/layout/activity_call.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 16 | 17 | 18 | 22 | 26 | 27 | 28 | 32 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/menu/connect_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/values-v17/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /RAppRTC/app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Default 5 | 4K (3840 x 2160) 6 | Full HD (1920 x 1080) 7 | HD (1280 x 720) 8 | VGA (640 x 480) 9 | QVGA (320 x 240) 10 | 11 | 12 | 13 | Default 14 | 3840 x 2160 15 | 1920 x 1080 16 | 1280 x 720 17 | 640 x 480 18 | 320 x 240 19 | 20 | 21 | 22 | Default 23 | 30 fps 24 | 15 fps 25 | 26 | 27 | 28 | Default 29 | Manual 30 | 31 | 32 | 33 | VP8 34 | VP9 35 | H264 36 | 37 | 38 | 39 | OPUS 40 | ISAC 41 | 42 | 43 | 44 | Auto (proximity sensor) 45 | Enabled 46 | Disabled 47 | 48 | 49 | 50 | auto 51 | true 52 | false 53 | 54 | 55 | 56 | Remove favorite 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /RAppRTC/app/src/test/java/org/appspot/apprtc/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package org.appspot.apprtc; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /RAppRTC/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.2' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /RAppRTC/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /RAppRTC/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/RAppRTC/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /RAppRTC/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Sep 13 09:20:36 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /RAppRTC/rmUnUseFile.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rm -rf *~ 3 | rm -rf */*~ 4 | rm -rf */*/*~ 5 | rm -rf build 6 | rm -rf app/build/ 7 | rm -rf rlib/build 8 | -------------------------------------------------------------------------------- /RAppRTC/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /RAppRTC/update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | rm -rf app/src/main/java/org/ 3 | cp -r ../../src/webrtc/src/webrtc/examples/androidapp/src/org ./app/src/main/java/ 4 | rm -fr app/src/main/res/ 5 | cp -r ../../src/webrtc/src/webrtc/examples/androidapp/res/ ./app/src/main/ 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | I am sorry to say that I have stopped maintaining this project. 2 | 3 | # WebRTC-Android-Learn 4 | 5 | Read The Fucking WebRTC Code. 6 | 7 | ## Code Version 8 | 9 | commit [5c13c33](https://chromium.googlesource.com/external/webrtc/+/5c13c33f3073bba420c1dbd5548559d8ec59c406). Thu Dec 01 00:14:41 2016. 10 | 11 | ## License 12 | 13 | [MIT](http://renyuzhuo.cn/MIT) 14 | 15 | -------------------------------------------------------------------------------- /apks/AppRTCMobile-arm.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/apks/AppRTCMobile-arm.apk -------------------------------------------------------------------------------- /apks/AppRTCMobile-arm64.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/apks/AppRTCMobile-arm64.apk -------------------------------------------------------------------------------- /apks/AppRTCMobile-x64.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/apks/AppRTCMobile-x64.apk -------------------------------------------------------------------------------- /apks/AppRTCMobile-x86.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/apks/AppRTCMobile-x86.apk -------------------------------------------------------------------------------- /apks/README.md: -------------------------------------------------------------------------------- 1 | ### 编译后输出文件 2 | 3 | #### 官方编译输出文件 4 | 5 | AppRTCMobile-*: 官方编译输出文件,未修改过,未添加屏幕录像等新功能。这里包含不同架构输出文件。 6 | 7 | #### AndroidStudio编译 8 | 9 | 官网源码采用ninja编译,这里将代码加到AndroidStudio中进行编译,建议checkout RAppRTC目录下代码,自行编译。 10 | 11 | -------------------------------------------------------------------------------- /apks/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyuzhuo/WebRTC-Android-Learn/735ab69de2fc23d7a470ae6712f6ea46b64a7c7a/apks/app-release.apk -------------------------------------------------------------------------------- /getSource.sh: -------------------------------------------------------------------------------- 1 | echo "rm RAppRTC begin" 2 | rm -rf RAppRTC 3 | echo "rm RAppRTC end" 4 | 5 | echo "cp RAppRTC begin" 6 | cp -r ~/AndroidStudioProjects/RAppRTC/ . 7 | echo "cp RAppRTC end" 8 | 9 | echo "sh updateSrc.sh" 10 | sh updateSrc.sh 11 | 12 | -------------------------------------------------------------------------------- /src/directories-dir-L1: -------------------------------------------------------------------------------- 1 | . 2 | ├── build_overrides # TODO 3 | ├── chromium # TODO 浏览器 4 | ├── data # TODO 数据 5 | ├── infra # TODO 6 | ├── out # 编译输出文件 7 | ├── resources # TODO 资源 8 | ├── third_party # TODO 第三方类库 9 | ├── tools # TODO 工具 10 | └── webrtc # TODO webrtc 11 | 12 | 14 directories 13 | -------------------------------------------------------------------------------- /src/directories-dir-L2: -------------------------------------------------------------------------------- 1 | . 2 | ├── build_overrides 3 | ├── chromium 4 | │   └── src 5 | ├── data 6 | │   ├── audio_processing 7 | │   ├── common_video 8 | │   ├── rtp_rtcp 9 | │   └── voice_engine 10 | ├── infra 11 | │   └── config 12 | ├── out 13 | │   └── Default 14 | ├── resources 15 | │   ├── audio_coding 16 | │   ├── audio_device 17 | │   ├── audio_processing 18 | │   ├── images 19 | │   ├── media 20 | │   ├── remote_bitrate_estimator 21 | │   ├── rtp_rtcp 22 | │   ├── utility 23 | │   ├── video_coding 24 | │   ├── video_engine 25 | │   └── voice_engine 26 | ├── third_party 27 | │   ├── gflags 28 | │   ├── gtest-parallel 29 | │   └── winsdk_samples 30 | ├── tools 31 | │   ├── autoroller 32 | │   ├── cpu 33 | │   ├── gritsettings 34 | │   ├── matlab 35 | │   ├── msan 36 | │   ├── network_emulator 37 | │   ├── perf 38 | │   ├── python_charts 39 | │   ├── sancov 40 | │   ├── sslroots 41 | │   ├── ubsan 42 | │   └── valgrind-webrtc 43 | └── webrtc 44 | ├── androidjunit 45 | ├── api 46 | ├── audio 47 | ├── base 48 | ├── build 49 | ├── call 50 | ├── common_audio 51 | ├── common_video 52 | ├── examples 53 | ├── libjingle 54 | ├── media 55 | ├── modules 56 | ├── p2p 57 | ├── pc 58 | ├── sdk 59 | ├── stats 60 | ├── system_wrappers 61 | ├── test 62 | ├── tools 63 | ├── video 64 | └── voice_engine 65 | 66 | 68 directories 67 | -------------------------------------------------------------------------------- /src/webrtc/directories-dir-L1: -------------------------------------------------------------------------------- 1 | . 2 | ├── androidjunit 3 | ├── api 4 | ├── audio 5 | ├── base 6 | ├── build 7 | ├── call 8 | ├── common_audio 9 | ├── common_video 10 | ├── examples 11 | ├── libjingle 12 | ├── media 13 | ├── modules 14 | ├── p2p 15 | ├── pc 16 | ├── sdk 17 | ├── stats 18 | ├── system_wrappers 19 | ├── test 20 | ├── tools 21 | ├── video 22 | └── voice_engine 23 | 24 | 21 directories 25 | -------------------------------------------------------------------------------- /updateSrc.sh: -------------------------------------------------------------------------------- 1 | echo "cp source file into RAppRTC-libs-src begin" 2 | cp ../webrtc/src/webrtc/api/android/java/src/org/webrtc/* ./RAppRTC-libs-src/libjingle_peerconnection_java-src/ 3 | cp ../webrtc/src/webrtc/api/android/java/src/org/webrtc/* ./RAppRTC-libs-src/libjingle_peerconnection_java-src/ 4 | cp ../webrtc/src/webrtc/api/android/jni/* ./RAppRTC-libs-src/libjingle_peerconnection_so-src/ 5 | cp ../webrtc/src/webrtc/api/android/README ./RAppRTC-libs-src/README-api 6 | echo "cp source file into RAppRTC-libs-src end" 7 | 8 | echo "cp apks into apks begin" 9 | cp ../webrtc/src/out/arm64/apks/AppRTCMobile.apk apks/AppRTCMobile-arm64.apk 10 | cp ../webrtc/src/out/arm/apks/AppRTCMobile.apk apks/AppRTCMobile-arm.apk 11 | cp ../webrtc/src/out/x64/apks/AppRTCMobile.apk apks/AppRTCMobile-x64.apk 12 | cp ../webrtc/src/out/x86/apks/AppRTCMobile.apk apks/AppRTCMobile-x86.apk 13 | echo "cp apks into apks end" 14 | 15 | git status 16 | 17 | --------------------------------------------------------------------------------