Le lundi 15 avril 2019 à 17:56 +0900, Tomasz Figa a écrit : > > Sounds like we need something similar to the SOURCE_CHANGE event > > mechanism if we want to allow dynamic bitrate control which would > > require re-allocation of the capture buffer queue. (Or any other > > runtime control on our encoders, which is really expected to be > > supported these days). > > Sounds like it. Or we could just assume that one needs to stop both > queues to do a resolution change, since most codes would anyway reset > the stream (e.g. send PPS/SPS, etc. for H.264) to change the > resolution. Not sure if that assumption always holds, though. I think for resolution/profile/level changes you have a good point, as you said, we need to start a new stream (new header, new IDR). Maybe then we should simply require the driver to allocate enough buffer to support the highest bitrate for the selected resoltion/profile/level? Though, this could create situation where we waste a lot of memory. On the other side, if you need to reallocate your buffers on bitrate change, it might create a visible freeze. Nicolas