| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 typedef void (*LOCALSDPREADYTOSEND_CALLBACK)(const char* type, const char* sdp); | 30 typedef void (*LOCALSDPREADYTOSEND_CALLBACK)(const char* type, const char* sdp); |
| 31 typedef void (*ICECANDIDATEREADYTOSEND_CALLBACK)(const char* candidate, | 31 typedef void (*ICECANDIDATEREADYTOSEND_CALLBACK)(const char* candidate, |
| 32 const int sdp_mline_index, | 32 const int sdp_mline_index, |
| 33 const char* sdp_mid); | 33 const char* sdp_mid); |
| 34 typedef void (*AUDIOBUSREADY_CALLBACK)(const void* audio_data, | 34 typedef void (*AUDIOBUSREADY_CALLBACK)(const void* audio_data, |
| 35 int bits_per_sample, | 35 int bits_per_sample, |
| 36 int sample_rate, | 36 int sample_rate, |
| 37 int number_of_channels, | 37 int number_of_channels, |
| 38 int number_of_frames); | 38 int number_of_frames); |
| 39 | 39 |
| 40 #if defined(WEBRTC_WIN) |
| 40 #define WEBRTC_PLUGIN_API __declspec(dllexport) | 41 #define WEBRTC_PLUGIN_API __declspec(dllexport) |
| 42 #elif defined(WEBRTC_ANDROID) |
| 43 #define WEBRTC_PLUGIN_API __attribute__((visibility("default"))) |
| 44 #endif |
| 41 extern "C" { | 45 extern "C" { |
| 42 // Create a peerconnection and return a unique peer connection id. | 46 // Create a peerconnection and return a unique peer connection id. |
| 43 WEBRTC_PLUGIN_API int CreatePeerConnection(const char** turn_urls, | 47 WEBRTC_PLUGIN_API int CreatePeerConnection(const char** turn_urls, |
| 44 const int no_of_urls, | 48 const int no_of_urls, |
| 45 const char* username, | 49 const char* username, |
| 46 const char* credential); | 50 const char* credential); |
| 47 // Close a peerconnection. | 51 // Close a peerconnection. |
| 48 WEBRTC_PLUGIN_API bool ClosePeerConnection(int peer_connection_id); | 52 WEBRTC_PLUGIN_API bool ClosePeerConnection(int peer_connection_id); |
| 49 // Add a audio stream. If audio_only is true, the stream only has an audio | 53 // Add a audio stream. If audio_only is true, the stream only has an audio |
| 50 // track and no video track. | 54 // track and no video track. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 AUDIOBUSREADY_CALLBACK callback); | 96 AUDIOBUSREADY_CALLBACK callback); |
| 93 WEBRTC_PLUGIN_API bool RegisterOnLocalSdpReadytoSend( | 97 WEBRTC_PLUGIN_API bool RegisterOnLocalSdpReadytoSend( |
| 94 int peer_connection_id, | 98 int peer_connection_id, |
| 95 LOCALSDPREADYTOSEND_CALLBACK callback); | 99 LOCALSDPREADYTOSEND_CALLBACK callback); |
| 96 WEBRTC_PLUGIN_API bool RegisterOnIceCandiateReadytoSend( | 100 WEBRTC_PLUGIN_API bool RegisterOnIceCandiateReadytoSend( |
| 97 int peer_connection_id, | 101 int peer_connection_id, |
| 98 ICECANDIDATEREADYTOSEND_CALLBACK callback); | 102 ICECANDIDATEREADYTOSEND_CALLBACK callback); |
| 99 } | 103 } |
| 100 | 104 |
| 101 #endif // WEBRTC_EXAMPLES_UNITYPLUGIN_UNITY_PLUGIN_APIS_H_ | 105 #endif // WEBRTC_EXAMPLES_UNITYPLUGIN_UNITY_PLUGIN_APIS_H_ |
| OLD | NEW |