├── .github
├── FUNDING.yml
└── workflows
│ └── build.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── docs
├── AOSP.md
├── Deploy.md
├── Design.md
├── Docker.md
├── Learning.md
├── MI5S.md
├── NetworkTopology.md
├── Protocol.md
├── TODO.md
├── WebRTC.md
├── certs
│ ├── ca.crt
│ ├── ca.key
│ ├── ca.srl
│ ├── server.crt
│ ├── server.csr
│ ├── server.ext
│ ├── server.key
│ └── server.p12
├── etc
│ ├── nginx.conf
│ └── taoyao-signal-server.service
├── image
│ ├── android.jpg
│ └── web.jpg
├── taoyao-v1.0.zip
└── 架构.drawio
├── taoyao-client-android
├── README.md
└── taoyao
│ ├── .gitignore
│ ├── boot
│ ├── build.gradle
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ └── acgist
│ │ └── taoyao
│ │ └── boot
│ │ ├── model
│ │ ├── Header.java
│ │ ├── Message.java
│ │ └── MessageCode.java
│ │ └── utils
│ │ ├── CloseableUtils.java
│ │ ├── DateUtils.java
│ │ ├── IdUtils.java
│ │ ├── JSONUtils.java
│ │ ├── MapUtils.java
│ │ └── PointerUtils.java
│ ├── build.gradle
│ ├── client
│ ├── build.gradle
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── ic_launcher-playstore.png
│ │ ├── java
│ │ └── com
│ │ │ └── acgist
│ │ │ └── taoyao
│ │ │ └── client
│ │ │ ├── MainActivity.java
│ │ │ ├── MediaService.java
│ │ │ ├── SettingsActivity.java
│ │ │ ├── TaoyaoReceiver.java
│ │ │ └── signal
│ │ │ └── Taoyao.java
│ │ └── res
│ │ ├── drawable
│ │ ├── action.xml
│ │ ├── photograph.xml
│ │ ├── record.xml
│ │ └── settings.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── activity_settings.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── settings.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── backup_rules.xml
│ │ └── data_extraction_rules.xml
│ ├── gradle.properties
│ ├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── media
│ ├── CMakeLists.txt
│ ├── build.gradle
│ ├── consumer-rules.pro
│ ├── libs
│ │ └── arm64-v8a
│ │ │ └── libjingle_peerconnection_so.so
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── cpp
│ │ ├── include
│ │ │ ├── Log.hpp
│ │ │ ├── MediaManager.hpp
│ │ │ ├── Room.hpp
│ │ │ └── RouterCallback.hpp
│ │ └── webrtc
│ │ │ ├── MediaManager.cpp
│ │ │ ├── Room.cpp
│ │ │ └── RouterCallback.cpp
│ │ └── java
│ │ ├── com
│ │ └── acgist
│ │ │ └── taoyao
│ │ │ └── media
│ │ │ ├── MediaManager.java
│ │ │ ├── RouterCallback.java
│ │ │ ├── VideoSourceType.java
│ │ │ ├── audio
│ │ │ └── MixerProcesser.java
│ │ │ ├── client
│ │ │ ├── Client.java
│ │ │ ├── CloseableClient.java
│ │ │ ├── LocalClient.java
│ │ │ ├── PhotographClient.java
│ │ │ ├── RecordClient.java
│ │ │ ├── RemoteClient.java
│ │ │ ├── Room.java
│ │ │ ├── RoomClient.java
│ │ │ └── SessionClient.java
│ │ │ ├── config
│ │ │ ├── Config.java
│ │ │ ├── MediaAudioProperties.java
│ │ │ ├── MediaProperties.java
│ │ │ ├── MediaVideoProperties.java
│ │ │ ├── WebrtcProperties.java
│ │ │ ├── WebrtcStunProperties.java
│ │ │ └── WebrtcTurnProperties.java
│ │ │ ├── signal
│ │ │ ├── ITaoyao.java
│ │ │ └── ITaoyaoListener.java
│ │ │ └── video
│ │ │ ├── AiProcesser.java
│ │ │ ├── VideoProcesser.java
│ │ │ └── WatermarkProcesser.java
│ │ └── org
│ │ └── webrtc
│ │ ├── AddIceObserver.java
│ │ ├── AndroidVideoDecoder.java
│ │ ├── AudioDecoderFactoryFactory.java
│ │ ├── AudioEncoderFactoryFactory.java
│ │ ├── AudioProcessingFactory.java
│ │ ├── AudioSource.java
│ │ ├── AudioTrack.java
│ │ ├── BaseBitrateAdjuster.java
│ │ ├── BitrateAdjuster.java
│ │ ├── BuiltinAudioDecoderFactoryFactory.java
│ │ ├── BuiltinAudioEncoderFactoryFactory.java
│ │ ├── CallSessionFileRotatingLogSink.java
│ │ ├── CalledByNative.java
│ │ ├── CalledByNativeUnchecked.java
│ │ ├── Camera1Capturer.java
│ │ ├── Camera1Enumerator.java
│ │ ├── Camera1Session.java
│ │ ├── Camera2Capturer.java
│ │ ├── Camera2Enumerator.java
│ │ ├── Camera2Session.java
│ │ ├── CameraCapturer.java
│ │ ├── CameraEnumerationAndroid.java
│ │ ├── CameraEnumerator.java
│ │ ├── CameraSession.java
│ │ ├── CameraVideoCapturer.java
│ │ ├── CandidatePairChangeEvent.java
│ │ ├── CapturerObserver.java
│ │ ├── ContextUtils.java
│ │ ├── CryptoOptions.java
│ │ ├── DataChannel.java
│ │ ├── DefaultVideoDecoderFactory.java
│ │ ├── DefaultVideoEncoderFactory.java
│ │ ├── DtmfSender.java
│ │ ├── DynamicBitrateAdjuster.java
│ │ ├── EglBase.java
│ │ ├── EglBase10.java
│ │ ├── EglBase10Impl.java
│ │ ├── EglBase14.java
│ │ ├── EglBase14Impl.java
│ │ ├── EglRenderer.java
│ │ ├── Empty.java
│ │ ├── EncodedImage.java
│ │ ├── FecControllerFactoryFactoryInterface.java
│ │ ├── FileVideoCapturer.java
│ │ ├── FrameDecryptor.java
│ │ ├── FrameEncryptor.java
│ │ ├── FramerateBitrateAdjuster.java
│ │ ├── GlGenericDrawer.java
│ │ ├── GlRectDrawer.java
│ │ ├── GlShader.java
│ │ ├── GlTextureFrameBuffer.java
│ │ ├── GlUtil.java
│ │ ├── H264Utils.java
│ │ ├── HardwareVideoDecoderFactory.java
│ │ ├── HardwareVideoEncoder.java
│ │ ├── HardwareVideoEncoderFactory.java
│ │ ├── Histogram.java
│ │ ├── IceCandidate.java
│ │ ├── JNILogging.java
│ │ ├── JavaI420Buffer.java
│ │ ├── JniCommon.java
│ │ ├── JniHelper.java
│ │ ├── LibaomAv1Decoder.java
│ │ ├── LibaomAv1Encoder.java
│ │ ├── LibvpxVp8Decoder.java
│ │ ├── LibvpxVp8Encoder.java
│ │ ├── LibvpxVp9Decoder.java
│ │ ├── LibvpxVp9Encoder.java
│ │ ├── Loggable.java
│ │ ├── Logging.java
│ │ ├── MediaCodecUtils.java
│ │ ├── MediaCodecVideoDecoderFactory.java
│ │ ├── MediaCodecWrapper.java
│ │ ├── MediaCodecWrapperFactory.java
│ │ ├── MediaCodecWrapperFactoryImpl.java
│ │ ├── MediaConstraints.java
│ │ ├── MediaSource.java
│ │ ├── MediaStream.java
│ │ ├── MediaStreamTrack.java
│ │ ├── Metrics.java
│ │ ├── NV12Buffer.java
│ │ ├── NV21Buffer.java
│ │ ├── NativeAndroidVideoTrackSource.java
│ │ ├── NativeCapturerObserver.java
│ │ ├── NativeLibrary.java
│ │ ├── NativeLibraryLoader.java
│ │ ├── NativePeerConnectionFactory.java
│ │ ├── NetEqFactoryFactory.java
│ │ ├── NetworkChangeDetector.java
│ │ ├── NetworkChangeDetectorFactory.java
│ │ ├── NetworkControllerFactoryFactory.java
│ │ ├── NetworkMonitor.java
│ │ ├── NetworkMonitorAutoDetect.java
│ │ ├── NetworkPreference.java
│ │ ├── NetworkStatePredictorFactoryFactory.java
│ │ ├── PeerConnection.java
│ │ ├── PeerConnectionDependencies.java
│ │ ├── PeerConnectionFactory.java
│ │ ├── PlatformSoftwareVideoDecoderFactory.java
│ │ ├── Predicate.java
│ │ ├── Priority.java
│ │ ├── RTCStats.java
│ │ ├── RTCStatsCollectorCallback.java
│ │ ├── RTCStatsReport.java
│ │ ├── RefCountDelegate.java
│ │ ├── RefCounted.java
│ │ ├── RendererCommon.java
│ │ ├── RtcCertificatePem.java
│ │ ├── RtpParameters.java
│ │ ├── RtpReceiver.java
│ │ ├── RtpSender.java
│ │ ├── RtpTransceiver.java
│ │ ├── SSLCertificateVerifier.java
│ │ ├── ScreenCapturerAndroid.java
│ │ ├── SdpObserver.java
│ │ ├── SessionDescription.java
│ │ ├── Size.java
│ │ ├── SoftwareVideoDecoderFactory.java
│ │ ├── SoftwareVideoEncoderFactory.java
│ │ ├── StatsObserver.java
│ │ ├── StatsReport.java
│ │ ├── SurfaceEglRenderer.java
│ │ ├── SurfaceTextureHelper.java
│ │ ├── SurfaceViewRenderer.java
│ │ ├── TextureBufferImpl.java
│ │ ├── ThreadUtils.java
│ │ ├── TimestampAligner.java
│ │ ├── TurnCustomizer.java
│ │ ├── VideoCapturer.java
│ │ ├── VideoCodecInfo.java
│ │ ├── VideoCodecMimeType.java
│ │ ├── VideoCodecStatus.java
│ │ ├── VideoDecoder.java
│ │ ├── VideoDecoderFactory.java
│ │ ├── VideoDecoderFallback.java
│ │ ├── VideoDecoderWrapper.java
│ │ ├── VideoEncoder.java
│ │ ├── VideoEncoderFactory.java
│ │ ├── VideoEncoderFallback.java
│ │ ├── VideoEncoderWrapper.java
│ │ ├── VideoFileRenderer.java
│ │ ├── VideoFrame.java
│ │ ├── VideoFrameBufferType.java
│ │ ├── VideoFrameDrawer.java
│ │ ├── VideoProcessor.java
│ │ ├── VideoSink.java
│ │ ├── VideoSource.java
│ │ ├── VideoTrack.java
│ │ ├── WebRtcClassLoader.java
│ │ ├── WrappedNativeI420Buffer.java
│ │ ├── WrappedNativeVideoDecoder.java
│ │ ├── WrappedNativeVideoEncoder.java
│ │ ├── YuvConverter.java
│ │ ├── YuvHelper.java
│ │ ├── audio
│ │ ├── AudioDeviceModule.java
│ │ ├── JavaAudioDeviceModule.java
│ │ ├── LegacyAudioDeviceModule.java
│ │ ├── LowLatencyAudioBufferManager.java
│ │ ├── VolumeLogger.java
│ │ ├── WebRtcAudioEffects.java
│ │ ├── WebRtcAudioManager.java
│ │ ├── WebRtcAudioRecord.java
│ │ ├── WebRtcAudioTrack.java
│ │ └── WebRtcAudioUtils.java
│ │ └── voiceengine
│ │ ├── BuildInfo.java
│ │ ├── WebRtcAudioEffects.java
│ │ ├── WebRtcAudioManager.java
│ │ ├── WebRtcAudioRecord.java
│ │ ├── WebRtcAudioTrack.java
│ │ └── WebRtcAudioUtils.java
│ └── settings.gradle
├── taoyao-client-media
├── .env
├── .env.node-a
├── .env.node-b
├── .env.prd
├── .env.work
├── README.md
├── ecosystem.config.cluster.json
├── ecosystem.config.json
├── package.json
└── src
│ ├── Config.js
│ ├── Server.js
│ └── Taoyao.js
├── taoyao-client-web
├── README.md
├── favicon.ico
├── index.html
├── package.json
├── public
│ ├── taoyao.svg
│ ├── taoyao.ttf
│ └── taoyao.woff
├── src
│ ├── App.vue
│ ├── assets
│ │ ├── base.css
│ │ ├── font.css
│ │ └── main.css
│ ├── certs
│ │ ├── server.crt
│ │ └── server.key
│ ├── components
│ │ ├── Config.js
│ │ ├── LocalClient.vue
│ │ ├── RemoteClient.vue
│ │ ├── SessionClient.vue
│ │ └── Taoyao.js
│ └── main.js
└── vite.config.js
└── taoyao-signal-server
├── README.md
├── docs
├── assembly
│ ├── dev.xml
│ └── prd.xml
└── bin
│ ├── deploy.sh
│ ├── startup.sh
│ ├── stop.sh
│ └── wait.sh
├── pom.xml
├── taoyao-boot
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── com
│ │ │ └── acgist
│ │ │ └── taoyao
│ │ │ └── boot
│ │ │ ├── annotation
│ │ │ ├── Description.java
│ │ │ ├── Listener.java
│ │ │ ├── Manager.java
│ │ │ └── Protocol.java
│ │ │ ├── config
│ │ │ ├── Constant.java
│ │ │ ├── FfmpegProperties.java
│ │ │ ├── IdProperties.java
│ │ │ ├── MediaAudioProperties.java
│ │ │ ├── MediaProperties.java
│ │ │ ├── MediaVideoProperties.java
│ │ │ ├── RewriteProperties.java
│ │ │ ├── RewriteRuleProperties.java
│ │ │ ├── ScriptProperties.java
│ │ │ ├── SecurityProperties.java
│ │ │ ├── SocketProperties.java
│ │ │ ├── TaoyaoProperties.java
│ │ │ ├── WebrtcProperties.java
│ │ │ ├── WebrtcStunProperties.java
│ │ │ └── WebrtcTurnProperties.java
│ │ │ ├── configuration
│ │ │ ├── BootAutoConfiguration.java
│ │ │ ├── SpringDocAutoConfiguration.java
│ │ │ └── WebMvcConfigurerAutoConfiguration.java
│ │ │ ├── controller
│ │ │ ├── TaoyaoControllerAdvice.java
│ │ │ └── TaoyaoErrorController.java
│ │ │ ├── interceptor
│ │ │ └── InterceptorAdapter.java
│ │ │ ├── model
│ │ │ ├── Header.java
│ │ │ ├── Message.java
│ │ │ ├── MessageCode.java
│ │ │ ├── MessageCodeException.java
│ │ │ └── MessageMapstruct.java
│ │ │ ├── runner
│ │ │ └── OrderedCommandLineRunner.java
│ │ │ ├── service
│ │ │ ├── IdService.java
│ │ │ └── impl
│ │ │ │ └── IdServiceImpl.java
│ │ │ └── utils
│ │ │ ├── CloseableUtils.java
│ │ │ ├── DateUtils.java
│ │ │ ├── ErrorUtils.java
│ │ │ ├── FileUtils.java
│ │ │ ├── HTTPUtils.java
│ │ │ ├── JSONUtils.java
│ │ │ ├── MapUtils.java
│ │ │ ├── NetUtils.java
│ │ │ └── ScriptUtils.java
│ └── resources
│ │ ├── META-INF
│ │ └── spring
│ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
│ │ ├── banner.txt
│ │ └── logback-spring.xml
│ └── test
│ └── java
│ └── com
│ └── acgist
│ └── taoyao
│ └── boot
│ ├── model
│ └── MessageTest.java
│ └── utils
│ ├── FileUtilsTest.java
│ ├── HTTPUtilsTest.java
│ ├── NetUtilsTest.java
│ └── ScriptUtilsTest.java
├── taoyao-server
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── com
│ │ │ └── acgist
│ │ │ └── taoyao
│ │ │ ├── configuration
│ │ │ └── TaoyaoAutoConfiguration.java
│ │ │ ├── controller
│ │ │ ├── ConfigController.java
│ │ │ ├── PlatformController.java
│ │ │ └── SystemController.java
│ │ │ ├── interceptor
│ │ │ ├── SecurityInterceptor.java
│ │ │ └── SlowInterceptor.java
│ │ │ ├── listener
│ │ │ ├── QnjrcmzListener.java
│ │ │ └── ThyjxcfListener.java
│ │ │ └── main
│ │ │ └── TaoyaoApplication.java
│ └── resources
│ │ ├── META-INF
│ │ └── spring.factories
│ │ ├── application-dev.yml
│ │ ├── application-prd.yml
│ │ ├── application-win.yml
│ │ ├── application.yml
│ │ ├── server.p12
│ │ └── static
│ │ ├── favicon.ico
│ │ └── index.html
│ └── test
│ └── java
│ └── com
│ └── acgist
│ └── taoyao
│ ├── AudioMixerTest.java
│ ├── RecorderTest.java
│ ├── annotation
│ ├── CostedTest.java
│ ├── CostedTestTestExecutionListener.java
│ └── TaoyaoTest.java
│ ├── rtp
│ └── RtpTest.java
│ └── service
│ └── IdServiceTest.java
└── taoyao-signal
├── pom.xml
└── src
├── main
├── java
│ └── com
│ │ └── acgist
│ │ └── taoyao
│ │ └── signal
│ │ ├── client
│ │ ├── Client.java
│ │ ├── ClientAdapter.java
│ │ ├── ClientManager.java
│ │ ├── ClientMapstruct.java
│ │ ├── ClientStatus.java
│ │ ├── ClientType.java
│ │ ├── proxy
│ │ │ └── ProxyClient.java
│ │ ├── socket
│ │ │ ├── SocketClient.java
│ │ │ ├── SocketSignal.java
│ │ │ ├── SocketSignalAcceptHandler.java
│ │ │ └── SocketSignalMessageHandler.java
│ │ └── websocket
│ │ │ ├── WebSocketClient.java
│ │ │ ├── WebSocketSignal.java
│ │ │ └── WebSocketSignalConfigurator.java
│ │ ├── configuration
│ │ ├── ScriptAutoConfiguration.java
│ │ ├── SignalAutoConfiguration.java
│ │ ├── SocketSignalAutoConfiguration.java
│ │ └── WebSocketSignalAutoConfiguration.java
│ │ ├── controller
│ │ ├── ClientController.java
│ │ ├── ControlController.java
│ │ ├── ProtocolController.java
│ │ └── RoomController.java
│ │ ├── event
│ │ ├── ApplicationEventAdapter.java
│ │ ├── ClientEventAdapter.java
│ │ ├── EventPublisher.java
│ │ ├── RoomEventAdapter.java
│ │ ├── SessionEventAdapter.java
│ │ ├── client
│ │ │ ├── ClientCloseEvent.java
│ │ │ ├── ClientConfigEvent.java
│ │ │ ├── ClientOfflineEvent.java
│ │ │ └── ClientOnlineEvent.java
│ │ ├── media
│ │ │ ├── MediaConsumeEvent.java
│ │ │ ├── MediaConsumerCloseEvent.java
│ │ │ ├── MediaConsumerPauseEvent.java
│ │ │ ├── MediaConsumerResumeEvent.java
│ │ │ ├── MediaDataConsumerCloseEvent.java
│ │ │ ├── MediaDataProducerCloseEvent.java
│ │ │ ├── MediaProducerCloseEvent.java
│ │ │ ├── MediaProducerPauseEvent.java
│ │ │ ├── MediaProducerResumeEvent.java
│ │ │ └── TransportCloseEvent.java
│ │ ├── room
│ │ │ ├── MediaServerRegisterEvent.java
│ │ │ ├── RecorderCloseEvent.java
│ │ │ ├── RoomCloseEvent.java
│ │ │ ├── RoomEnterEvent.java
│ │ │ └── RoomLeaveEvent.java
│ │ └── session
│ │ │ └── SessionCloseEvent.java
│ │ ├── party
│ │ ├── media
│ │ │ ├── Consumer.java
│ │ │ ├── DataConsumer.java
│ │ │ ├── DataProducer.java
│ │ │ ├── Kind.java
│ │ │ ├── Operator.java
│ │ │ ├── OperatorAdapter.java
│ │ │ ├── Producer.java
│ │ │ └── Transport.java
│ │ ├── package-info.java
│ │ ├── room
│ │ │ ├── ClientWrapper.java
│ │ │ ├── Recorder.java
│ │ │ ├── Room.java
│ │ │ ├── RoomClientId.java
│ │ │ ├── RoomManager.java
│ │ │ ├── RoomStatus.java
│ │ │ ├── RoomStatusMapstruct.java
│ │ │ └── SubscribeType.java
│ │ └── session
│ │ │ ├── Session.java
│ │ │ └── SessionManager.java
│ │ ├── protocol
│ │ ├── Protocol.java
│ │ ├── ProtocolAdapter.java
│ │ ├── ProtocolClientAdapter.java
│ │ ├── ProtocolControlAdapter.java
│ │ ├── ProtocolManager.java
│ │ ├── ProtocolRoomAdapter.java
│ │ ├── ProtocolSessionAdapter.java
│ │ ├── client
│ │ │ ├── ClientAlarmProtocol.java
│ │ │ ├── ClientBroadcastProtocol.java
│ │ │ ├── ClientCloseProtocol.java
│ │ │ ├── ClientConfigProtocol.java
│ │ │ ├── ClientHeartbeatProtocol.java
│ │ │ ├── ClientListProtocol.java
│ │ │ ├── ClientOfflineProtocol.java
│ │ │ ├── ClientOnlineProtocol.java
│ │ │ ├── ClientRebootProtocol.java
│ │ │ ├── ClientRegisterProtocol.java
│ │ │ ├── ClientShutdownProtocol.java
│ │ │ ├── ClientStatusProtocol.java
│ │ │ └── ClientUnicastProtocol.java
│ │ ├── control
│ │ │ ├── ControlBellProtocol.java
│ │ │ ├── ControlClientRecordProtocol.java
│ │ │ ├── ControlConfigAudioProtocol.java
│ │ │ ├── ControlConfigVideoProtocol.java
│ │ │ ├── ControlPhotographProtocol.java
│ │ │ ├── ControlServerRecordProtocol.java
│ │ │ ├── ControlWakeupProtocol.java
│ │ │ ├── IControlBellProtocol.java
│ │ │ ├── IControlClientRecordProtocol.java
│ │ │ ├── IControlConfigAudioProtocol.java
│ │ │ ├── IControlConfigVideoProtocol.java
│ │ │ ├── IControlPhotographProtocol.java
│ │ │ ├── IControlServerRecordProtocol.java
│ │ │ └── IControlWakeupProtocol.java
│ │ ├── media
│ │ │ ├── MediaAudioVolumeProtocol.java
│ │ │ ├── MediaConsumeProtocol.java
│ │ │ ├── MediaConsumerCloseProtocol.java
│ │ │ ├── MediaConsumerLayersChangeProtocol.java
│ │ │ ├── MediaConsumerPauseProtocol.java
│ │ │ ├── MediaConsumerRequestKeyFrameProtocol.java
│ │ │ ├── MediaConsumerResumeProtocol.java
│ │ │ ├── MediaConsumerScoreProtocol.java
│ │ │ ├── MediaConsumerSetPreferredLayersProtocol.java
│ │ │ ├── MediaConsumerSetPriorityProtocol.java
│ │ │ ├── MediaConsumerStatusProtocol.java
│ │ │ ├── MediaDataConsumeProtocol.java
│ │ │ ├── MediaDataConsumerCloseProtocol.java
│ │ │ ├── MediaDataConsumerStatusProtocol.java
│ │ │ ├── MediaDataProduceProtocol.java
│ │ │ ├── MediaDataProducerCloseProtocol.java
│ │ │ ├── MediaDataProducerStatusProtocol.java
│ │ │ ├── MediaIceRestartProtocol.java
│ │ │ ├── MediaProduceProtocol.java
│ │ │ ├── MediaProducerCloseProtocol.java
│ │ │ ├── MediaProducerPauseProtocol.java
│ │ │ ├── MediaProducerResumeProtocol.java
│ │ │ ├── MediaProducerScoreProtocol.java
│ │ │ ├── MediaProducerStatusProtocol.java
│ │ │ ├── MediaRouterRtpCapabilitiesProtocol.java
│ │ │ ├── MediaTransportCloseProtocol.java
│ │ │ ├── MediaTransportPlainCreateProtocol.java
│ │ │ ├── MediaTransportStatusProtocol.java
│ │ │ ├── MediaTransportWebRtcConnectProtocol.java
│ │ │ ├── MediaTransportWebRtcCreateProtocol.java
│ │ │ └── MediaVideoOrientationChangeProtocol.java
│ │ ├── platform
│ │ │ ├── PlatformErrorProtocol.java
│ │ │ ├── PlatformRebootProtocol.java
│ │ │ ├── PlatformScriptProtocol.java
│ │ │ └── PlatformShutdownProtocol.java
│ │ ├── room
│ │ │ ├── RoomBroadcastProtocol.java
│ │ │ ├── RoomClientListIdProtocol.java
│ │ │ ├── RoomClientListProtocol.java
│ │ │ ├── RoomCloseProtocol.java
│ │ │ ├── RoomCreateProtocol.java
│ │ │ ├── RoomEnterProtocol.java
│ │ │ ├── RoomExpelProtocol.java
│ │ │ ├── RoomInviteProtocol.java
│ │ │ ├── RoomLeaveProtocol.java
│ │ │ ├── RoomListProtocol.java
│ │ │ └── RoomStatusProtocol.java
│ │ ├── session
│ │ │ ├── SessionCallProtocol.java
│ │ │ ├── SessionCloseProtocol.java
│ │ │ ├── SessionExchangeProtocol.java
│ │ │ ├── SessionPauseProtocol.java
│ │ │ └── SessionResumeProtocol.java
│ │ └── system
│ │ │ ├── SystemInfoProtocol.java
│ │ │ ├── SystemRebootProtocol.java
│ │ │ └── SystemShutdownProtocol.java
│ │ ├── service
│ │ ├── SecurityService.java
│ │ ├── UsernamePasswordService.java
│ │ └── impl
│ │ │ └── SecurityServiceImpl.java
│ │ └── utils
│ │ └── CipherUtils.java
└── resources
│ └── META-INF
│ └── spring
│ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
└── test
└── java
└── com
└── acgist
└── taoyao
└── signal
└── utils
└── CipherUtilsTest.java
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # github: [acgist]
2 | custom: ["https://www.acgist.com/sponsor"]
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .project
2 | .settings
3 | .classpath
4 | .factorypath
5 |
6 | dist
7 | logs
8 | build
9 | target
10 | node_modules
11 |
12 | .vscode
13 |
14 | package-lock.json
15 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "taoyao-client-media/mediasoup"]
2 | path = taoyao-client-media/mediasoup
3 | url = https://github.com/versatica/mediasoup.git
4 | [submodule "taoyao-client-web/mediasoup-client"]
5 | path = taoyao-client-web/mediasoup-client
6 | url = https://github.com/versatica/mediasoup-client.git
7 | [submodule "taoyao-client-android/libmediasoupclient"]
8 | path = taoyao-client-android/libmediasoupclient
9 | url = https://github.com/versatica/libmediasoupclient.git
10 |
--------------------------------------------------------------------------------
/docs/Learning.md:
--------------------------------------------------------------------------------
1 | # 资料
2 |
3 | ## WebRTC资料
4 |
5 | * https://www.cnblogs.com/ssyfj/p/14828185.html
6 | * https://www.cnblogs.com/ssyfj/p/14826516.html
7 | * https://www.cnblogs.com/ssyfj/p/14823861.html
8 | * https://www.cnblogs.com/ssyfj/p/14815266.html
9 | * https://www.cnblogs.com/ssyfj/p/14811253.html
10 | * https://www.cnblogs.com/ssyfj/p/14806678.html
11 | * https://www.cnblogs.com/ssyfj/p/14805040.html
12 | * https://www.cnblogs.com/ssyfj/p/14788663.html
13 | * https://www.cnblogs.com/ssyfj/p/14787012.html
14 | * https://www.cnblogs.com/ssyfj/p/14783168.html
15 | * https://www.cnblogs.com/ssyfj/p/14781982.html
16 | * https://www.cnblogs.com/ssyfj/p/14778839.html
17 |
18 | ## Mediasoup资料
19 |
20 | * https://www.cnblogs.com/ssyfj/p/14855454.html
21 | * https://www.cnblogs.com/ssyfj/p/14851442.html
22 | * https://www.cnblogs.com/ssyfj/p/14850041.html
23 | * https://www.cnblogs.com/ssyfj/p/14847097.html
24 | * https://www.cnblogs.com/ssyfj/p/14843182.html
25 | * https://www.cnblogs.com/ssyfj/p/14843082.html
26 |
27 | ## 更多资料
28 |
29 | * https://zhuanlan.zhihu.com/p/466172240
30 | * http://koca.szkingdom.com/forum/t/topic/218
31 | * https://blog.csdn.net/qw225967/article/details/121251305
32 | * http://www.manoner.com/post/音视频基础/WebRTC核心组件和协议栈/
33 | * https://blog.csdn.net/ababab12345/article/details/115585378
34 | * https://blog.csdn.net/jisuanji111111/article/details/121634199
35 | * https://lequ7.com/guan-yu-webrtc-yi-wen-xiang-jie-webrtc-ji-chu.html
36 |
--------------------------------------------------------------------------------
/docs/MI5S.md:
--------------------------------------------------------------------------------
1 | # 小米5S
2 |
3 | 由于使用小米5S作为测试机,没有适合的`LineageOS`版本,所有这里选择了`PixelExperience`作为测试系统。如果其他机器建议使用`LineageOS`,当然最好还是使用`Pixel`作为测试机,可以直接使用原生系统,或者自己定制编译`AOSP`。
4 |
5 | ## TWRP
6 |
7 | * https://twrp.me/Devices/
8 |
9 | ## MIUI
10 |
11 | * 卡刷:http://bigota.d.miui.com/V11.0.2.0.OAGCNXM/miui_MI5S_V11.0.2.0.OAGCNXM_6ce204eb2c_8.0.zip
12 | * 线刷:http://bigota.d.miui.com/V11.0.2.0.OAGCNXM/capricorn_images_V11.0.2.0.OAGCNXM_20191023.0000.00_8.0_cn_714988e4b7.tgz
13 | * 文章:https://web.vip.miui.com/page/info/mio/mio/detail?isTop=0&postId=17843063
14 |
15 | ## PixelExperience
16 |
17 | * https://get.pixelexperience.org/capricorn
18 |
19 | ## 砖头
20 |
21 | 如果刷机过程中出现了黑屏,进不了`recovery`和`bootloader`时,需要使用`MiFlash`通过串口刷机。
22 |
--------------------------------------------------------------------------------
/docs/TODO.md:
--------------------------------------------------------------------------------
1 | # 计划任务
2 |
3 | ## 日常任务
4 |
5 | * 过时方法
6 | * 注释优化:详细描述、单位描述
7 | * 日志优化:
8 | * 添加测试:
9 | * 异常优化:捕获范围
10 | * 排版优化:优化顺序
11 | * 代码优化:逻辑调整、性能优化、安全优化、增强稳定性
12 |
13 | ## Mediasoup功能集成
14 |
15 | 持续集成`mediasoup`功能:
16 |
17 | * 上次集成`mediasoup-demo`日期:`2023-06-19`
18 | * 上次集成`libmediasoupclient`日期:`2023-06-19`
19 |
20 | > `mediasoup-demo`包含`mediasoup`和`mediasoup-client`
21 |
22 | ## 计划任务
23 |
24 | * 开机自启
25 | * 录像底噪
26 | * 性能测试
27 | * 稳定性测试
28 | * 分辨率调整
29 | * 安卓内存抖动
30 | * 多重子网环境
31 | * 降低视频录像大小
32 | * 测试时间层和空间层
33 | * 码率等等参数配置验证
34 | * 查询消费者生产者信息
35 | * 存在TURN服务优先使用
36 | * 安卓关闭视频没有删除预览
37 | * 浏览器WebRTC监控页面关闭:`chrome://webrtc-internals/`
38 |
39 | ## 完成任务
40 |
--------------------------------------------------------------------------------
/docs/certs/ca.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDjzCCAnegAwIBAgIJAKPjuujtbFnoMA0GCSqGSIb3DQEBCwUAMF4xCzAJBgNV
3 | BAYTAmNuMQswCQYDVQQIDAJnZDELMAkGA1UEBwwCZ3oxDzANBgNVBAoMBmFjZ2lz
4 | dDEPMA0GA1UECwwGYWNnaXN0MRMwEQYDVQQDDAphY2dpc3QuY29tMB4XDTIzMDIy
5 | NzEzMzUyNloXDTMzMDIyNDEzMzUyNlowXjELMAkGA1UEBhMCY24xCzAJBgNVBAgM
6 | AmdkMQswCQYDVQQHDAJnejEPMA0GA1UECgwGYWNnaXN0MQ8wDQYDVQQLDAZhY2dp
7 | c3QxEzARBgNVBAMMCmFjZ2lzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
8 | ggEKAoIBAQDbt9orZnoTtzbaI9+S8uqqvi8rqOzi+b3tRHOYE+JVQNxWf8vTvKJ5
9 | mDDrBqICVy2SCtwkxXgrjDcRQVKK1IiDqxQ4oY6DCZetx4gQhYk9ychYsPPKnRg8
10 | bQEG48DM1EhmxhozUv7kaiUMS0LNODfzLTH/C25Nhgt3laGCtcIWOQliO9AVOxam
11 | EasfYP01AfL2qahk1s5N7fK9poLpbR9BS8ZUYMxZ5xOIUcc5eithBgGvuHUv9nEY
12 | Dart6XPC4z3YE9liwrxYwcBxztdvCA2EWeh1k0wNcrT/eJG3cuGgzsPDjI/BORq1
13 | DWFKJOXrWmhmIlw+VaQ6PIiD4/aQ50xfAgMBAAGjUDBOMB0GA1UdDgQWBBR98tbO
14 | eDI9mBcuZ96keDld1w54OzAfBgNVHSMEGDAWgBR98tbOeDI9mBcuZ96keDld1w54
15 | OzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCavKK+pJCmWDqFNMoX
16 | YwdRPDJS7LoCFV7C8oTkX5myCKNOi11bzlyqP/EkelubtRgaNr+GZCyhwxPiJvRx
17 | ZrWsoWpOH8OEdADM9lU+UXR23Ufmo9jFFEL7jZ9u9OmOJWAM5xM1KqCBd5+KRvfE
18 | oEHXdayfy6l00F+rsgaMm6IKdZcthAxVVEKO60GfwavcuvIiHVVLxW21H8BMoqd6
19 | Erigq7wJRRH+qm7Q5fVpmo1L7E6T2cBvGcFHKuQFdoxDlH4N6tPRDuRSODKFE//O
20 | D1ViQY65nn35mawbz2AgUUPvWiBDYYomeKIiGl859PukeP1jwDZcECFtrhH4s1p+
21 | at2z
22 | -----END CERTIFICATE-----
23 |
--------------------------------------------------------------------------------
/docs/certs/ca.srl:
--------------------------------------------------------------------------------
1 | C75F31B213340862
2 |
--------------------------------------------------------------------------------
/docs/certs/server.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIID2TCCAsGgAwIBAgIJAMdfMbITNAhiMA0GCSqGSIb3DQEBCwUAMF4xCzAJBgNV
3 | BAYTAmNuMQswCQYDVQQIDAJnZDELMAkGA1UEBwwCZ3oxDzANBgNVBAoMBmFjZ2lz
4 | dDEPMA0GA1UECwwGYWNnaXN0MRMwEQYDVQQDDAphY2dpc3QuY29tMB4XDTIzMDIy
5 | NzEzMzg0OFoXDTMzMDIyNDEzMzg0OFowZTELMAkGA1UEBhMCY24xCzAJBgNVBAgM
6 | AmdkMQswCQYDVQQHDAJnejEPMA0GA1UECgwGYWNnaXN0MQ8wDQYDVQQLDAZ0YW95
7 | YW8xGjAYBgNVBAMMEXRhb3lhby5hY2dpc3QuY29tMIIBIjANBgkqhkiG9w0BAQEF
8 | AAOCAQ8AMIIBCgKCAQEAmeQvh6OwHR87DKvm04z1xjbHgh6fxi6y+5jMJ7K7LvPT
9 | l+7haNB/eeSgEnHL38Naaw2cQvNkSAVPK210q574tQZW6Am2icRb9EJnMx2tKdaG
10 | 8QtTGxddScebyO++7qzf8CwECPRpsZRRp1a5ompCouDXY4VWJatXBMnZX05ZqUJH
11 | 0u6nioDwvd+YBOui4nGCxoF8tcVsidvHWx0JTfC7simyMp/5VvVYt7V4ENuU+3NT
12 | wDF7sEW1z8Sx1ErE4NLQIyy+PpGmV+h2HgNb0Bnre+jq7v/1Ue2Irsd6xe9iHf3P
13 | ji/mnkrRdAxd36KszFvmQjLAClJM1tRjc7gGyO8yCQIDAQABo4GSMIGPMAsGA1Ud
14 | DwQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwYQYDVR0RBFow
15 | WIcEfwAAAYcEwKgBZIcEwKgBbocEwKgIZIcEwKgIboIJbG9jYWxob3N0ggphY2dp
16 | c3QuY29tgg53d3cuYWNnaXN0LmNvbYIRdGFveWFvLmFjZ2lzdC5jb20wDQYJKoZI
17 | hvcNAQELBQADggEBAKDYyUUMFDchfTYwEhUWHHtUpJTzVz2opAoKjUU2yH4pT4dT
18 | Fb1s4NAuopoU9ycX4MJaApmxMioWwQzkoBLbnr+4RPfOYR9nlU0s+dx5JcpOgJtR
19 | 6X08ZDmW2DqhfIqR89uvIOgOU0oc6nUxQ0+doihDYyuyvXkvkZLjl8hrv6phuL8e
20 | qhtx9++4umD3RYbRsASRmB8/iYTgi7WAvFyNM9kkS5pwkJOaHN+vtKx5xpytEROT
21 | pbdUgGdXcYzYwzqDJ7Wbe0pIKeZ97rx6mF+0/92sWhd2U54jn5M1gp1sCQqG/syd
22 | tER+0jG77mvqkls5VCNmUE1+pOa53MvB5TuTTsA=
23 | -----END CERTIFICATE-----
24 |
--------------------------------------------------------------------------------
/docs/certs/server.csr:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE REQUEST-----
2 | MIICqjCCAZICAQAwZTELMAkGA1UEBhMCY24xCzAJBgNVBAgMAmdkMQswCQYDVQQH
3 | DAJnejEPMA0GA1UECgwGYWNnaXN0MQ8wDQYDVQQLDAZ0YW95YW8xGjAYBgNVBAMM
4 | EXRhb3lhby5hY2dpc3QuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
5 | AQEAmeQvh6OwHR87DKvm04z1xjbHgh6fxi6y+5jMJ7K7LvPTl+7haNB/eeSgEnHL
6 | 38Naaw2cQvNkSAVPK210q574tQZW6Am2icRb9EJnMx2tKdaG8QtTGxddScebyO++
7 | 7qzf8CwECPRpsZRRp1a5ompCouDXY4VWJatXBMnZX05ZqUJH0u6nioDwvd+YBOui
8 | 4nGCxoF8tcVsidvHWx0JTfC7simyMp/5VvVYt7V4ENuU+3NTwDF7sEW1z8Sx1ErE
9 | 4NLQIyy+PpGmV+h2HgNb0Bnre+jq7v/1Ue2Irsd6xe9iHf3Pji/mnkrRdAxd36Ks
10 | zFvmQjLAClJM1tRjc7gGyO8yCQIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAC2M
11 | KwMJv8TKM7QL6UE3skEoMhXgxwwODuIBiiloySHmRsb+fVEYcF1f+gN9UxSVwaIx
12 | BP7sb/+xy/N9G+28QVTbVlSc1MneQRPHjlx2MQqRHhfxtJ2/Zf6qFUuR2LimuHth
13 | HwIgQotnUbe6C2630bNeYV5mOyF/rltw0pSoaPlMG9WsNtzZJ1LYzyNp5ztXPR3W
14 | O2MkNQ3ZWqsR7dQXdUJbgruniwfxVGKxab6wBg+GZsHjiHujEmljjt3MIwimVDT+
15 | Z1V/R8C1Rlk98lJY5hSVBXZ09C5hox9NAvYkGfZ+ZqupOLoPOrvux7zETsDPxzV9
16 | mvAXPwkT0zVn/YvUCvo=
17 | -----END CERTIFICATE REQUEST-----
18 |
--------------------------------------------------------------------------------
/docs/certs/server.ext:
--------------------------------------------------------------------------------
1 | keyUsage = nonRepudiation, digitalSignature, keyEncipherment
2 | extendedKeyUsage = serverAuth, clientAuth
3 | subjectAltName=@SubjectAlternativeName
4 |
5 | [ SubjectAlternativeName ]
6 | IP.1=127.0.0.1
7 | IP.2=192.168.1.100
8 | IP.3=192.168.1.110
9 | IP.4=192.168.8.100
10 | IP.5=192.168.8.110
11 | DNS.1=localhost
12 | DNS.2=acgist.com
13 | DNS.3=www.acgist.com
14 | DNS.4=taoyao.acgist.com
15 |
--------------------------------------------------------------------------------
/docs/certs/server.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/docs/certs/server.p12
--------------------------------------------------------------------------------
/docs/etc/taoyao-signal-server.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=taoyao signal server
3 | After=network.target
4 | Wants=network.target
5 |
6 | [Service]
7 | User=taoyao
8 | Type=forking
9 | KillMode=process
10 | ExecStart=/data/taoyao/taoyao-signal-server/deploy/bin/startup.sh
11 | ExecReload=/bin/kill -HUP $MAINPID
12 | ExecStop=/bin/kill -QUIT $MAINPID
13 | Restart=always
14 | RestartSec=5s
15 |
16 | [Install]
17 | WantedBy=multi-user.target
18 |
--------------------------------------------------------------------------------
/docs/image/android.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/docs/image/android.jpg
--------------------------------------------------------------------------------
/docs/image/web.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/docs/image/web.jpg
--------------------------------------------------------------------------------
/docs/taoyao-v1.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/docs/taoyao-v1.0.zip
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/.gitignore:
--------------------------------------------------------------------------------
1 | .cxx
2 | .idea
3 | .gradle
4 |
5 | media/deps
6 |
7 | local.properties
8 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/boot/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.library'
3 | }
4 |
5 | android {
6 | namespace 'com.acgist.client.boot'
7 | compileSdk rootProject.ext.taoyao.compileSdk
8 | defaultConfig {
9 | minSdk rootProject.ext.taoyao.minSdk
10 | targetSdk rootProject.ext.taoyao.targetSdk
11 | consumerProguardFiles "consumer-rules.pro"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled true
16 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | compileOptions {
20 | sourceCompatibility rootProject.ext.taoyao.javaVersion
21 | targetCompatibility rootProject.ext.taoyao.javaVersion
22 | }
23 | }
24 |
25 | dependencies {
26 | api 'org.apache.commons:commons-lang3:3.12.0'
27 | api 'org.apache.commons:commons-collections4:4.4'
28 | api 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
29 | api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2'
30 | testImplementation 'junit:junit:4.13.2'
31 | }
32 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/boot/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/boot/consumer-rules.pro
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/boot/proguard-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/boot/proguard-rules.pro
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/boot/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/boot/src/main/java/com/acgist/taoyao/boot/model/Header.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.boot.model;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * 消息头部
7 | *
8 | * @author acgist
9 | */
10 | public class Header implements Cloneable, Serializable {
11 |
12 | private static final long serialVersionUID = 1L;
13 |
14 | /**
15 | * 消息版本
16 | */
17 | private String v;
18 | /**
19 | * 消息标识
20 | */
21 | private Long id;
22 | /**
23 | * 信令标识
24 | */
25 | private String signal;
26 |
27 | public Header() {
28 | }
29 |
30 | public Header(String v, Long id, String signal) {
31 | this.v = v;
32 | this.id = id;
33 | this.signal = signal;
34 | }
35 |
36 | @Override
37 | public Header clone() {
38 | return new Header(this.v, this.id, this.signal);
39 | }
40 |
41 | public String getV() {
42 | return this.v;
43 | }
44 |
45 | public void setV(String v) {
46 | this.v = v;
47 | }
48 |
49 | public Long getId() {
50 | return this.id;
51 | }
52 |
53 | public void setId(Long id) {
54 | this.id = id;
55 | }
56 |
57 | public String getSignal() {
58 | return this.signal;
59 | }
60 |
61 | public void setSignal(String signal) {
62 | this.signal = signal;
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/boot/src/main/java/com/acgist/taoyao/boot/utils/CloseableUtils.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.boot.utils;
2 |
3 | import android.util.Log;
4 |
5 | import java.io.Closeable;
6 |
7 | /**
8 | * 关闭资源工具
9 | *
10 | * @author acgist
11 | */
12 | public final class CloseableUtils {
13 |
14 | private CloseableUtils() {
15 | }
16 |
17 | /**
18 | * 关闭资源
19 | *
20 | * @param closeable 资源
21 | */
22 | public static final void close(Closeable closeable) {
23 | try {
24 | if (closeable != null) {
25 | closeable.close();
26 | }
27 | } catch (Exception e) {
28 | Log.e(CloseableUtils.class.getSimpleName(), "关闭资源异常", e);
29 | }
30 | }
31 |
32 | /**
33 | * 关闭资源
34 | *
35 | * @param closeable 资源
36 | */
37 | public static final void close(AutoCloseable closeable) {
38 | try {
39 | if (closeable != null) {
40 | closeable.close();
41 | }
42 | } catch (Exception e) {
43 | Log.e(CloseableUtils.class.getSimpleName(), "关闭资源异常", e);
44 | }
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/boot/src/main/java/com/acgist/taoyao/boot/utils/PointerUtils.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.boot.utils;
2 |
3 | import android.util.Log;
4 |
5 | import org.apache.commons.lang3.reflect.FieldUtils;
6 |
7 | import java.lang.reflect.Field;
8 |
9 | /**
10 | * 指针工具
11 | *
12 | * @author acgist
13 | */
14 | public final class PointerUtils {
15 |
16 | private PointerUtils() {
17 | }
18 |
19 | /**
20 | * @param object 对象
21 | * @param name 指针属性名称
22 | *
23 | * @return 指针
24 | */
25 | public static final long getNativePointer(Object object, String name) {
26 | if(object == null) {
27 | return 0L;
28 | }
29 | try {
30 | final Field reader = FieldUtils.getField(object.getClass(), name, true);
31 | if(reader == null) {
32 | return 0L;
33 | }
34 | return reader.getLong(object);
35 | } catch (Exception e) {
36 | Log.e(PointerUtils.class.getSimpleName(), "获取指针异常", e);
37 | }
38 | return 0L;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.library' version '7.4.2' apply false
3 | id 'com.android.application' version '7.4.2' apply false
4 | // 打包体积变大
5 | // id 'com.android.library' version '8.0.1' apply false
6 | // id 'com.android.application' version '8.0.1' apply false
7 | }
8 | ext {
9 | taoyao = [
10 | minSdk : 28,
11 | targetSdk : 32,
12 | compileSdk : 32,
13 | versionCode : 100,
14 | versionName : "1.0.0",
15 | ndkVersion : "23.1.7779620",
16 | javaVersion : JavaVersion.VERSION_17,
17 | cmakeVersion : "3.22.1",
18 | ]
19 | }
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | android {
6 | namespace 'com.acgist.taoyao.client'
7 | compileSdk rootProject.ext.taoyao.compileSdk
8 | defaultConfig {
9 | minSdk rootProject.ext.taoyao.minSdk
10 | targetSdk rootProject.ext.taoyao.targetSdk
11 | versionCode rootProject.ext.taoyao.versionCode
12 | versionName rootProject.ext.taoyao.versionName
13 | applicationId "com.acgist.taoyao.client"
14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled true
19 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | compileOptions {
23 | sourceCompatibility rootProject.ext.taoyao.javaVersion
24 | targetCompatibility rootProject.ext.taoyao.javaVersion
25 | }
26 | buildFeatures {
27 | viewBinding true
28 | }
29 | }
30 |
31 | dependencies {
32 | implementation project(path: ':boot')
33 | implementation project(path: ':media')
34 | implementation 'androidx.appcompat:appcompat:1.5.1'
35 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
36 | implementation 'com.google.android.material:material:1.8.0'
37 | testImplementation 'junit:junit:4.13.2'
38 | }
39 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/consumer-rules.pro
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/proguard-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/proguard-rules.pro
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/java/com/acgist/taoyao/client/TaoyaoReceiver.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.client;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.util.Log;
7 |
8 | /**
9 | * 开机广播
10 | *
11 | * @author acgist
12 | */
13 | public class TaoyaoReceiver extends BroadcastReceiver {
14 |
15 | @Override
16 | public void onReceive(Context context, Intent intent) {
17 | Log.d(TaoyaoReceiver.class.getSimpleName(), "onReceive:" + intent.getAction());
18 | if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
19 | this.bootTaoyao(context);
20 | } else {
21 | }
22 | }
23 |
24 | /**
25 | * 拉起预览
26 | *
27 | * @param context 上下文
28 | */
29 | private void bootTaoyao(Context context) {
30 | final Intent serviceIntent = new Intent(context, MediaService.class);
31 | serviceIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
32 | serviceIntent.setAction(MediaService.Action.BOOT.name());
33 | context.startForegroundService(serviceIntent);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/drawable/action.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/drawable/photograph.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/drawable/record.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/drawable/settings.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/client/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFFFF
4 | #FF000000
5 | #FF6200EE
6 | #FF3700B3
7 | #FF03DAC5
8 | #FF018786
9 |
10 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 桃夭
4 | 桃夭终端预览
5 | 桃夭终端设置
6 | 动作
7 | 录像
8 | 设置
9 | 拍照
10 | 连接
11 | 信令端口
12 | 信令地址
13 | 终端名称
14 | 终端标识
15 | 信令帐号
16 | 信令密码
17 |
18 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/client/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx512m -Dfile.encoding=UTF-8
2 | android.useAndroidX=true
3 | android.nonTransitiveRClass=true
4 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Mar 20 09:51:37 CST 2023
2 | zipStoreBase=GRADLE_USER_HOME
3 | zipStorePath=wrapper/dists
4 | distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-7.5-bin.zip
5 | #distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
6 | #distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
7 | distributionBase=GRADLE_USER_HOME
8 | distributionPath=wrapper/dists
9 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/media/consumer-rules.pro
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/libs/arm64-v8a/libjingle_peerconnection_so.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/media/libs/arm64-v8a/libjingle_peerconnection_so.so
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/proguard-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-android/taoyao/media/proguard-rules.pro
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/cpp/include/Log.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /**
4 | * 日志头文件
5 | */
6 | namespace acgist {
7 |
8 | #include "android/log.h"
9 |
10 | #ifndef LOG_TAG_TAOYAO
11 | #define LOG_TAG_TAOYAO "libtaoyao"
12 | #define LOG_D(format, ...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG_TAOYAO, "%s " format, __func__, ##__VA_ARGS__)
13 | #define LOG_I(format, ...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG_TAOYAO, "%s " format, __func__, ##__VA_ARGS__)
14 | #define LOG_W(format, ...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG_TAOYAO, "%s " format, __func__, ##__VA_ARGS__)
15 | #define LOG_E(format, ...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG_TAOYAO, "%s " format, __func__, ##__VA_ARGS__)
16 | #endif
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/cpp/include/MediaManager.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "jni.h"
4 | #include "Log.hpp"
5 | #include "mediasoupclient.hpp"
6 |
7 | #include "sdk/android/src/jni/jvm.h"
8 |
9 | /**
10 | * 媒体管理器头文件
11 | */
12 | namespace acgist {
13 |
14 | /**
15 | * 全局JavaVM指针
16 | */
17 | extern JavaVM* taoyaoJavaVM;
18 | /**
19 | * 绑定Java线程
20 | *
21 | * @param env JNIEnv
22 | * @param name Java线程名称
23 | */
24 | extern void bindJavaThread(JNIEnv** env, const char* name = "C++Thread");
25 | /**
26 | * 解绑Java线程
27 | */
28 | extern void unbindJavaThread();
29 |
30 | }
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/VideoSourceType.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media;
2 |
3 | /**
4 | * 视频来源类型
5 | *
6 | * @author acgist
7 | */
8 | public enum VideoSourceType {
9 |
10 | /**
11 | * 文件共享:FileVideoCapturer
12 | */
13 | FILE,
14 | /**
15 | * 后置摄像头:CameraVideoCapturer
16 | */
17 | BACK,
18 | /**
19 | * 前置摄像头:CameraVideoCapturer
20 | */
21 | FRONT,
22 | /**
23 | * 屏幕共享:ScreenCapturerAndroid
24 | */
25 | SCREEN;
26 |
27 | /**
28 | * @return 是否是摄像头
29 | */
30 | public boolean isCamera() {
31 | return this == BACK || this == FRONT;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/client/CloseableClient.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media.client;
2 |
3 | import android.os.Handler;
4 |
5 | import com.acgist.taoyao.media.MediaManager;
6 | import com.acgist.taoyao.media.signal.ITaoyao;
7 |
8 | import java.io.Closeable;
9 |
10 | /**
11 | * 需要关闭终端
12 | *
13 | * @author acgist
14 | */
15 | public abstract class CloseableClient implements Closeable {
16 |
17 | /**
18 | * 是否加载
19 | */
20 | protected volatile boolean init;
21 | /**
22 | * 是否关闭
23 | */
24 | protected volatile boolean close;
25 | /**
26 | * 信令通道
27 | */
28 | protected final ITaoyao taoyao;
29 | /**
30 | * MainHandler
31 | */
32 | protected final Handler mainHandler;
33 | /**
34 | * 媒体服务
35 | */
36 | protected final MediaManager mediaManager;
37 |
38 | /**
39 | * @param taoyao 信令
40 | * @param mainHandler MainHandler
41 | */
42 | public CloseableClient(ITaoyao taoyao, Handler mainHandler) {
43 | this.init = false;
44 | this.close = false;
45 | this.taoyao = taoyao;
46 | this.mainHandler = mainHandler;
47 | this.mediaManager = MediaManager.getInstance();
48 | }
49 |
50 | /**
51 | * 加载
52 | */
53 | protected void init() {
54 | this.init = true;
55 | }
56 |
57 |
58 | @Override
59 | public void close() {
60 | this.close = true;
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/client/RoomClient.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media.client;
2 |
3 | import android.os.Handler;
4 |
5 | import com.acgist.taoyao.media.signal.ITaoyao;
6 |
7 | /**
8 | * 房间终端
9 | * SDK + NDK + Mediasoup实现视频房间
10 | *
11 | * @author acgist
12 | */
13 | public class RoomClient extends Client {
14 |
15 | /**
16 | * @param name 终端名称
17 | * @param clientId 终端ID
18 | * @param taoyao 信令
19 | * @param mainHandler MainHandler
20 | */
21 | protected RoomClient(String name, String clientId, ITaoyao taoyao, Handler mainHandler) {
22 | super(name, clientId, taoyao, mainHandler);
23 | }
24 |
25 | @Override
26 | public void close() {
27 | super.close();
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/config/Config.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media.config;
2 |
3 | /**
4 | * 配置
5 | *
6 | * @author acgist
7 | */
8 | public class Config {
9 |
10 | /**
11 | * 屏幕捕获消息
12 | */
13 | public static final int WHAT_SCREEN_CAPTURE = 1000;
14 | /**
15 | * 视频录像消息
16 | */
17 | public static final int WHAT_RECORD = 1001;
18 | /**
19 | * 新建本地音频消息
20 | */
21 | public static final int WHAT_NEW_LOCAL_AUDIO = 2000;
22 | /**
23 | * 新建本地视频消息
24 | */
25 | public static final int WHAT_NEW_LOCAL_VIDEO = 2001;
26 | /**
27 | * 新建远程音频消息
28 | */
29 | public static final int WHAT_NEW_REMOTE_AUDIO = 2002;
30 | /**
31 | * 新建远程视频消息
32 | */
33 | public static final int WHAT_NEW_REMOTE_VIDEO = 2003;
34 | /**
35 | * 移除远程音频消息
36 | */
37 | public static final int WHAT_REMOVE_AUDIO = 2998;
38 | /**
39 | * 移除远程视频消息
40 | */
41 | public static final int WHAT_REMOVE_VIDEO = 2999;
42 | /**
43 | * 默认声音大小
44 | */
45 | public static final double DEFAULT_VOLUME = 10.0D;
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/config/WebrtcStunProperties.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media.config;
2 |
3 | /**
4 | * WebRTC STUN配置
5 | *
6 | * 注意:完全拷贝信令模块`WebrtcStunProperties`代码
7 | *
8 | * @author acgist
9 | */
10 | public class WebrtcStunProperties {
11 |
12 | /**
13 | * 主机
14 | */
15 | protected String host;
16 | /**
17 | * 端口
18 | */
19 | protected Integer port;
20 |
21 | public String getHost() {
22 | return host;
23 | }
24 |
25 | public void setHost(String host) {
26 | this.host = host;
27 | }
28 |
29 | public Integer getPort() {
30 | return port;
31 | }
32 |
33 | public void setPort(Integer port) {
34 | this.port = port;
35 | }
36 |
37 | public String getAddress() {
38 | return "stun:" + this.host + ":" + this.port;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/config/WebrtcTurnProperties.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media.config;
2 |
3 | /**
4 | * WebRTC TURN配置
5 | *
6 | * 注意:完全拷贝信令模块`WebrtcTurnProperties`代码
7 | *
8 | * @author acgist
9 | */
10 | public class WebrtcTurnProperties extends WebrtcStunProperties {
11 |
12 | /**
13 | * 帐号
14 | */
15 | private String username;
16 | /**
17 | * 密码
18 | */
19 | private String password;
20 |
21 | public String getUsername() {
22 | return username;
23 | }
24 |
25 | public void setUsername(String username) {
26 | this.username = username;
27 | }
28 |
29 | public String getPassword() {
30 | return password;
31 | }
32 |
33 | public void setPassword(String password) {
34 | this.password = password;
35 | }
36 |
37 | @Override
38 | public String getAddress() {
39 | return "turn:" + this.host + ":" + this.port;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/signal/ITaoyaoListener.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media.signal;
2 |
3 | import com.acgist.taoyao.boot.model.Message;
4 |
5 | /**
6 | * 信令监听
7 | *
8 | * @author acgist
9 | */
10 | public interface ITaoyaoListener {
11 |
12 | /**
13 | * 前置信令处理
14 | *
15 | * @param message 信令消息
16 | *
17 | * @return 是否完成
18 | */
19 | default boolean preOnMessage(Message message) {
20 | return false;
21 | }
22 |
23 | /**
24 | * 后置信令处理
25 | *
26 | * @param message 信令消息
27 | */
28 | default void postOnMessage(Message message) {
29 | }
30 |
31 | /**
32 | * 信令正在连接
33 | */
34 | default void onConnect() {
35 | }
36 |
37 | /**
38 | * 信令连接成功
39 | */
40 | default void onConnected() {
41 | }
42 |
43 | /**
44 | * 信令断开连接
45 | */
46 | default void onDisconnect() {
47 | }
48 |
49 | /**
50 | * 信令异常
51 | *
52 | * @param throwable 异常
53 | */
54 | default void onError(Throwable throwable) {
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/video/AiProcesser.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media.video;
2 |
3 | import org.webrtc.VideoFrame;
4 |
5 | /**
6 | * AI识别处理器
7 | *
8 | * 建议不要每帧识别,如果没有识别出来结果可以复用识别结果。
9 | *
10 | * @author acgist
11 | */
12 | public class AiProcesser extends VideoProcesser {
13 |
14 | public AiProcesser() {
15 | super("AI识别处理器");
16 | }
17 |
18 | @Override
19 | protected void doProcess(VideoFrame.I420Buffer i420Buffer) {
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/com/acgist/taoyao/media/video/VideoProcesser.java:
--------------------------------------------------------------------------------
1 | package com.acgist.taoyao.media.video;
2 |
3 | import android.util.Log;
4 |
5 | import org.webrtc.VideoFrame;
6 |
7 | import java.io.Closeable;
8 |
9 | /**
10 | * 视频处理器
11 | *
12 | * @author acgist
13 | */
14 | public abstract class VideoProcesser implements Closeable {
15 |
16 | /**
17 | * 处理器名称
18 | */
19 | protected final String name;
20 | /**
21 | * 下一个视频处理器
22 | */
23 | protected VideoProcesser next;
24 |
25 | public VideoProcesser(String name) {
26 | this.name = name;
27 | Log.i(WatermarkProcesser.class.getSimpleName(), "加载视频处理器" + name);
28 | }
29 |
30 | /**
31 | * 处理视频帧
32 | *
33 | * @param i420Buffer 视频帧
34 | */
35 | public void process(VideoFrame.I420Buffer i420Buffer) {
36 | this.doProcess(i420Buffer);
37 | if(this.next == null) {
38 | // 忽略
39 | } else {
40 | this.next.process(i420Buffer);
41 | }
42 | }
43 |
44 | /**
45 | * 处理视频帧
46 | *
47 | * @param i420Buffer 视频帧
48 | */
49 | protected abstract void doProcess(VideoFrame.I420Buffer i420Buffer);
50 |
51 | /**
52 | * 关闭处理器
53 | */
54 | public void close() {
55 | Log.i(VideoProcesser.class.getSimpleName(), "关闭视频处理器:" + this.name);
56 | if(this.next == null) {
57 | // 忽略
58 | } else {
59 | this.next.close();
60 | }
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/AddIceObserver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 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 to handle completion of addIceCandidate */
14 | public interface AddIceObserver {
15 | /** Called when ICE candidate added successfully.*/
16 | @CalledByNative public void onAddSuccess();
17 |
18 | /** Called when ICE candidate addition failed.*/
19 | @CalledByNative public void onAddFailure(String error);
20 | }
21 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/AudioDecoderFactoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * Implementations of this interface can create a native {@code webrtc::AudioDecoderFactory}.
15 | */
16 | public interface AudioDecoderFactoryFactory {
17 | /**
18 | * Returns a pointer to a {@code webrtc::AudioDecoderFactory}. The caller takes ownership.
19 | */
20 | long createNativeAudioDecoderFactory();
21 | }
22 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/AudioEncoderFactoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * Implementations of this interface can create a native {@code webrtc::AudioEncoderFactory}.
15 | */
16 | public interface AudioEncoderFactoryFactory {
17 | /**
18 | * Returns a pointer to a {@code webrtc::AudioEncoderFactory}. The caller takes ownership.
19 | */
20 | long createNativeAudioEncoderFactory();
21 | }
22 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/AudioProcessingFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | /** Factory for creating webrtc::AudioProcessing instances. */
14 | public interface AudioProcessingFactory {
15 | /**
16 | * Dynamically allocates a webrtc::AudioProcessing instance and returns a pointer to it.
17 | * The caller takes ownership of the object.
18 | */
19 | public long createNative();
20 | }
21 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/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 | /** Returns a pointer to webrtc::AudioSourceInterface. */
23 | long getNativeAudioSource() {
24 | return getNativeMediaSource();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/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 | /** Sets the volume for the underlying MediaSource. Volume is a gain value in the range
20 | * 0 to 10.
21 | */
22 | public void setVolume(double volume) {
23 | nativeSetVolume(getNativeAudioTrack(), volume);
24 | }
25 |
26 | /** Returns a pointer to webrtc::AudioTrackInterface. */
27 | long getNativeAudioTrack() {
28 | return getNativeMediaStreamTrack();
29 | }
30 |
31 | private static native void nativeSetVolume(long track, double volume);
32 | }
33 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/BaseBitrateAdjuster.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | /** BitrateAdjuster that tracks bitrate and framerate but does not adjust them. */
14 | class BaseBitrateAdjuster implements BitrateAdjuster {
15 | protected int targetBitrateBps;
16 | protected int targetFps;
17 |
18 | @Override
19 | public void setTargets(int targetBitrateBps, int targetFps) {
20 | this.targetBitrateBps = targetBitrateBps;
21 | this.targetFps = targetFps;
22 | }
23 |
24 | @Override
25 | public void reportEncodedFrame(int size) {
26 | // No op.
27 | }
28 |
29 | @Override
30 | public int getAdjustedBitrateBps() {
31 | return targetBitrateBps;
32 | }
33 |
34 | @Override
35 | public int getCodecConfigFramerate() {
36 | return targetFps;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/BitrateAdjuster.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | /** Object that adjusts the bitrate of a hardware codec. */
14 | interface BitrateAdjuster {
15 | /**
16 | * Sets the target bitrate in bits per second and framerate in frames per second.
17 | */
18 | void setTargets(int targetBitrateBps, int targetFps);
19 |
20 | /**
21 | * Should be used to report the size of an encoded frame to the bitrate adjuster. Use
22 | * getAdjustedBitrateBps to get the updated bitrate after calling this method.
23 | */
24 | void reportEncodedFrame(int size);
25 |
26 | /** Gets the current bitrate. */
27 | int getAdjustedBitrateBps();
28 |
29 | /** Gets the framerate for initial codec configuration. */
30 | int getCodecConfigFramerate();
31 | }
32 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/BuiltinAudioDecoderFactoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * Creates a native {@code webrtc::AudioDecoderFactory} with the builtin audio decoders.
15 | */
16 | public class BuiltinAudioDecoderFactoryFactory implements AudioDecoderFactoryFactory {
17 | @Override
18 | public long createNativeAudioDecoderFactory() {
19 | return nativeCreateBuiltinAudioDecoderFactory();
20 | }
21 |
22 | private static native long nativeCreateBuiltinAudioDecoderFactory();
23 | }
24 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/BuiltinAudioEncoderFactoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * This class creates a native {@code webrtc::AudioEncoderFactory} with the builtin audio encoders.
15 | */
16 | public class BuiltinAudioEncoderFactoryFactory implements AudioEncoderFactoryFactory {
17 | @Override
18 | public long createNativeAudioEncoderFactory() {
19 | return nativeCreateBuiltinAudioEncoderFactory();
20 | }
21 |
22 | private static native long nativeCreateBuiltinAudioEncoderFactory();
23 | }
24 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/CalledByNative.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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.lang.annotation.ElementType;
14 | import java.lang.annotation.Retention;
15 | import java.lang.annotation.RetentionPolicy;
16 | import java.lang.annotation.Target;
17 |
18 | /**
19 | * @CalledByNative is used by the JNI generator to create the necessary JNI
20 | * bindings and expose this method to native code.
21 | */
22 | @Target({ElementType.CONSTRUCTOR, ElementType.METHOD})
23 | @Retention(RetentionPolicy.CLASS)
24 | public @interface CalledByNative {
25 | /*
26 | * If present, tells which inner class the method belongs to.
27 | */
28 | public String value() default "";
29 | }
30 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/CalledByNativeUnchecked.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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.lang.annotation.ElementType;
14 | import java.lang.annotation.Retention;
15 | import java.lang.annotation.RetentionPolicy;
16 | import java.lang.annotation.Target;
17 |
18 | /**
19 | * @CalledByNativeUnchecked is used to generate JNI bindings that do not check for exceptions.
20 | * It only makes sense to use this annotation on methods that declare a throws... spec.
21 | * However, note that the exception received native side maybe an 'unchecked' (RuntimeExpception)
22 | * such as NullPointerException, so the native code should differentiate these cases.
23 | * Usage of this should be very rare; where possible handle exceptions in the Java side and use a
24 | * return value to indicate success / failure.
25 | */
26 | @Target(ElementType.METHOD)
27 | @Retention(RetentionPolicy.CLASS)
28 | public @interface CalledByNativeUnchecked {
29 | /*
30 | * If present, tells which inner class the method belongs to.
31 | */
32 | public String value() default "";
33 | }
34 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/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 android.content.Context;
14 |
15 | public class Camera1Capturer extends CameraCapturer {
16 | private final boolean captureToTexture;
17 |
18 | public Camera1Capturer(
19 | String cameraName, CameraEventsHandler eventsHandler, boolean captureToTexture) {
20 | super(cameraName, eventsHandler, new Camera1Enumerator(captureToTexture));
21 |
22 | this.captureToTexture = captureToTexture;
23 | }
24 |
25 | @Override
26 | protected void createCameraSession(CameraSession.CreateSessionCallback createSessionCallback,
27 | CameraSession.Events events, Context applicationContext,
28 | SurfaceTextureHelper surfaceTextureHelper, String cameraName, int width, int height,
29 | int framerate) {
30 | Camera1Session.create(createSessionCallback, events, captureToTexture, applicationContext,
31 | surfaceTextureHelper, Camera1Enumerator.getCameraIndex(cameraName), width, height,
32 | framerate);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/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 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/CapturerObserver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * Interface for observering a capturer. Passed to {@link VideoCapturer#initialize}. Provided by
15 | * {@link VideoSource#getCapturerObserver}.
16 | *
17 | * All callbacks must be executed on a single thread.
18 | */
19 | public interface CapturerObserver {
20 | /** Notify if the capturer have been started successfully or not. */
21 | void onCapturerStarted(boolean success);
22 | /** Notify that the capturer has been stopped. */
23 | void onCapturerStopped();
24 |
25 | /** Delivers a captured frame. */
26 | void onFrameCaptured(VideoFrame frame);
27 | }
28 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/EglBase10.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 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 javax.microedition.khronos.egl.EGLContext;
14 |
15 | /** EGL 1.0 implementation of EglBase. */
16 | public interface EglBase10 extends EglBase {
17 | interface Context extends EglBase.Context {
18 | EGLContext getRawContext();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/EglBase14.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 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.EGLContext;
14 |
15 | /** EGL 1.4 implementation of EglBase. */
16 | public interface EglBase14 extends EglBase {
17 | interface Context extends EglBase.Context {
18 | EGLContext getRawContext();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/Empty.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * Empty class for use in libjingle_peerconnection_java because all targets require at least one
15 | * Java file.
16 | */
17 | class Empty {}
18 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/FecControllerFactoryFactoryInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * Factory for creating webrtc::FecControllerFactory instances.
15 | */
16 | public interface FecControllerFactoryFactoryInterface {
17 | /**
18 | * Dynamically allocates a webrtc::FecControllerFactory instance and returns a pointer to it.
19 | * The caller takes ownership of the object.
20 | */
21 | public long createNative();
22 | }
23 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/FrameDecryptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * The FrameDecryptor interface allows Java API users to provide a
15 | * pointer to their native implementation of the FrameDecryptorInterface.
16 | * FrameDecryptors are extremely performance sensitive as they must process all
17 | * incoming video and audio frames. Due to this reason they should always be
18 | * backed by a native implementation
19 | * @note Not ready for production use.
20 | */
21 | public interface FrameDecryptor {
22 | /**
23 | * @return A FrameDecryptorInterface pointer.
24 | */
25 | long getNativeFrameDecryptor();
26 | }
27 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/FrameEncryptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * The FrameEncryptor interface allows Java API users to provide a pointer to
15 | * their native implementation of the FrameEncryptorInterface.
16 | * FrameEncyptors are extremely performance sensitive as they must process all
17 | * outgoing video and audio frames. Due to this reason they should always be
18 | * backed by a native implementation.
19 | * @note Not ready for production use.
20 | */
21 | public interface FrameEncryptor {
22 | /**
23 | * @return A FrameEncryptorInterface pointer.
24 | */
25 | long getNativeFrameEncryptor();
26 | }
27 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/FramerateBitrateAdjuster.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | * BitrateAdjuster that adjusts the bitrate to compensate for changes in the framerate. Used with
15 | * hardware codecs that assume the framerate never changes.
16 | */
17 | class FramerateBitrateAdjuster extends BaseBitrateAdjuster {
18 | private static final int INITIAL_FPS = 30;
19 |
20 | @Override
21 | public void setTargets(int targetBitrateBps, int targetFps) {
22 | if (this.targetFps == 0) {
23 | // Framerate-based bitrate adjustment always initializes to the same framerate.
24 | targetFps = INITIAL_FPS;
25 | }
26 | super.setTargets(targetBitrateBps, targetFps);
27 |
28 | this.targetBitrateBps = this.targetBitrateBps * INITIAL_FPS / this.targetFps;
29 | }
30 |
31 | @Override
32 | public int getCodecConfigFramerate() {
33 | return INITIAL_FPS;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/GlRectDrawer.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 | /** Simplest possible GL shader that just draws frames as opaque quads. */
14 | public class GlRectDrawer extends GlGenericDrawer {
15 | private static final String FRAGMENT_SHADER = "void main() {\n"
16 | + " gl_FragColor = sample(tc);\n"
17 | + "}\n";
18 |
19 | private static class ShaderCallbacks implements GlGenericDrawer.ShaderCallbacks {
20 | @Override
21 | public void onNewShader(GlShader shader) {}
22 |
23 | @Override
24 | public void onPrepareShader(GlShader shader, float[] texMatrix, int frameWidth, int frameHeight,
25 | int viewportWidth, int viewportHeight) {}
26 | }
27 |
28 | public GlRectDrawer() {
29 | super(FRAGMENT_SHADER, new ShaderCallbacks());
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/JNILogging.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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.Logging.Severity;
14 |
15 | class JNILogging {
16 | private final Loggable loggable;
17 |
18 | public JNILogging(Loggable loggable) {
19 | this.loggable = loggable;
20 | }
21 |
22 | @CalledByNative
23 | public void logToInjectable(String message, Integer severity, String tag) {
24 | loggable.onLogMessage(message, Severity.values()[severity], tag);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/JniCommon.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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.nio.ByteBuffer;
14 |
15 | /** Class with static JNI helper functions that are used in many places. */
16 | public class JniCommon {
17 | /** Functions to increment/decrement an rtc::RefCountInterface pointer. */
18 | public static native void nativeAddRef(long refCountedPointer);
19 | public static native void nativeReleaseRef(long refCountedPointer);
20 |
21 | public static native ByteBuffer nativeAllocateByteBuffer(int size);
22 | public static native void nativeFreeByteBuffer(ByteBuffer buffer);
23 | }
24 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/LibaomAv1Decoder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 LibaomAv1Decoder extends WrappedNativeVideoDecoder {
14 | @Override
15 | public long createNativeVideoDecoder() {
16 | return nativeCreateDecoder();
17 | }
18 |
19 | static native long nativeCreateDecoder();
20 |
21 | static native boolean nativeIsSupported();
22 | }
23 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/LibaomAv1Encoder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 LibaomAv1Encoder extends WrappedNativeVideoEncoder {
14 | @Override
15 | public long createNativeVideoEncoder() {
16 | return nativeCreateEncoder();
17 | }
18 |
19 | static native long nativeCreateEncoder();
20 |
21 | @Override
22 | public boolean isHardwareEncoder() {
23 | return false;
24 | }
25 |
26 | static native boolean nativeIsSupported();
27 | }
28 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/LibvpxVp8Decoder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 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 LibvpxVp8Decoder extends WrappedNativeVideoDecoder {
14 | @Override
15 | public long createNativeVideoDecoder() {
16 | return nativeCreateDecoder();
17 | }
18 |
19 | static native long nativeCreateDecoder();
20 | }
21 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/LibvpxVp8Encoder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 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 LibvpxVp8Encoder extends WrappedNativeVideoEncoder {
14 | @Override
15 | public long createNativeVideoEncoder() {
16 | return nativeCreateEncoder();
17 | }
18 |
19 | static native long nativeCreateEncoder();
20 |
21 | @Override
22 | public boolean isHardwareEncoder() {
23 | return false;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/LibvpxVp9Decoder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 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 LibvpxVp9Decoder extends WrappedNativeVideoDecoder {
14 | @Override
15 | public long createNativeVideoDecoder() {
16 | return nativeCreateDecoder();
17 | }
18 |
19 | static native long nativeCreateDecoder();
20 |
21 | static native boolean nativeIsSupported();
22 | }
23 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/LibvpxVp9Encoder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 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 LibvpxVp9Encoder extends WrappedNativeVideoEncoder {
14 | @Override
15 | public long createNativeVideoEncoder() {
16 | return nativeCreateEncoder();
17 | }
18 |
19 | static native long nativeCreateEncoder();
20 |
21 | @Override
22 | public boolean isHardwareEncoder() {
23 | return false;
24 | }
25 |
26 | static native boolean nativeIsSupported();
27 | }
28 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/Loggable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018 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.Logging.Severity;
14 |
15 | /**
16 | * Java interface for WebRTC logging. The default implementation uses webrtc.Logging.
17 | *
18 | * When injected, the Loggable will receive logging from both Java and native.
19 | */
20 | public interface Loggable {
21 | public void onLogMessage(String message, Severity severity, String tag);
22 | }
23 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/MediaCodecWrapperFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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.io.IOException;
14 |
15 | interface MediaCodecWrapperFactory {
16 | /**
17 | * Creates a new {@link MediaCodecWrapper} by codec name.
18 | *
19 | *
For additional information see {@link android.media.MediaCodec#createByCodecName}.
20 | */
21 | MediaCodecWrapper createByCodecName(String name) throws IOException;
22 | }
23 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/NativeLibraryLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 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 | * Interface for loading native libraries. A custom loader can be passed to
15 | * PeerConnectionFactory.initialize.
16 | */
17 | public interface NativeLibraryLoader {
18 | /**
19 | * Loads a native library with the given name.
20 | *
21 | * @return True on success
22 | */
23 | boolean load(String name);
24 | }
25 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/NativePeerConnectionFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | /** Factory for creating webrtc::jni::OwnedPeerConnection instances. */
14 | public interface NativePeerConnectionFactory {
15 | /**
16 | * Create a new webrtc::jni::OwnedPeerConnection instance and returns a pointer to it.
17 | * The caller takes ownership of the object.
18 | */
19 | long createNativePeerConnection();
20 | }
21 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/NetEqFactoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 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 | * Implementations of this interface can create a native {@code webrtc::NetEqFactory}.
15 | */
16 | public interface NetEqFactoryFactory {
17 | /**
18 | * Returns a pointer to a {@code webrtc::NetEqFactory}. The caller takes ownership.
19 | */
20 | long createNativeNetEqFactory();
21 | }
22 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/NetworkChangeDetectorFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 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.content.Context;
14 |
15 | public interface NetworkChangeDetectorFactory {
16 | public NetworkChangeDetector create(NetworkChangeDetector.Observer observer, Context context);
17 | }
18 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/NetworkControllerFactoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 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 | /** Factory for creating webrtc::NetworkControllerFactory instances. */
14 | public interface NetworkControllerFactoryFactory {
15 | /**
16 | * Dynamically allocates a webrtc::NetworkControllerFactory instance and returns a pointer to
17 | * it. The caller takes ownership of the object.
18 | */
19 | public long createNativeNetworkControllerFactory();
20 | }
21 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/NetworkPreference.java:
--------------------------------------------------------------------------------
1 |
2 | // Copyright 2023 The Chromium Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style license that can be
4 | // found in the LICENSE file.
5 |
6 | // This file is autogenerated by
7 | // java_cpp_enum.py
8 | // From
9 | // ../../../rtc_base/network_monitor.h
10 |
11 | package org.webrtc;
12 |
13 | import androidx.annotation.IntDef;
14 |
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 |
18 | @IntDef({
19 | NetworkPreference.NEUTRAL, NetworkPreference.NOT_PREFERRED
20 | })
21 | @Retention(RetentionPolicy.SOURCE)
22 | public @interface NetworkPreference {
23 | int NEUTRAL = 0;
24 | int NOT_PREFERRED = -1;
25 | }
26 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/NetworkStatePredictorFactoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 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 | /** Factory for creating webrtc::NetworkStatePredictorFactory instances. */
14 | public interface NetworkStatePredictorFactoryFactory {
15 | /**
16 | * Dynamically allocates a webrtc::NetworkStatePredictorFactory instance and returns a pointer to
17 | * it. The caller takes ownership of the object.
18 | */
19 | public long createNativeNetworkStatePredictorFactory();
20 | }
21 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/Priority.java:
--------------------------------------------------------------------------------
1 |
2 | // Copyright 2023 The Chromium Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style license that can be
4 | // found in the LICENSE file.
5 |
6 | // This file is autogenerated by
7 | // java_cpp_enum.py
8 | // From
9 | // ../../../api/priority.h
10 |
11 | package org.webrtc;
12 |
13 | import androidx.annotation.IntDef;
14 |
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 |
18 | @IntDef({
19 | Priority.VERY_LOW, Priority.LOW, Priority.MEDIUM, Priority.HIGH
20 | })
21 | @Retention(RetentionPolicy.SOURCE)
22 | public @interface Priority {
23 | int VERY_LOW = 0;
24 | int LOW = 1;
25 | int MEDIUM = 2;
26 | int HIGH = 3;
27 | }
28 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/RTCStatsCollectorCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 receiving stats reports (see webrtc::RTCStatsCollectorCallback). */
14 | public interface RTCStatsCollectorCallback {
15 | /** Called when the stats report is ready. */
16 | @CalledByNative public void onStatsDelivered(RTCStatsReport report);
17 | }
18 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/RefCounted.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * Interface for ref counted objects in WebRTC. These objects have significant resources that need
15 | * to be freed when they are no longer in use. Each objects starts with ref count of one when
16 | * created. If a reference is passed as a parameter to a method, the caller has ownesrship of the
17 | * object by default - calling release is not necessary unless retain is called.
18 | */
19 | public interface RefCounted {
20 | /** Increases ref count by one. */
21 | @CalledByNative void retain();
22 |
23 | /**
24 | * Decreases ref count by one. When the ref count reaches zero, resources related to the object
25 | * will be freed.
26 | */
27 | @CalledByNative void release();
28 | }
29 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/SSLCertificateVerifier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 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 | * The SSLCertificateVerifier interface allows API users to provide custom
15 | * logic to verify certificates.
16 | */
17 | public interface SSLCertificateVerifier {
18 | /**
19 | * Implementations of verify allow applications to provide custom logic for
20 | * verifying certificates. This is not required by default and should be used
21 | * with care.
22 | *
23 | * @param certificate A byte array containing a DER encoded X509 certificate.
24 | * @return True if the certificate is verified and trusted else false.
25 | */
26 | @CalledByNative boolean verify(byte[] certificate);
27 | }
28 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/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 | @CalledByNative void onCreateSuccess(SessionDescription sdp);
17 |
18 | /** Called on success of Set{Local,Remote}Description(). */
19 | @CalledByNative void onSetSuccess();
20 |
21 | /** Called on error of Create{Offer,Answer}(). */
22 | @CalledByNative void onCreateFailure(String error);
23 |
24 | /** Called on error of Set{Local,Remote}Description(). */
25 | @CalledByNative void onSetFailure(String error);
26 | }
27 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/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 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/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 | @CalledByNative public void onComplete(StatsReport[] reports);
17 | }
18 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/TurnCustomizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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++ TurnCustomizer. */
14 | public class TurnCustomizer {
15 | private long nativeTurnCustomizer;
16 |
17 | public TurnCustomizer(long nativeTurnCustomizer) {
18 | this.nativeTurnCustomizer = nativeTurnCustomizer;
19 | }
20 |
21 | public void dispose() {
22 | checkTurnCustomizerExists();
23 | nativeFreeTurnCustomizer(nativeTurnCustomizer);
24 | nativeTurnCustomizer = 0;
25 | }
26 |
27 | private static native void nativeFreeTurnCustomizer(long turnCustomizer);
28 |
29 | /** Return a pointer to webrtc::TurnCustomizer. */
30 | @CalledByNative
31 | long getNativeTurnCustomizer() {
32 | checkTurnCustomizerExists();
33 | return nativeTurnCustomizer;
34 | }
35 |
36 | private void checkTurnCustomizerExists() {
37 | if (nativeTurnCustomizer == 0) {
38 | throw new IllegalStateException("TurnCustomizer has been disposed.");
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/VideoCodecMimeType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | /** Enumeration of supported video codec types. */
14 | enum VideoCodecMimeType {
15 | VP8("video/x-vnd.on2.vp8"),
16 | VP9("video/x-vnd.on2.vp9"),
17 | H264("video/avc"),
18 | AV1("video/av01");
19 |
20 | private final String mimeType;
21 |
22 | private VideoCodecMimeType(String mimeType) {
23 | this.mimeType = mimeType;
24 | }
25 |
26 | String mimeType() {
27 | return mimeType;
28 | }
29 |
30 | static VideoCodecMimeType fromSdpCodecName(String codecName) {
31 | return codecName.equals("AV1X") ? AV1 : valueOf(codecName);
32 | }
33 |
34 | String toSdpCodecName() {
35 | return this == AV1 ? "AV1X" : name();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/VideoCodecStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | * Status codes reported by video encoding/decoding components. This should be kept in sync with
15 | * video_error_codes.h.
16 | */
17 | public enum VideoCodecStatus {
18 | REQUEST_SLI(2),
19 | NO_OUTPUT(1),
20 | OK(0),
21 | ERROR(-1),
22 | LEVEL_EXCEEDED(-2),
23 | MEMORY(-3),
24 | ERR_PARAMETER(-4),
25 | ERR_SIZE(-5),
26 | TIMEOUT(-6),
27 | UNINITIALIZED(-7),
28 | ERR_REQUEST_SLI(-12),
29 | FALLBACK_SOFTWARE(-13),
30 | TARGET_BITRATE_OVERSHOOT(-14);
31 |
32 | private final int number;
33 |
34 | private VideoCodecStatus(int number) {
35 | this.number = number;
36 | }
37 |
38 | @CalledByNative
39 | public int getNumber() {
40 | return number;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/VideoDecoderFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 androidx.annotation.Nullable;
14 |
15 | /** Factory for creating VideoDecoders. */
16 | public interface VideoDecoderFactory {
17 | /**
18 | * Creates a VideoDecoder for the given codec. Supports the same codecs supported by
19 | * VideoEncoderFactory.
20 | */
21 | @Nullable @CalledByNative VideoDecoder createDecoder(VideoCodecInfo info);
22 |
23 | /**
24 | * Enumerates the list of supported video codecs.
25 | */
26 | @CalledByNative
27 | default VideoCodecInfo[] getSupportedCodecs() {
28 | return new VideoCodecInfo[0];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/VideoDecoderFallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | * A combined video decoder that falls back on a secondary decoder if the primary decoder fails.
15 | */
16 | public class VideoDecoderFallback extends WrappedNativeVideoDecoder {
17 | private final VideoDecoder fallback;
18 | private final VideoDecoder primary;
19 |
20 | public VideoDecoderFallback(VideoDecoder fallback, VideoDecoder primary) {
21 | this.fallback = fallback;
22 | this.primary = primary;
23 | }
24 |
25 | @Override
26 | public long createNativeVideoDecoder() {
27 | return nativeCreateDecoder(fallback, primary);
28 | }
29 |
30 | private static native long nativeCreateDecoder(VideoDecoder fallback, VideoDecoder primary);
31 | }
32 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/VideoDecoderWrapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | * This class contains the Java glue code for JNI generation of VideoDecoder.
15 | */
16 | class VideoDecoderWrapper {
17 | @CalledByNative
18 | static VideoDecoder.Callback createDecoderCallback(final long nativeDecoder) {
19 | return (VideoFrame frame, Integer decodeTimeMs,
20 | Integer qp) -> nativeOnDecodedFrame(nativeDecoder, frame, decodeTimeMs, qp);
21 | }
22 |
23 | private static native void nativeOnDecodedFrame(
24 | long nativeVideoDecoderWrapper, VideoFrame frame, Integer decodeTimeMs, Integer qp);
25 | }
26 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/VideoEncoderFallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | * A combined video encoder that falls back on a secondary encoder if the primary encoder fails.
15 | */
16 | public class VideoEncoderFallback extends WrappedNativeVideoEncoder {
17 | private final VideoEncoder fallback;
18 | private final VideoEncoder primary;
19 |
20 | public VideoEncoderFallback(VideoEncoder fallback, VideoEncoder primary) {
21 | this.fallback = fallback;
22 | this.primary = primary;
23 | }
24 |
25 | @Override
26 | public long createNativeVideoEncoder() {
27 | return nativeCreateEncoder(fallback, primary);
28 | }
29 |
30 | @Override
31 | public boolean isHardwareEncoder() {
32 | return primary.isHardwareEncoder();
33 | }
34 |
35 | private static native long nativeCreateEncoder(VideoEncoder fallback, VideoEncoder primary);
36 | }
37 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/VideoFrameBufferType.java:
--------------------------------------------------------------------------------
1 |
2 | // Copyright 2023 The Chromium Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style license that can be
4 | // found in the LICENSE file.
5 |
6 | // This file is autogenerated by
7 | // java_cpp_enum.py
8 | // From
9 | // ../../../api/video/video_frame_buffer.h
10 |
11 | package org.webrtc;
12 |
13 | import androidx.annotation.IntDef;
14 |
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 |
18 | @IntDef({
19 | VideoFrameBufferType.NATIVE, VideoFrameBufferType.I420, VideoFrameBufferType.I420A,
20 | VideoFrameBufferType.I444, VideoFrameBufferType.I010, VideoFrameBufferType.NV12
21 | })
22 | @Retention(RetentionPolicy.SOURCE)
23 | public @interface VideoFrameBufferType {
24 | int NATIVE = 0;
25 | int I420 = 1;
26 | int I420A = 2;
27 | int I444 = 3;
28 | int I010 = 4;
29 | int NV12 = 5;
30 | }
31 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/VideoSink.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 version of rtc::VideoSinkInterface.
15 | */
16 | public interface VideoSink {
17 | /**
18 | * Implementations should call frame.retain() if they need to hold a reference to the frame after
19 | * this function returns. Each call to retain() should be followed by a call to frame.release()
20 | * when the reference is no longer needed.
21 | */
22 | @CalledByNative void onFrame(VideoFrame frame);
23 | }
24 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/WebRtcClassLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 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 | * This class provides a ClassLoader that is capable of loading WebRTC Java classes regardless of
15 | * what thread it's called from. Such a ClassLoader is needed for the few cases where the JNI
16 | * mechanism is unable to automatically determine the appropriate ClassLoader instance.
17 | */
18 | class WebRtcClassLoader {
19 | @CalledByNative
20 | static Object getClassLoader() {
21 | Object loader = WebRtcClassLoader.class.getClassLoader();
22 | if (loader == null) {
23 | throw new RuntimeException("Failed to get WebRTC class loader.");
24 | }
25 | return loader;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/WrappedNativeVideoDecoder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 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 | * Wraps a native webrtc::VideoDecoder.
15 | */
16 | public abstract class WrappedNativeVideoDecoder implements VideoDecoder {
17 | @Override public abstract long createNativeVideoDecoder();
18 |
19 | @Override
20 | public final VideoCodecStatus initDecode(Settings settings, Callback decodeCallback) {
21 | throw new UnsupportedOperationException("Not implemented.");
22 | }
23 |
24 | @Override
25 | public final VideoCodecStatus release() {
26 | throw new UnsupportedOperationException("Not implemented.");
27 | }
28 |
29 | @Override
30 | public final VideoCodecStatus decode(EncodedImage frame, DecodeInfo info) {
31 | throw new UnsupportedOperationException("Not implemented.");
32 | }
33 |
34 | @Override
35 | public final String getImplementationName() {
36 | throw new UnsupportedOperationException("Not implemented.");
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/media/src/main/java/org/webrtc/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 | public final class BuildInfo {
16 | public static String getDevice() {
17 | return Build.DEVICE;
18 | }
19 |
20 | public static String getDeviceModel() {
21 | return Build.MODEL;
22 | }
23 |
24 | public static String getProduct() {
25 | return Build.PRODUCT;
26 | }
27 |
28 | public static String getBrand() {
29 | return Build.BRAND;
30 | }
31 |
32 | public static String getDeviceManufacturer() {
33 | return Build.MANUFACTURER;
34 | }
35 |
36 | public static String getAndroidBuildId() {
37 | return Build.ID;
38 | }
39 |
40 | public static String getBuildType() {
41 | return Build.TYPE;
42 | }
43 |
44 | public static String getBuildRelease() {
45 | return Build.VERSION.RELEASE;
46 | }
47 |
48 | public static int getSdkVersion() {
49 | return Build.VERSION.SDK_INT;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/taoyao-client-android/taoyao/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | maven { url 'https://maven.aliyun.com/repository/google' }
4 | maven { url 'https://maven.aliyun.com/repository/public' }
5 | maven { url 'https://maven.aliyun.com/repository/central' }
6 | maven { url 'https://maven.aliyun.com/repository/jcenter' }
7 | maven { url 'https://maven.aliyun.com/repository/releases' }
8 | maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
9 | google()
10 | mavenCentral()
11 | gradlePluginPortal()
12 | }
13 | }
14 | dependencyResolutionManagement {
15 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
16 | repositories {
17 | maven { url 'https://maven.aliyun.com/repository/google' }
18 | maven { url 'https://maven.aliyun.com/repository/public' }
19 | maven { url 'https://maven.aliyun.com/repository/central' }
20 | maven { url 'https://maven.aliyun.com/repository/jcenter' }
21 | maven { url 'https://maven.aliyun.com/repository/releases' }
22 | maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
23 | google()
24 | mavenCentral()
25 | }
26 | }
27 | rootProject.name = "taoyao"
28 | include ':boot'
29 | include ':media'
30 | include ':client'
31 |
--------------------------------------------------------------------------------
/taoyao-client-media/.env:
--------------------------------------------------------------------------------
1 | # 服务名称
2 | NAME=taoyao-client-media
3 | # 终端ID
4 | CLIENT_ID=taoyao-client-media
5 | # 终端名称
6 | CLIENT_NAME=桃夭媒体服务
7 | # 信令版本
8 | SIGNAL_VERSION=1.0.0
9 | # 信令地址
10 | SIGNAL_HOST=127.0.0.1
11 | # 信令端口
12 | SIGNAL_PORT=8888
13 | # 信令帐号
14 | SIGNAL_USERNAME=taoyao
15 | # 信令密码
16 | SIGNAL_PASSWORD=taoyao
17 | # 工作线程数量(生产环境不要配置)
18 | MEDIASOUP_WORKER_SIZE=2
19 | # Mediasoup最小端口
20 | MEDIASOUP_MIN_PORT=40000
21 | # Mediasoup最大端口
22 | MEDIASOUP_MAX_PORT=49999
23 | # Mediasoup监听地址
24 | MEDIASOUP_LISTEN_IP=0.0.0.0
25 | # Mediasoup监听端口(起始端口)
26 | MEDIASOUP_LISTEN_PORT=44444
27 | # Mediasoup声明地址(不能配置环回地址)
28 | MEDIASOUP_ANNOUNCED_IP=192.168.1.100
--------------------------------------------------------------------------------
/taoyao-client-media/.env.node-a:
--------------------------------------------------------------------------------
1 | NAME=taoyao-client-media-a
2 | CLIENT_ID=taoyao-client-media-a
3 | CLIENT_NAME=桃夭媒体服务A
4 | SIGNAL_VERSION=1.0.0
5 | SIGNAL_HOST=127.0.0.1
6 | SIGNAL_PORT=8888
7 | SIGNAL_USERNAME=taoyao
8 | SIGNAL_PASSWORD=taoyao
9 | MEDIASOUP_WORKER_SIZE=2
10 | MEDIASOUP_MIN_PORT=40000
11 | MEDIASOUP_MAX_PORT=49999
12 | MEDIASOUP_LISTEN_IP=0.0.0.0
13 | MEDIASOUP_LISTEN_PORT=41111
14 | MEDIASOUP_ANNOUNCED_IP=192.168.1.110
--------------------------------------------------------------------------------
/taoyao-client-media/.env.node-b:
--------------------------------------------------------------------------------
1 | NAME=taoyao-client-media-b
2 | CLIENT_ID=taoyao-client-media-b
3 | CLIENT_NAME=桃夭媒体服务B
4 | SIGNAL_VERSION=1.0.0
5 | SIGNAL_HOST=127.0.0.1
6 | SIGNAL_PORT=8888
7 | SIGNAL_USERNAME=taoyao
8 | SIGNAL_PASSWORD=taoyao
9 | MEDIASOUP_WORKER_SIZE=2
10 | MEDIASOUP_MIN_PORT=40000
11 | MEDIASOUP_MAX_PORT=49999
12 | MEDIASOUP_LISTEN_IP=0.0.0.0
13 | MEDIASOUP_LISTEN_PORT=42222
14 | MEDIASOUP_ANNOUNCED_IP=192.168.1.110
--------------------------------------------------------------------------------
/taoyao-client-media/.env.prd:
--------------------------------------------------------------------------------
1 | NAME=taoyao-client-media
2 | CLIENT_ID=taoyao-client-media
3 | CLIENT_NAME=桃夭媒体服务
4 | SIGNAL_VERSION=1.0.0
5 | SIGNAL_HOST=127.0.0.1
6 | SIGNAL_PORT=8888
7 | SIGNAL_USERNAME=taoyao
8 | SIGNAL_PASSWORD=taoyao
9 | MEDIASOUP_MIN_PORT=40000
10 | MEDIASOUP_MAX_PORT=49999
11 | MEDIASOUP_LISTEN_IP=0.0.0.0
12 | MEDIASOUP_LISTEN_PORT=44444
13 | MEDIASOUP_ANNOUNCED_IP=192.168.1.110
--------------------------------------------------------------------------------
/taoyao-client-media/.env.work:
--------------------------------------------------------------------------------
1 | NAME=taoyao-client-media
2 | CLIENT_ID=taoyao-client-media
3 | CLIENT_NAME=桃夭媒体服务
4 | SIGNAL_VERSION=1.0.0
5 | SIGNAL_HOST=127.0.0.1
6 | SIGNAL_PORT=8888
7 | SIGNAL_USERNAME=taoyao
8 | SIGNAL_PASSWORD=taoyao
9 | MEDIASOUP_WORKER_SIZE=2
10 | MEDIASOUP_MIN_PORT=40000
11 | MEDIASOUP_MAX_PORT=49999
12 | MEDIASOUP_LISTEN_IP=0.0.0.0
13 | MEDIASOUP_LISTEN_PORT=44444
14 | MEDIASOUP_ANNOUNCED_IP=192.168.8.100
--------------------------------------------------------------------------------
/taoyao-client-media/ecosystem.config.cluster.json:
--------------------------------------------------------------------------------
1 | {
2 | "apps": [
3 | {
4 | "cwd" : "./",
5 | "name" : "taoyao-client-media",
6 | "script" : "src/Server.js",
7 | "instances" : 2,
8 | "exec_mode" : "cluster",
9 | "out_file" : "./logs/out.log",
10 | "error_file" : "./logs/error.log",
11 | "log_date_format": "YYYY-MM-DD HH:mm:ss"
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/taoyao-client-media/ecosystem.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "apps": [
3 | {
4 | "cwd" : "./",
5 | "name" : "taoyao-client-media",
6 | "script" : "src/Server.js",
7 | "out_file" : "./logs/out.log",
8 | "error_file" : "./logs/error.log",
9 | "log_date_format": "YYYY-MM-DD HH:mm:ss"
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/taoyao-client-media/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : "taoyao-client-media",
3 | "author" : "acgist",
4 | "version" : "1.0.0",
5 | "private" : true,
6 | "license" : "Apache-2.0",
7 | "homepage" : "https://gitee.com/acgist/taoyao",
8 | "description": "taoyao client media",
9 | "scripts": {
10 | "dev" : "node src/Server.js",
11 | "prd" : "cross-env NODE_ENV=prd node src/Server.js",
12 | "work" : "cross-env NODE_ENV=work node src/Server.js",
13 | "node-a": "cross-env NODE_ENV=node-a node src/Server.js",
14 | "node-b": "cross-env NODE_ENV=node-b node src/Server.js"
15 | },
16 | "dependencies": {
17 | "ws" : "^8.12.0",
18 | "dotenv" : "^16.3.1",
19 | "cross-env": "^7.0.3",
20 | "mediasoup": "^3.11.10"
21 | }
22 | }
--------------------------------------------------------------------------------
/taoyao-client-web/README.md:
--------------------------------------------------------------------------------
1 | # Web终端
2 |
3 | ## Web终端
4 |
5 | * [mediasoup-client源码](https://github.com/versatica/mediasoup-client)
6 | * [mediasoup-client文档](https://mediasoup.org/documentation/v3/mediasoup-client)
7 | * [mediasoup-client接口](https://mediasoup.org/documentation/v3/mediasoup-client/api)
8 |
9 | ## 终端媒体
10 |
11 | 终端页面组件需要提供`media`方法,同时挂载到终端的`proxy`属性下面。
12 | 媒体生成以后自动调用:
13 |
14 | ```
15 | LocalClient.proxy.media(track, producer);
16 | RemoteClient.proxy.media(track, consumer);
17 | SessionClient.proxy.media(track);
18 | ```
19 |
20 | ## 终端列表
21 |
22 | `Web`终端并未对整个终端列表以及状态进行维护,所以需要开发者自己实现。
23 |
--------------------------------------------------------------------------------
/taoyao-client-web/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/acgist/taoyao/2d065876db331eb4329639c96986b18e154b4d3e/taoyao-client-web/favicon.ico
--------------------------------------------------------------------------------
/taoyao-client-web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |