Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: webrtc/modules/audio_coding/neteq/payload_splitter.h

Issue 2281453002: Moved codec-specific audio packet splitting into decoders. (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/payload_splitter.h
diff --git a/webrtc/modules/audio_coding/neteq/payload_splitter.h b/webrtc/modules/audio_coding/neteq/payload_splitter.h
index b0c4b5fe5cd0528b446825f0a4451fe17ed44acf..12242aa97442912f7abb90fb45917c19295699fd 100644
--- a/webrtc/modules/audio_coding/neteq/payload_splitter.h
+++ b/webrtc/modules/audio_coding/neteq/payload_splitter.h
@@ -20,16 +20,14 @@ namespace webrtc {
class DecoderDatabase;
// This class handles splitting of payloads into smaller parts.
-// The class does not have any member variables, and the methods could have
-// been made static. The reason for not making them static is testability.
-// With this design, the splitting functionality can be mocked during testing
-// of the NetEqImpl class.
+
+// For RED and FEC the splitting is done internally. Other codecs' packets are
+// split by calling AudioDecoder::SplitPacket.
class PayloadSplitter {
public:
enum SplitterReturnCodes {
kOK = 0,
kNoSplit = 1,
- kTooLargePayload = -1,
kFrameSplitError = -2,
kUnknownPayloadType = -3,
kRedLengthMismatch = -4,
@@ -68,20 +66,6 @@ class PayloadSplitter {
const DecoderDatabase& decoder_database);
private:
- // Splits the payload in |packet|. The payload is assumed to be from a
- // sample-based codec.
- virtual void SplitBySamples(const Packet* packet,
- size_t bytes_per_ms,
- uint32_t timestamps_per_ms,
- PacketList* new_packets);
-
- // Splits the payload in |packet|. The payload will be split into chunks of
- // size |bytes_per_frame|, corresponding to a |timestamps_per_frame|
- // RTP timestamps.
- virtual int SplitByFrames(const Packet* packet,
- size_t bytes_per_frame,
- uint32_t timestamps_per_frame,
- PacketList* new_packets);
RTC_DISALLOW_COPY_AND_ASSIGN(PayloadSplitter);
};

Powered by Google App Engine
This is Rietveld 408576698