| 1 |
/* |
| 2 |
* Copyright (C) 2010-2021 Team Kodi (https://kodi.tv) |
| 3 |
* Copyright (C) 2010 Alwin Esch (Team Kodi) |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSE.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "Session.h" |
| 12 |
|
| 13 |
#include <kodi/addon-instance/pvr/Stream.h> |
| 14 |
|
| 15 |
class ATTR_DLL_LOCAL cVNSIRecording : public cVNSISession |
| 16 |
{ |
| 17 |
public: |
| 18 |
cVNSIRecording(kodi::addon::CInstancePVRClient& instance); |
| 19 |
~cVNSIRecording(); |
| 20 |
|
| 21 |
bool OpenRecording(const kodi::addon::PVRRecording& recinfo); |
| 22 |
void Close() override; |
| 23 |
|
| 24 |
int Read(unsigned char* buf, uint32_t buf_size); |
| 25 |
long long Seek(long long pos, uint32_t whence); |
| 26 |
long long Length(void); |
| 27 |
bool GetStreamTimes(kodi::addon::PVRStreamTimes& times); |
| 28 |
|
| 29 |
protected: |
| 30 |
void OnReconnect() override; |
| 31 |
void GetLength(); |
| 32 |
|
| 33 |
private: |
| 34 |
kodi::addon::PVRRecording m_recinfo; |
| 35 |
uint64_t m_currentPlayingRecordBytes = 0; |
| 36 |
uint64_t m_currentPlayingRecordLengthMSec = 0; |
| 37 |
uint32_t m_currentPlayingRecordFrames = 0; |
| 38 |
uint64_t m_currentPlayingRecordPosition = 0; |
| 39 |
|
| 40 |
kodi::addon::CInstancePVRClient& m_instance; |
| 41 |
}; |