Create an abstract base class that will provide methods to manipulate encoded buffers, codec_data and stream_header fields as needed to join streams with different encoding settings. For each codec a child class should provide the necessary methods (doing nothing if nothing is required).