summaryrefslogtreecommitdiffstats
path: root/media/formats/mpeg/adts_stream_parser.h
blob: 26ebcc9235d73ebc72706a9c1d10bb2cdcd60870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2014 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_MPEG_ADTS_STREAM_PARSER_H_
#define MEDIA_FORMATS_MPEG_ADTS_STREAM_PARSER_H_

#include "base/basictypes.h"
#include "media/base/media_export.h"
#include "media/formats/mpeg/mpeg_audio_stream_parser_base.h"

namespace media {

class MEDIA_EXPORT ADTSStreamParser : public MPEGAudioStreamParserBase {
 public:
  ADTSStreamParser();
  virtual ~ADTSStreamParser();

 private:
  // MPEGAudioStreamParserBase overrides.
  virtual int ParseFrameHeader(const uint8* data,
                               int size,
                               int* frame_size,
                               int* sample_rate,
                               ChannelLayout* channel_layout,
                               int* sample_count) const OVERRIDE;

  DISALLOW_COPY_AND_ASSIGN(ADTSStreamParser);
};

}  // namespace media

#endif  // MEDIA_FORMATS_MPEG_ADTS_STREAM_PARSER_H_