aboutsummaryrefslogtreecommitdiff
path: root/Src/replicant/http/HTTPPlayback.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/http/HTTPPlayback.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/replicant/http/HTTPPlayback.h')
-rw-r--r--Src/replicant/http/HTTPPlayback.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/Src/replicant/http/HTTPPlayback.h b/Src/replicant/http/HTTPPlayback.h
new file mode 100644
index 00000000..12082b05
--- /dev/null
+++ b/Src/replicant/http/HTTPPlayback.h
@@ -0,0 +1,37 @@
+#pragma once
+#include "nx/nxonce.h"
+#include "jnetlib/jnetlib.h"
+#include "http/ifc_http_demuxer.h"
+#include "http/ifc_http.h"
+#include "nswasabi/PlaybackBase.h"
+
+class HTTPPlayback : public PlaybackBase, public ifc_http
+{
+public:
+ HTTPPlayback();
+ ~HTTPPlayback();
+
+ int Initialize(nx_uri_t url, ifc_player *player);
+ /* ifc_http implementation */
+ int WASABICALL HTTP_Wake(int mask);
+ int WASABICALL HTTP_Check(int mask);
+ int WASABICALL HTTP_Wait(unsigned int milliseconds, int mask);
+ int WASABICALL HTTP_Sleep(int milliseconds, int mask);
+ Agave_Seek *WASABICALL HTTP_GetSeek();
+ void WASABICALL HTTP_FreeSeek(Agave_Seek *seek);
+ int WASABICALL HTTP_Seek(uint64_t byte_position);
+ int WASABICALL HTTP_Seekable();
+ int WASABICALL HTTP_AudioOpen(const ifc_audioout::Parameters *format, ifc_audioout **out_output);
+private:
+ int Internal_Connect(uint64_t byte_position);
+ ifc_http_demuxer *demuxer;
+
+ volatile int paused;
+ volatile int stopped;
+ jnl_http_t http;
+
+ int Init();
+
+ nx_thread_return_t NXTHREADCALL DecodeLoop();
+ static nx_thread_return_t NXTHREADCALL HTTPPlayerThreadFunction(nx_thread_parameter_t param);
+};