Class StreamRecorder

Definition

Namespace:
Tizen.Multimedia
Assembly:
Tizen.Multimedia.StreamRecorder.dll
API Level:
3

Provides the ability to record user buffer from application.

C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public class StreamRecorder : IDisposable
Inheritance
System.Object
StreamRecorder
Implements
System.IDisposable

Constructors

View Source

StreamRecorder()

Initialize a new instance of the StreamRecorder class.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public StreamRecorder()
Exceptions
Type Condition
System.NotSupportedException

The feature is not supported.

API Level: 3
Feature: http://tizen.org/feature/multimedia.stream_recorder

Properties

View Source

State

Gets the current state of the stream recorder.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public RecorderState State { get; }
Property Value
Type Description
RecorderState
Exceptions
Type Condition
ObjectDisposedException

The StreamRecorder has already been disposed.

API Level: 3

Methods

View Source

Cancel()

Cancels recording. The recording data is discarded and not written.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public void Cancel()
Remarks

The recorder state must be Recording state by Start() or Paused state by Pause().

Exceptions
Type Condition
System.InvalidOperationException

The recorder is not in the valid state.

ObjectDisposedException

The StreamRecorder has already been disposed.

See Also
API Level: 3
View Source

Commit()

Stops recording and saves the result.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public void Commit()
Remarks

The recorder state must be Recording state by Start() or Paused state by Pause().

The recorder state will be Ready after commit.

http://tizen.org/privilege/mediastorage is needed if the save path are relevant to media storage. http://tizen.org/privilege/externalstorage is needed if the save path are relevant to external storage.

Exceptions
Type Condition
System.InvalidOperationException

The recorder is not in the valid state.

UnauthorizedAccessException

The access to the resources can not be granted.

ObjectDisposedException

The StreamRecorder has already been disposed.

See Also
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/mediastoragehttp://tizen.org/privilege/externalstorage
View Source

Dispose()

Release any unmanaged resources used by this object.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public void Dispose()
API Level: 3
View Source

Dispose(Boolean)

Releases the resources used by the StreamRecorder.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

API Level: 3
View Source

GetSupportedAudioCodecs()

Gets the audio codecs that the current device supports.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public IEnumerable<RecorderAudioCodec> GetSupportedAudioCodecs()
Returns
Type Description
System.Collections.Generic.IEnumerable<RecorderAudioCodec>

An IEnumerable of RecorderAudioCodec representing the supported audio codecs.

API Level: 4
View Source

GetSupportedFileFormats()

Gets the file formats that the current device supports.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public IEnumerable<RecorderFileFormat> GetSupportedFileFormats()
Returns
Type Description
System.Collections.Generic.IEnumerable<RecorderFileFormat>

An IEnumerable of RecorderFileFormat representing the supported file formats.

API Level: 4
View Source

GetSupportedVideoCodecs()

Gets the video codecs that the current device supports.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public IEnumerable<RecorderVideoCodec> GetSupportedVideoCodecs()
Returns
Type Description
System.Collections.Generic.IEnumerable<RecorderVideoCodec>

An IEnumerable of RecorderVideoCodec representing the supported video codecs.

API Level: 4
View Source

GetSupportedVideoResolutions()

Gets the video resolutions that the current device supports.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public IEnumerable<Size> GetSupportedVideoResolutions()
Returns
Type Description
System.Collections.Generic.IEnumerable<Size>

An IEnumerable of Size representing the supported resolutions.

API Level: 4
View Source

Pause()

Pauses recording.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public void Pause()
Remarks

Recording can be resumed with Start().

The recorder state must be Recording state by Start().

It has no effect if the recorder is already in the Paused state.

Exceptions
Type Condition
System.InvalidOperationException

The recorder is not in the valid state.

ObjectDisposedException

The StreamRecorder has already been disposed.

API Level: 3
View Source

Prepare(StreamRecorderOptions)

Prepares the stream recorder with the specified options.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public void Prepare(StreamRecorderOptions options)
Parameters
Type Name Description
StreamRecorderOptions options

The options for recording.

Remarks

The recorder must be Idle.

Exceptions
Type Condition
System.InvalidOperationException

The recorder is not in the valid state.

System.ArgumentException

Both Audio and Video are null.

System.NotSupportedException

options contains a value which is not supported.

ObjectDisposedException

The StreamRecorder has already been disposed.

API Level: 4
View Source

PushBuffer(MediaPacket)

Pushes a packet as recording raw data.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public void PushBuffer(MediaPacket packet)
Parameters
Type Name Description
MediaPacket packet

An audio or video packet to record.

Remarks

The recorder state must be Recording state by Start().

Exceptions
Type Condition
System.InvalidOperationException

The recorder is not in the valid state.
-or-
packet is an audio packet but audio recording is not enabled(See Audio).
-or-
packet is a video packet but video recording is not enabled(See Video).
-or-
packet is a video packet but the MimeType does not match the video source format.
-or-
An internal error occurs.

ObjectDisposedException

The StreamRecorder has already been disposed.

API Level: 3
View Source

Start()

Starts recording.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public void Start()
Remarks

The recorder state must be Ready state by Prepare(StreamRecorderOptions) or Paused state by Pause().

It has no effect if the recorder is already in the Recording state.

Exceptions
Type Condition
System.InvalidOperationException

The recorder is not in the valid state.

UnauthorizedAccessException

The access of the resources can not be granted.

ObjectDisposedException

The StreamRecorder has already been disposed.

API Level: 3
View Source

Unprepare()

Unprepares the stream recorder.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public void Unprepare()
Remarks

The recorder state must be Ready state by Prepare(StreamRecorderOptions), Cancel() and Commit().
The recorder state will be Idle.

It has no effect if the recorder is already in the Idle state.

Exceptions
Type Condition
System.InvalidOperationException

The recorder is not in the valid state.

ObjectDisposedException

The StreamRecorder has already been disposed.

API Level: 3

Events

View Source

BufferConsumed

Occurs when a buffer had consumed completely.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public event EventHandler<StreamRecorderBufferConsumedEventArgs> BufferConsumed
Event Type
Type Description
System.EventHandler<StreamRecorderBufferConsumedEventArgs>
API Level: 3
View Source

ErrorOccurred

Occurs when an error occurred during a recorder operation.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public event EventHandler<StreamRecorderErrorOccurredEventArgs> ErrorOccurred
Event Type
Type Description
System.EventHandler<StreamRecorderErrorOccurredEventArgs>
API Level: 4
View Source

RecordingLimitReached

Occurs when recording limit is reached.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public event EventHandler<RecordingLimitReachedEventArgs> RecordingLimitReached
Event Type
Type Description
System.EventHandler<RecordingLimitReachedEventArgs>
API Level: 3
View Source

RecordingStatusChanged

Occurs when recording status is changed.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public event EventHandler<RecordingStatusChangedEventArgs> RecordingStatusChanged
Event Type
Type Description
System.EventHandler<RecordingStatusChangedEventArgs>
API Level: 3
View Source

StateChanged

Occurs when StreamRecorder state is changed.

Declaration
C#
Copy
[Obsolete("Deprecated in API10; Will be removed in API12")] public event EventHandler<StreamRecorderStateChangedEventArgs> StateChanged
Event Type
Type Description
System.EventHandler<StreamRecorderStateChangedEventArgs>
API Level: 4

Implements

System.IDisposable

See Also