Summary: Fix numerous warnings in codycam (merge from fixes branch)
Keywords: Patches applied: * n.reedijk@planet.nl--nielx-2003/codycam--fixes--0.1--base-0 tag of n.reedijk@planet.nl--openbeos-2004/codycam--mainline--0.1--base-0 * n.reedijk@planet.nl--nielx-2003/codycam--fixes--0.1--patch-1 Fix numerous warnings in codycam git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5556 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3a8fae2fb7
commit
859c1f0198
@ -93,9 +93,6 @@ void
|
|||||||
CodyCam::ReadyToRun()
|
CodyCam::ReadyToRun()
|
||||||
{
|
{
|
||||||
/* create the window for the app */
|
/* create the window for the app */
|
||||||
uint32 x = WINDOW_SIZE_X;
|
|
||||||
uint32 y = WINDOW_SIZE_Y;
|
|
||||||
|
|
||||||
fWindow = new VideoWindow(BRect(28, 28, 28 + (WINDOW_SIZE_X-1), 28 + (WINDOW_SIZE_Y-1)),
|
fWindow = new VideoWindow(BRect(28, 28, 28 + (WINDOW_SIZE_X-1), 28 + (WINDOW_SIZE_Y-1)),
|
||||||
(const char *)"CodyCam", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE, &fPort);
|
(const char *)"CodyCam", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE, &fPort);
|
||||||
|
|
||||||
@ -127,8 +124,6 @@ CodyCam::QuitRequested()
|
|||||||
void
|
void
|
||||||
CodyCam::MessageReceived(BMessage *message)
|
CodyCam::MessageReceived(BMessage *message)
|
||||||
{
|
{
|
||||||
status_t status;
|
|
||||||
|
|
||||||
switch (message->what)
|
switch (message->what)
|
||||||
{
|
{
|
||||||
case msg_start:
|
case msg_start:
|
||||||
@ -368,7 +363,7 @@ static void
|
|||||||
ErrorAlert(const char * message, status_t err)
|
ErrorAlert(const char * message, status_t err)
|
||||||
{
|
{
|
||||||
char msg[256];
|
char msg[256];
|
||||||
sprintf(msg, "%s\n%s [%x]", message, strerror(err), err);
|
sprintf(msg, "%s\n%s [%lx]", message, strerror(err), err);
|
||||||
(new BAlert("", msg, "Quit"))->Go();
|
(new BAlert("", msg, "Quit"))->Go();
|
||||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||||
}
|
}
|
||||||
@ -424,9 +419,9 @@ AddTranslationItems( BMenu * intoMenu, uint32 from_type)
|
|||||||
|
|
||||||
VideoWindow::VideoWindow (BRect frame, const char *title, window_type type, uint32 flags, port_id * consumerport) :
|
VideoWindow::VideoWindow (BRect frame, const char *title, window_type type, uint32 flags, port_id * consumerport) :
|
||||||
BWindow(frame,title,type,flags),
|
BWindow(frame,title,type,flags),
|
||||||
|
fPortPtr(consumerport),
|
||||||
fView(NULL),
|
fView(NULL),
|
||||||
fVideoView(NULL),
|
fVideoView(NULL)
|
||||||
fPortPtr(consumerport)
|
|
||||||
{
|
{
|
||||||
fFtpInfo.port = 0;
|
fFtpInfo.port = 0;
|
||||||
fFtpInfo.rate = 0x7fffffff;
|
fFtpInfo.rate = 0x7fffffff;
|
||||||
@ -519,7 +514,6 @@ void
|
|||||||
VideoWindow::MessageReceived(BMessage *message)
|
VideoWindow::MessageReceived(BMessage *message)
|
||||||
{
|
{
|
||||||
BControl *p;
|
BControl *p;
|
||||||
uint32 index;
|
|
||||||
|
|
||||||
p = NULL;
|
p = NULL;
|
||||||
message->FindPointer((const char *)"source",(void **)&p);
|
message->FindPointer((const char *)"source",(void **)&p);
|
||||||
@ -868,7 +862,6 @@ void
|
|||||||
ControlWindow::MessageReceived(BMessage * message)
|
ControlWindow::MessageReceived(BMessage * message)
|
||||||
{
|
{
|
||||||
BParameterWeb * web = NULL;
|
BParameterWeb * web = NULL;
|
||||||
BView * panel = NULL;
|
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
switch (message->what)
|
switch (message->what)
|
||||||
|
@ -44,7 +44,7 @@ bool FtpClient::ls(string &listing)
|
|||||||
{
|
{
|
||||||
bool rc = false;
|
bool rc = false;
|
||||||
string cmd, replystr;
|
string cmd, replystr;
|
||||||
int code, codetype, i, numread;
|
int code, codetype, numread;
|
||||||
char buf[513];
|
char buf[513];
|
||||||
|
|
||||||
cmd = "TYPE A";
|
cmd = "TYPE A";
|
||||||
@ -453,7 +453,7 @@ bool FtpClient::p_sendRequest(const string &cmd)
|
|||||||
|
|
||||||
if(m_control != 0)
|
if(m_control != 0)
|
||||||
{
|
{
|
||||||
if(cmd.find("PASS") != -1)
|
if(cmd.find("PASS") != string::npos)
|
||||||
printf("PASS <suppressed> (real password sent)\n");
|
printf("PASS <suppressed> (real password sent)\n");
|
||||||
else
|
else
|
||||||
printf("%s\n", ccmd.c_str());
|
printf("%s\n", ccmd.c_str());
|
||||||
@ -607,7 +607,6 @@ bool FtpClient::p_openDataConnection()
|
|||||||
unsigned short port;
|
unsigned short port;
|
||||||
BNetAddress addr;
|
BNetAddress addr;
|
||||||
int i, code, codetype;
|
int i, code, codetype;
|
||||||
char buf[32];
|
|
||||||
bool rc = false;
|
bool rc = false;
|
||||||
struct sockaddr_in sa;
|
struct sockaddr_in sa;
|
||||||
|
|
||||||
|
@ -43,21 +43,21 @@ VideoConsumer::VideoConsumer(
|
|||||||
BMediaNode(name),
|
BMediaNode(name),
|
||||||
BMediaEventLooper(),
|
BMediaEventLooper(),
|
||||||
BBufferConsumer(B_MEDIA_RAW_VIDEO),
|
BBufferConsumer(B_MEDIA_RAW_VIDEO),
|
||||||
mView(view),
|
|
||||||
mWindow(NULL),
|
|
||||||
mStatusLine(statusLine),
|
mStatusLine(statusLine),
|
||||||
mInternalID(internal_id),
|
mInternalID(internal_id),
|
||||||
mAddOn(addon),
|
mAddOn(addon),
|
||||||
mTimeToFtp(false),
|
|
||||||
mFtpComplete(true),
|
|
||||||
mRate(1000000),
|
|
||||||
mImageFormat(0),
|
|
||||||
mTranslator(0),
|
|
||||||
mPassiveFtp(true),
|
|
||||||
mConnectionActive(false),
|
mConnectionActive(false),
|
||||||
mMyLatency(20000),
|
mMyLatency(20000),
|
||||||
|
mWindow(NULL),
|
||||||
|
mView(view),
|
||||||
|
mOurBuffers(false),
|
||||||
mBuffers(NULL),
|
mBuffers(NULL),
|
||||||
mOurBuffers(false)
|
mTimeToFtp(false),
|
||||||
|
mFtpComplete(true),
|
||||||
|
mRate(1000000),
|
||||||
|
mImageFormat(0),
|
||||||
|
mTranslator(0),
|
||||||
|
mPassiveFtp(true)
|
||||||
{
|
{
|
||||||
FUNCTION("VideoConsumer::VideoConsumer\n");
|
FUNCTION("VideoConsumer::VideoConsumer\n");
|
||||||
|
|
||||||
@ -85,7 +85,6 @@ VideoConsumer::VideoConsumer(
|
|||||||
VideoConsumer::~VideoConsumer()
|
VideoConsumer::~VideoConsumer()
|
||||||
{
|
{
|
||||||
FUNCTION("VideoConsumer::~VideoConsumer\n");
|
FUNCTION("VideoConsumer::~VideoConsumer\n");
|
||||||
status_t status;
|
|
||||||
|
|
||||||
Quit();
|
Quit();
|
||||||
|
|
||||||
@ -196,6 +195,9 @@ VideoConsumer::RequestCompleted(const media_request_info & info)
|
|||||||
ERROR("VideoConsumer::RequestCompleted: Not using our buffers!\n");
|
ERROR("VideoConsumer::RequestCompleted: Not using our buffers!\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
ERROR("VideoConsumer::RequestCompleted: Invalid argument\n");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@ -240,7 +242,7 @@ VideoConsumer::HandleMessage(int32 message, const void * data, size_t size)
|
|||||||
void
|
void
|
||||||
VideoConsumer::BufferReceived(BBuffer * buffer)
|
VideoConsumer::BufferReceived(BBuffer * buffer)
|
||||||
{
|
{
|
||||||
LOOP("VideoConsumer::Buffer #%d received\n", buffer->ID());
|
LOOP("VideoConsumer::Buffer #%ld received\n", buffer->ID());
|
||||||
|
|
||||||
if (RunState() == B_STOPPED)
|
if (RunState() == B_STOPPED)
|
||||||
{
|
{
|
||||||
@ -284,7 +286,6 @@ VideoConsumer::CreateBuffers(
|
|||||||
// create a buffer group
|
// create a buffer group
|
||||||
uint32 mXSize = with_format.u.raw_video.display.line_width;
|
uint32 mXSize = with_format.u.raw_video.display.line_width;
|
||||||
uint32 mYSize = with_format.u.raw_video.display.line_count;
|
uint32 mYSize = with_format.u.raw_video.display.line_count;
|
||||||
uint32 mRowBytes = with_format.u.raw_video.display.bytes_per_row;
|
|
||||||
color_space mColorspace = with_format.u.raw_video.display.format;
|
color_space mColorspace = with_format.u.raw_video.display.format;
|
||||||
PROGRESS("VideoConsumer::CreateBuffers - Colorspace = %d\n", mColorspace);
|
PROGRESS("VideoConsumer::CreateBuffers - Colorspace = %d\n", mColorspace);
|
||||||
|
|
||||||
@ -317,7 +318,7 @@ VideoConsumer::CreateBuffers(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERROR("VideoConsumer::CreateBuffers - ERROR CREATING VIDEO RING BUFFER: %08x\n", status);
|
ERROR("VideoConsumer::CreateBuffers - ERROR CREATING VIDEO RING BUFFER: %08lx\n", status);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -330,7 +331,7 @@ VideoConsumer::CreateBuffers(
|
|||||||
if (buffList[j] != NULL)
|
if (buffList[j] != NULL)
|
||||||
{
|
{
|
||||||
mBufferMap[j] = (uint32) buffList[j];
|
mBufferMap[j] = (uint32) buffList[j];
|
||||||
PROGRESS(" j = %d buffer = %08x\n", j, mBufferMap[j]);
|
PROGRESS(" j = %d buffer = %08lx\n", j, mBufferMap[j]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -350,7 +351,6 @@ void
|
|||||||
VideoConsumer::DeleteBuffers()
|
VideoConsumer::DeleteBuffers()
|
||||||
{
|
{
|
||||||
FUNCTION("VideoConsumer::DeleteBuffers\n");
|
FUNCTION("VideoConsumer::DeleteBuffers\n");
|
||||||
status_t status;
|
|
||||||
|
|
||||||
if (mBuffers)
|
if (mBuffers)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user