Statistics
| Branch: | Revision:

chunker-player / chunker_player / chunker_player.h @ 10c75ef7

History | View | Annotate | Download (1.63 KB)

1
#ifndef _CHUNKER_PLAYER_H
2
#define _CHUNKER_PLAYER_H
3

    
4
#include "player_defines.h"
5
#include <SDL.h>
6
#include <SDL_mutex.h>
7

    
8
typedef struct SChannel
9
{
10
        char LaunchString[255];
11
        char Title[255];
12
        int Width;
13
        int Height;
14
        float Ratio;
15
        int SampleRate;
16
        short int AudioChannels;
17
        int Index;
18
} SChannel;
19

    
20
SDL_mutex *OverlayMutex;
21
SDL_Overlay *YUVOverlay;
22
SDL_Rect OverlayRect;
23
SDL_Surface *MainScreen;
24
int SilentMode;
25
int queue_filling_threshold;
26
char YUVFileName[256];
27
int SaveYUV;
28
int quit;
29
short int QueueFillingMode;
30
int P2PProcessID;
31

    
32
#ifdef __WIN32__
33
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "taskkill /pid %d /F", pid); system(command_name);}
34
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "taskkill /im %s /F", pname); system(command_name);}
35
#endif
36
#ifdef __LINUX__
37
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "kill %d", pid); system(command_name);}
38
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "killall %s -9", pname); system(command_name);}
39
#endif
40
#ifdef __MACOS__
41
#define KILL_PROCESS(pid) {char command_name[255]; sprintf(command_name, "kill %d", pid); system(command_name);}
42
#define KILLALL(pname) {char command_name[255]; sprintf(command_name, "killall %s -9", pname); system(command_name);}
43
#endif
44

    
45

    
46

    
47

    
48
SChannel Channels[MAX_CHANNELS_NUM];
49
int NChannels;
50
int SelectedChannel;
51
char OfferStreamerPath[255];
52
char OfferStreamerFilename[255];
53
int FullscreenMode; // fullscreen vs windowized flag
54
int window_width, window_height;
55
int HttpPort;
56

    
57
void ZapDown();
58
void ZapUp();
59
int ParseConf();
60
int SwitchChannel(SChannel* channel);
61

    
62
#endif // _CHUNKER_PLAYER_H