| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // These methods should be called by implementation only. | 111 // These methods should be called by implementation only. |
| 112 virtual bool set_state(TrackState new_state) = 0; | 112 virtual bool set_state(TrackState new_state) = 0; |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 virtual ~MediaStreamTrackInterface() {} | 115 virtual ~MediaStreamTrackInterface() {} |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 // Interface for rendering VideoFrames from a VideoTrack | 118 // Interface for rendering VideoFrames from a VideoTrack |
| 119 class VideoRendererInterface { | 119 class VideoRendererInterface { |
| 120 public: | 120 public: |
| 121 // TODO(guoweis): Remove this function. Obsolete. The implementation of | |
| 122 // VideoRendererInterface should be able to handle different frame size as | |
| 123 // well as pending rotation. If it can't apply the frame rotation by itself, | |
| 124 // it should call |frame|.GetCopyWithRotationApplied() to get a frame that has | |
| 125 // the rotation applied. | |
| 126 virtual void SetSize(int width, int height) {} | |
| 127 | |
| 128 // |frame| may have pending rotation. For clients which can't apply rotation, | 121 // |frame| may have pending rotation. For clients which can't apply rotation, |
| 129 // |frame|->GetCopyWithRotationApplied() will return a frame that has the | 122 // |frame|->GetCopyWithRotationApplied() will return a frame that has the |
| 130 // rotation applied. | 123 // rotation applied. |
| 131 virtual void RenderFrame(const cricket::VideoFrame* frame) = 0; | 124 virtual void RenderFrame(const cricket::VideoFrame* frame) = 0; |
| 132 | 125 |
| 133 protected: | 126 protected: |
| 134 // The destructor is protected to prevent deletion via the interface. | 127 // The destructor is protected to prevent deletion via the interface. |
| 135 // This is so that we allow reference counted classes, where the destructor | 128 // This is so that we allow reference counted classes, where the destructor |
| 136 // should never be public, to implement the interface. | 129 // should never be public, to implement the interface. |
| 137 virtual ~VideoRendererInterface() {} | 130 virtual ~VideoRendererInterface() {} |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; | 267 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; |
| 275 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; | 268 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; |
| 276 | 269 |
| 277 protected: | 270 protected: |
| 278 virtual ~MediaStreamInterface() {} | 271 virtual ~MediaStreamInterface() {} |
| 279 }; | 272 }; |
| 280 | 273 |
| 281 } // namespace webrtc | 274 } // namespace webrtc |
| 282 | 275 |
| 283 #endif // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ | 276 #endif // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ |
| OLD | NEW |