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

Unified Diff: media/formats/ac3/ac3_util.h

Issue 2572573007: Use passthrough decoder for (E)AC3 formats (Closed)
Patch Set: Sanity checks Created 3 years, 7 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
« no previous file with comments | « media/filters/android/media_codec_audio_decoder.cc ('k') | media/formats/ac3/ac3_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/ac3/ac3_util.h
diff --git a/media/formats/ac3/ac3_util.h b/media/formats/ac3/ac3_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..f01e516f344b93e568b83bf9072605f7d363f718
--- /dev/null
+++ b/media/formats/ac3/ac3_util.h
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_FORMATS_AC3_AC3_UTIL_H_
+#define MEDIA_FORMATS_AC3_AC3_UTIL_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+class MEDIA_EXPORT Ac3Util {
+ public:
+ // Returns the total number of audio samples in the given buffer, which
+ // contains several complete AC3 syncframes.
+ static int ParseTotalAc3SampleCount(const uint8_t* data, size_t size);
+
+ // Returns the total number of audio samples in the given buffer, which
+ // contains several complete E-AC3 syncframes.
+ static int ParseTotalEac3SampleCount(const uint8_t* data, size_t size);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Ac3Util);
+};
+
+} // namespace media
+
+#endif // MEDIA_FORMATS_AC3_AC3_UTIL_H_
« no previous file with comments | « media/filters/android/media_codec_audio_decoder.cc ('k') | media/formats/ac3/ac3_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698