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