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

Unified Diff: media/formats/mpeg/adts_header_parser.h

Issue 2063443002: Return parsed sample frequency of ADTS header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SBR Created 4 years, 6 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: media/formats/mpeg/adts_header_parser.h
diff --git a/media/formats/mpeg/adts_header_parser.h b/media/formats/mpeg/adts_header_parser.h
index e613015458767b0f80ad78b7eae56bd3f21c4235..c15a779a043ccd025616ca56d947752d5f2a5cc6 100644
--- a/media/formats/mpeg/adts_header_parser.h
+++ b/media/formats/mpeg/adts_header_parser.h
@@ -5,6 +5,7 @@
#ifndef MEDIA_FORMATS_MPEG_ADTS_HEADER_PARSER_H_
#define MEDIA_FORMATS_MPEG_ADTS_HEADER_PARSER_H_
+#include <stddef.h>
#include <stdint.h>
#include "media/base/media_export.h"
@@ -16,10 +17,12 @@ class AudioDecoderConfig;
// Parses ADTS header |adts_header| (4 bytes) and extracts the information into
// |config| structure if the parsing succeeds. Returns true if the parsing
// succeeds or false otherwise. The |is_sbr| flag stands for Spectral Band
-// Replication.
+// Replication. |orig_sample_rate| will return the sample frequency before
+// doubling in SBR.
MEDIA_EXPORT bool ParseAdtsHeader(const uint8_t* adts_header,
bool is_sbr,
- AudioDecoderConfig* config);
+ AudioDecoderConfig* config,
+ size_t* orig_sample_rate);
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698