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

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

Issue 506943003: Support MPEG1 audio in the MPEG2-TS stream parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactoring to reuse code from MP3StreamParser. Created 6 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: media/formats/mpeg/mp3_stream_parser.h
diff --git a/media/formats/mpeg/mp3_stream_parser.h b/media/formats/mpeg/mp3_stream_parser.h
index b5271d848be31489e9f76c6686bb447cb6bc61b3..d645bc52832b30e1af404e7c7aa77628f8bb4240 100644
--- a/media/formats/mpeg/mp3_stream_parser.h
+++ b/media/formats/mpeg/mp3_stream_parser.h
@@ -13,6 +13,25 @@ namespace media {
class MEDIA_EXPORT MP3StreamParser : public MPEGAudioStreamParserBase {
public:
+ struct Mpeg1AudioHeader {
+ int version;
+ int layer;
+ int frame_size;
+ int sample_rate;
+ int channel_mode;
+ ChannelLayout channel_layout;
+ int sample_count;
+ };
+
+ static const int kMpeg1AudioHeaderSize;
+
+ // Assumption: size of array |data| should be at least the size of an Mpeg1
+ // audio header (i.e. should be greater than or equal to 4).
damienv1 2014/09/03 17:43:43 Update the comment using kMpeg1AudioHeaderSize ins
+ static bool ParserMpeg1AudioFrameHeader(
damienv1 2014/09/03 18:59:54 Could be simply ParseMpeg1AudioHeader.
+ const LogCB& log_cb,
+ const uint8* data,
+ Mpeg1AudioHeader* header);
+
MP3StreamParser();
virtual ~MP3StreamParser();

Powered by Google App Engine
This is Rietveld 408576698