VideoStreamDecoderImpl implementation, part 2.

In this CL the GetDecoder support function is implemented. It will
be called from the (not yet existing) Decode function whenever a
frame is about to be decoded in order to get the correct decoder for
the current frame.

Bug: webrtc:8909
Change-Id: I35e40c108fb652d566b1a5fdff60a703f5615406
Reviewed-on: https://webrtc-review.googlesource.com/64448
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22627}
diff --git a/video/video_stream_decoder_impl.h b/video/video_stream_decoder_impl.h
index 97de050..5575176 100644
--- a/video/video_stream_decoder_impl.h
+++ b/video/video_stream_decoder_impl.h
@@ -15,6 +15,7 @@
 #include <memory>
 #include <utility>
 
+#include "api/optional.h"
 #include "api/video/video_stream_decoder.h"
 #include "modules/video_coding/frame_buffer2.h"
 #include "modules/video_coding/jitter_estimator.h"
@@ -38,6 +39,8 @@
   void OnFrame(std::unique_ptr<video_coding::EncodedFrame> frame) override;
 
  private:
+  VideoDecoder* GetDecoder(int payload_type);
+
   // Implements DecodedImageCallback interface
   int32_t Decoded(VideoFrame& decodedImage) override;
   int32_t Decoded(VideoFrame& decodedImage, int64_t decode_time_ms) override;
@@ -60,6 +63,8 @@
   VCMTiming timing_;
   video_coding::FrameBuffer frame_buffer_;
   video_coding::VideoLayerFrameId last_continuous_id_;
+  rtc::Optional<int> current_payload_type_;
+  std::unique_ptr<VideoDecoder> decoder_;
 };
 
 }  // namespace webrtc