mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-11 05:57:05 +03:00
trying to follow cspot...
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <stdint.h> // for uint8_t
|
||||
#include <memory> // for shared_ptr, unique_ptr, weak_ptr
|
||||
#include <vector> // for vector
|
||||
|
||||
#include "AccessKeyFetcher.h"
|
||||
#include "CDNTrackStream.h"
|
||||
#include "CSpotContext.h"
|
||||
#include "TrackReference.h"
|
||||
#include "protobuf/metadata.pb.h"
|
||||
#include "protobuf/spirc.pb.h"
|
||||
#include "MercurySession.h" // for MercurySession
|
||||
#include "TrackReference.h" // for TrackReference
|
||||
#include "protobuf/metadata.pb.h" // for Episode, Restriction, Track
|
||||
|
||||
namespace cspot {
|
||||
class AccessKeyFetcher;
|
||||
class CDNTrackStream;
|
||||
struct Context;
|
||||
|
||||
class TrackProvider {
|
||||
public:
|
||||
TrackProvider(std::shared_ptr<cspot::Context> ctx);
|
||||
@@ -23,11 +26,13 @@ class TrackProvider {
|
||||
std::unique_ptr<cspot::CDNTrackStream> cdnStream;
|
||||
|
||||
Track trackInfo;
|
||||
Episode episodeInfo;
|
||||
std::weak_ptr<CDNTrackStream> currentTrackReference;
|
||||
TrackReference trackIdInfo;
|
||||
|
||||
void queryMetadata();
|
||||
void onMetadataResponse(MercurySession::Response& res);
|
||||
bool doRestrictionsApply(Restriction* restrictions, int count);
|
||||
void fetchFile(const std::vector<uint8_t>& fileId,
|
||||
const std::vector<uint8_t>& trackId);
|
||||
bool canPlayTrack(int index);
|
||||
|
||||
Reference in New Issue
Block a user