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

Side by Side Diff: media/formats/mpeg/mpeg1_audio_stream_parser.h

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FORMATS_MPEG_MPEG1_AUDIO_STREAM_PARSER_H_ 5 #ifndef MEDIA_FORMATS_MPEG_MPEG1_AUDIO_STREAM_PARSER_H_
6 #define MEDIA_FORMATS_MPEG_MPEG1_AUDIO_STREAM_PARSER_H_ 6 #define MEDIA_FORMATS_MPEG_MPEG1_AUDIO_STREAM_PARSER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // Channel layout. 57 // Channel layout.
58 ChannelLayout channel_layout; 58 ChannelLayout channel_layout;
59 59
60 // Number of samples per frame. 60 // Number of samples per frame.
61 int sample_count; 61 int sample_count;
62 }; 62 };
63 63
64 // Parses the header starting at |data|. 64 // Parses the header starting at |data|.
65 // Assumption: size of array |data| should be at least |kHeaderSize|. 65 // Assumption: size of array |data| should be at least |kHeaderSize|.
66 // Returns false if the header is not valid. 66 // Returns false if the header is not valid.
67 static bool ParseHeader(const scoped_refptr<MediaLog>& media_log, 67 static bool ParseHeader(MediaLog* media_log,
68 const uint8_t* data, 68 const uint8_t* data,
69 Header* header); 69 Header* header);
70 70
71 MPEG1AudioStreamParser(); 71 MPEG1AudioStreamParser();
72 ~MPEG1AudioStreamParser() override; 72 ~MPEG1AudioStreamParser() override;
73 73
74 private: 74 private:
75 // MPEGAudioStreamParserBase overrides. 75 // MPEGAudioStreamParserBase overrides.
76 int ParseFrameHeader(const uint8_t* data, 76 int ParseFrameHeader(const uint8_t* data,
77 int size, 77 int size,
78 int* frame_size, 78 int* frame_size,
79 int* sample_rate, 79 int* sample_rate,
80 ChannelLayout* channel_layout, 80 ChannelLayout* channel_layout,
81 int* sample_count, 81 int* sample_count,
82 bool* metadata_frame, 82 bool* metadata_frame,
83 std::vector<uint8_t>* extra_data) const override; 83 std::vector<uint8_t>* extra_data) const override;
84 84
85 DISALLOW_COPY_AND_ASSIGN(MPEG1AudioStreamParser); 85 DISALLOW_COPY_AND_ASSIGN(MPEG1AudioStreamParser);
86 }; 86 };
87 87
88 } // namespace media 88 } // namespace media
89 89
90 #endif // MEDIA_FORMATS_MPEG_MPEG1_AUDIO_STREAM_PARSER_H_ 90 #endif // MEDIA_FORMATS_MPEG_MPEG1_AUDIO_STREAM_PARSER_H_
OLDNEW
« no previous file with comments | « media/formats/mp4/track_run_iterator_unittest.cc ('k') | media/formats/mpeg/mpeg1_audio_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698