Revision e11386c0 chunker_player/chunker_player.h

View differences:

chunker_player/chunker_player.h
12 12
	int Width;
13 13
	int Height;
14 14
	float Ratio;
15
	int Bitrate;
15 16
	int SampleRate;
16 17
	short int AudioChannels;
17 18
	int Index;
......
32 33
int queue_filling_threshold;
33 34
int quit;
34 35
short int QueueFillingMode;
35
int P2PProcessID;
36
int LogTraces;
37

  
38
#ifdef EMULATE_CHUNK_LOSS
39
typedef struct
40
{
41
	time_t Time;
42
	unsigned int Value;
43
	unsigned int MinValue;
44
	unsigned int MaxValue;
45
	unsigned int Burstiness;
46
} SChunkLoss;
47
SChunkLoss* ScheduledChunkLosses;
48
int CurrChunkLossIndex, NScheduledChunkLosses;
49
#endif
50

  
51
void* P2PProcessHandle;
36 52

  
37 53
#ifdef __WIN32__
38
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "taskkill /pid %d /F", pid); system(command_name);}
54
//~ #define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "taskkill /pid %d /F", pid); system(command_name);}
55
#define KILL_PROCESS(handle) {TerminateProcess(((PROCESS_INFORMATION*)handle)->hProcess, 0);}
39 56
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "taskkill /im %s /F", pname); system(command_name);}
40
#endif
41
#ifdef __LINUX__
42
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "kill %d", pid); system(command_name);}
43
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "killall %s -9", pname); system(command_name);}
44
#endif
45
#ifdef __MACOS__
46
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "kill %d", pid); system(command_name);}
57
//#endif
58
//#ifdef __LINUX__
59
#else
60
#define KILL_PROCESS(handle) {if(*((pid_t*)handle)>0){char command_name[255]; sprintf(command_name, "kill %d", *((pid_t*)handle)); system(command_name);}}
47 61
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "killall %s -9", pname); system(command_name);}
48 62
#endif
63
//#ifdef __MACOS__
64
//#define KILL_PROCESS(handle) {if(*((pid_t*)handle)>0){char command_name[255]; sprintf(command_name, "kill %d", *((pid_t*)handle)); system(command_name);}}
65
//#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "killall %s -9", pname); system(command_name);}
66
//#endif
49 67

  
50

  
51

  
68
#ifdef __LINUX__
69
#define DELETE_DIR(folder) {char command_name[255]; sprintf(command_name, "rm -fR %s", folder); system(command_name); }
70
#define CREATE_DIR(folder) {char command_name[255]; sprintf(command_name, "mkdir %s", folder); system(command_name); }
71
#else
72
#define DELETE_DIR(folder) {char command_name[255]; sprintf(command_name, "rd /S /Q %s", folder); system(command_name); }
73
#define CREATE_DIR(folder) {char command_name[255]; sprintf(command_name, "mkdir %s", folder); system(command_name); }
74
#endif
52 75

  
53 76
SChannel Channels[MAX_CHANNELS_NUM];
54 77
int NChannels;
55 78
int SelectedChannel;
56
char OfferStreamerFilename[255];
79
char StreamerFilename[255];
57 80
int FullscreenMode; // fullscreen vs windowized flag
58 81
int window_width, window_height;
82
int Audio_ON;
83

  
84
#ifdef HTTPIO
59 85
int HttpPort;
86
#else
87
#ifdef TCPIO
88
int TcpPort;
89
#endif
90
#endif
60 91

  
61 92
void ZapDown();
62 93
void ZapUp();
63 94
int ParseConf();
64 95
int SwitchChannel(SChannel* channel);
96
int ReTune(SChannel* channel);
65 97

  
66 98
#endif // _CHUNKER_PLAYER_H

Also available in: Unified diff