Currently they both have begin_frame() method that doesn't return any errors. We need to update it to return status::StatusCode, so that it can report error if it happens.
Implementation
Update IFrameEncoder and IFrameDecoder interfaces
Update implementations:
audio::PcmEncoder
audio::PcmDecoder
PCM encoder and decoder never fail, so they can just always return StatusOK. (Future implementation of IFrameEncoder and IFrameDecoder will be able to report errors, e.g. Opus)
Update audio::Packetizer and audio::Depacketizer, which use IFrameEncoder and IFrameDecoder interfaces. When encoder or decoder return error, packetizer and depacketizer should forward it to upper level.
Testing
Add unit test for Packetizer to check that it forwards error from encoder to upper level.
Add unit test for Depacketizer to check that it forwards error from decoder to upper level.
Summary
audio::IFrameEncoder and audio::IFrameDecoder are interfaces for encoding and decoding of audio packets.
Currently they both have
begin_frame()
method that doesn't return any errors. We need to update it to return status::StatusCode, so that it can report error if it happens.Implementation
Testing