mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 16:55:46 -04:00
Initial community commit
This commit is contained in:
26
Src/replicant/icy/ifc_icy_playback.h
Normal file
26
Src/replicant/icy/ifc_icy_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 "icy/ifc_icy_reader.h"
|
||||
#include "player/ifc_playback_parameters.h"
|
||||
|
||||
class ifc_icy_playback: public Wasabi2::Dispatchable
|
||||
{
|
||||
protected:
|
||||
ifc_icy_playback() : Dispatchable(DISPATCHABLE_VERSION) {}
|
||||
~ifc_icy_playback() {}
|
||||
public:
|
||||
enum
|
||||
{
|
||||
DISPATCHABLE_VERSION,
|
||||
};
|
||||
|
||||
int Run(ifc_http *http_parent, ifc_player *player, ifc_icy_reader *reader) { return ICYPlayback_Run(http_parent, player, reader); }
|
||||
|
||||
protected:
|
||||
virtual int WASABICALL ICYPlayback_Run(ifc_http *http_parent, ifc_player *player, ifc_icy_reader *reader)=0;
|
||||
};
|
37
Src/replicant/icy/ifc_icy_reader.h
Normal file
37
Src/replicant/icy/ifc_icy_reader.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* ifc_icy_reader.h
|
||||
* shoutcast_player
|
||||
*
|
||||
* Created by Ben Allison on 2/1/08.
|
||||
* Copyright 2008 Nullsoft, Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "foundation/dispatch.h"
|
||||
#include "foundation/types.h"
|
||||
#include "foundation/error.h"
|
||||
|
||||
class ifc_icy_reader : public Wasabi2::Dispatchable
|
||||
{
|
||||
protected:
|
||||
ifc_icy_reader() : Dispatchable(DISPATCHABLE_VERSION) {}
|
||||
~ifc_icy_reader() {}
|
||||
public:
|
||||
size_t BytesBuffered() { return ICYReader_BytesBuffered(); }
|
||||
int Read(void *buffer, size_t length, size_t *readLength) { return ICYReader_Read(buffer, length, readLength); }
|
||||
int Peek(void *buffer, size_t length, size_t *readLength) { return ICYReader_Peek(buffer, length, readLength); }
|
||||
int IsClosed() { return ICYReader_IsClosed(); }
|
||||
int Run() { return ICYReader_Run(); }
|
||||
|
||||
enum
|
||||
{
|
||||
DISPATCHABLE_VERSION,
|
||||
};
|
||||
protected:
|
||||
virtual size_t WASABICALL ICYReader_BytesBuffered()=0;
|
||||
virtual int WASABICALL ICYReader_Read(void *buffer, size_t length, size_t *readLength)=0;
|
||||
virtual int WASABICALL ICYReader_Peek(void *buffer, size_t length, size_t *readLength)=0;
|
||||
virtual int WASABICALL ICYReader_IsClosed()=0;
|
||||
virtual int WASABICALL ICYReader_Run()=0;
|
||||
|
||||
};
|
31
Src/replicant/icy/svc_icy_playback.h
Normal file
31
Src/replicant/icy/svc_icy_playback.h
Normal file
@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
#include "jnetlib/jnetlib_defines.h"
|
||||
#include "foundation/dispatch.h"
|
||||
#include "foundation/error.h"
|
||||
#include "icy/ifc_icy_playback.h"
|
||||
|
||||
|
||||
// {42E078D5-7D68-43b5-9AFD-0135558C799F}
|
||||
static const GUID icy_playback_service_type_guid =
|
||||
{ 0x42e078d5, 0x7d68, 0x43b5, { 0x9a, 0xfd, 0x1, 0x35, 0x55, 0x8c, 0x79, 0x9f } };
|
||||
|
||||
class svc_icy_playback : public Wasabi2::Dispatchable
|
||||
{
|
||||
protected:
|
||||
svc_icy_playback() : Dispatchable(DISPATCHABLE_VERSION) {}
|
||||
~svc_icy_playback() {}
|
||||
public:
|
||||
static GUID GetServiceType() { return icy_playback_service_type_guid; }
|
||||
/* returns types to be added to "Accept" HTTP header */
|
||||
const char *EnumerateAcceptedTypes(size_t i) { return ICYPlaybackService_EnumerateAcceptedTypes(i); }
|
||||
|
||||
NError CreatePlayback(jnl_http_t http, ifc_icy_playback **playback, int pass) { return ICYPlaybackService_CreateDemuxer(http, playback, pass); }
|
||||
enum
|
||||
{
|
||||
DISPATCHABLE_VERSION,
|
||||
};
|
||||
|
||||
protected:
|
||||
virtual const char *WASABICALL ICYPlaybackService_EnumerateAcceptedTypes(size_t i) = 0;
|
||||
virtual NError WASABICALL ICYPlaybackService_CreateDemuxer(jnl_http_t http, ifc_icy_playback **playback, int pass) = 0;
|
||||
};
|
Reference in New Issue
Block a user