Description
The ToiMediaRecorder interface is the access point for a media recorder. Access to this interface is acquired through the ToiMediaService::createRecorderInstance() function. It is possible to create multiple private media recorder instances. Each application gets its own private instance of this interface for each of its media recorder instances.
- See also:
- ToiMediaRecorderBase
-
ToiMediaService
import "ToiMediaRecorder.idl";
List of all members.
Public Member Functions |
| void | open (in string url, in string assetId) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiBusyException, TToiUnavailableException, TToiInvalidPreconditionException) |
| void | close () raises (TToiSessionViolationException) |
| void | record () raises (TToiSessionViolationException, TToiOperationNotSupportedException) |
| void | recordAt (in unsigned long offset) raises (TToiSessionViolationException, TToiOperationNotSupportedException) |
| void | setParameter (in string name, in string value) raises (TToiInvalidArgumentException, TToiPermissionDeniedException) |
| void | unsetParameter (in string name) raises (TToiInvalidArgumentException, TToiPermissionDeniedException) |
Member Function Documentation
This function starts a new recording session by trying to establish a connection to a media source. If this function returns successfully, the recorder state has changed to STATE_CONNECTING. If an exception is raised, the recorder state is unaffected.
Depending on the success of the connection attempt to the media source, the recorder will make a second state transition to either STATE_PAUSED or STATE_FAILED, on success and failure, respectively. In any respect, the application will be notified about this event by a call to its ToiMediaRecorderStateChangedEvent function.
The application ends the session by calling ToiMediaRecorder::close(), which makes the recorder change state to STATE_IDLE.
- Parameters:
-
| url | The URL identifying the media source. The URL string may contain additional parameter information in accordance to the extended URL format. |
| assetId | Identifies the asset to record to. |
- Exceptions:
-
- See also:
- ToiMediaRecorder::close()
-
TToiMediaRecorderState
This function starts a recording of the stream. If this function returns successfully, the recorder state has changed to STATE_RECORDING. If an exception is raised, the recorder state is unaffected.
- Exceptions:
-
- See also:
- TToiMediaRecorderState
- Technical Preview:
- This method is a TECHNICAL PREVIEW, it may change. This function starts a new recording session and may reuse existing recorded content from another ongoing recording session, including a possible timeshift session, sharing the same source.
Depending on the success of the connection attempt to the media source, the recorder will change state to STATE_RECORDING. If something goes wrong it will end up in state STATE_FAILED. In any respect, the application will be notified about those state transistions by calls to its ToiMediaRecorderStateChangedEvent function.
- Parameters:
-
| offset | The offset (in milliseconds) relative to the current position, i.e. a value of 1000 means that one second back in time will be reused. If the specified offset time is not available less data than requested will be given. |
- Exceptions:
-
- See also:
- ToiMediaRecorder::close()
-
TToiMediaRecorderState
This function sets the value of a parameter. Depending on the current state, the new value is used differently. If the function is called when in idle state, the new value is used for all sessions started after the parameter is set. If the function is called in any other state but the idle state, the new value is applied to that session only and is discarded automatically when the session ends.
- Parameters:
-
| name | The name of the parameter to set. |
| value | The value to set the parameter to. |
- Exceptions:
-
- See also:
- ToiMediaRecorder::unsetParameter()
-
ToiMediaRecorder::getParameter()
This function restores the value of a parameter to the default. Depending on the current state, the new value is used differently. If the function is called when in idle state, all sessions started after the parameter is restored will use the default value. If the function is called in any other state but the idle state, the value is changed for that session only.
- Parameters:
-
| name | The name of the parameter for which the value is to be restored to the default. |
- Exceptions:
-
- See also:
- ToiMediaRecorder::setParameter()
-
ToiMediaRecorder::getParameter()