Rough in pcm alaw support. Untested.

This commit is contained in:
Isaac Connor 2022-02-01 14:06:12 -05:00
parent 80461cb135
commit 4949159b88
1 changed files with 8 additions and 0 deletions

View File

@ -298,6 +298,14 @@ int main(int argc, char *argv[]) {
session->GetMediaSessionId(), xop::channel_1, audioFifoPath); session->GetMediaSessionId(), xop::channel_1, audioFifoPath);
audioSource->setFrequency(monitor->GetAudioFrequency()); audioSource->setFrequency(monitor->GetAudioFrequency());
audioSource->setChannels(monitor->GetAudioChannels()); audioSource->setChannels(monitor->GetAudioChannels());
} else if (std::string::npos != audioFifoPath.find("pcm_alaw")) {
Debug(1, "Adding G711A source at %dHz %d channels",
monitor->GetAudioFrequency(), monitor->GetAudioChannels());
session->AddSource(xop::channel_1, xop::G711ASource::CreateNew());
audioSource = new ADTS_ZoneMinderFifoSource(rtspServer,
session->GetMediaSessionId(), xop::channel_1, audioFifoPath);
audioSource->setFrequency(monitor->GetAudioFrequency());
audioSource->setChannels(monitor->GetAudioChannels());
} else { } else {
Warning("Unknown format in %s", audioFifoPath.c_str()); Warning("Unknown format in %s", audioFifoPath.c_str());
} }