Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: webrtc/sdk/android/api/org/webrtc/RtpSender.java

Issue 2994733002: Adding comments explaining Java createSender and setTrack methods. (Closed)
Patch Set: Convert to javadoc style comments Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/PeerConnection.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/api/org/webrtc/RtpSender.java
diff --git a/webrtc/sdk/android/api/org/webrtc/RtpSender.java b/webrtc/sdk/android/api/org/webrtc/RtpSender.java
index 358b87dff81fc4ec2388e9838bd30fa369063ddd..29779532d4de04eb2f5c52ca62219420c14c0b78 100644
--- a/webrtc/sdk/android/api/org/webrtc/RtpSender.java
+++ b/webrtc/sdk/android/api/org/webrtc/RtpSender.java
@@ -29,11 +29,20 @@ public class RtpSender {
dtmfSender = (nativeDtmfSender != 0) ? new DtmfSender(nativeDtmfSender) : null;
}
- // If |takeOwnership| is true, the RtpSender takes ownership of the track
- // from the caller, and will auto-dispose of it when no longer needed.
- // |takeOwnership| should only be used if the caller owns the track; it is
- // not appropriate when the track is owned by, for example, another RtpSender
- // or a MediaStream.
+ /**
+ * Starts sending a new track, without requiring additional SDP negotiation.
+ * <p>
+ * Note: This is equivalent to replaceTrack in the official WebRTC API. It
+ * was just implemented before the standards group settled on a name.
+ *
+ * @param takeOwnership If true, the RtpSender takes ownership of the track
+ * from the caller, and will auto-dispose of it when no
+ * longer needed. |takeOwnership| should only be used if
+ * the caller owns the track; it is not appropriate when
+ * the track is owned by, for example, another RtpSender
+ * or a MediaStream.
+ * @return true on success and false on failure.
+ */
public boolean setTrack(MediaStreamTrack track, boolean takeOwnership) {
if (!nativeSetTrack(nativeRtpSender, (track == null) ? 0 : track.nativeTrack)) {
return false;
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/PeerConnection.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698