Allowing screen & camara sharing simultaneously
This commit is contained in:
parent
6e93c5e25a
commit
39d1959dde
2
rtclib
2
rtclib
@ -1 +1 @@
|
|||||||
Subproject commit 5f17f326c8d363993f0573780b609512349be366
|
Subproject commit f8c063fbb51a66460b22dff7126c61bdb3cab4ca
|
@ -14,7 +14,7 @@ struct NativeCallbacks {
|
|||||||
|
|
||||||
uint32_t(*rtc_configure)(const void* /* callback data */, void* /* configure callback data */);
|
uint32_t(*rtc_configure)(const void* /* callback data */, void* /* configure callback data */);
|
||||||
|
|
||||||
void(*client_stream_assignment)(const void* /* callback data */, uint32_t /* stream id */, const void* /* source callback data */);
|
void(*client_stream_assignment)(const void* /* callback data */, uint32_t /* stream id */, uint8_t /* media type */, const void* /* source callback data */);
|
||||||
void(*client_offer_generated)(const void* /* callback data */, const char* /* offer */, size_t /* offer length */);
|
void(*client_offer_generated)(const void* /* callback data */, const char* /* offer */, size_t /* offer length */);
|
||||||
|
|
||||||
void(*client_stream_start)(const void* /* callback data */, uint32_t /* stream id */, const void* /* source callback data */);
|
void(*client_stream_start)(const void* /* callback data */, uint32_t /* stream id */, const void* /* source callback data */);
|
||||||
|
@ -94,7 +94,7 @@ uint32_t librtc_callback_rtc_configure(const void* callback_data_ptr, void* conf
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void librtc_callback_client_stream_assignment(const void* callback_data_ptr, uint32_t stream_id, const void* source_data_ptr) {
|
void librtc_callback_client_stream_assignment(const void* callback_data_ptr, uint32_t stream_id, uint8_t media_type, const void* source_data_ptr) {
|
||||||
auto callback_data = (LibCallbackData*) callback_data_ptr;
|
auto callback_data = (LibCallbackData*) callback_data_ptr;
|
||||||
auto source_data = (LibCallbackData*) source_data_ptr;
|
auto source_data = (LibCallbackData*) source_data_ptr;
|
||||||
|
|
||||||
@ -107,6 +107,7 @@ void librtc_callback_client_stream_assignment(const void* callback_data_ptr, uin
|
|||||||
|
|
||||||
ts::command_builder notify{"notifyrtcstreamassignment"};
|
ts::command_builder notify{"notifyrtcstreamassignment"};
|
||||||
notify.put_unchecked(0, "streamid", stream_id);
|
notify.put_unchecked(0, "streamid", stream_id);
|
||||||
|
notify.put_unchecked(0, "media", media_type);
|
||||||
notify.put_unchecked(0, "sclid", source_client->getClientId());
|
notify.put_unchecked(0, "sclid", source_client->getClientId());
|
||||||
notify.put_unchecked(0, "scluid", source_client->getUid());
|
notify.put_unchecked(0, "scluid", source_client->getUid());
|
||||||
notify.put_unchecked(0, "scldbid", source_client->getClientDatabaseId());
|
notify.put_unchecked(0, "scldbid", source_client->getClientDatabaseId());
|
||||||
@ -143,7 +144,7 @@ void librtc_callback_client_audio_start(const void* callback_data_ptr, uint32_t
|
|||||||
auto source_client = source_data->weak_ref.lock();
|
auto source_client = source_data->weak_ref.lock();
|
||||||
if(!source_client) { return; }
|
if(!source_client) { return; }
|
||||||
|
|
||||||
ts::command_builder notify{"notifyrtcstateaudio"};
|
ts::command_builder notify{"notifyrtcstreamstate"};
|
||||||
notify.put_unchecked(0, "streamid", stream_id);
|
notify.put_unchecked(0, "streamid", stream_id);
|
||||||
notify.put_unchecked(0, "sclid", source_client->getClientId());
|
notify.put_unchecked(0, "sclid", source_client->getClientId());
|
||||||
notify.put_unchecked(0, "scluid", source_client->getUid());
|
notify.put_unchecked(0, "scluid", source_client->getUid());
|
||||||
@ -163,7 +164,7 @@ void librtc_callback_client_audio_stop(const void* callback_data_ptr, uint32_t s
|
|||||||
auto source_client = source_data->weak_ref.lock();
|
auto source_client = source_data->weak_ref.lock();
|
||||||
if(!source_client) { return; }
|
if(!source_client) { return; }
|
||||||
|
|
||||||
ts::command_builder notify{"notifyrtcstateaudio"};
|
ts::command_builder notify{"notifyrtcstreamstate"};
|
||||||
notify.put_unchecked(0, "streamid", stream_id);
|
notify.put_unchecked(0, "streamid", stream_id);
|
||||||
notify.put_unchecked(0, "sclid", source_client->getClientId());
|
notify.put_unchecked(0, "sclid", source_client->getClientId());
|
||||||
notify.put_unchecked(0, "state", "0");
|
notify.put_unchecked(0, "state", "0");
|
||||||
@ -210,7 +211,7 @@ void librtc_callback_client_audio_sender_data(const void* callback_data_ptr, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NativeCallbacks native_callbacks{
|
static NativeCallbacks native_callbacks{
|
||||||
.version = 2,
|
.version = 3,
|
||||||
|
|
||||||
.log = librtc_callback_log,
|
.log = librtc_callback_log,
|
||||||
.free_client_data = librtc_callback_free_client_data,
|
.free_client_data = librtc_callback_free_client_data,
|
||||||
|
Loading…
Reference in New Issue
Block a user