Class MediaSource
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
- API Level:
- 9
MediaSource is a base class for WebRTC sources.
C#Copypublic abstract class MediaSource : IDisplayable<uint>
- Inheritance
-
System.ObjectMediaSource
- Derived
-
Tizen.Multimedia.Remoting.MediaCustomSource
Constructors
Declaration
C#Copyprotected MediaSource()
API Level: 10
Declaration
C#Copyprotected MediaSource(MediaType mediaType)
Parameters
Type | Name | Description |
---|---|---|
MediaType | mediaType |
API Level: 9
Properties
Declaration
C#Copypublic int EncoderBitrate { get; set; }
Property Value
Type | Description |
---|---|
Int32 | A value that specifies the encoder bitrate. |
Remarks
This API is not supported in MediaFileSource, MediaPacketSource.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | EncoderBitrate is less than or equal to zero. |
System.InvalidOperationException | MediaSource is not attached yet. |
ObjectDisposedException | The WebRTC has already been disposed. |
API Level: 10
Declaration
C#Copyprotected MediaType MediaType { get; }
Property Value
Type | Description |
---|---|
MediaType | MediaType |
API Level: 9
Declaration
C#Copypublic bool Mute { get; set; }
Property Value
Type | Description |
---|---|
Boolean | A value that specifies the mute status. |
Remarks
This API is not supported in MediaFileSource, MediaPacketSource, MediaNullSource. (Since API level 10)
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | MediaSource is not attached yet. |
ObjectDisposedException | The WebRTC has already been disposed. |
API Level: 9
Declaration
C#Copypublic bool Pause { get; set; }
Property Value
Type | Description |
---|---|
Boolean | A value that specifies the pause status. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | MediaSource is not attached yet. |
ObjectDisposedException | The WebRTC has already been disposed. |
API Level: 9
Declaration
C#Copypublic ReadOnlyCollection<TransceiverCodec> SupportedTransceiverCodecs { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<TransceiverCodec> | The transceiver codecs. |
Remarks
This API is not supported in MediaFileSource, MediaPacketSource.
If user want to get supported codecs for each audio or video in MediaNullSource,
please use GetSupportedTransceiverCodecs(MediaType) instead.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This MediaSource is not supported type of MediaSource. |
ObjectDisposedException | The WebRTC has already been disposed. |
API Level: 10
Declaration
C#Copypublic TransceiverCodec TransceiverCodec { get; set; }
Property Value
Type | Description |
---|---|
TransceiverCodec | The transceiver codec. |
Remarks
This API is not supported in MediaFileSource, MediaPacketSource.
If MediaNullSource, please use GetTransceiverCodec(MediaType)
or SetTransceiverCodec(MediaType, TransceiverCodec) instead.
The WebRTC must be in the Idle state when transceiver codec is set.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | MediaSource is not attached yet. |
ObjectDisposedException | The WebRTC has already been disposed. |
API Level: 10
Declaration
C#Copypublic TransceiverDirection TransceiverDirection { get; set; }
Property Value
Type | Description |
---|---|
TransceiverDirection | A TransceiverDirection that specifies the transceiver direction. |
Remarks
The default value is SendRecv except MediaNullSource.
If user want to set each audio, video direction in MediaFileSource,
please use SetTransceiverDirection(MediaType, TransceiverDirection). (Since API level 10)
In MediaNullSource, only RecvOnly can be set.(Since API level 10)
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | MediaSource is not attached yet. |
ObjectDisposedException | The WebRTC has already been disposed. |
See Also
API Level: 9
Declaration
C#Copypublic int VideoFrameRate { get; set; }
Property Value
Type | Description |
---|---|
Int32 | A value that specifies the video frame rate. |
Remarks
This API is only supported in video media source, especially MediaCameraSource,
MediaScreenSource, MediaTestSource.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | VideoFrameRate is less than or equal to zero. |
System.InvalidOperationException | MediaSource is not attached yet. |
ObjectDisposedException | The WebRTC has already been disposed. |
API Level: 10
Declaration
C#Copypublic Size VideoResolution { get; set; }
Property Value
Type | Description |
---|---|
Size | A value that specifies the video resolution. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | MediaSource is not attached yet. |
ObjectDisposedException | The WebRTC has already been disposed. |
API Level: 9
Methods
EnableAudioLoopback(AudioStreamPolicy)
Enables the audio loopback. The local audio will be played with policy
.
Declaration
C#Copypublic MediaStreamTrack EnableAudioLoopback(AudioStreamPolicy policy)
Parameters
Type | Name | Description |
---|---|---|
AudioStreamPolicy | policy | The AudioStreamPolicy to apply. |
Returns
Type | Description |
---|---|
MediaStreamTrack | MediaStreamTrack |
Remarks
MediaSource does not support all AudioStreamType.
Supported types are Media, Voip,
MediaExternalOnly.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | MediaSource is not attached yet. |
System.NotSupportedException | AudioStreamType of |
ObjectDisposedException |
|
EnableVideoLoopback(Display)
Enables the video loopback. The local video will be diaplayed in display
.
Declaration
C#Copypublic MediaStreamTrack EnableVideoLoopback(Display display)
Parameters
Type | Name | Description |
---|---|---|
Display | display | The Display to apply. |
Returns
Type | Description |
---|---|
MediaStreamTrack | MediaStreamTrack |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The display has already been assigned to another. |
System.ArgumentNullException |
|
System.InvalidOperationException | MediaSource is not attached yet. |
ObjectDisposedException | The WebRTC has already been disposed. |