From 5ba0331a1cafcb64e7d1b0b12af812894fec2a7e Mon Sep 17 00:00:00 2001 From: Haesu Gwon Date: Tue, 24 Sep 2024 15:42:28 +0900 Subject: [PATCH] [WebRTC] Improve documentation --- .../WebRTC/MediaCameraSource.cs | 4 ++-- .../WebRTC/MediaCustomSource.cs | 5 +++- .../WebRTC/MediaFileSource.cs | 2 +- .../WebRTC/MediaMicrophoneSource.cs | 2 +- .../WebRTC/MediaNullSource.cs | 6 +++-- ...MediaPacketBufferStatusChangedEventArgs.cs | 4 ++-- .../WebRTC/MediaPacketSource.cs | 2 +- .../WebRTC/MediaPacketSourceConfiguration.cs | 4 ++-- .../WebRTC/MediaScreenSource.cs | 2 +- .../WebRTC/MediaStreamTrack.cs | 6 ++--- .../WebRTC/MediaTestSource.cs | 2 +- .../WebRTC/WebRTC.cs | 24 +++++++++---------- ...WebRTCDataChannelErrorOccurredEventArgs.cs | 2 +- .../WebRTC/WebRTCEnums.cs | 7 +++--- .../WebRTC/WebRTCFrameEncodedEventArgs.cs | 2 +- .../WebRTC/WebRTCTrackAddedEventArgs.cs | 2 +- 16 files changed, 41 insertions(+), 35 deletions(-) diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaCameraSource.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaCameraSource.cs index 50a34111a76..2efc12409cb 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaCameraSource.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaCameraSource.cs @@ -21,7 +21,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Represents a camera source. + /// Represents a media source that makes video data using camera device internally. /// /// The camera privilege(http://tizen.org/privilege/camera) is required. /// @@ -36,7 +36,7 @@ public sealed class MediaCameraSource : MediaSource public MediaCameraSource() : base(MediaType.Video) {} /// - /// Gets or sets the camera device id. + /// Gets or sets the camera device id that identifies each camera device. /// /// A value that specifies the camera device id. /// MediaSource is not attached yet. diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaCustomSource.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaCustomSource.cs index 4f42fd930f1..112beb5a5d3 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaCustomSource.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaCustomSource.cs @@ -22,8 +22,11 @@ namespace Tizen.Multimedia.Remoting { /// - /// Represents a audio, video custom source. + /// Represents a media source that makes audio, video data internally. /// + /// + /// This supports the product infrastructure and is not intended to be used directly from application code. + /// /// /// /// 9 diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaFileSource.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaFileSource.cs index 40e6ea36f08..4cc04bb1b7b 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaFileSource.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaFileSource.cs @@ -21,7 +21,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Represents a media source with contents read from a file. + /// Represents a media source that reads media data from a file. /// /// /// Depending on where the source file is located either the media storage privilege (http://tizen.org/privilege/mediastorage) is required or
diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaMicrophoneSource.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaMicrophoneSource.cs index 8823ef89ef1..7c0cf06f7ef 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaMicrophoneSource.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaMicrophoneSource.cs @@ -21,7 +21,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Represents a microphone source. + /// Represents a media source that makes audio data using microphone. /// /// The recorder privilege(http://tizen.org/privilege/recorder) is required. /// diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaNullSource.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaNullSource.cs index cdd1d34c45f..586aede9c94 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaNullSource.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaNullSource.cs @@ -21,7 +21,9 @@ namespace Tizen.Multimedia.Remoting { - /// Represents a null source. + /// + /// Represents a media source that only receives media streams from peer. + /// /// /// If you add this source, WebRTC only receives media stream.
/// is set by default. @@ -84,7 +86,7 @@ public void SetTransceiverCodec(MediaType type, TransceiverCodec codec) } /// - /// Retrieves the supported transceiver codecs. + /// Retrieves the supported transceiver codecs for receiving media stream. /// /// The media type. /// The supported transceiver codecs. diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketBufferStatusChangedEventArgs.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketBufferStatusChangedEventArgs.cs index 2f293e478b7..50a93a2cf95 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketBufferStatusChangedEventArgs.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketBufferStatusChangedEventArgs.cs @@ -31,14 +31,14 @@ internal MediaPacketBufferStatusChangedEventArgs(uint sourceId, MediaPacketBuffe } /// - /// Gets the source ID. + /// Gets the source ID of media packet. /// /// The source ID. /// 9 public uint SourceId { get; } /// - /// Gets the media packet buffer status. + /// Gets the media packet buffer status that indicates underrun or overflow. /// /// The media packet buffer status. /// 9 diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSource.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSource.cs index 09fea0058ed..8f31f186b2c 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSource.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSource.cs @@ -23,7 +23,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Represents a media packet source. + /// Represents a media source that wraps media data into MediaPacket. /// /// /// diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSourceConfiguration.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSourceConfiguration.cs index d411a01fad1..3e0edbded23 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSourceConfiguration.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSourceConfiguration.cs @@ -20,7 +20,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Provides means to configure properties and handle events for . + /// Provides means to configure properties and handle event for . /// /// /// 9 @@ -35,7 +35,7 @@ internal MediaPacketSourceConfiguration(MediaPacketSource owner) } /// - /// Occurs when the buffer underruns or overflows. + /// Occurs when the status of buffer is underruns or overflows. /// /// The event handler will be executed on an internal thread. /// 9 diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs index 391a13a5aa3..ad51dfb8fe0 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs @@ -21,7 +21,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Represents a screen source. + /// Represents a media source to share screen data. /// /// /// MediaScreenSource is not allowed to be used by third-party applications due to the security reasons. (Since Tizen 7.0) diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs index be62bebf236..fcd12909121 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs @@ -21,7 +21,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Provides the ability to control audio/video track. + /// Provides the ability to control audio or video track from peer. /// /// 9 public sealed class MediaStreamTrack : IDisplayable @@ -38,7 +38,7 @@ internal MediaStreamTrack(WebRTC webRtc, MediaType type, uint trackId) } /// - /// Gets the the of media stream track. + /// Gets the type of media stream track. /// /// /// 9 @@ -55,7 +55,7 @@ private void ReplaceDisplay(Display newDisplay) } /// - /// Gets or sets the display to show remote video. + /// Gets or sets the display to show video data from peer. /// /// A that specifies the display. /// diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/MediaTestSource.cs b/src/Tizen.Multimedia.Remoting/WebRTC/MediaTestSource.cs index d3226b83c7d..a7c514770db 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/MediaTestSource.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/MediaTestSource.cs @@ -21,7 +21,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Represents an audio or a video test source. + /// Represents a media source that makes test audio or video stream. /// /// /// diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs index 0590d0f0faa..a6d3ce2857e 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs @@ -129,7 +129,7 @@ internal void ValidateNotDisposed() #endregion /// - /// Starts the WebRTC. + /// Starts the WebRTC with specific media source. /// /// /// The WebRTC must be in the state.
@@ -150,7 +150,7 @@ public void Start() } /// - /// Starts the WebRTC asynchronously. + /// Starts the WebRTC asynchronously with specific media source. /// /// /// The WebRTC must be in the state.
@@ -228,7 +228,7 @@ public void Stop() } /// - /// Creates SDP offer asynchronously to start a new WebRTC connection to a remote peer. + /// Creates SDP(Session Description Protocol) offer asynchronously to start a new WebRTC connection to a remote peer. /// /// /// The WebRTC must be in the or (Since API Level 12) @@ -267,7 +267,7 @@ public async Task CreateOfferAsync() } /// - /// Creates SDP answer asynchronously with option to an offer received from a remote peer. + /// Creates SDP(Session Description Protocol) answer asynchronously with option to an offer received from a remote peer. /// /// /// The WebRTC must be in the or (Since API Level 12) @@ -354,7 +354,7 @@ public string GetLocalDescription() } /// - /// Sets the session description of the remote peer's current offer or answer. + /// Sets the offer or answer session description from the current remote peer. /// /// /// The WebRTC must be in the or (Since API Level 12) @@ -378,7 +378,7 @@ public void SetRemoteDescription(string description) } /// - /// Gets the session description of the remote peer's current offer or answer. + /// Gets the offer or answer session description from the current remote peer. /// /// The remote session description string /// The WebRTC has already been disposed. @@ -445,7 +445,7 @@ public void AddIceCandidates(IEnumerable iceCandidates) } /// - /// Adds media source. + /// Adds media source to the current WebRTC. /// /// /// This method does not throw state exception anymore(Since API Level 12). It can be called in any state.
@@ -491,7 +491,7 @@ public void AddSource(MediaSource source) } /// - /// Adds media sources. + /// Adds media sources from the current WebRTC. /// /// /// This method does not throw state exception anymore(Since API Level 12). It can be called in any state.
@@ -538,7 +538,7 @@ public void AddSources(params MediaSource[] sources) } /// - /// Removes media source. + /// Removes media source from the current WebRTC. /// /// /// This method does not throw state exception anymore(Since API Level 12). It can be called in any state.
@@ -571,7 +571,7 @@ public void RemoveSource(MediaSource source) } /// - /// Removes media sources. + /// Removes media sources from the current WebRTC. /// /// /// This method does not throw state exception anymore(Since API Level 12). It can be called in any state.
@@ -598,7 +598,7 @@ public void RemoveSources(params MediaSource[] sources) } /// - /// Sets a turn server. + /// Sets a turn server for signalling with remote peer which cannot be connected directly. /// /// The is null. /// The WebRTC has already been disposed. @@ -617,7 +617,7 @@ public void SetTurnServer(string turnServer) } /// - /// Sets turn servers. + /// Sets turn servers for signalling with remote peer which cannot be connected directly. /// /// The one of is null. /// The WebRTC has already been disposed. diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannelErrorOccurredEventArgs.cs b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannelErrorOccurredEventArgs.cs index ddae8b4d3e0..8963ea7c93f 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannelErrorOccurredEventArgs.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannelErrorOccurredEventArgs.cs @@ -30,7 +30,7 @@ internal WebRTCDataChannelErrorOccurredEventArgs(WebRTCError error) } /// - /// Gets the error. + /// Gets the error of data channel. /// /// The error. /// 9 diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCEnums.cs b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCEnums.cs index 24796c35b57..61cafb38f2a 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCEnums.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCEnums.cs @@ -20,7 +20,7 @@ namespace Tizen.Multimedia.Remoting { /// - /// Specifies errors. + /// Specifies WebRTC errors. /// /// /// @@ -361,7 +361,7 @@ public enum IceTransportPolicy } /// - /// Specifies the display type. + /// Specifies the display mode that indicates the way of displaying video data. /// /// 9 public enum WebRTCDisplayMode @@ -383,7 +383,8 @@ public enum WebRTCDisplayMode } /// - /// Specifies the bundle policy. + /// Specifies the bundle policy that affects which media tracks are negotiated if the remote endpoint is not bundle-aware, + /// and what ICE candidates are gathered. /// /// /// The details of bundle policy enum is described in https://www.w3.org/TR/webrtc/#rtcbundlepolicy-enum. diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFrameEncodedEventArgs.cs b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFrameEncodedEventArgs.cs index 455009c5154..aea9583b980 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFrameEncodedEventArgs.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFrameEncodedEventArgs.cs @@ -31,7 +31,7 @@ internal WebRTCFrameEncodedEventArgs(MediaStreamTrack track, MediaPacket packet) } /// - /// Gets the track information. + /// Gets the information of media stream track from remote peer. /// /// The media type. /// 9 diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCTrackAddedEventArgs.cs b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCTrackAddedEventArgs.cs index e95c70eb113..dce812cca78 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCTrackAddedEventArgs.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCTrackAddedEventArgs.cs @@ -30,7 +30,7 @@ internal WebRTCTrackAddedEventArgs(MediaStreamTrack track) } /// - /// Gets the media type. + /// Gets the media stream track from reemote peer. /// /// The media type. /// 9