| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 MediaStreamTrack(webrtc::MediaStreamTrackInterface* track, | 27 MediaStreamTrack(webrtc::MediaStreamTrackInterface* track, |
| 28 bool is_local_track); | 28 bool is_local_track); |
| 29 virtual ~MediaStreamTrack(); | 29 virtual ~MediaStreamTrack(); |
| 30 | 30 |
| 31 static MediaStreamTrack* GetTrack( | 31 static MediaStreamTrack* GetTrack( |
| 32 const blink::WebMediaStreamTrack& track); | 32 const blink::WebMediaStreamTrack& track); |
| 33 | 33 |
| 34 // If a subclass overrides this method it has to call the base class. | 34 // If a subclass overrides this method it has to call the base class. |
| 35 virtual void SetEnabled(bool enabled); | 35 virtual void SetEnabled(bool enabled); |
| 36 | 36 |
| 37 virtual void SetMutedState(bool muted_state); |
| 38 |
| 37 // TODO(xians): Make this pure virtual when Stop[Track] has been | 39 // TODO(xians): Make this pure virtual when Stop[Track] has been |
| 38 // implemented for remote audio tracks. | 40 // implemented for remote audio tracks. |
| 39 virtual void Stop(); | 41 virtual void Stop(); |
| 40 | 42 |
| 41 virtual webrtc::AudioTrackInterface* GetAudioAdapter(); | 43 virtual webrtc::AudioTrackInterface* GetAudioAdapter(); |
| 42 | 44 |
| 43 bool is_local_track () const { return is_local_track_; } | 45 bool is_local_track () const { return is_local_track_; } |
| 44 | 46 |
| 45 protected: | 47 protected: |
| 46 scoped_refptr<webrtc::MediaStreamTrackInterface> track_; | 48 scoped_refptr<webrtc::MediaStreamTrackInterface> track_; |
| 47 | 49 |
| 50 // Set to true if the owner MediaStreamSource is not delivering frames. |
| 51 bool muted_state_; |
| 52 |
| 48 private: | 53 private: |
| 49 const bool is_local_track_; | 54 const bool is_local_track_; |
| 50 | 55 |
| 51 DISALLOW_COPY_AND_ASSIGN(MediaStreamTrack); | 56 DISALLOW_COPY_AND_ASSIGN(MediaStreamTrack); |
| 52 }; | 57 }; |
| 53 | 58 |
| 54 } // namespace content | 59 } // namespace content |
| 55 | 60 |
| 56 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ | 61 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ |
| OLD | NEW |