| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Register callback for receiving file playing notifications. | 50 // Register callback for receiving file playing notifications. |
| 51 virtual int32_t RegisterModuleFileCallback(FileCallback* callback) = 0; | 51 virtual int32_t RegisterModuleFileCallback(FileCallback* callback) = 0; |
| 52 | 52 |
| 53 // API for playing audio from fileName to channel. | 53 // API for playing audio from fileName to channel. |
| 54 // Note: codecInst is used for pre-encoded files. | 54 // Note: codecInst is used for pre-encoded files. |
| 55 virtual int32_t StartPlayingFile(const char* fileName, | 55 virtual int32_t StartPlayingFile(const char* fileName, |
| 56 bool loop, | 56 bool loop, |
| 57 uint32_t startPosition, | 57 uint32_t startPosition, |
| 58 float volumeScaling, | 58 float volumeScaling, |
| 59 uint32_t notification, | 59 uint32_t notification, |
| 60 uint32_t stopPosition = 0, | 60 uint32_t stopPosition, |
| 61 const CodecInst* codecInst = NULL) = 0; | 61 const CodecInst* codecInst) = 0; |
| 62 | 62 |
| 63 // Note: codecInst is used for pre-encoded files. | 63 // Note: codecInst is used for pre-encoded files. |
| 64 virtual int32_t StartPlayingFile(InStream& sourceStream, | 64 virtual int32_t StartPlayingFile(InStream& sourceStream, |
| 65 uint32_t startPosition, | 65 uint32_t startPosition, |
| 66 float volumeScaling, | 66 float volumeScaling, |
| 67 uint32_t notification, | 67 uint32_t notification, |
| 68 uint32_t stopPosition = 0, | 68 uint32_t stopPosition, |
| 69 const CodecInst* codecInst = NULL) = 0; | 69 const CodecInst* codecInst) = 0; |
| 70 | 70 |
| 71 virtual int32_t StopPlayingFile() = 0; | 71 virtual int32_t StopPlayingFile() = 0; |
| 72 | 72 |
| 73 virtual bool IsPlayingFile() const = 0; | 73 virtual bool IsPlayingFile() const = 0; |
| 74 | 74 |
| 75 virtual int32_t GetPlayoutPosition(uint32_t& durationMs) = 0; | 75 virtual int32_t GetPlayoutPosition(uint32_t& durationMs) = 0; |
| 76 | 76 |
| 77 // Set audioCodec to the currently used audio codec. | 77 // Set audioCodec to the currently used audio codec. |
| 78 virtual int32_t AudioCodec(CodecInst& audioCodec) const = 0; | 78 virtual int32_t AudioCodec(CodecInst& audioCodec) const = 0; |
| 79 | 79 |
| 80 virtual int32_t Frequency() const = 0; | 80 virtual int32_t Frequency() const = 0; |
| 81 | 81 |
| 82 // Note: scaleFactor is in the range [0.0 - 2.0] | 82 // Note: scaleFactor is in the range [0.0 - 2.0] |
| 83 virtual int32_t SetAudioScaling(float scaleFactor) = 0; | 83 virtual int32_t SetAudioScaling(float scaleFactor) = 0; |
| 84 }; | 84 }; |
| 85 } // namespace webrtc | 85 } // namespace webrtc |
| 86 #endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_ | 86 #endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_ |
| OLD | NEW |