[WASAPI] fix stream types and frequencies enumeration
[xbmc.git] / xbmc / CueDocument.h
blob2a7f9c7cadba0fb8361d181480db47682fad646a
1 /*
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.
7 */
9 #pragma once
11 #include "music/Song.h"
13 #include <string>
14 #include <vector>
16 #define MAX_PATH_SIZE 1024
18 class CFileItem;
19 class CFileItemList;
20 class CueReader;
22 class CCueDocument
24 class CCueTrack
26 public:
27 std::string strArtist;
28 std::string strTitle;
29 std::string strFile;
30 int iTrackNumber = 0;
31 int iStartTime = 0;
32 int iEndTime = 0;
33 ReplayGain::Info replayGain;
35 public:
36 ~CCueDocument(void);
37 // USED
38 bool ParseFile(const std::string &strFilePath);
39 bool ParseTag(const std::string &strContent);
40 void GetSongs(VECSONGS &songs);
41 std::string GetMediaPath();
42 const std::string& GetMediaTitle() const { return m_strAlbum; }
43 void GetMediaFiles(std::vector<std::string>& mediaFiles);
44 void UpdateMediaFile(const std::string& oldMediaFile, const std::string& mediaFile);
45 bool IsOneFilePerTrack() const;
46 bool IsLoaded() const;
48 bool LoadTracks(CFileItemList& scannedItems, const CFileItem& item);
50 private:
51 void Clear();
52 bool Parse(CueReader& reader, const std::string& strFile = std::string());
54 // Member variables
55 std::string m_strArtist; // album artist
56 std::string m_strAlbum; // album title
57 std::string m_strGenre; // album genre
58 int m_iYear = 0; //album year
59 int m_iTrack = 0; // current track
60 int m_iDiscNumber = 0; // Disc number
61 ReplayGain::Info m_albumReplayGain;
63 bool m_bOneFilePerTrack = false;
65 // cuetrack array
66 typedef std::vector<CCueTrack> Tracks;
67 Tracks m_tracks;
69 std::string ExtractInfo(const std::string &line);
70 int ExtractTimeFromIndex(const std::string &index);
71 int ExtractNumericInfo(const std::string &info);
72 bool ResolvePath(std::string &strPath, const std::string &strBase);