Using webrtc with boost/beast websocket library

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Using webrtc with boost/beast websocket library

kaladin
This post was updated on .
Hey!

I'm trying to develop a websocket server that send a webrtc stream to its
clients using gstwebrtc and boost. This server had already been developed in
Java and were working fine (we did it in java to begin with because the app
that creates the clients is also in java and was easier that way) but right
now we're trying to accelerate the pipeline using hardware accelerated
encoding/decoding in our nvidia jetson tx2.

The hardware acceleration is working fine, sending a stream from there to a
java websocket server works ok, our problem is coming from the websocket
server. I developed it using both the boost websocket server example
<https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/server/async/websocket_server_async.cpp
 and the  gstwebrtc demos <https://github.com/centricular/gstwebrtc-demos
the default demo from that repo uses libsoup and we didn't manage to make it
work on the board, so we decided to use boost instead.

The websocket server itself works just fine when tested with simple clients,
whenever it receives "SESSION_OK" from a client it starts a pipeline and
sends offers, our problem comes when trying to use it with and actual
webrtc client, suddenly the offer and ice candidate messages stop being
received by the client (anything sent before starting the pipeline work ok,
and sending stuff after starting the pipeline doesn't give any errors, it's
just not received).

Is there any reason the server it's not being able to negotiate with the
client without any errors on either side? I cannot provide the clients code
since it's from a bigger app but the problem is most likely in the server
since the client was working before with another server and hasn't been
changed.

The sever code is the following: (both a test pipeline and the actual
pipeline that we're using are there, both provide the same results)


websocket_server_async.cpp


EDIT:

I managed to debug this a bit further. Everything seems working ok in the program except the following errors when on_negotiation_needed callback is activated:

on_negotiation_needed
0:00:14.273623466 13413   0x7f6c019e30 FIXME                default gstutils.c:3981:gst_pad_create_stream_id_internal:<nicesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:14.273712873 13413   0x7f6c019e30 WARN                GST_PADS gstpad.c:4231:gst_pad_peer_query:<nicesrc0:src> could not send sticky events
0:00:14.274634245 13413   0x7f6c019d90 FIXME                default gstutils.c:3981:gst_pad_create_stream_id_internal:<nicesrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:14.274720357 13413   0x7f6c019d90 WARN                GST_PADS gstpad.c:4231:gst_pad_peer_query:<nicesrc1:src> could not send sticky events
on_offer_created
0:00:14.275202467 13413   0x55933932d0 WARN               structure gststructure.c:1863:priv_gst_structure_append_to_gstring: No value transform to serialize field 'offer' of type 'GstWebRTCSessionDescription'


I have no idea on how to interpret this error or how to begin to fix it, is this a problem with the pipeline? I've used several and all provide the same result.


--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel