[FFmpeg-devel] [PATCH v6 0/1] avformat: add Software Defined Radio support

Michael Niedermayer michael at niedermayer.cc
Sun Jul 2 00:25:42 EEST 2023


On Sat, Jul 01, 2023 at 09:42:14PM +0100, Kieran Kunhya wrote:
[...]
> > If so, what design ?
> >
> 
> This is purely a flaw in FFmpeg that protocol/demux are joined up into the
> same library. Also an assumption (coming from things like AVI and probably
> reasonable at the time) that there is only going to be one layer of demux,
> whereas in modern codecs (HEIF, LC-EVC, Dolby E etc) there can be many
> layers of demux required.
> 
> Your logic is flawed, you base your assumption that everyone else is wrong
> when it's in fact FFmpeg that's in the wrong by mixing transport and
> container into the same library.

Iam not assuming anyone is wrong. "wrong" and "right" depend alot on
assumtations and point of view.
You can be wrong in mathematics. With software you can be wrong if the
code doesnt work. Or if code maintaince costs more than the competitor
has to pay for the same.
if libavformats design is a problem for modern containers it needs to evolve

In respect to SDR and multimedia, it seems again not different from the
other "many layers of demux" already needed.
we even have avpriv_mpegts* as exported functions already ...

people may hate libavformats design. Ok
but this design doesnt have a problem with the SDR code
theres nothing i had to change in libavformats APIs. If theres mpegts
id try to pass it throught the existing avpriv_mpegts* code. maybe
that would not work and need some amendment, but thats not a big deal


> 
> 
> > > As for purely AM/FM, I'm not quire sure what the right level for
> > > that is though.
> >
> > >
> > > In any case, I disagree with the procedure of stating to push the patch
> > if
> > > there's no objections, when there has been numerous objections from
> > > essentially most of the active community already.
> >
> > The objections have been unclear, are they against SDR, against the
> > implementation.
> > I took the liberty to be pushy here to get this more clear. And i will
> > continue to do this until i get clear responses. Because otherwise
> > iam just stuck as i dont know how to correct the design and code.
> >
> 
> They are against SDR as this violates layering. FFmpeg doesn't handle the
> physical layer, third party libs do upstream (e.g hardware capture).
> Again, should we implement WiFi SDR in FFmpeg? Should we implement a
> userspace TCP stack? Should we implement bitbanged Ethernet? All of these
> things sit at a different layer to the data and transport layer that FFmpeg
> sits in.

You can design something starting with a filter and then define everything
a subclass of filter.
you can design things with no common class and everything different types.

But whatever you call the class for the SDR code and the class of the common
demuxers. Their do look very darn similar
they should IMHO have a common parent class.

Call one Demuxer and one Transport but they still do take one input stream
(a stream of complex values in case of SDR) and spit out multiple streams
raw audio, raw video, mpegts.
And same way (other) demuxers also can return raw audio, raw video, mpegts

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Homeopathy is like voting while filling the ballot out with transparent ink.
Sometimes the outcome one wanted occurs. Rarely its worse than filling out
a ballot properly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230701/e9caf30c/attachment.sig>


More information about the ffmpeg-devel mailing list