Commit 7715684f authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

qcap: Use BOOL type where appropriate.

parent ac8a24aa
...@@ -110,7 +110,7 @@ struct _Capture ...@@ -110,7 +110,7 @@ struct _Capture
IPin *pOut; IPin *pOut;
int fd, mmap; int fd, mmap;
int iscommitted, stopped; BOOL iscommitted, stopped;
struct video_picture pict; struct video_picture pict;
int dbrightness, dhue, dcolour, dcontrast; int dbrightness, dhue, dcolour, dcontrast;
...@@ -661,7 +661,8 @@ cfail: ...@@ -661,7 +661,8 @@ cfail:
LeaveCriticalSection(&capBox->CritSect); LeaveCriticalSection(&capBox->CritSect);
fail: fail:
capBox->thread = 0; capBox->stopped = 1; capBox->thread = 0;
capBox->stopped = TRUE;
FIXME("Stop IFilterGraph\n"); FIXME("Stop IFilterGraph\n");
return 0; return 0;
} }
...@@ -677,16 +678,18 @@ HRESULT qcap_driver_run(Capture *capBox, FILTER_STATE *state) ...@@ -677,16 +678,18 @@ HRESULT qcap_driver_run(Capture *capBox, FILTER_STATE *state)
EnterCriticalSection(&capBox->CritSect); EnterCriticalSection(&capBox->CritSect);
capBox->stopped = 0; capBox->stopped = FALSE;
if (*state == State_Stopped) if (*state == State_Stopped)
{ {
*state = State_Running; *state = State_Running;
if (!capBox->iscommitted++) if (!capBox->iscommitted)
{ {
ALLOCATOR_PROPERTIES ap, actual; ALLOCATOR_PROPERTIES ap, actual;
BaseOutputPin *out; BaseOutputPin *out;
capBox->iscommitted = TRUE;
ap.cBuffers = 3; ap.cBuffers = 3;
if (!capBox->swresize) if (!capBox->swresize)
ap.cbBuffer = capBox->width * capBox->height; ap.cbBuffer = capBox->width * capBox->height;
...@@ -755,14 +758,14 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state) ...@@ -755,14 +758,14 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state)
{ {
if (*state == State_Paused) if (*state == State_Paused)
ResumeThread(capBox->thread); ResumeThread(capBox->thread);
capBox->stopped = 1; capBox->stopped = TRUE;
capBox->thread = 0; capBox->thread = 0;
if (capBox->iscommitted) if (capBox->iscommitted)
{ {
BaseOutputPin *out; BaseOutputPin *out;
HRESULT hr; HRESULT hr;
capBox->iscommitted = 0; capBox->iscommitted = FALSE;
out = (BaseOutputPin*)capBox->pOut; out = (BaseOutputPin*)capBox->pOut;
...@@ -894,9 +897,9 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card ) ...@@ -894,9 +897,9 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card )
capBox->bitDepth = 24; capBox->bitDepth = 24;
capBox->pOut = pOut; capBox->pOut = pOut;
capBox->fps = 3; capBox->fps = 3;
capBox->stopped = 0; capBox->stopped = FALSE;
capBox->curframe = 0; capBox->curframe = 0;
capBox->iscommitted = 0; capBox->iscommitted = FALSE;
TRACE("format: %d bits - %d x %d\n", capBox->bitDepth, capBox->width, capBox->height); TRACE("format: %d bits - %d x %d\n", capBox->bitDepth, capBox->width, capBox->height);
......
...@@ -41,7 +41,7 @@ static int yuv_gu[256]; /* Green U */ ...@@ -41,7 +41,7 @@ static int yuv_gu[256]; /* Green U */
static int yuv_bu[256]; /* Blue U */ static int yuv_bu[256]; /* Blue U */
static int yuv_rv[256]; /* Red V */ static int yuv_rv[256]; /* Red V */
static int yuv_gv[256]; /* Green V */ static int yuv_gv[256]; /* Green V */
static int initialised = 0; static BOOL initialised = FALSE;
static inline int ValidRange(int in) { static inline int ValidRange(int in) {
if (in > 255) in = 255; if (in > 255) in = 255;
...@@ -67,7 +67,8 @@ void YUV_Init(void) { ...@@ -67,7 +67,8 @@ void YUV_Init(void) {
float y, u, v; float y, u, v;
int y_, cb, cr; int y_, cb, cr;
if (initialised++) return; if (initialised) return;
initialised = TRUE;
for (y_ = 0; y_ <= 255; y_++) for (y_ = 0; y_ <= 255; y_++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment