Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC via HTTP API #269

Open
alexgoldstone opened this issue Jan 7, 2022 · 1 comment
Open

WebRTC via HTTP API #269

alexgoldstone opened this issue Jan 7, 2022 · 1 comment

Comments

@alexgoldstone
Copy link

alexgoldstone commented Jan 7, 2022

I have successfully created pipelines for cameras, displays, etc.

I am now trying to make them accessible via WebRTC and have a test pipeline that looks like:

network_stream_pipeline`, `webrtcbin bundle-policy=max-compat name=webrtcbin stun-server=stun://stun.l.google.com:19302 interpipesrc name=network_prev0 listen-to=quad_src0 is-live=true allow-renegotiation=true stream-sync=compensate-ts format=time ! queue ! nvvideoconvert ! video/x-raw(memory:NVMM), format=I420 ! videorate ! video/x-raw(memory:NVMM),framerate=30/1 ! nvv4l2h264enc maxperf-enable=1 bitrate=8000000 iframeinterval=40 preset-level=1 control-rate=1 ! h264parse ! rtph264pay config-interval=-1 name=payloader ! application/x-rtp,media=video,encoding-name=H264,payload=96 ! webrtcbin.

I am using the HTTP API. I call out to subscribe to the on-negotiation-needed signal and receive a response when the pipeline is started.

I believe the next step is to ask webrtcbin to create an offer and this is where I am struggling...

I have seen some Python code that uses GstPromise:

def on_negotiation_needed(self, element):
        promise = Gst.Promise.new_with_change_func(self.on_offer_created, element, None)
        element.emit('create-offer', None, promise)

There doesn't seem to be an equivalent mechanism for doing this via the GSTD HTTP API but I am hoping I have missed how I should do this. Any and all guidance appreciated.

Thanks.

Alex

@alexgoldstone
Copy link
Author

I see that support to emit non parametric actions has been added here: 2ea78a4

There is no documentation for this online... I will try to see if this can be used to use WebRTC as noted above but if anyone can advise before I test it will be appreciated... If not I will report back in case others see this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant