| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * libjingle | 2  * libjingle | 
| 3  * Copyright 2004 Google Inc. | 3  * Copyright 2004 Google Inc. | 
| 4  * | 4  * | 
| 5  * Redistribution and use in source and binary forms, with or without | 5  * Redistribution and use in source and binary forms, with or without | 
| 6  * modification, are permitted provided that the following conditions are met: | 6  * modification, are permitted provided that the following conditions are met: | 
| 7  * | 7  * | 
| 8  *  1. Redistributions of source code must retain the above copyright notice, | 8  *  1. Redistributions of source code must retain the above copyright notice, | 
| 9  *     this list of conditions and the following disclaimer. | 9  *     this list of conditions and the following disclaimer. | 
| 10  *  2. Redistributions in binary form must reproduce the above copyright notice, | 10  *  2. Redistributions in binary form must reproduce the above copyright notice, | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50 #endif | 50 #endif | 
| 51 | 51 | 
| 52 namespace webrtc { | 52 namespace webrtc { | 
| 53 class Call; | 53 class Call; | 
| 54 } | 54 } | 
| 55 | 55 | 
| 56 namespace cricket { | 56 namespace cricket { | 
| 57 | 57 | 
| 58 class VideoCapturer; | 58 class VideoCapturer; | 
| 59 | 59 | 
|  | 60 struct RtpCapabilities { | 
|  | 61   std::vector<RtpHeaderExtension> header_extensions; | 
|  | 62 }; | 
|  | 63 | 
| 60 // MediaEngineInterface is an abstraction of a media engine which can be | 64 // MediaEngineInterface is an abstraction of a media engine which can be | 
| 61 // subclassed to support different media componentry backends. | 65 // subclassed to support different media componentry backends. | 
| 62 // It supports voice and video operations in the same class to facilitate | 66 // It supports voice and video operations in the same class to facilitate | 
| 63 // proper synchronization between both media types. | 67 // proper synchronization between both media types. | 
| 64 class MediaEngineInterface { | 68 class MediaEngineInterface { | 
| 65  public: | 69  public: | 
| 66   virtual ~MediaEngineInterface() {} | 70   virtual ~MediaEngineInterface() {} | 
| 67 | 71 | 
| 68   // Initialization | 72   // Initialization | 
| 69   // Starts the engine. | 73   // Starts the engine. | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 101   // Device configuration | 105   // Device configuration | 
| 102   // Gets the current speaker volume, as a value between 0 and 255. | 106   // Gets the current speaker volume, as a value between 0 and 255. | 
| 103   virtual bool GetOutputVolume(int* level) = 0; | 107   virtual bool GetOutputVolume(int* level) = 0; | 
| 104   // Sets the current speaker volume, as a value between 0 and 255. | 108   // Sets the current speaker volume, as a value between 0 and 255. | 
| 105   virtual bool SetOutputVolume(int level) = 0; | 109   virtual bool SetOutputVolume(int level) = 0; | 
| 106 | 110 | 
| 107   // Gets the current microphone level, as a value between 0 and 10. | 111   // Gets the current microphone level, as a value between 0 and 10. | 
| 108   virtual int GetInputLevel() = 0; | 112   virtual int GetInputLevel() = 0; | 
| 109 | 113 | 
| 110   virtual const std::vector<AudioCodec>& audio_codecs() = 0; | 114   virtual const std::vector<AudioCodec>& audio_codecs() = 0; | 
| 111   virtual const std::vector<RtpHeaderExtension>& | 115   virtual RtpCapabilities GetAudioCapabilities() = 0; | 
| 112       audio_rtp_header_extensions() = 0; |  | 
| 113   virtual const std::vector<VideoCodec>& video_codecs() = 0; | 116   virtual const std::vector<VideoCodec>& video_codecs() = 0; | 
| 114   virtual const std::vector<RtpHeaderExtension>& | 117   virtual RtpCapabilities GetVideoCapabilities() = 0; | 
| 115       video_rtp_header_extensions() = 0; |  | 
| 116 | 118 | 
| 117   // Starts AEC dump using existing file. | 119   // Starts AEC dump using existing file. | 
| 118   virtual bool StartAecDump(rtc::PlatformFile file) = 0; | 120   virtual bool StartAecDump(rtc::PlatformFile file) = 0; | 
| 119 | 121 | 
| 120   // Stops recording AEC dump. | 122   // Stops recording AEC dump. | 
| 121   virtual void StopAecDump() = 0; | 123   virtual void StopAecDump() = 0; | 
| 122 | 124 | 
| 123   // Starts RtcEventLog using existing file. | 125   // Starts RtcEventLog using existing file. | 
| 124   virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; | 126   virtual bool StartRtcEventLog(rtc::PlatformFile file) = 0; | 
| 125 | 127 | 
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 195   virtual bool SetOutputVolume(int level) { | 197   virtual bool SetOutputVolume(int level) { | 
| 196     return voice_.SetOutputVolume(level); | 198     return voice_.SetOutputVolume(level); | 
| 197   } | 199   } | 
| 198 | 200 | 
| 199   virtual int GetInputLevel() { | 201   virtual int GetInputLevel() { | 
| 200     return voice_.GetInputLevel(); | 202     return voice_.GetInputLevel(); | 
| 201   } | 203   } | 
| 202   virtual const std::vector<AudioCodec>& audio_codecs() { | 204   virtual const std::vector<AudioCodec>& audio_codecs() { | 
| 203     return voice_.codecs(); | 205     return voice_.codecs(); | 
| 204   } | 206   } | 
| 205   virtual const std::vector<RtpHeaderExtension>& audio_rtp_header_extensions() { | 207   virtual RtpCapabilities GetAudioCapabilities() { | 
| 206     return voice_.rtp_header_extensions(); | 208     return voice_.GetCapabilities(); | 
| 207   } | 209   } | 
| 208   virtual const std::vector<VideoCodec>& video_codecs() { | 210   virtual const std::vector<VideoCodec>& video_codecs() { | 
| 209     return video_.codecs(); | 211     return video_.codecs(); | 
| 210   } | 212   } | 
| 211   virtual const std::vector<RtpHeaderExtension>& video_rtp_header_extensions() { | 213   virtual RtpCapabilities GetVideoCapabilities() { | 
| 212     return video_.rtp_header_extensions(); | 214     return video_.GetCapabilities(); | 
| 213   } | 215   } | 
| 214 | 216 | 
| 215   virtual bool StartAecDump(rtc::PlatformFile file) { | 217   virtual bool StartAecDump(rtc::PlatformFile file) { | 
| 216     return voice_.StartAecDump(file); | 218     return voice_.StartAecDump(file); | 
| 217   } | 219   } | 
| 218 | 220 | 
| 219   virtual void StopAecDump() { | 221   virtual void StopAecDump() { | 
| 220     voice_.StopAecDump(); | 222     voice_.StopAecDump(); | 
| 221   } | 223   } | 
| 222 | 224 | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 240 class DataEngineInterface { | 242 class DataEngineInterface { | 
| 241  public: | 243  public: | 
| 242   virtual ~DataEngineInterface() {} | 244   virtual ~DataEngineInterface() {} | 
| 243   virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 245   virtual DataMediaChannel* CreateChannel(DataChannelType type) = 0; | 
| 244   virtual const std::vector<DataCodec>& data_codecs() = 0; | 246   virtual const std::vector<DataCodec>& data_codecs() = 0; | 
| 245 }; | 247 }; | 
| 246 | 248 | 
| 247 }  // namespace cricket | 249 }  // namespace cricket | 
| 248 | 250 | 
| 249 #endif  // TALK_MEDIA_BASE_MEDIAENGINE_H_ | 251 #endif  // TALK_MEDIA_BASE_MEDIAENGINE_H_ | 
| OLD | NEW | 
|---|