geeksville / Micro-RTSP

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

Error: no matching function for call to 'OV2640Streamer::OV2640Streamer(OV2640&)' #26

Open sridharangopal opened 4 years ago

sridharangopal commented 4 years ago

https://github.com/geeksville/Micro-RTSP/blob/43dd876fb9ffb882397b446cb4374bde280f9f69/examples/ESP32-devcam.ino#L184

While trying to build this example using pio, I get the following error: error: no matching function for call to 'OV2640Streamer::OV2640Streamer(OV2640&)' platformio.ini file contents I used:

[env:esp32cam] platform = espressif32 board = esp32cam framework = arduino lib_deps = Micro-RTSP, ESP8266_SSD1306

It looks like there is no constructor defined that takes only one argument - the cam object.

Please advise on how to best get past this error.

Net-time commented 4 years ago

Sounds a bit like a problem I had with Arduino IDE, when I copied the sketch the source catalog was not copied so the #include src/"OV2640Streamer.h" or similar failed. Does your build have OV2640Streamer.h mapped or in the path?

ccomincini commented 4 years ago

Same problem here while trying to compile with Arduino ide. Has anybody found a solution?

dcmwong commented 4 years ago

Just had this same error with pio run How do we map OV2640Streamer.h ? Where is that located?

dcmwong commented 4 years ago

I found the answer by placing the example folder into the root folder so the src sits in the same place where all the .h files live. I had to install some dependencies and thenpio run worked

FortinFred commented 3 years ago

I'm using pio in VS Code here and the resolved dependency has a two params constructor which is out of sync with this repo....

Example

streamer = new OV2640Streamer(cam); // our streamer for UDP/TCP based RTP transport

.pio\libdeps\esp32cam\Micro-RTSP\src\OV2640Streamer.h

#pragma once

#include "CStreamer.h"
#include "OV2640.h"

class OV2640Streamer : public CStreamer
{
    bool m_showBig;
    OV2640 &m_cam;

public:
    OV2640Streamer(SOCKET aClient, OV2640 &cam);

    virtual void    streamImage(uint32_t curMsec);
};
inaciose commented 3 years ago

You should not use example in this repo with the library installed by plataformio. Use the example in .pio/libdeps/esp32cam/Micro-RTSP folder instead