Move decoder instance ownership to VideoReceiver2

This moves the ownership away from VideoReceiveStream2 and closer to
VCMDecoderDataBase. That facilitates unregistration (upcoming change)
without recreating receive streams.

Bug: none
Change-Id: I812175134730a0ffbf7077fd149c8489481c73d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272481
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37866}
This commit is contained in:
Tommi
2022-08-22 12:56:38 +02:00
committed by WebRTC LUCI CQ
parent ae0ec3a5d9
commit bd02e70629
7 changed files with 49 additions and 35 deletions

View File

@ -30,7 +30,9 @@ class VCMDecoderDataBase {
VCMDecoderDataBase& operator=(const VCMDecoderDataBase&) = delete;
~VCMDecoderDataBase() = default;
bool DeregisterExternalDecoder(uint8_t payload_type);
// Returns a pointer to the previously registered decoder or nullptr if none
// was registered for the `payload_type`.
VideoDecoder* DeregisterExternalDecoder(uint8_t payload_type);
void RegisterExternalDecoder(uint8_t payload_type,
VideoDecoder* external_decoder);
bool IsExternalDecoderRegistered(uint8_t payload_type) const;