mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 03:55:46 -04:00
Initial community commit
This commit is contained in:
26
Src/replicant/ultravox/ifc_ultravox_playback.h
Normal file
26
Src/replicant/ultravox/ifc_ultravox_playback.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "jnetlib/jnetlib_defines.h"
|
||||
#include "foundation/dispatch.h"
|
||||
#include "foundation/error.h"
|
||||
#include "player/svc_output.h"
|
||||
#include "player/ifc_player.h"
|
||||
#include "http/ifc_http.h"
|
||||
#include "ultravox/ifc_ultravox_reader.h"
|
||||
#include "player/ifc_playback_parameters.h"
|
||||
|
||||
class ifc_ultravox_playback: public Wasabi2::Dispatchable
|
||||
{
|
||||
protected:
|
||||
ifc_ultravox_playback() : Dispatchable(DISPATCHABLE_VERSION) {}
|
||||
~ifc_ultravox_playback() {}
|
||||
public:
|
||||
enum
|
||||
{
|
||||
DISPATCHABLE_VERSION,
|
||||
};
|
||||
|
||||
int Run(ifc_http *http_parent, ifc_player *player, ifc_ultravox_reader *reader) { return UltravoxPlayback_Run(http_parent, player, reader); }
|
||||
|
||||
protected:
|
||||
virtual int WASABICALL UltravoxPlayback_Run(ifc_http *http_parent, ifc_player *player, ifc_ultravox_reader *reader)=0;
|
||||
};
|
28
Src/replicant/ultravox/ifc_ultravox_reader.h
Normal file
28
Src/replicant/ultravox/ifc_ultravox_reader.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "foundation/dispatch.h"
|
||||
|
||||
class ifc_ultravox_reader : public Wasabi2::Dispatchable
|
||||
{
|
||||
protected:
|
||||
ifc_ultravox_reader() : Dispatchable(DISPATCHABLE_VERSION) {}
|
||||
~ifc_ultravox_reader() {}
|
||||
public:
|
||||
enum
|
||||
{
|
||||
DISPATCHABLE_VERSION=0,
|
||||
};
|
||||
|
||||
size_t BytesBuffered() { return UltravoxReader_BytesBuffered(); }
|
||||
int Read(void *buffer, size_t buffer_length, size_t *bytes_read) { return UltravoxReader_Read(buffer, buffer_length, bytes_read); }
|
||||
int Peek(void *buffer, size_t buffer_length, size_t *bytes_read) { return UltravoxReader_Peek(buffer, buffer_length, bytes_read); }
|
||||
int IsClosed() { return UltravoxReader_IsClosed(); }
|
||||
/* gives you back the contents of exactly one packet. used when Ultravox is provided codec framing */
|
||||
int ReadPacket(void *buffer, size_t buffer_length, size_t *bytes_read) { return UltravoxReader_ReadPacket(buffer, buffer_length, bytes_read); }
|
||||
private:
|
||||
virtual int WASABICALL UltravoxReader_Read(void *buffer, size_t buffer_length, size_t *bytes_read)=0;
|
||||
virtual int WASABICALL UltravoxReader_Peek(void *buffer, size_t buffer_length, size_t *bytes_read)=0;
|
||||
virtual size_t WASABICALL UltravoxReader_BytesBuffered()=0;
|
||||
virtual int WASABICALL UltravoxReader_IsClosed()=0;
|
||||
virtual int WASABICALL UltravoxReader_ReadPacket(void *buffer, size_t buffer_length, size_t *bytes_read)=0;
|
||||
|
||||
};
|
27
Src/replicant/ultravox/svc_ultravox_playback.h
Normal file
27
Src/replicant/ultravox/svc_ultravox_playback.h
Normal file
@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "jnetlib/jnetlib_defines.h"
|
||||
#include "foundation/dispatch.h"
|
||||
#include "foundation/error.h"
|
||||
#include "ultravox/ifc_ultravox_playback.h"
|
||||
// {CAA4D831-8387-4F7D-A752-6DD0759E9C09}
|
||||
static const GUID ultravox_playback_service_type_guid =
|
||||
{ 0xcaa4d831, 0x8387, 0x4f7d, { 0xa7, 0x52, 0x6d, 0xd0, 0x75, 0x9e, 0x9c, 0x9 } };
|
||||
|
||||
|
||||
class svc_ultravox_playback : public Wasabi2::Dispatchable
|
||||
{
|
||||
protected:
|
||||
svc_ultravox_playback() : Dispatchable(DISPATCHABLE_VERSION) {}
|
||||
~svc_ultravox_playback() {}
|
||||
public:
|
||||
static GUID GetServiceType() { return ultravox_playback_service_type_guid; }
|
||||
|
||||
NError CreatePlayback(jnl_http_t http, unsigned int classtype, ifc_ultravox_playback **playback) { return UltravoxPlaybackService_CreateDemuxer(http, classtype, playback); }
|
||||
enum
|
||||
{
|
||||
DISPATCHABLE_VERSION,
|
||||
};
|
||||
|
||||
protected:
|
||||
virtual NError WASABICALL UltravoxPlaybackService_CreateDemuxer(jnl_http_t http, unsigned int classtype, ifc_ultravox_playback **playback) = 0;
|
||||
};
|
Reference in New Issue
Block a user