here’s the whole console output. don’t know what most of it means
C:\store\dev\repos\Micro-RTSPx\examples\ESP32-devcamX\ESP32-devcamX.ino: In function 'void setup()':
ESP32-devcamX:23:38: error: no matching function for call to 'OV2640Streamer::OV2640Streamer(OV2640&)'
23 | streamer = new OV2640Streamer(cam); // our streamer for UDP/TCP based RTP transport
| ^
In file included from C:\store\dev\repos\Micro-RTSPx\examples\ESP32-devcamX\ESP32-devcamX.ino:4:
C:/store/dev/repos/Micro-RTSPx/src/OV2640Streamer.h:12:5: note: candidate: 'OV2640Streamer::OV2640Streamer(OV2640*)'
12 | OV2640Streamer(OV2640 *cam);
| ^~~~~~~~~~~~~~
C:/store/dev/repos/Micro-RTSPx/src/OV2640Streamer.h:12:28: note: no known conversion for argument 1 from 'OV2640' to 'OV2640*'
12 | OV2640Streamer(OV2640 *cam);
| ~~~~~~~~^~~
C:/store/dev/repos/Micro-RTSPx/src/OV2640Streamer.h:6:7: note: candidate: 'OV2640Streamer::OV2640Streamer(const OV2640Streamer&)'
6 | class OV2640Streamer : public CStreamer
| ^~~~~~~~~~~~~~
C:/store/dev/repos/Micro-RTSPx/src/OV2640Streamer.h:6:7: note: no known conversion for argument 1 from 'OV2640' to 'const OV2640Streamer&'
C:/store/dev/repos/Micro-RTSPx/src/OV2640Streamer.h:6:7: note: candidate: 'OV2640Streamer::OV2640Streamer(OV2640Streamer&&)'
C:/store/dev/repos/Micro-RTSPx/src/OV2640Streamer.h:6:7: note: no known conversion for argument 1 from 'OV2640' to 'OV2640Streamer&&'
C:\store\dev\repos\Micro-RTSPx\examples\ESP32-devcamX\ESP32-devcamX.ino: In function 'void loop()':
ESP32-devcamX:29:43: error: cannot convert 'WiFiClient' {aka 'NetworkClient'} to 'SOCKET' {aka 'NetworkClient*'}
29 | if(rtspClient) { streamer->addSession(rtspClient); }
| ^~~~~~~~~~
| |
| WiFiClient {aka NetworkClient}
In file included from C:/store/dev/repos/Micro-RTSPx/src/OV2640Streamer.h:3:
C:/store/dev/repos/Micro-RTSPx/src/CStreamer.h:16:38: note: initializing argument 1 of 'CRtspSession* CStreamer::addSession(SOCKET)'
16 | CRtspSession *addSession( SOCKET aClient );
| ~~~~~~~^~~~~~~
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.2\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
no matching function for call to 'OV2640Streamer::OV2640Streamer(OV2640&)'
The output is hard to read with the long paths and line and column numbers (needed if you need to find that specific location). But there are only two errors, each with one or more notes. The first
error: no matching function for call to OV2640Streamer::OV2640Streamer(OV2640&)
You tried to pass a OV2640&, but that's not a valid option. Two close matches, but "no known conversion" from that to either of those.
The second is similar, and offers a simpler clue
error: cannot convert WiFiClient {aka NetworkClient} to SOCKET {aka NetworkClient*}
In both cases, you got a "thing", but you need to pass "thing*" -- a "pointer to" that thing. So use the & as the address-of operator to get that pointer. For example
the libraries are
OV2640Streamer.cpp
OV2640Streamer.h
OV2640.cpp
OV2640.h
i’m just tryin to setup a rtsp server over my house wifi on an ESP32-CAM, but i don’t know anything about OOP. I trimmed down the code to the absolute essentials enough to show the compile error
ok thanks for that i changed the references to
streamer = new OV2640Streamer(&cam);
and that error went away. But couldn’t figure out the
”cannot convert 'WiFiClient' {aka 'NetworkClient'} to 'SOCKET' {aka 'NetworkClient*'}”*
i tried both & and * and still got more errors like
”no match for 'operator*' (operand type is 'WiFiClient' {aka 'NetworkClient'})”
You may want to read the documentation about installing libraries. This one was tricky; the zip contained another zip in a folder called Arduino. I could see the first zip wasn't a valid library, so I opened the Arduino folder, which contained a proper library zip. I included the zip, and it installed and has 2 example sketches. https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries/
I don't know much about OOP either, but you don;t need to, you just need to install the actual library. What you are attempting is an unknown procedure. I installed the library and compiled the sample code with no errors.
And thank God for Kooky Marvin. His repo doesn’t have that zip file, but it has a sketch called BasicVideo which compiled and executed right away. I just gotta get the wifi connection working. i think there’s an antenna jumper i have to connect, but it’s a @!#$ing 0402-size jumper, that’s fun