centricular / gstcefsrc

A simple gstreamer wrapper around Chromium Embedded Framework
84 stars 45 forks source link

Small demux cleanup #36

Closed reinismu closed 2 years ago

reinismu commented 2 years ago

For fun and learning, I started to rewrite cefsrc to Rust (Will see how far I get). Noticed that some fields are not used and a typo :)

MathieuDuponchelle commented 2 years ago

Hah, thanks :) Re rust, that sounds fun, one of the reasons I went for C++ was that I could simply copy paste the build system bits from CEF samples, how do you plan to deal with that? Does CEF have rust bindings by the way?

MathieuDuponchelle commented 2 years ago

By the way, I would recommend not going for the same src / demux design, for cefsrc it was pretty much an ad-hoc decision in order to not have to rewrite the GstBaseSrc-based cefsrc when adding audio support, but if you start from scratch I would recommend simply implementing a GstElement subclass :)

reinismu commented 2 years ago

Hah, thanks :) Re rust, that sounds fun, one of the reasons I went for C++ was that I could simply copy paste the build system bits from CEF samples, how do you plan to deal with that? Does CEF have rust bindings by the way?

I did solve the audio and video grabbing part before in Rust when I was still thinking of using FFMPEG. I think that shouldn't be hard :)

By the way, I would recommend not going for the same src / demux design, for cefsrc it was pretty much an ad-hoc decision in order to not have to rewrite the GstBaseSrc-based cefsrc when adding audio support, but if you start from scratch I would recommend simply implementing a GstElement subclass :)

I had a feeling it could be done differently while looking at NdiSrcDemux, but currently, it might be too much for me to handle :D At least I know that this design works :D Hmm you know a similar base plugin I could look at to inspire from?