Remove debug messages (#19365)

This commit is contained in:
Theo Arends 2023-08-20 17:49:21 +02:00
parent e4860efcdb
commit 0acd5335d5
6 changed files with 20 additions and 20 deletions

View File

@ -5,7 +5,7 @@
CRtspSession::CRtspSession(SOCKET aRtspClient, CStreamer * aStreamer) : m_RtspClient(aRtspClient),m_Streamer(aStreamer)
{
printf("Creating RTSP session\n");
// printf("Creating RTSP session\n");
Init();
m_RtspSessionID = getRandom(); // create a session ID
@ -95,11 +95,11 @@ bool CRtspSession::ParseRtspRequest(char const * aRequest, unsigned aRequestSize
}
CmdName[i] = '\0';
if (!parseSucceeded) {
printf("failed to parse RTSP\n");
// printf("failed to parse RTSP\n");
return false;
}
printf("RTSP received %s\n", CmdName);
// printf("RTSP received %s\n", CmdName);
// find out the command type
if (strstr(CmdName,"OPTIONS") != nullptr) m_RtspCmdType = RTSP_OPTIONS; else
@ -400,7 +400,7 @@ bool CRtspSession::handleRequests(uint32_t readTimeoutMs)
return true;
}
else if(res == 0) {
printf("client closed socket, exiting\n");
// printf("client closed socket, exiting\n");
m_stopped = true;
return true;
}

View File

@ -6,7 +6,7 @@
CStreamer::CStreamer(SOCKET aClient, u_short width, u_short height) : m_Client(aClient)
{
printf("Creating TSP streamer\n");
// printf("Creating TSP streamer\n");
m_RtpServerPort = 0;
m_RtcpServerPort = 0;
m_RtpClientPort = 0;
@ -228,7 +228,7 @@ bool findJPEGheader(BufPtr *start, uint32_t *len, uint8_t marker) {
while(bytes - *start < *len) {
uint8_t framing = *bytes++; // better be 0xff
if(framing != 0xff) {
printf("malformed jpeg, framing=%x\n", framing);
// printf("malformed jpeg, framing=%x\n", framing);
return false;
}
uint8_t typecode = *bytes++;
@ -263,13 +263,13 @@ bool findJPEGheader(BufPtr *start, uint32_t *len, uint8_t marker) {
break;
}
default:
printf("unexpected jpeg typecode 0x%x\n", typecode);
// printf("unexpected jpeg typecode 0x%x\n", typecode);
break;
}
}
}
printf("failed to find jpeg marker 0x%x", marker);
// printf("failed to find jpeg marker 0x%x", marker);
return false;
}
@ -309,7 +309,7 @@ bool decodeJPEGfile(BufPtr *start, uint32_t *len, BufPtr *qtable0, BufPtr *qtabl
BufPtr quantstart = *start;
uint32_t quantlen = *len;
if(!findJPEGheader(&quantstart, &quantlen, 0xdb)) {
printf("error can't find quant table 0\n");
// printf("error can't find quant table 0\n");
}
else {
// printf("found quant table %x\n", quantstart[2]);
@ -317,7 +317,7 @@ bool decodeJPEGfile(BufPtr *start, uint32_t *len, BufPtr *qtable0, BufPtr *qtabl
*qtable0 = quantstart + 3; // 3 bytes of header skipped
nextJpegBlock(&quantstart);
if(!findJPEGheader(&quantstart, &quantlen, 0xdb)) {
printf("error can't find quant table 1\n");
// printf("error can't find quant table 1\n");
}
else {
// printf("found quant table %x\n", quantstart[2]);

View File

@ -184,7 +184,7 @@ esp_err_t OV2640::init(camera_config_t config)
esp_err_t err = esp_camera_init(&_cam_config);
if (err != ESP_OK)
{
printf("Camera probe failed with error 0x%x", err);
// printf("Camera probe failed with error 0x%x", err);
return err;
}
// ESP_ERROR_CHECK(gpio_install_isr_service(0));

View File

@ -6,7 +6,7 @@
OV2640Streamer::OV2640Streamer(SOCKET aClient, OV2640 &cam) : CStreamer(aClient, cam.getWidth(), cam.getHeight()), m_cam(cam)
{
Serial.printf("Created streamer width=%d, height=%d\n", cam.getWidth(), cam.getHeight());
// Serial.printf("Created streamer width=%d, height=%d\n", cam.getWidth(), cam.getHeight());
}
void OV2640Streamer::streamImage(uint32_t curMsec)
@ -15,5 +15,5 @@ void OV2640Streamer::streamImage(uint32_t curMsec)
BufPtr bytes = m_cam.getfb();
streamFrame(bytes, m_cam.getSize(), curMsec);
Serial.printf("get frame: %d\n",m_cam.getSize());
// Serial.printf("get frame: %d\n",m_cam.getSize());
}

View File

@ -22,7 +22,7 @@ typedef uint16_t IPPORT; // on linux use network byte order
#define NULLSOCKET NULL
inline void closesocket(SOCKET s) {
printf("closing TCP socket\n");
// printf("closing TCP socket\n");
if(s) {
s->stop();
@ -38,7 +38,7 @@ inline void socketpeeraddr(SOCKET s, IPADDRESS *addr, IPPORT *port) {
}
inline void udpsocketclose(UDPSOCKET s) {
printf("closing UDP socket\n");
// printf("closing UDP socket\n");
if(s) {
s->stop();
delete s;
@ -50,7 +50,7 @@ inline UDPSOCKET udpsocketcreate(unsigned short portNum)
UDPSOCKET s = new WiFiUDP();
if(!s->begin(portNum)) {
printf("Can't bind port %d\n", portNum);
// printf("Can't bind port %d\n", portNum);
delete s;
return NULL;
}
@ -70,7 +70,7 @@ inline ssize_t udpsocketsend(UDPSOCKET sockfd, const void *buf, size_t len,
sockfd->beginPacket(destaddr, destport);
sockfd->write((const uint8_t *) buf, len);
if(!sockfd->endPacket())
printf("error sending udp packet\n");
// printf("error sending udp packet\n");
return len;
}
@ -83,7 +83,7 @@ inline ssize_t udpsocketsend(UDPSOCKET sockfd, const void *buf, size_t len,
inline int socketread(SOCKET sock, char *buf, size_t buflen, int timeoutmsec)
{
if(!sock->connected()) {
printf("client has closed the socket\n");
// printf("client has closed the socket\n");
return 0;
}

View File

@ -28,7 +28,7 @@ inline void socketpeeraddr(SOCKET s, IPADDRESS *addr, IPPORT *port) {
sockaddr_in r;
socklen_t len = sizeof(r);
if(getpeername(s,(struct sockaddr*)&r,&len) < 0) {
printf("getpeername failed\n");
// printf("getpeername failed\n");
*addr = 0;
*port = 0;
}
@ -54,7 +54,7 @@ inline UDPSOCKET udpsocketcreate(unsigned short portNum)
int s = socket(AF_INET, SOCK_DGRAM, 0);
addr.sin_port = htons(portNum);
if (bind(s,(sockaddr*)&addr,sizeof(addr)) != 0) {
printf("Error, can't bind\n");
// printf("Error, can't bind\n");
close(s);
s = 0;
}