| 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 |
| 11 // This file provides an example of unity native plugin APIs. | 11 // This file provides an example of unity native plugin APIs. |
| 12 | 12 |
| 13 #ifndef EXAMPLES_UNITYPLUGIN_UNITY_PLUGIN_APIS_H_ | 13 #ifndef EXAMPLES_UNITYPLUGIN_UNITY_PLUGIN_APIS_H_ |
| 14 #define EXAMPLES_UNITYPLUGIN_UNITY_PLUGIN_APIS_H_ | 14 #define EXAMPLES_UNITYPLUGIN_UNITY_PLUGIN_APIS_H_ |
| 15 | 15 |
| 16 #include <stdint.h> | 16 #include <stdint.h> |
| 17 | 17 |
| 18 // Definitions of callback functions. | 18 // Definitions of callback functions. |
| 19 // To support alpha channel, one needs to patch |
| 20 // https://codereview.chromium.org/2951033003/. We put it in general |
| 21 // interface in order to make this plugin work well with our Unity |
| 22 // Demo even without the Alpha Support. |
| 19 typedef void (*I420FRAMEREADY_CALLBACK)(const uint8_t* data_y, | 23 typedef void (*I420FRAMEREADY_CALLBACK)(const uint8_t* data_y, |
| 20 const uint8_t* data_u, | 24 const uint8_t* data_u, |
| 21 const uint8_t* data_v, | 25 const uint8_t* data_v, |
| 26 const uint8_t* data_a, |
| 22 int stride_y, | 27 int stride_y, |
| 23 int stride_u, | 28 int stride_u, |
| 24 int stride_v, | 29 int stride_v, |
| 30 int stride_a, |
| 25 uint32_t width, | 31 uint32_t width, |
| 26 uint32_t height); | 32 uint32_t height); |
| 27 typedef void (*LOCALDATACHANNELREADY_CALLBACK)(); | 33 typedef void (*LOCALDATACHANNELREADY_CALLBACK)(); |
| 28 typedef void (*DATAFROMEDATECHANNELREADY_CALLBACK)(const char* msg); | 34 typedef void (*DATAFROMEDATECHANNELREADY_CALLBACK)(const char* msg); |
| 29 typedef void (*FAILURE_CALLBACK)(const char* msg); | 35 typedef void (*FAILURE_CALLBACK)(const char* msg); |
| 30 typedef void (*LOCALSDPREADYTOSEND_CALLBACK)(const char* type, const char* sdp); | 36 typedef void (*LOCALSDPREADYTOSEND_CALLBACK)(const char* type, const char* sdp); |
| 31 typedef void (*ICECANDIDATEREADYTOSEND_CALLBACK)(const char* candidate, | 37 typedef void (*ICECANDIDATEREADYTOSEND_CALLBACK)(const char* candidate, |
| 32 const int sdp_mline_index, | 38 const int sdp_mline_index, |
| 33 const char* sdp_mid); | 39 const char* sdp_mid); |
| 34 typedef void (*AUDIOBUSREADY_CALLBACK)(const void* audio_data, | 40 typedef void (*AUDIOBUSREADY_CALLBACK)(const void* audio_data, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 AUDIOBUSREADY_CALLBACK callback); | 102 AUDIOBUSREADY_CALLBACK callback); |
| 97 WEBRTC_PLUGIN_API bool RegisterOnLocalSdpReadytoSend( | 103 WEBRTC_PLUGIN_API bool RegisterOnLocalSdpReadytoSend( |
| 98 int peer_connection_id, | 104 int peer_connection_id, |
| 99 LOCALSDPREADYTOSEND_CALLBACK callback); | 105 LOCALSDPREADYTOSEND_CALLBACK callback); |
| 100 WEBRTC_PLUGIN_API bool RegisterOnIceCandiateReadytoSend( | 106 WEBRTC_PLUGIN_API bool RegisterOnIceCandiateReadytoSend( |
| 101 int peer_connection_id, | 107 int peer_connection_id, |
| 102 ICECANDIDATEREADYTOSEND_CALLBACK callback); | 108 ICECANDIDATEREADYTOSEND_CALLBACK callback); |
| 103 } | 109 } |
| 104 | 110 |
| 105 #endif // EXAMPLES_UNITYPLUGIN_UNITY_PLUGIN_APIS_H_ | 111 #endif // EXAMPLES_UNITYPLUGIN_UNITY_PLUGIN_APIS_H_ |
| OLD | NEW |