mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
rtp时间戳采用pts
This commit is contained in:
parent
42ef41cb58
commit
10eb063f63
@ -124,7 +124,7 @@ void PSEncoder::inputFrame(const Frame::Ptr &frame) {
|
|||||||
_frame_merger.inputFrame(frame, [&](uint32_t dts, uint32_t pts, const Buffer::Ptr &buffer, bool have_idr) {
|
_frame_merger.inputFrame(frame, [&](uint32_t dts, uint32_t pts, const Buffer::Ptr &buffer, bool have_idr) {
|
||||||
track_info.stamp.revise(dts, pts, dts_out, pts_out);
|
track_info.stamp.revise(dts, pts, dts_out, pts_out);
|
||||||
//取视频时间戳为TS的时间戳
|
//取视频时间戳为TS的时间戳
|
||||||
_timestamp = (uint32_t) dts_out;
|
_timestamp = (uint32_t) pts_out;
|
||||||
ps_muxer_input(_muxer.get(), track_info.track_id, have_idr ? 0x0001 : 0,
|
ps_muxer_input(_muxer.get(), track_info.track_id, have_idr ? 0x0001 : 0,
|
||||||
pts_out * 90LL, dts_out * 90LL, buffer->data(), buffer->size());
|
pts_out * 90LL, dts_out * 90LL, buffer->data(), buffer->size());
|
||||||
});
|
});
|
||||||
@ -165,7 +165,7 @@ PSEncoderImp::~PSEncoderImp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PSEncoderImp::onPS(uint32_t stamp, void *packet, size_t bytes) {
|
void PSEncoderImp::onPS(uint32_t stamp, void *packet, size_t bytes) {
|
||||||
_rtp_encoder->inputFrame(std::make_shared<FrameFromPtr>((char *) packet, bytes, stamp));
|
_rtp_encoder->inputFrame(std::make_shared<FrameFromPtr>((char *) packet, bytes, stamp, stamp));
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace mediakit
|
}//namespace mediakit
|
||||||
|
Loading…
Reference in New Issue
Block a user