From c235f09fc5ef83827ac53375015f469cd7e13eec Mon Sep 17 00:00:00 2001 From: "N.N" Date: Mon, 14 Dec 2009 19:55:54 +0000 Subject: import version 0.36 svn path=/trunk/externals/august/readanysf~/; revision=12836 --- include/InputStream.h | 83 --------------------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 include/InputStream.h (limited to 'include/InputStream.h') diff --git a/include/InputStream.h b/include/InputStream.h deleted file mode 100644 index 704fed1..0000000 --- a/include/InputStream.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef _INPUTSTREAM_H_ -#define _INPUTSTREAM_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "Input.h" -#include "Fifo.h" - -#include -#include -#include - - -#include -#include -#include -#include -#include -#ifdef UNIX -#include -#include -#include -#include -#include -#define SOCKET_ERROR -1 -#else -#include -#endif - -using namespace std; - -class InputStream : public Input { - public: - InputStream (); - virtual ~InputStream(); - - virtual int Open( const char *pathname ); - virtual int Close(); - virtual int Read( void *buf, unsigned int count ); - - virtual long SeekSet ( long offset ); - virtual long SeekCur ( long offset ); - virtual long SeekEnd ( long offset ); - virtual float get_cachesize(); - virtual bool get_recover( ) { return recover; } - - pthread_mutex_t *get_mutex() { return &mut;} - pthread_cond_t *get_condition(){ return &cond;} - - void set_threaded( bool b ) { threaded = b;} - - Fifo * get_fifo() { return infifo;} - bool get_quit() { return quit;} - - int socket_connect ( ); - - private: - //int socket_connect (string hostname, string mountpoint, int portno); - //int socket_connect (char *hostname, char *mountpoint, int portno); - // connects to socket and checks for ice or shout - // returns type of stream(ogg, mp3) or -1 for failure - - string ParseHttp( string str, string parse ); // parse x-audio* vars from icecast - int SetUrl (const char *url); // breaks http://server:port/mount down to hostname,port,mountpoint - // return 1 for success, 0 for failure - - int get_line( char * str, int sock, int maxget); - - Fifo *infifo; // fifo for thread buffering - string hostname; // hostname of URL - string mountpoint; // mountpoint for Icecast URL - int port; // port number URL - bool threaded; // if thread is running or not, true if running - bool quit; // if we should quit thread or not - - pthread_mutex_t mut; - pthread_cond_t cond; - pthread_t childthread; - -}; -#endif -- cgit v1.2.1