geeksville / Micro-RTSP

A RTSP video server intended for very small CPUs (ESP32 etc)
MIT License
755 stars 199 forks source link

Compiling error in Arduino IDE #54

Open orlin369 opened 5 months ago

orlin369 commented 5 months ago

Hello I am using Arduino IDE and trying to build the project.

This error comes out:

C:\Users\User\Documents\Arduino\libraries\Micro-RTSP\examples\ESP32-devcam\ESP32-devcam.ino: In function 'void loop()':
C:\Users\User\Documents\Arduino\libraries\Micro-RTSP\examples\ESP32-devcam\ESP32-devcam.ino:220:40: error: no matching function for call to 'CStreamer::addSession(WiFiClient&)'
         streamer->addSession(rtspClient);
                                        ^
In file included from c:\Users\User\Documents\Arduino\libraries\Micro-RTSP\src/SimStreamer.h:4,
                 from C:\Users\User\Documents\Arduino\libraries\Micro-RTSP\examples\ESP32-devcam\ESP32-devcam.ino:6:
c:\Users\User\Documents\Arduino\libraries\Micro-RTSP\src/CStreamer.h:16:19: note: candidate: 'CRtspSession* CStreamer::addSession(SOCKET)'
     CRtspSession *addSession( SOCKET aClient );
                   ^~~~~~~~~~
c:\Users\User\Documents\Arduino\libraries\Micro-RTSP\src/CStreamer.h:16:19: note:   no known conversion for argument 1 from 'WiFiClient' to 'SOCKET' {aka 'WiFiClient*'}

exit status 1

Compilation error: no matching function for call to 'CStreamer::addSession(WiFiClient&)'

Would you be able to help?

Regards

lejibxl commented 4 months ago

I have the same error

djsaveRUS commented 4 months ago

I have a couple of problems with this library. The first is that it doesn't show up in the library manager.(Arduino IDE 2.3.x) And if I transfer a sketch to a folder with sketches and run it as a regular tape, I get a compilation error. `C:\Users\Superman\Documents\Arduino\ESP32-CAM-RSTP-server\ESP32-CAM-RSTP-server.ino: In function 'void setup()': C:\Users\Superman\Documents\Arduino\ESP32-CAM-RSTP-server\ESP32-CAM-RSTP-server.ino:184:38: error: no matching function for call to 'OV2640Streamer::OV2640Streamer(OV2640&)' streamer = new OV2640Streamer(cam); // our streamer for UDP/TCP based RTP transport ^ In file included from C:\Users\Superman\Documents\Arduino\ESP32-CAM-RSTP-server\ESP32-CAM-RSTP-server.ino:7: c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/OV2640Streamer.h:12:5: note: candidate: 'OV2640Streamer::OV2640Streamer(OV2640)' OV2640Streamer(OV2640 cam); ^~~~~~ c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/OV2640Streamer.h:12:5: note: no known conversion for argument 1 from 'OV2640' to 'OV2640' c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/OV2640Streamer.h:6:7: note: candidate: 'OV2640Streamer::OV2640Streamer(const OV2640Streamer&)' class OV2640Streamer : public CStreamer ^~~~~~ c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/OV2640Streamer.h:6:7: note: no known conversion for argument 1 from 'OV2640' to 'const OV2640Streamer&' c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/OV2640Streamer.h:6:7: note: candidate: 'OV2640Streamer::OV2640Streamer(OV2640Streamer&&)' c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/OV2640Streamer.h:6:7: note: no known conversion for argument 1 from 'OV2640' to 'OV2640Streamer&&' C:\Users\Superman\Documents\Arduino\ESP32-CAM-RSTP-server\ESP32-CAM-RSTP-server.ino: In function 'void loop()': C:\Users\Superman\Documents\Arduino\ESP32-CAM-RSTP-server\ESP32-CAM-RSTP-server.ino:220:40: error: no matching function for call to 'CStreamer::addSession(WiFiClient&)' streamer->addSession(rtspClient); ^ In file included from c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/SimStreamer.h:4, from C:\Users\Superman\Documents\Arduino\ESP32-CAM-RSTP-server\ESP32-CAM-RSTP-server.ino:6: c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/CStreamer.h:16:19: note: candidate: 'CRtspSession CStreamer::addSession(SOCKET)' CRtspSession addSession( SOCKET aClient ); ^~~~~~ c:\Users\Superman\Documents\Arduino\libraries\Micro-RTSP\src/CStreamer.h:16:19: note: no known conversion for argument 1 from 'WiFiClient' to 'SOCKET' {aka 'WiFiClient'}

exit status 1

Compilation error: no matching function for call to 'OV2640Streamer::OV2640Streamer(OV2640&)'`

ESP32-CAM-RSTP-server.zip I will be glad if someone corrects the code so that it works.

canDry commented 4 months ago

Using this library: https://github.com/circuitrocks/ESP32-RTSP/tree/master worked for me.
Note: remember to first remove the existing Micro-RTSP from libraries before importing this one.

liuyang3688 commented 2 months ago

class constructor or function parameter need a pointer instead of object.

repo code has obvious error.