projects
/
platform
/
core
/
csapi
/
tizenfx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2f9ae07
)
[WebRTC] Add display feature for video APIs (#5442)
author
Haesu Gwon
<haesu.gwon@samsung.com>
Wed, 9 Aug 2023 01:55:24 +0000
(10:55 +0900)
committer
GitHub
<noreply@github.com>
Wed, 9 Aug 2023 01:55:24 +0000
(10:55 +0900)
src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs
patch
|
blob
|
history
src/Tizen.Multimedia.Remoting/WebRTC/MediaSource.cs
patch
|
blob
|
history
src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs
patch
|
blob
|
history
src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs
patch
|
blob
|
history
src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFeatures.cs
patch
|
blob
|
history
diff --git
a/src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs
b/src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs
index
7be1574
..
391a13a
100755
(executable)
--- a/
src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs
+++ b/
src/Tizen.Multimedia.Remoting/WebRTC/MediaScreenSource.cs
@@
-34,6
+34,11
@@
namespace Tizen.Multimedia.Remoting
/// <summary>
/// Initializes a new instance of the <see cref="MediaScreenSource"/> class.
/// </summary>
/// <summary>
/// Initializes a new instance of the <see cref="MediaScreenSource"/> class.
/// </summary>
+ /// <feature>http://tizen.org/feature/display</feature>
+ /// <remark>
+ /// If display feature is not supported, NotSupportedException will be thrown
+ /// when MediaScreenSource is added by <see cref="WebRTC.AddSource"/> or <see cref="WebRTC.AddSources"/>.
+ /// </remark>
/// <since_tizen> 9 </since_tizen>
public MediaScreenSource() : base(MediaType.Video) {}
/// <since_tizen> 9 </since_tizen>
public MediaScreenSource() : base(MediaType.Video) {}
diff --git
a/src/Tizen.Multimedia.Remoting/WebRTC/MediaSource.cs
b/src/Tizen.Multimedia.Remoting/WebRTC/MediaSource.cs
index
a4a2306
..
7768f69
100755
(executable)
--- a/
src/Tizen.Multimedia.Remoting/WebRTC/MediaSource.cs
+++ b/
src/Tizen.Multimedia.Remoting/WebRTC/MediaSource.cs
@@
-615,6
+615,8
@@
namespace Tizen.Multimedia.Remoting
/// Enables the video loopback. The local video will be diaplayed in <paramref name="display"/>.
/// </summary>
/// <param name="display">The <see cref="Display"/> to apply.</param>
/// Enables the video loopback. The local video will be diaplayed in <paramref name="display"/>.
/// </summary>
/// <param name="display">The <see cref="Display"/> to apply.</param>
+ /// <feature>http://tizen.org/feature/display</feature>
+ /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
/// <exception cref="ArgumentException">The display has already been assigned to another.</exception>
/// <exception cref="ArgumentNullException"><paramref name="display"/> is null.</exception>
/// <exception cref="InvalidOperationException">
/// <exception cref="ArgumentException">The display has already been assigned to another.</exception>
/// <exception cref="ArgumentNullException"><paramref name="display"/> is null.</exception>
/// <exception cref="InvalidOperationException">
@@
-628,6
+630,10
@@
namespace Tizen.Multimedia.Remoting
{
uint trackId = 0;
{
uint trackId = 0;
+ if (!Features.IsSupported(WebRTCFeatures.Display))
+ {
+ throw new NotSupportedException("Display feature is not supported.");
+ }
if (!SourceId.HasValue)
{
throw new InvalidOperationException("MediaSource is not attached yet. Call AddSource() first.");
if (!SourceId.HasValue)
{
throw new InvalidOperationException("MediaSource is not attached yet. Call AddSource() first.");
diff --git
a/src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs
b/src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs
index
3862f67
..
1d154e9
100755
(executable)
--- a/
src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs
+++ b/
src/Tizen.Multimedia.Remoting/WebRTC/MediaStreamTrack.cs
@@
-64,6
+64,8
@@
namespace Tizen.Multimedia.Remoting
/// If remote track, <see cref="Display"/> must be set in <see cref="WebRTC.TrackAdded"/> event.<br/>
/// The display is created with <see cref="MediaView"/>.
/// </remarks>
/// If remote track, <see cref="Display"/> must be set in <see cref="WebRTC.TrackAdded"/> event.<br/>
/// The display is created with <see cref="MediaView"/>.
/// </remarks>
+ /// <feature>http://tizen.org/feature/display</feature>
+ /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
/// <exception cref="ObjectDisposedException">The WebRTC has already been disposed of.</exception>
/// <exception cref="ArgumentException">The value has already been assigned to another WebRTC.</exception>
/// <exception cref="InvalidOperationException">
/// <exception cref="ObjectDisposedException">The WebRTC has already been disposed of.</exception>
/// <exception cref="ArgumentException">The value has already been assigned to another WebRTC.</exception>
/// <exception cref="InvalidOperationException">
@@
-74,9
+76,22
@@
namespace Tizen.Multimedia.Remoting
/// <since_tizen> 9 </since_tizen>
public Display Display
{
/// <since_tizen> 9 </since_tizen>
public Display Display
{
- get => _display;
+ get
+ {
+ if (!Features.IsSupported(WebRTCFeatures.Display))
+ {
+ throw new NotSupportedException("Display feature is not supported.");
+ }
+
+ return _display;
+ }
set
{
set
{
+ if (!Features.IsSupported(WebRTCFeatures.Display))
+ {
+ throw new NotSupportedException("Display feature is not supported.");
+ }
+
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
@@
-122,6
+137,8
@@
namespace Tizen.Multimedia.Remoting
/// <remarks>
/// This property is meaningful only in overlay or EVAS surface display type.
/// </remarks>
/// <remarks>
/// This property is meaningful only in overlay or EVAS surface display type.
/// </remarks>
+ /// <feature>http://tizen.org/feature/display</feature>
+ /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
/// <value>A <see cref="WebRTCDisplayMode"/> that specifies the display mode.</value>
/// <exception cref="ArgumentException">Display mode type is incorrect.</exception>
/// <exception cref="InvalidOperationException"><see cref="Display"/> is not set.</exception>
/// <value>A <see cref="WebRTCDisplayMode"/> that specifies the display mode.</value>
/// <exception cref="ArgumentException">Display mode type is incorrect.</exception>
/// <exception cref="InvalidOperationException"><see cref="Display"/> is not set.</exception>
@@
-130,6
+147,11
@@
namespace Tizen.Multimedia.Remoting
{
get
{
{
get
{
+ if (!Features.IsSupported(WebRTCFeatures.Display))
+ {
+ throw new NotSupportedException("Display feature is not supported.");
+ }
+
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
@@
-142,6
+164,11
@@
namespace Tizen.Multimedia.Remoting
}
set
{
}
set
{
+ if (!Features.IsSupported(WebRTCFeatures.Display))
+ {
+ throw new NotSupportedException("Display feature is not supported.");
+ }
+
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
@@
-161,12
+188,19
@@
namespace Tizen.Multimedia.Remoting
/// <remarks>
/// This property is meaningful only in overlay or EVAS surface display type.
/// </remarks>
/// <remarks>
/// This property is meaningful only in overlay or EVAS surface display type.
/// </remarks>
+ /// <feature>http://tizen.org/feature/display</feature>
+ /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
/// <exception cref="InvalidOperationException"><see cref="Display"/> is not set.</exception>
/// <since_tizen> 9 </since_tizen>
public bool DisplayVisible
{
get
{
/// <exception cref="InvalidOperationException"><see cref="Display"/> is not set.</exception>
/// <since_tizen> 9 </since_tizen>
public bool DisplayVisible
{
get
{
+ if (!Features.IsSupported(WebRTCFeatures.Display))
+ {
+ throw new NotSupportedException("Display feature is not supported.");
+ }
+
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
@@
-179,6
+213,11
@@
namespace Tizen.Multimedia.Remoting
}
set
{
}
set
{
+ if (!Features.IsSupported(WebRTCFeatures.Display))
+ {
+ throw new NotSupportedException("Display feature is not supported.");
+ }
+
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
if (Type != MediaType.Video)
{
throw new InvalidOperationException("This property is only for video track.");
diff --git
a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs
b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs
index
dd6ecff
..
7564e86
100755
(executable)
--- a/
src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs
+++ b/
src/Tizen.Multimedia.Remoting/WebRTC/WebRTC.cs
@@
-386,6
+386,7
@@
namespace Tizen.Multimedia.Remoting
/// <param name="source">The media sources to add.</param>
/// <feature>http://tizen.org/feature/camera</feature>
/// <feature>http://tizen.org/feature/microphone</feature>
/// <param name="source">The media sources to add.</param>
/// <feature>http://tizen.org/feature/camera</feature>
/// <feature>http://tizen.org/feature/microphone</feature>
+ /// <feature>http://tizen.org/feature/display</feature>
/// <privilege>http://tizen.org/privilege/camera</privilege>
/// <privilege>http://tizen.org/privilege/mediastorage</privilege>
/// <privilege>http://tizen.org/privilege/externalstorage</privilege>
/// <privilege>http://tizen.org/privilege/camera</privilege>
/// <privilege>http://tizen.org/privilege/mediastorage</privilege>
/// <privilege>http://tizen.org/privilege/externalstorage</privilege>
@@
-433,6
+434,7
@@
namespace Tizen.Multimedia.Remoting
/// <param name="sources">The media sources to add.</param>
/// <feature>http://tizen.org/feature/camera</feature>
/// <feature>http://tizen.org/feature/microphone</feature>
/// <param name="sources">The media sources to add.</param>
/// <feature>http://tizen.org/feature/camera</feature>
/// <feature>http://tizen.org/feature/microphone</feature>
+ /// <feature>http://tizen.org/feature/display</feature>
/// <privilege>http://tizen.org/privilege/camera</privilege>
/// <privilege>http://tizen.org/privilege/mediastorage</privilege>
/// <privilege>http://tizen.org/privilege/externalstorage</privilege>
/// <privilege>http://tizen.org/privilege/camera</privilege>
/// <privilege>http://tizen.org/privilege/mediastorage</privilege>
/// <privilege>http://tizen.org/privilege/externalstorage</privilege>
diff --git
a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFeatures.cs
b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFeatures.cs
index
b10644c
..
56c772d
100755
(executable)
--- a/
src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFeatures.cs
+++ b/
src/Tizen.Multimedia.Remoting/WebRTC/WebRTCFeatures.cs
@@
-21,5
+21,6
@@
namespace Tizen.Multimedia.Remoting
internal const string Wifi = "http://tizen.org/feature/network.wifi";
internal const string Telephony = "http://tizen.org/feature/network.telephony";
internal const string Ethernet = "http://tizen.org/feature/network.ethernet";
internal const string Wifi = "http://tizen.org/feature/network.wifi";
internal const string Telephony = "http://tizen.org/feature/network.telephony";
internal const string Ethernet = "http://tizen.org/feature/network.ethernet";
+ internal const string Display = "http://tizen.org/feature/display";
}
}
}
}