PVR recording methods
To transfer available recordings of the PVR backend and to allow possible playback.
Recordings parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ GetRecordingsAmount()
virtual PVR_ERROR GetRecordingsAmount |
( |
bool | deleted, |
|
|
int & | amount ) |
|
inlinevirtual |
To get amount of recording present on backend.
- Parameters
-
[in] | deleted | if set return deleted recording (called if supportsRecordingsUndelete set to true) |
[out] | amount | The total amount of recordings on the backend |
- Returns
- PVR_ERROR_NO_ERROR if the amount has been fetched successfully.
◆ GetRecordings()
Request the list of all recordings from the backend, if supported.
Recording entries are added to Kodi by calling TransferRecordingEntry() on the callback.
- Parameters
-
- Returns
- PVR_ERROR_NO_ERROR if the recordings have been fetched successfully.
The following table contains values that can be set with class PVRRecording :
Example:
...
{
recording.
SetTitle(
"My recording name");
...
}
...
Definition Recordings.h:39
Definition Recordings.h:654
@ PVR_ERROR_NO_ERROR
0 : No error occurred.
Definition pvr_general.h:38
void SetTitle(const std::string &title)
required The title of this recording.
Definition Recordings.h:126
void SetRecordingId(const std::string &recordingId)
required Unique identifier of the recording on the client.
Definition Recordings.h:113
void Add(const kodi::addon::PVRRecording &tag)
To add and give content from addon to Kodi on related call.
Definition Recordings.h:670
◆ DeleteRecording()
Delete a recording on the backend.
- Parameters
-
- Returns
- PVR_ERROR_NO_ERROR if the recording has been deleted successfully.
◆ UndeleteRecording()
Undelete a recording on the backend.
- Parameters
-
- Returns
- PVR_ERROR_NO_ERROR if the recording has been undeleted successfully.
◆ DeleteAllRecordingsFromTrash()
virtual PVR_ERROR DeleteAllRecordingsFromTrash |
( |
| ) |
|
|
inlinevirtual |
Delete all recordings permanent which in the deleted folder on the backend.
- Returns
- PVR_ERROR_NO_ERROR if the recordings has been deleted successfully.
◆ RenameRecording()
Rename a recording on the backend.
- Parameters
-
- Returns
- PVR_ERROR_NO_ERROR if the recording has been renamed successfully.
◆ SetRecordingLifetime()
Set the lifetime of a recording on the backend.
- Parameters
-
[in] | recording | The class PVRRecording to change the lifetime for. recording.iLifetime contains the new lieftime value. |
- Returns
- PVR_ERROR_NO_ERROR if the recording's lifetime has been set successfully.
◆ SetRecordingPlayCount()
Set the play count of a recording on the backend.
- Parameters
-
- Returns
- PVR_ERROR_NO_ERROR if the recording's play count has been set successfully.
◆ SetRecordingLastPlayedPosition()
Set the last watched position of a recording on the backend.
- Parameters
-
[in] | recording | The class PVRRecording. |
[in] | lastplayedposition | The last watched position in seconds |
- Returns
- PVR_ERROR_NO_ERROR if the position has been stored successfully.
◆ GetRecordingLastPlayedPosition()
Retrieve the last watched position of a recording on the backend.
- Parameters
-
- Returns
- PVR_ERROR_NO_ERROR if the amount has been fetched successfully.
◆ GetRecordingEdl()
Retrieve the edit decision list (EDL) of a recording on the backend.
- Parameters
-
[in] | recording | The class PVRRecording. |
[out] | edl | The function has to write the EDL into this array. |
- Returns
- PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists.
The following table contains values that can be set with class PVREDLEntry :
◆ GetRecordingSize()
Retrieve the size of a recording on the backend.
- Parameters
-
[in] | recording | The recording to get the size in bytes for. |
[out] | size | The size in bytes of the recording |
- Returns
- PVR_ERROR_NO_ERROR if the recording's size has been set successfully.
◆ GetRecordingStreamProperties()
Get the stream properties for a recording from the backend.
- Parameters
-
[in] | recording | The class PVRRecording to get the stream properties for. |
[out] | properties | The properties required to play the stream. |
- Returns
- PVR_ERROR_NO_ERROR if the stream is available.
- Note
- The value directly related to inputstream must always begin with the name of the associated add-on, e.g.
"inputstream.adaptive.manifest_update_parameter"
.
Example:
...
std::vector<kodi::addon::PVRStreamProperty>& properties)
{
...
properties.emplace_back("inputstream.adaptive.manifest_type", "mpd");
properties.emplace_back("inputstream.adaptive.manifest_update_parameter", "full");
}
...
#define PVR_STREAM_PROPERTY_MIMETYPE
the MIME type of the stream that should be played.
Definition pvr_general.h:311
#define PVR_STREAM_PROPERTY_INPUTSTREAM
To define in stream properties the name of the inputstream add-on that should be used.
Definition pvr_general.h:235
◆ CallRecordingMenuHook()
Call one of the recording related menu hooks (if supported).
Supported class PVRMenuhook instances have to be added in constructor()
, by calling AddMenuHook() on the callback.
- Parameters
-
[in] | menuhook | The hook to call. |
[in] | item | The selected recording item for which the hook was called. |
- Returns
- PVR_ERROR_NO_ERROR if the hook was called successfully.
The following table contains values that can be set with class PVRMenuhook :
◆ RecordingNotification()
void RecordingNotification |
( |
const std::string & | recordingName, |
|
|
const std::string & | fileName, |
|
|
bool | on ) |
|
inline |
Callback to Kodi Function
Display a notification in Kodi that a recording started or stopped on the server.
- Parameters
-
[in] | recordingName | The name of the recording to display |
[in] | fileName | The filename of the recording |
[in] | on | True when recording started, false when it stopped |
◆ TriggerRecordingUpdate()
void TriggerRecordingUpdate |
( |
| ) |
|
|
inline |
Callback to Kodi Function
Request Kodi to update it's list of recordings.