blob: 5d28947ed785381bc34d41ee6dfdc011cb9e0078 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:251/*
tommi@webrtc.org851becd2012-04-04 14:57:192 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:253 *
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_VOICE_ENGINE_VOE_FILE_IMPL_H
12#define WEBRTC_VOICE_ENGINE_VOE_FILE_IMPL_H
13
pbos@webrtc.org956aa7e2013-05-21 13:52:3214#include "webrtc/voice_engine/include/voe_file.h"
15#include "webrtc/voice_engine/shared_data.h"
niklase@google.com470e71d2011-07-07 08:21:2516
17namespace webrtc {
18
Jelena Marusic0d266052015-05-04 12:15:3219class VoEFileImpl : public VoEFile {
20 public:
21 // Playout file locally
niklase@google.com470e71d2011-07-07 08:21:2522
Jelena Marusic0d266052015-05-04 12:15:3223 int StartPlayingFileLocally(int channel,
24 const char fileNameUTF8[1024],
25 bool loop = false,
26 FileFormats format = kFileFormatPcm16kHzFile,
27 float volumeScaling = 1.0,
28 int startPointMs = 0,
29 int stopPointMs = 0) override;
niklase@google.com470e71d2011-07-07 08:21:2530
Jelena Marusic0d266052015-05-04 12:15:3231 int StartPlayingFileLocally(int channel,
32 InStream* stream,
33 FileFormats format = kFileFormatPcm16kHzFile,
34 float volumeScaling = 1.0,
35 int startPointMs = 0,
36 int stopPointMs = 0) override;
niklase@google.com470e71d2011-07-07 08:21:2537
Jelena Marusic0d266052015-05-04 12:15:3238 int StopPlayingFileLocally(int channel) override;
niklase@google.com470e71d2011-07-07 08:21:2539
Jelena Marusic0d266052015-05-04 12:15:3240 int IsPlayingFileLocally(int channel) override;
niklase@google.com470e71d2011-07-07 08:21:2541
Jelena Marusic0d266052015-05-04 12:15:3242 // Use file as microphone input
niklase@google.com470e71d2011-07-07 08:21:2543
Jelena Marusic0d266052015-05-04 12:15:3244 int StartPlayingFileAsMicrophone(int channel,
45 const char fileNameUTF8[1024],
46 bool loop = false,
47 bool mixWithMicrophone = false,
48 FileFormats format = kFileFormatPcm16kHzFile,
49 float volumeScaling = 1.0) override;
niklase@google.com470e71d2011-07-07 08:21:2550
Jelena Marusic0d266052015-05-04 12:15:3251 int StartPlayingFileAsMicrophone(int channel,
52 InStream* stream,
53 bool mixWithMicrophone = false,
54 FileFormats format = kFileFormatPcm16kHzFile,
55 float volumeScaling = 1.0) override;
niklase@google.com470e71d2011-07-07 08:21:2556
Jelena Marusic0d266052015-05-04 12:15:3257 int StopPlayingFileAsMicrophone(int channel) override;
niklase@google.com470e71d2011-07-07 08:21:2558
Jelena Marusic0d266052015-05-04 12:15:3259 int IsPlayingFileAsMicrophone(int channel) override;
niklase@google.com470e71d2011-07-07 08:21:2560
Jelena Marusic0d266052015-05-04 12:15:3261 // Record speaker signal to file
niklase@google.com470e71d2011-07-07 08:21:2562
Jelena Marusic0d266052015-05-04 12:15:3263 int StartRecordingPlayout(int channel,
64 const char* fileNameUTF8,
65 CodecInst* compression = NULL,
66 int maxSizeBytes = -1) override;
niklase@google.com470e71d2011-07-07 08:21:2567
Jelena Marusic0d266052015-05-04 12:15:3268 int StartRecordingPlayout(int channel,
69 OutStream* stream,
70 CodecInst* compression = NULL) override;
niklase@google.com470e71d2011-07-07 08:21:2571
Jelena Marusic0d266052015-05-04 12:15:3272 int StopRecordingPlayout(int channel) override;
niklase@google.com470e71d2011-07-07 08:21:2573
Jelena Marusic0d266052015-05-04 12:15:3274 // Record microphone signal to file
niklase@google.com470e71d2011-07-07 08:21:2575
Jelena Marusic0d266052015-05-04 12:15:3276 int StartRecordingMicrophone(const char* fileNameUTF8,
77 CodecInst* compression = NULL,
78 int maxSizeBytes = -1) override;
niklase@google.com470e71d2011-07-07 08:21:2579
Jelena Marusic0d266052015-05-04 12:15:3280 int StartRecordingMicrophone(OutStream* stream,
81 CodecInst* compression = NULL) override;
niklase@google.com470e71d2011-07-07 08:21:2582
Jelena Marusic0d266052015-05-04 12:15:3283 int StopRecordingMicrophone() override;
niklase@google.com470e71d2011-07-07 08:21:2584
Jelena Marusic0d266052015-05-04 12:15:3285 protected:
86 VoEFileImpl(voe::SharedData* shared);
87 ~VoEFileImpl() override;
niklase@google.com470e71d2011-07-07 08:21:2588
Jelena Marusic0d266052015-05-04 12:15:3289 private:
90 voe::SharedData* _shared;
niklase@google.com470e71d2011-07-07 08:21:2591};
92
93} // namespace webrtc
94
95#endif // WEBRTC_VOICE_ENGINE_VOE_FILE_IMPL_H