| 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_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_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" |
| 11 #include "base/threading/thread_checker.h" | 11 #include "base/threading/thread_checker.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" | 13 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
| 14 | 14 |
| 15 namespace webrtc { | 15 namespace webrtc { |
| 16 class AudioTrackInterface; | 16 class AudioTrackInterface; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 29 const scoped_refptr<webrtc::MediaStreamTrackInterface>& track, | 29 const scoped_refptr<webrtc::MediaStreamTrackInterface>& track, |
| 30 bool is_local_track); | 30 bool is_local_track); |
| 31 virtual ~MediaStreamTrack(); | 31 virtual ~MediaStreamTrack(); |
| 32 | 32 |
| 33 static MediaStreamTrack* GetTrack( | 33 static MediaStreamTrack* GetTrack( |
| 34 const blink::WebMediaStreamTrack& track); | 34 const blink::WebMediaStreamTrack& track); |
| 35 | 35 |
| 36 // If a subclass overrides this method it has to call the base class. | 36 // If a subclass overrides this method it has to call the base class. |
| 37 virtual void SetEnabled(bool enabled); | 37 virtual void SetEnabled(bool enabled); |
| 38 | 38 |
| 39 virtual void SetMutedState(bool muted_state); | |
| 40 virtual bool GetMutedState(void) const; | |
| 41 | |
| 42 // TODO(xians): Make this pure virtual when Stop[Track] has been | 39 // TODO(xians): Make this pure virtual when Stop[Track] has been |
| 43 // implemented for remote audio tracks. | 40 // implemented for remote audio tracks. |
| 44 virtual void Stop(); | 41 virtual void Stop(); |
| 45 | 42 |
| 46 virtual webrtc::AudioTrackInterface* GetAudioAdapter(); | 43 virtual webrtc::AudioTrackInterface* GetAudioAdapter(); |
| 47 | 44 |
| 48 bool is_local_track () const { return is_local_track_; } | 45 bool is_local_track () const { return is_local_track_; } |
| 49 | 46 |
| 50 protected: | 47 protected: |
| 51 scoped_refptr<webrtc::MediaStreamTrackInterface> track_; | 48 scoped_refptr<webrtc::MediaStreamTrackInterface> track_; |
| 52 | 49 |
| 53 // Set to true if the owner MediaStreamSource is not delivering frames. | |
| 54 bool muted_state_; | |
| 55 | |
| 56 private: | 50 private: |
| 57 const bool is_local_track_; | 51 const bool is_local_track_; |
| 58 | 52 |
| 59 base::ThreadChecker thread_checker_; | 53 base::ThreadChecker thread_checker_; |
| 60 | 54 |
| 61 DISALLOW_COPY_AND_ASSIGN(MediaStreamTrack); | 55 DISALLOW_COPY_AND_ASSIGN(MediaStreamTrack); |
| 62 }; | 56 }; |
| 63 | 57 |
| 64 } // namespace content | 58 } // namespace content |
| 65 | 59 |
| 66 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ | 60 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_H_ |
| OLD | NEW |