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

Side by Side Diff: webrtc/modules/utility/source/file_player_impl.h

Issue 2038513002: FileRecorderImpl and FilePlayerImpl don't need their own .h and .cc files (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@remove2
Patch Set: rebase Created 4 years, 4 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
(Empty)
1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_
12 #define WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_
13
14 #include "webrtc/common_audio/resampler/include/resampler.h"
15 #include "webrtc/common_types.h"
16 #include "webrtc/engine_configurations.h"
17 #include "webrtc/modules/media_file/media_file.h"
18 #include "webrtc/modules/media_file/media_file_defines.h"
19 #include "webrtc/modules/utility/include/file_player.h"
20 #include "webrtc/modules/utility/source/coder.h"
21 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
22 #include "webrtc/typedefs.h"
23
24 namespace webrtc {
25 class FilePlayerImpl : public FilePlayer {
26 public:
27 FilePlayerImpl(uint32_t instanceID, FileFormats fileFormat);
28 ~FilePlayerImpl();
29
30 virtual int Get10msAudioFromFile(int16_t* outBuffer,
31 size_t& lengthInSamples,
32 int frequencyInHz);
33 virtual int32_t RegisterModuleFileCallback(FileCallback* callback);
34 virtual int32_t StartPlayingFile(const char* fileName,
35 bool loop,
36 uint32_t startPosition,
37 float volumeScaling,
38 uint32_t notification,
39 uint32_t stopPosition = 0,
40 const CodecInst* codecInst = NULL);
41 virtual int32_t StartPlayingFile(InStream& sourceStream,
42 uint32_t startPosition,
43 float volumeScaling,
44 uint32_t notification,
45 uint32_t stopPosition = 0,
46 const CodecInst* codecInst = NULL);
47 virtual int32_t StopPlayingFile();
48 virtual bool IsPlayingFile() const;
49 virtual int32_t GetPlayoutPosition(uint32_t& durationMs);
50 virtual int32_t AudioCodec(CodecInst& audioCodec) const;
51 virtual int32_t Frequency() const;
52 virtual int32_t SetAudioScaling(float scaleFactor);
53
54 protected:
55 int32_t SetUpAudioDecoder();
56
57 uint32_t _instanceID;
58 const FileFormats _fileFormat;
59 MediaFile& _fileModule;
60
61 uint32_t _decodedLengthInMS;
62
63 private:
64 AudioCoder _audioDecoder;
65
66 CodecInst _codec;
67 int32_t _numberOf10MsPerFrame;
68 int32_t _numberOf10MsInDecoder;
69
70 Resampler _resampler;
71 float _scaling;
72 };
73 } // namespace webrtc
74 #endif // WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/utility/source/file_player.cc ('k') | webrtc/modules/utility/source/file_player_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698