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 kAudioTrackKind[]; | |
104 static const char kVideoTrackKind[]; | |
105 | |
106 virtual std::string kind() const = 0; | 103 virtual std::string kind() const = 0; |
107 virtual std::string id() const = 0; | 104 virtual std::string id() const = 0; |
108 virtual bool enabled() const = 0; | 105 virtual bool enabled() const = 0; |
109 virtual TrackState state() const = 0; | 106 virtual TrackState state() const = 0; |
110 virtual bool set_enabled(bool enable) = 0; | 107 virtual bool set_enabled(bool enable) = 0; |
111 // These methods should be called by implementation only. | 108 // These methods should be called by implementation only. |
112 virtual bool set_state(TrackState new_state) = 0; | 109 virtual bool set_state(TrackState new_state) = 0; |
113 | 110 |
114 protected: | 111 protected: |
115 virtual ~MediaStreamTrackInterface() {} | 112 virtual ~MediaStreamTrackInterface() {} |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; | 264 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; |
268 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; | 265 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; |
269 | 266 |
270 protected: | 267 protected: |
271 virtual ~MediaStreamInterface() {} | 268 virtual ~MediaStreamInterface() {} |
272 }; | 269 }; |
273 | 270 |
274 } // namespace webrtc | 271 } // namespace webrtc |
275 | 272 |
276 #endif // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ | 273 #endif // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ |
OLD | NEW |