FifoSource: Adapt to changed xop::AVFrame API

This commit is contained in:
Peter Keresztes Schmidt 2021-04-09 09:48:42 +02:00
parent 23de612faf
commit f8fc768486
2 changed files with 2 additions and 9 deletions

View File

@ -40,12 +40,9 @@ int ZoneMinderFifoAudioSource::getFrequencyIndex() {
}
void ZoneMinderFifoAudioSource::PushFrame(const uint8_t *data, size_t size, int64_t pts) {
xop::AVFrame frame = {0};
xop::AVFrame frame(data, size);
frame.type = xop::AUDIO_FRAME;
frame.size = size;
frame.timestamp = av_rescale_q(pts, AV_TIME_BASE_Q, m_timeBase);
frame.buffer.reset(new uint8_t[size]);
memcpy(frame.buffer.get(), data, size);
m_rtspServer->PushFrame(m_sessionId, m_channelId, frame);
}
#endif // HAVE_RTSP_SERVER

View File

@ -23,12 +23,8 @@ ZoneMinderFifoVideoSource::ZoneMinderFifoVideoSource(
}
void ZoneMinderFifoVideoSource::PushFrame(const uint8_t *data, size_t size, int64_t pts) {
xop::AVFrame frame = {0};
frame.type = 0;
frame.size = size;
xop::AVFrame frame(data, size);
frame.timestamp = av_rescale_q(pts, AV_TIME_BASE_Q, m_timeBase);
frame.buffer.reset(new uint8_t[size]);
memcpy(frame.buffer.get(), data, size);
m_rtspServer->PushFrame(m_sessionId, m_channelId, frame);
}