2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
12 #include "storage/cdioSupport.h"
16 class CFileCDDA
: public IFile
20 ~CFileCDDA(void) override
;
21 bool Open(const CURL
& url
) override
;
22 bool Exists(const CURL
& url
) override
;
23 int Stat(const CURL
& url
, struct __stat64
* buffer
) override
;
25 ssize_t
Read(void* lpBuf
, size_t uiBufSize
) override
;
26 int64_t Seek(int64_t iFilePosition
, int iWhence
= SEEK_SET
) override
;
27 void Close() override
;
28 int64_t GetPosition() override
;
29 int64_t GetLength() override
;
30 int GetChunkSize() override
;
33 bool IsValidFile(const CURL
& url
);
34 int GetTrackNum(const CURL
& url
);
38 lsn_t m_lsnStart
= CDIO_INVALID_LSN
; // Start of m_iTrack in logical sector number
39 lsn_t m_lsnCurrent
= CDIO_INVALID_LSN
; // Position inside the track in logical sector number
40 lsn_t m_lsnEnd
= CDIO_INVALID_LSN
; // End of m_iTrack in logical sector number
41 int m_iSectorCount
; // max number of sectors to read at once
42 std::shared_ptr
<MEDIA_DETECT::CLibcdio
> m_cdio
;