OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void OnChanged() override; | 54 void OnChanged() override; |
55 | 55 |
56 // AudioSourceInterface::AudioObserver implementation | 56 // AudioSourceInterface::AudioObserver implementation |
57 void OnSetVolume(double volume) override; | 57 void OnSetVolume(double volume) override; |
58 | 58 |
59 // RtpReceiverInterface implementation | 59 // RtpReceiverInterface implementation |
60 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { | 60 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { |
61 return track_.get(); | 61 return track_.get(); |
62 } | 62 } |
63 | 63 |
| 64 cricket::MediaType media_type() const override { |
| 65 return cricket::MEDIA_TYPE_AUDIO; |
| 66 } |
| 67 |
64 std::string id() const override { return id_; } | 68 std::string id() const override { return id_; } |
65 | 69 |
66 void Stop() override; | 70 void Stop() override; |
67 | 71 |
| 72 void Reconfigure() override; |
| 73 |
68 private: | 74 private: |
69 void Reconfigure(); | |
70 | |
71 std::string id_; | 75 std::string id_; |
72 rtc::scoped_refptr<AudioTrackInterface> track_; | 76 rtc::scoped_refptr<AudioTrackInterface> track_; |
73 uint32_t ssrc_; | 77 uint32_t ssrc_; |
74 AudioProviderInterface* provider_; | 78 AudioProviderInterface* provider_; |
75 bool cached_track_enabled_; | 79 bool cached_track_enabled_; |
76 }; | 80 }; |
77 | 81 |
78 class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> { | 82 class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> { |
79 public: | 83 public: |
80 VideoRtpReceiver(VideoTrackInterface* track, | 84 VideoRtpReceiver(VideoTrackInterface* track, |
81 uint32_t ssrc, | 85 uint32_t ssrc, |
82 VideoProviderInterface* provider); | 86 VideoProviderInterface* provider); |
83 | 87 |
84 virtual ~VideoRtpReceiver(); | 88 virtual ~VideoRtpReceiver(); |
85 | 89 |
86 // RtpReceiverInterface implementation | 90 // RtpReceiverInterface implementation |
87 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { | 91 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { |
88 return track_.get(); | 92 return track_.get(); |
89 } | 93 } |
90 | 94 |
| 95 cricket::MediaType media_type() const override { |
| 96 return cricket::MEDIA_TYPE_VIDEO; |
| 97 } |
| 98 |
91 std::string id() const override { return id_; } | 99 std::string id() const override { return id_; } |
92 | 100 |
93 void Stop() override; | 101 void Stop() override; |
94 | 102 |
| 103 void Reconfigure() override; |
| 104 |
95 private: | 105 private: |
96 std::string id_; | 106 std::string id_; |
97 rtc::scoped_refptr<VideoTrackInterface> track_; | 107 rtc::scoped_refptr<VideoTrackInterface> track_; |
98 uint32_t ssrc_; | 108 uint32_t ssrc_; |
99 VideoProviderInterface* provider_; | 109 VideoProviderInterface* provider_; |
100 }; | 110 }; |
101 | 111 |
102 } // namespace webrtc | 112 } // namespace webrtc |
103 | 113 |
104 #endif // TALK_APP_WEBRTC_RTPRECEIVER_H_ | 114 #endif // TALK_APP_WEBRTC_RTPRECEIVER_H_ |
OLD | NEW |