FifoSource: Adapt to changed xop::AVFrame API
This commit is contained in:
parent
23de612faf
commit
f8fc768486
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue