More work

This commit is contained in:
Tobias Fella
2023-06-14 20:16:05 +02:00
parent 39ee17cfa1
commit c65183f93a
2 changed files with 4 additions and 6 deletions

View File

@@ -423,10 +423,9 @@ void CallManager::startCall(NeoChatRoom *room)
QJsonObject metadata; QJsonObject metadata;
for (const auto &[stream, purpose] : msidToPurpose) { for (const auto &[stream, purpose] : msidToPurpose) {
QJsonObject data = {{"purpose", purpose}}; QJsonObject data = {{"purpose", purpose}};
metadata[stream] = purpose; metadata[stream] = data;
} }
json["org.matrix.msc3077.sdp_stream_metadata"] = metadata; json["org.matrix.msc3077.sdp_stream_metadata"] = metadata;
qWarning() << json;
m_room->postJson("m.call.negotiate", json); m_room->postJson("m.call.negotiate", json);
}); });
} }

View File

@@ -84,7 +84,6 @@ void setLocalDescription(GstPromise *promise, gpointer user_data)
{ {
INSTANCE INSTANCE
qCDebug(voip) << "Setting local description"; qCDebug(voip) << "Setting local description";
qWarning() << "SETTING LOCAL DESCRIPTION";
const GstStructure *reply = gst_promise_get_reply(promise); const GstStructure *reply = gst_promise_get_reply(promise);
gboolean isAnswer = gst_structure_id_has_field(reply, g_quark_from_string("answer")); gboolean isAnswer = gst_structure_id_has_field(reply, g_quark_from_string("answer"));
GstWebRTCSessionDescription *gstsdp = nullptr; GstWebRTCSessionDescription *gstsdp = nullptr;
@@ -782,9 +781,7 @@ bool CallSession::addVideoPipeline()
auto user = dynamic_cast<NeoChatUser *>(manager->room()->localUser()); auto user = dynamic_cast<NeoChatUser *>(manager->room()->localUser());
participants->setHasCamera(user, true); participants->setHasCamera(user, true);
auto participant = participants->callParticipantForUser(user); connectSingleShot(participants->callParticipantForUser(user), &CallParticipant::initialized, this, [=](QQuickItem *item) {
connectSingleShot(participant, &CallParticipant::initialized, this, [=](QQuickItem *item) {
gst_pad_unlink(newpad, fakepad); gst_pad_unlink(newpad, fakepad);
Q_ASSERT(item); Q_ASSERT(item);
@@ -798,6 +795,8 @@ bool CallSession::addVideoPipeline()
Q_ASSERT(ok); Q_ASSERT(ok);
g_object_set(selector, "active-pad", selectorSrc, nullptr); g_object_set(selector, "active-pad", selectorSrc, nullptr);
gst_object_unref(queuepad); gst_object_unref(queuepad);
gst_element_set_state(m_pipe, GST_STATE_READY); // TODO experimental
gst_element_set_state(m_pipe, GST_STATE_PLAYING); // TODO experimental
GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_pipe), GST_DEBUG_GRAPH_SHOW_ALL, "foo"); GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_pipe), GST_DEBUG_GRAPH_SHOW_ALL, "foo");
}); });
return true; return true;