Skip to content

Commit

Permalink
add frequency & channels
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Mar 11, 2024
1 parent e1d3869 commit bb88558
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inc/SessionSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SessionCallback
{

public:
virtual bool onNewSession(const char* id, const char* media, const char* codec, const char* sdp) { return true; }
virtual bool onNewSession(const char* id, const char* media, const char* codec, const char* sdp, unsigned int rtpfrequency, unsigned int channels) { return true; }
virtual bool onData(const char* id, unsigned char* buffer, ssize_t size, struct timeval presentationTime) = 0;
virtual ssize_t onNewBuffer(const char* id, const char* mime, unsigned char* buffer, ssize_t size) {
ssize_t markerSize = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/mkvclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void MKVClient::onMatroskaFileCreation(MatroskaFile* newFile) {
m_env << "Failed to create sink for \"" << track->mimeType << "\" subsession error: " << m_env.getResultMsg() << "\n";
m_callback->onError(*this, m_env.getResultMsg());
}
else if (m_callback->onNewSession(sink->name(), media.c_str(), codec.c_str(), sdp.c_str()))
else if (m_callback->onNewSession(sink->name(), media.c_str(), codec.c_str(), sdp.c_str(), rtpsink->rtpTimestampFrequency(), rtpsink->numChannels()))
{
m_env << "Start playing sink for \"" << track->mimeType << "\" sdp:" << sdp.c_str() << "\n";
sink->startPlaying(*trackSource, onEndOfFile, this);
Expand Down
2 changes: 1 addition & 1 deletion src/rtspconnectionclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void RTSPConnection::RTSPClientConnection::continueAfterSETUP(int resultCode, ch
envir() << "Failed to create sink for \"" << m_subSession->mediumName() << "/" << m_subSession->codecName() << "\" subsession error: " << envir().getResultMsg() << "\n";
m_callback->onError(m_connection, envir().getResultMsg());
}
else if (m_callback->onNewSession(sink->name(), m_subSession->mediumName(), m_subSession->codecName(), m_subSession->savedSDPLines()))
else if (m_callback->onNewSession(sink->name(), m_subSession->mediumName(), m_subSession->codecName(), m_subSession->savedSDPLines(), m_subSession->rtpTimestampFrequency(), m_subSession->numChannels()))
{
envir() << "Start playing sink for \"" << m_subSession->mediumName() << "/" << m_subSession->codecName() << "\" subsession" << "\n";
m_subSession->sink = sink;
Expand Down
2 changes: 1 addition & 1 deletion src/sdpclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SDPClient::SDPClient(Environment& env, Callback* callback, const char* sdp, cons
m_env << "Failed to create sink for \"" << subsession->mediumName() << "/" << subsession->codecName() << "\" subsession error: " << m_env.getResultMsg() << "\n";
m_callback->onError(*this, m_env.getResultMsg());
}
else if (m_callback->onNewSession(sink->name(), subsession->mediumName(), subsession->codecName(), subsession->savedSDPLines()))
else if (m_callback->onNewSession(sink->name(), subsession->mediumName(), subsession->codecName(), subsession->savedSDPLines(), subsession->rtpTimestampFrequency(), subsession->numChannels()))
{
m_env << "Start playing sink for \"" << subsession->mediumName() << "/" << subsession->codecName() << "\" subsession" << "\n";
subsession->sink = sink;
Expand Down

0 comments on commit bb88558

Please sign in to comment.