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

Unified Diff: webrtc/modules/audio_coding/codecs/split_by_samples.h

Issue 2326003002: Moved codec-specific audio packet splitting into decoders. (Closed)
Patch Set: Created 4 years, 3 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/codecs/split_by_samples.h
diff --git a/webrtc/modules/audio_coding/codecs/split_by_samples.h b/webrtc/modules/audio_coding/codecs/split_by_samples.h
new file mode 100644
index 0000000000000000000000000000000000000000..6b0ac15fb3eabcfe734b542d871250afaf19df7e
--- /dev/null
+++ b/webrtc/modules/audio_coding/codecs/split_by_samples.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2016 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_AUDIO_CODING_CODECS_SPLIT_BY_SAMPLES_H_
+#define WEBRTC_MODULES_AUDIO_CODING_CODECS_SPLIT_BY_SAMPLES_H_
+
+#include <vector>
+
+#include "webrtc/base/array_view.h"
+#include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
+
+namespace webrtc {
+
+namespace internal {
kwiberg-webrtc 2016/09/12 02:11:02 Why put this in the "internal" namespace? It isn't
ossu 2016/09/12 11:26:37 Hmm, that's true. I wanted to make sure this was n
kwiberg-webrtc 2016/09/13 12:23:37 Ack. Hmmm. I wonder if it would be more useful th
+
+// This function is experimental and should not be relied upon by external
+// code. As with the SplitAudio method that utilizes it, it will likely be
+// removed in the near future.
+// Splits a payload consisting of inidividual samples into reasonable chunks.
+// Utility function for use by sample-based codecs to implement SplitPacket.
+std::vector<AudioDecoder::PacketSplit> SplitBySamples(
+ rtc::ArrayView<const uint8_t> payload,
+ size_t bytes_per_ms,
+ uint32_t timestamps_per_ms);
kwiberg-webrtc 2016/09/12 02:11:02 Consider having an output argument instead of a re
ossu 2016/09/12 11:26:37 I don't like using output arguments in general, si
kwiberg-webrtc 2016/09/13 12:23:37 True.
+
+} // namespace internal
+
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_SPLIT_BY_SAMPLES_H_

Powered by Google App Engine
This is Rietveld 408576698