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

Side by Side Diff: media/cast/audio_sender/audio_encoder.h

Issue 388663003: Cast: Reshuffle files under media/cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing includes Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « media/cast/README ('k') | media/cast/audio_sender/audio_encoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_CAST_AUDIO_SENDER_AUDIO_ENCODER_H_
6 #define MEDIA_CAST_AUDIO_SENDER_AUDIO_ENCODER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/thread_checker.h"
11 #include "media/base/audio_bus.h"
12 #include "media/cast/cast_environment.h"
13
14 namespace base {
15 class TimeTicks;
16 }
17
18 namespace media {
19 namespace cast {
20
21 class AudioEncoder {
22 public:
23 typedef base::Callback<void(scoped_ptr<transport::EncodedFrame>)>
24 FrameEncodedCallback;
25
26 AudioEncoder(const scoped_refptr<CastEnvironment>& cast_environment,
27 int num_channels,
28 int sampling_rate,
29 int bitrate,
30 transport::Codec codec,
31 const FrameEncodedCallback& frame_encoded_callback);
32 virtual ~AudioEncoder();
33
34 CastInitializationStatus InitializationResult() const;
35
36 void InsertAudio(scoped_ptr<AudioBus> audio_bus,
37 const base::TimeTicks& recorded_time);
38
39 private:
40 class ImplBase;
41 class OpusImpl;
42 class Pcm16Impl;
43
44 const scoped_refptr<CastEnvironment> cast_environment_;
45 scoped_refptr<ImplBase> impl_;
46
47 // Used to ensure only one thread invokes InsertAudio().
48 base::ThreadChecker insert_thread_checker_;
49
50 DISALLOW_COPY_AND_ASSIGN(AudioEncoder);
51 };
52
53 } // namespace cast
54 } // namespace media
55
56 #endif // MEDIA_CAST_AUDIO_SENDER_AUDIO_ENCODER_H_
OLDNEW
« no previous file with comments | « media/cast/README ('k') | media/cast/audio_sender/audio_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698