Skip to content

Commit

Permalink
fix start of rtsp connection
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed May 2, 2024
1 parent 2d09c6e commit 5367d7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions inc/livevideosource.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class LiveVideoSource : public VideoSourceWithDecoder, public T::Callback
VideoSourceWithDecoder(opts, videoDecoderFactory, wait),
m_env(m_stop),
m_liveclient(m_env, this, uri.c_str(), opts, rtc::LogMessage::GetLogToDebug()<=2) {
m_liveclient.start();
this->Start();
}
virtual ~LiveVideoSource() {
Expand All @@ -69,7 +70,7 @@ class LiveVideoSource : public VideoSourceWithDecoder, public T::Callback
}

// overide T::onNewSession
virtual bool onNewSession(const char *id, const char *media, const char *codec, const char *sdp)
virtual bool onNewSession(const char *id, const char *media, const char *codec, const char *sdp, unsigned int rtpfrequency, unsigned int channels) override
{
bool success = false;
if (strcmp(media, "video") == 0)
Expand Down Expand Up @@ -264,7 +265,7 @@ class LiveVideoSource : public VideoSourceWithDecoder, public T::Callback
return res;
}

virtual bool onData(const char *id, unsigned char *buffer, ssize_t size, struct timeval presentationTime)
virtual bool onData(const char *id, unsigned char *buffer, ssize_t size, struct timeval presentationTime) override
{
int64_t ts = presentationTime.tv_sec;
ts = ts * 1000 + presentationTime.tv_usec / 1000;
Expand Down
2 changes: 1 addition & 1 deletion live555helper

0 comments on commit 5367d7e

Please sign in to comment.