blob: bb0a6f310e4af181fe8cafd1477b975d24e1657a [file] [log] [blame]
jerrymf1579332013-02-07 01:56:28 +00001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2008. All Rights Reserved. */
3/* Open Source Software - may be modified and shared by FRC teams. The code */
4/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5/*----------------------------------------------------------------------------*/
6
7#ifndef __PC_VIDEO_SERVER_H__
8#define __PC_VIDEO_SERVER_H__
9
10#include "Task.h"
11#include <semLib.h>
12
13/** port for sending video to laptop */
14#define VIDEO_TO_PC_PORT 1180
15
16/**
17 * Class the serves images to the PC.
18 */
19class PCVideoServer : public ErrorBase {
20
21public:
22 PCVideoServer();
23 ~PCVideoServer();
24 unsigned int Release();
25 void Start();
26 void Stop();
27
28private:
29 static int s_ServerTask(PCVideoServer *thisPtr);
30 int ServerTask();
31 int StartServerTask();
32
33 Task m_serverTask;
34 SEM_ID m_newImageSem;
35 bool m_stopServer;
36};
37
38#endif
39