OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 class MediaStreamTrackInterface : public rtc::RefCountInterface, | 93 class MediaStreamTrackInterface : public rtc::RefCountInterface, |
94 public NotifierInterface { | 94 public NotifierInterface { |
95 public: | 95 public: |
96 enum TrackState { | 96 enum TrackState { |
97 kInitializing, // Track is beeing negotiated. | 97 kInitializing, // Track is beeing negotiated. |
98 kLive = 1, // Track alive | 98 kLive = 1, // Track alive |
99 kEnded = 2, // Track have ended | 99 kEnded = 2, // Track have ended |
100 kFailed = 3, // Track negotiation failed. | 100 kFailed = 3, // Track negotiation failed. |
101 }; | 101 }; |
102 | 102 |
| 103 static const char kAudioKind[]; |
| 104 static const char kVideoKind[]; |
| 105 |
103 virtual std::string kind() const = 0; | 106 virtual std::string kind() const = 0; |
104 virtual std::string id() const = 0; | 107 virtual std::string id() const = 0; |
105 virtual bool enabled() const = 0; | 108 virtual bool enabled() const = 0; |
106 virtual TrackState state() const = 0; | 109 virtual TrackState state() const = 0; |
107 virtual bool set_enabled(bool enable) = 0; | 110 virtual bool set_enabled(bool enable) = 0; |
108 // These methods should be called by implementation only. | 111 // These methods should be called by implementation only. |
109 virtual bool set_state(TrackState new_state) = 0; | 112 virtual bool set_state(TrackState new_state) = 0; |
110 | 113 |
111 protected: | 114 protected: |
112 virtual ~MediaStreamTrackInterface() {} | 115 virtual ~MediaStreamTrackInterface() {} |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; | 267 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; |
265 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; | 268 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; |
266 | 269 |
267 protected: | 270 protected: |
268 virtual ~MediaStreamInterface() {} | 271 virtual ~MediaStreamInterface() {} |
269 }; | 272 }; |
270 | 273 |
271 } // namespace webrtc | 274 } // namespace webrtc |
272 | 275 |
273 #endif // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ | 276 #endif // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ |
OLD | NEW |