Index: webrtc/video/payload_router.h |
diff --git a/webrtc/video/payload_router.h b/webrtc/video/payload_router.h |
index 81ec0dd4b1cb1342f44c1e6bc4588efea8dee056..c2f4b0442cb226bb77667330614e1a1251492fd1 100644 |
--- a/webrtc/video/payload_router.h |
+++ b/webrtc/video/payload_router.h |
@@ -17,6 +17,7 @@ |
#include "webrtc/base/criticalsection.h" |
#include "webrtc/base/thread_annotations.h" |
#include "webrtc/common_types.h" |
+#include "webrtc/video_encoder.h" |
#include "webrtc/system_wrappers/include/atomic32.h" |
namespace webrtc { |
@@ -27,10 +28,11 @@ struct RTPVideoHeader; |
// PayloadRouter routes outgoing data to the correct sending RTP module, based |
// on the simulcast layer in RTPVideoHeader. |
-class PayloadRouter { |
+class PayloadRouter : public EncodedImageCallback { |
public: |
// Rtp modules are assumed to be sorted in simulcast index order. |
- explicit PayloadRouter(const std::vector<RtpRtcp*>& rtp_modules); |
+ explicit PayloadRouter(const std::vector<RtpRtcp*>& rtp_modules, |
+ int payload_type); |
~PayloadRouter(); |
static size_t DefaultMaxPayloadLength(); |
@@ -41,16 +43,11 @@ class PayloadRouter { |
void set_active(bool active); |
bool active(); |
- // Input parameters according to the signature of RtpRtcp::SendOutgoingData. |
- // Returns true if the packet was routed / sent, false otherwise. |
- bool RoutePayload(FrameType frame_type, |
- int8_t payload_type, |
- uint32_t time_stamp, |
- int64_t capture_time_ms, |
- const uint8_t* payload_data, |
- size_t payload_size, |
- const RTPFragmentationHeader* fragmentation, |
- const RTPVideoHeader* rtp_video_hdr); |
+ // Implements EncodedImageCallback. |
+ // Returns 0 if the packet was routed / sent, -1 otherwise. |
+ int32_t Encoded(const EncodedImage& encoded_image, |
+ const CodecSpecificInfo* codec_specific_info, |
+ const RTPFragmentationHeader* fragmentation) override; |
// Configures current target bitrate per module. 'stream_bitrates' is assumed |
// to be in the same order as 'SetSendingRtpModules'. |
@@ -69,6 +66,7 @@ class PayloadRouter { |
// Rtp modules are assumed to be sorted in simulcast index order. Not owned. |
const std::vector<RtpRtcp*> rtp_modules_; |
+ const int payload_type_; |
RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter); |
}; |