Skip to content

encodebin: Fix smart encoding

commit eb201706

encodebin: Fix and refactor smart encoding

It was not working properly and the implementation of the smartencoder
element was weird. This introduce a number of changes (which are all
in one single commit because they basically all work together and lead
to basically reimplementing the element):

* Make smartencoder a bin so that the reencoding chain of elements are
  inside of it instead of not having any parent. Those elements were not
  be visible when dumping the pipeline which was very confusing.
* Make encodebin create the right encoder with a capsfilter (and parser)
  to properly enforce the format specified by the user, and so that the
  encoder properties specified in the encoding profile are respected.
* Use `decodebin` to do the decoding instead of selecting a decoder
  ourself and not plug any parser etc...
* Ensure that negotiated format in the sinkpad of smart encoder is fixed
  through time when the user requested a non dynamic output
* Add a parser at the beginning of the smart encoder
* Handle errors when reencoding

commit d3a69a2f

streamsplitter: Forward STREAM_START to all branchs

Otherwise the branch that get selected later won't receive it ever.

commit 2ba18f8f

streamsplitter/combiner: Drain encoder before switching branch

Otherwise we miht have frames queued in the encoder from the old branch
that do not get encoded/muxed when they should.

The implementation is a bit 'weird' but the rational and solution
is documented in the code.

commit 2fc1b631

encodebin: Rebuilt internal state when swicthing to avoid-reencoding

Merge request reports

Loading