123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- #pragma once
- #include <api/media_stream_interface.h>
- #include <api/rtc_error.h>
- struct IUnityInterfaces;
- namespace unity
- {
- namespace webrtc
- {
- using namespace ::webrtc;
- class Context;
- class PeerConnectionObject;
- class UnityVideoRenderer;
- class AudioTrackSinkAdapter;
- enum class RTCSdpType;
- enum class RTCPeerConnectionEventType;
- struct MediaStreamEvent;
- using DelegateDebugLog = void (*)(const char*);
- using DelegateSetResolution = void (*)(int32_t*, int32_t*);
- using DelegateMediaStreamOnAddTrack = void (*)(MediaStreamInterface*, MediaStreamTrackInterface*);
- using DelegateMediaStreamOnRemoveTrack = void (*)(MediaStreamInterface*, MediaStreamTrackInterface*);
- using DelegateVideoFrameResize = void (*)(UnityVideoRenderer* renderer, int width, int height);
- void debugLog(const char* buf);
- extern DelegateDebugLog delegateDebugLog;
- enum class RTCPeerConnectionState
- {
- New,
- Connecting,
- Connected,
- Disconnected,
- Failed,
- Closed
- };
- enum class RTCIceConnectionState
- {
- New,
- Checking,
- Connected,
- Completed,
- Failed,
- Disconnected,
- Closed,
- Max
- };
- enum class RTCSignalingState
- {
- Stable,
- HaveLocalOffer,
- HaveRemoteOffer,
- HaveLocalPranswer,
- HaveRemotePranswer,
- Closed
- };
- enum class RTCPeerConnectionEventType
- {
- ConnectionStateChange,
- DataChannel,
- IceCandidate,
- IceConnectionStateChange,
- Track
- };
- enum class RTCSdpType
- {
- Offer,
- PrAnswer,
- Answer,
- Rollback
- };
- enum class SdpSemanticsType
- {
- UnifiedPlan
- };
- enum class RTCErrorDetailType
- {
- DataChannelFailure,
- DtlsFailure,
- FingerprintFailure,
- IdpBadScriptFailure,
- IdpExecutionFailure,
- IdpLoadFailure,
- IdpNeedLogin,
- IdpTimeout,
- IdpTlsFailure,
- IdpTokenExpired,
- IdpTokenInvalid,
- SctpFailure,
- SdpSyntaxError,
- HardwareEncoderNotAvailable,
- HardwareEncoderError
- };
- enum class RTCIceCredentialType
- {
- Password,
- OAuth
- };
- enum class TrackKind
- {
- Audio,
- Video
- };
- struct RTCSessionDescription
- {
- RTCSdpType type;
- char* sdp;
- };
- struct RTCIceServer
- {
- char* credential;
- char* credentialType;
- char** urls;
- int urlsLength;
- char* username;
- };
- struct RTCConfiguration
- {
- RTCIceServer* iceServers;
- int iceServersLength;
- char* iceServerPolicy;
- };
- struct RTCIceCandidate
- {
- char* candidate;
- char* sdpMid;
- int sdpMLineIndex;
- };
- struct RTCOfferAnswerOptions
- {
- bool iceRestart;
- bool voiceActivityDetection;
- };
- class IGraphicsDevice;
- class ProfilerMarkerFactory;
- class Plugin
- {
- public:
- static IGraphicsDevice* GraphicsDevice();
- static ProfilerMarkerFactory* ProfilerMarkerFactory();
- };
- } // end namespace webrtc
- } // end namespace unity
|