Skip to content

Commit

Permalink
[WebRTC] Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hsgwon committed Sep 24, 2024
1 parent 3760e5f commit 5ba0331
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 35 deletions.
4 changes: 2 additions & 2 deletions src/Tizen.Multimedia.Remoting/WebRTC/MediaCameraSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Represents a camera source.
/// Represents a media source that makes video data using camera device internally.
/// </summary>
/// <remarks>The camera privilege(http://tizen.org/privilege/camera) is required.</remarks>
/// <seealso cref="WebRTC.AddSource"/>
Expand All @@ -36,7 +36,7 @@ public sealed class MediaCameraSource : MediaSource
public MediaCameraSource() : base(MediaType.Video) {}

/// <summary>
/// Gets or sets the camera device id.
/// Gets or sets the camera device id that identifies each camera device.
/// </summary>
/// <value>A value that specifies the camera device id.</value>
/// <exception cref="InvalidOperationException">MediaSource is not attached yet.</exception>
Expand Down
5 changes: 4 additions & 1 deletion src/Tizen.Multimedia.Remoting/WebRTC/MediaCustomSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Represents a audio, video custom source.
/// Represents a media source that makes audio, video data internally.
/// </summary>
/// <remarks>
/// This supports the product infrastructure and is not intended to be used directly from application code.
/// </remarks>
/// <seealso cref="WebRTC.AddSource"/>
/// <seealso cref="WebRTC.AddSources"/>
/// <since_tizen> 9 </since_tizen>
Expand Down
2 changes: 1 addition & 1 deletion src/Tizen.Multimedia.Remoting/WebRTC/MediaFileSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Represents a media source with contents read from a file.
/// Represents a media source that reads media data from a file.
/// </summary>
/// <remarks>
/// Depending on where the source file is located either the media storage privilege (http://tizen.org/privilege/mediastorage) is required or<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Represents a microphone source.
/// Represents a media source that makes audio data using microphone.
/// </summary>
/// <remarks>The recorder privilege(http://tizen.org/privilege/recorder) is required.</remarks>
/// <seealso cref="WebRTC.AddSource"/>
Expand Down
6 changes: 4 additions & 2 deletions src/Tizen.Multimedia.Remoting/WebRTC/MediaNullSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

namespace Tizen.Multimedia.Remoting
{
/// <summary>Represents a null source.</summary>
/// <summary>
/// Represents a media source that only receives media streams from peer.
/// </summary>
/// <remarks>
/// If you add this source, WebRTC only receives media stream.<br/>
/// <see cref="TransceiverDirection"/> is set <see cref="TransceiverDirection.RecvOnly"/> by default.
Expand Down Expand Up @@ -84,7 +86,7 @@ public void SetTransceiverCodec(MediaType type, TransceiverCodec codec)
}

/// <summary>
/// Retrieves the supported transceiver codecs.
/// Retrieves the supported transceiver codecs for receiving media stream.
/// </summary>
/// <param name="type">The media type.</param>
/// <returns>The supported transceiver codecs.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ internal MediaPacketBufferStatusChangedEventArgs(uint sourceId, MediaPacketBuffe
}

/// <summary>
/// Gets the source ID.
/// Gets the source ID of media packet.
/// </summary>
/// <value>The source ID.</value>
/// <since_tizen> 9 </since_tizen>
public uint SourceId { get; }

/// <summary>
/// Gets the media packet buffer status.
/// Gets the media packet buffer status that indicates underrun or overflow.
/// </summary>
/// <value>The media packet buffer status.</value>
/// <since_tizen> 9 </since_tizen>
Expand Down
2 changes: 1 addition & 1 deletion src/Tizen.Multimedia.Remoting/WebRTC/MediaPacketSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Represents a media packet source.
/// Represents a media source that wraps media data into MediaPacket.
/// </summary>
/// <seealso cref="WebRTC.AddSource"/>
/// <seealso cref="WebRTC.AddSources"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Provides means to configure properties and handle events for <see cref="MediaPacketSource"/>.
/// Provides means to configure properties and handle event for <see cref="MediaPacketSource"/>.
/// </summary>
/// <seealso cref="MediaPacketSource"/>
/// <since_tizen> 9 </since_tizen>
Expand All @@ -35,7 +35,7 @@ internal MediaPacketSourceConfiguration(MediaPacketSource owner)
}

/// <summary>
/// Occurs when the buffer underruns or overflows.
/// Occurs when the status of buffer is underruns or overflows.
/// </summary>
/// <remarks>The event handler will be executed on an internal thread.</remarks>
/// <since_tizen> 9 </since_tizen>
Expand Down
2 changes: 1 addition & 1 deletion src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Represents a screen source.
/// Represents a media source to share screen data.
/// </summary>
/// <remarks>
/// MediaScreenSource is not allowed to be used by third-party applications due to the security reasons. (Since Tizen 7.0)
Expand Down
6 changes: 3 additions & 3 deletions src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Provides the ability to control audio/video track.
/// Provides the ability to control audio or video track from peer.
/// </summary>
/// <since_tizen> 9 </since_tizen>
public sealed class MediaStreamTrack : IDisplayable<WebRTCErrorCode>
Expand All @@ -38,7 +38,7 @@ internal MediaStreamTrack(WebRTC webRtc, MediaType type, uint trackId)
}

/// <summary>
/// Gets the the of media stream track.
/// Gets the type of media stream track.
/// </summary>
/// <value><see cref="MediaType"/></value>
/// <since_tizen> 9 </since_tizen>
Expand All @@ -55,7 +55,7 @@ private void ReplaceDisplay(Display newDisplay)
}

/// <summary>
/// Gets or sets the display to show remote video.
/// Gets or sets the display to show video data from peer.
/// </summary>
/// <value>A <see cref="Multimedia.Display"/> that specifies the display.</value>
/// <remarks>
Expand Down
2 changes: 1 addition & 1 deletion src/Tizen.Multimedia.Remoting/WebRTC/MediaTestSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Represents an audio or a video test source.
/// Represents a media source that makes test audio or video stream.
/// </summary>
/// <seealso cref="WebRTC.AddSource"/>
/// <seealso cref="WebRTC.AddSources"/>
Expand Down
24 changes: 12 additions & 12 deletions src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ internal void ValidateNotDisposed()
#endregion

/// <summary>
/// Starts the WebRTC.
/// Starts the WebRTC with specific media source.
/// </summary>
/// <remarks>
/// The WebRTC must be in the <see cref="WebRTCState.Idle"/> state.<br/>
Expand All @@ -150,7 +150,7 @@ public void Start()
}

/// <summary>
/// Starts the WebRTC asynchronously.
/// Starts the WebRTC asynchronously with specific media source.
/// </summary>
/// <remarks>
/// The WebRTC must be in the <see cref="WebRTCState.Idle"/> state.<br/>
Expand Down Expand Up @@ -228,7 +228,7 @@ public void Stop()
}

/// <summary>
/// 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.
/// </summary>
/// <remarks>
/// The WebRTC must be in the <see cref="WebRTCState.Negotiating"/> or <see cref="WebRTCState.Playing"/>(Since API Level 12)
Expand Down Expand Up @@ -267,7 +267,7 @@ public async Task<string> CreateOfferAsync()
}

/// <summary>
/// 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.
/// </summary>
/// <remarks>
/// The WebRTC must be in the <see cref="WebRTCState.Negotiating"/> or <see cref="WebRTCState.Playing"/>(Since API Level 12)
Expand Down Expand Up @@ -354,7 +354,7 @@ public string GetLocalDescription()
}

/// <summary>
/// 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.
/// </summary>
/// <remarks>
/// The WebRTC must be in the <see cref="WebRTCState.Negotiating"/> or <see cref="WebRTCState.Playing"/>(Since API Level 12)
Expand All @@ -378,7 +378,7 @@ public void SetRemoteDescription(string description)
}

/// <summary>
/// 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.
/// </summary>
/// <value>The remote session description string</value>
/// <exception cref="ObjectDisposedException">The WebRTC has already been disposed.</exception>
Expand Down Expand Up @@ -445,7 +445,7 @@ public void AddIceCandidates(IEnumerable<string> iceCandidates)
}

/// <summary>
/// Adds media source.
/// Adds media source to the current WebRTC.
/// </summary>
/// <remarks>
/// This method does not throw state exception anymore(Since API Level 12). It can be called in any state.<br/>
Expand Down Expand Up @@ -491,7 +491,7 @@ public void AddSource(MediaSource source)
}

/// <summary>
/// Adds media sources.
/// Adds media sources from the current WebRTC.
/// </summary>
/// <remarks>
/// This method does not throw state exception anymore(Since API Level 12). It can be called in any state.<br/>
Expand Down Expand Up @@ -538,7 +538,7 @@ public void AddSources(params MediaSource[] sources)
}

/// <summary>
/// Removes media source.
/// Removes media source from the current WebRTC.
/// </summary>
/// <remarks>
/// This method does not throw state exception anymore(Since API Level 12). It can be called in any state.<br/>
Expand Down Expand Up @@ -571,7 +571,7 @@ public void RemoveSource(MediaSource source)
}

/// <summary>
/// Removes media sources.
/// Removes media sources from the current WebRTC.
/// </summary>
/// <remarks>
/// This method does not throw state exception anymore(Since API Level 12). It can be called in any state.<br/>
Expand All @@ -598,7 +598,7 @@ public void RemoveSources(params MediaSource[] sources)
}

/// <summary>
/// Sets a turn server.
/// Sets a turn server for signalling with remote peer which cannot be connected directly.
/// </summary>
/// <exception cref="ArgumentNullException">The <paramref name="turnServer"/> is null.</exception>
/// <exception cref="ObjectDisposedException">The WebRTC has already been disposed.</exception>
Expand All @@ -617,7 +617,7 @@ public void SetTurnServer(string turnServer)
}

/// <summary>
/// Sets turn servers.
/// Sets turn servers for signalling with remote peer which cannot be connected directly.
/// </summary>
/// <exception cref="ArgumentNullException">The one of <paramref name="turnServers"/> is null.</exception>
/// <exception cref="ObjectDisposedException">The WebRTC has already been disposed.</exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal WebRTCDataChannelErrorOccurredEventArgs(WebRTCError error)
}

/// <summary>
/// Gets the error.
/// Gets the error of data channel.
/// </summary>
/// <value>The error.</value>
/// <since_tizen> 9 </since_tizen>
Expand Down
7 changes: 4 additions & 3 deletions src/Tizen.Multimedia.Remoting/WebRTC/WebRTCEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
namespace Tizen.Multimedia.Remoting
{
/// <summary>
/// Specifies errors.
/// Specifies WebRTC errors.
/// </summary>
/// <seealso cref="WebRTC.ErrorOccurred"/>
/// <seealso cref="WebRTCErrorOccurredEventArgs"/>
Expand Down Expand Up @@ -361,7 +361,7 @@ public enum IceTransportPolicy
}

/// <summary>
/// Specifies the display type.
/// Specifies the display mode that indicates the way of displaying video data.
/// </summary>
/// <since_tizen> 9 </since_tizen>
public enum WebRTCDisplayMode
Expand All @@ -383,7 +383,8 @@ public enum WebRTCDisplayMode
}

/// <summary>
/// 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.
/// </summary>
/// <remarks>
/// The details of bundle policy enum is described in https://www.w3.org/TR/webrtc/#rtcbundlepolicy-enum.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal WebRTCFrameEncodedEventArgs(MediaStreamTrack track, MediaPacket packet)
}

/// <summary>
/// Gets the track information.
/// Gets the information of media stream track from remote peer.
/// </summary>
/// <value>The media type.</value>
/// <since_tizen> 9 </since_tizen>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal WebRTCTrackAddedEventArgs(MediaStreamTrack track)
}

/// <summary>
/// Gets the media type.
/// Gets the media stream track from reemote peer.
/// </summary>
/// <value>The media type.</value>
/// <since_tizen> 9 </since_tizen>
Expand Down

0 comments on commit 5ba0331

Please sign in to comment.