Moved almost all payload-related stuff to the payload registry.

The big benefit is we no longer have a circular dependency between the media receiver and the payload registry. The payload registry is starting to take a bit more place on the stage, and now knows how to do different things depending on audio or video.

BUG=
TESTED=rtp_rtcp_unittests, vie_auto_test, voe_auto_test

Review URL: https://webrtc-codereview.appspot.com/1078004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3465 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
phoglund@webrtc.org
2013-02-04 13:23:07 +00:00
parent fa53d8717c
commit 244251a9cd
13 changed files with 523 additions and 296 deletions

View File

@ -0,0 +1,41 @@
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_MOCK_MOCK_RTP_PAYLOAD_REGISTRY_H_
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_MOCK_MOCK_RTP_PAYLOAD_REGISTRY_H_
#include "gmock/gmock.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_payload_registry.h"
namespace webrtc {
class MockRTPPayloadStrategy : public RTPPayloadStrategy {
public:
MOCK_CONST_METHOD0(CodecsMustBeUnique,
bool());
MOCK_CONST_METHOD4(PayloadIsCompatible,
bool(const ModuleRTPUtility::Payload& payload,
const WebRtc_UWord32 frequency,
const WebRtc_UWord8 channels,
const WebRtc_UWord32 rate));
MOCK_CONST_METHOD2(UpdatePayloadRate,
void(ModuleRTPUtility::Payload* payload, const WebRtc_UWord32 rate));
MOCK_CONST_METHOD5(CreatePayloadType,
ModuleRTPUtility::Payload*(
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
const WebRtc_Word8 payloadType,
const WebRtc_UWord32 frequency,
const WebRtc_UWord8 channels,
const WebRtc_UWord32 rate));
};
} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_MOCK_MOCK_RTP_PAYLOAD_REGISTRY_H_