summaryrefslogtreecommitdiff
path: root/video_receive_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'video_receive_stream.h')
-rw-r--r--video_receive_stream.h68
1 files changed, 36 insertions, 32 deletions
diff --git a/video_receive_stream.h b/video_receive_stream.h
index 4eb5532b..5ab898c7 100644
--- a/video_receive_stream.h
+++ b/video_receive_stream.h
@@ -31,30 +31,38 @@ enum RtcpMode { kRtcpCompound, kRtcpReducedSize };
class VideoDecoder;
-// TODO(mflodman) Move all these settings to VideoDecoder and move the
-// declaration to common_types.h.
-struct ExternalVideoDecoder {
- ExternalVideoDecoder()
- : decoder(NULL), payload_type(0), renderer(false), expected_delay_ms(0) {}
- // The actual decoder.
- VideoDecoder* decoder;
-
- // Received RTP packets with this payload type will be sent to this decoder
- // instance.
- int payload_type;
-
- // 'true' if the decoder handles rendering as well.
- bool renderer;
-
- // The expected delay for decoding and rendering, i.e. the frame will be
- // delivered this many milliseconds, if possible, earlier than the ideal
- // render time.
- // Note: Ignored if 'renderer' is false.
- int expected_delay_ms;
-};
-
class VideoReceiveStream {
public:
+ // TODO(mflodman) Move all these settings to VideoDecoder and move the
+ // declaration to common_types.h.
+ struct Decoder {
+ Decoder()
+ : decoder(NULL),
+ payload_type(0),
+ renderer(false),
+ expected_delay_ms(0) {}
+
+ // The actual decoder instance.
+ VideoDecoder* decoder;
+
+ // Received RTP packets with this payload type will be sent to this decoder
+ // instance.
+ int payload_type;
+
+ // Name of the decoded payload (such as VP8). Maps back to the depacketizer
+ // used to unpack incoming packets.
+ std::string payload_name;
+
+ // 'true' if the decoder handles rendering as well.
+ bool renderer;
+
+ // The expected delay for decoding and rendering, i.e. the frame will be
+ // delivered this many milliseconds, if possible, earlier than the ideal
+ // render time.
+ // Note: Ignored if 'renderer' is false.
+ int expected_delay_ms;
+ };
+
struct Stats : public StreamStats {
Stats()
: network_frame_rate(0),
@@ -77,12 +85,13 @@ class VideoReceiveStream {
Config()
: renderer(NULL),
render_delay_ms(0),
- audio_channel_id(0),
+ audio_channel_id(-1),
pre_decode_callback(NULL),
pre_render_callback(NULL),
target_delay_ms(0) {}
- // Codecs the receive stream can receive.
- std::vector<VideoCodec> codecs;
+
+ // Decoders for every payload that we can receive.
+ std::vector<Decoder> decoders;
// Receive-stream specific RTP settings.
struct Rtp {
@@ -162,10 +171,6 @@ class VideoReceiveStream {
// stream. 'NULL' disables the callback.
I420FrameCallback* pre_render_callback;
- // External video decoders to be used if incoming payload type matches the
- // registered type for an external decoder.
- std::vector<ExternalVideoDecoder> external_decoders;
-
// Target delay in milliseconds. A positive value indicates this stream is
// used for streaming instead of a real-time call.
int target_delay_ms;
@@ -173,10 +178,9 @@ class VideoReceiveStream {
virtual void Start() = 0;
virtual void Stop() = 0;
- virtual Stats GetStats() const = 0;
- // TODO(mflodman) Replace this with callback.
- virtual void GetCurrentReceiveCodec(VideoCodec* receive_codec) = 0;
+ // TODO(pbos): Add info on currently-received codec to Stats.
+ virtual Stats GetStats() const = 0;
protected:
virtual ~VideoReceiveStream() {}