mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 20:01:56 +00:00
parent
9e856c84e7
commit
e905fce847
2 changed files with 9 additions and 1 deletions
|
@ -77,6 +77,7 @@ srs_error_t SrsRtpMuxer::frame_to_packet(SrsSharedPtrMessage* shared_frame, SrsF
|
|||
uint8_t header = sample.bytes[0];
|
||||
uint8_t nal_type = header & kNalTypeMask;
|
||||
|
||||
// TODO: FIXME: Magic number? Doc?
|
||||
// ignore SEI nal
|
||||
if (nal_type == 0x06 || nal_type == 0x09) {
|
||||
continue;
|
||||
|
@ -253,6 +254,7 @@ void SrsRtp::dispose()
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: FIXME: Dead code?
|
||||
srs_error_t SrsRtp::cycle()
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
@ -338,7 +340,8 @@ srs_error_t SrsRtp::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* forma
|
|||
srs_error_t SrsRtp::on_video(SrsSharedPtrMessage* shared_video, SrsFormat* format)
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
|
||||
// TODO: FIXME: Maybe it should config on vhost level.
|
||||
if (!enabled) {
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -1122,15 +1122,20 @@ srs_error_t SrsOriginHub::on_video(SrsSharedPtrMessage* shared_video, bool is_se
|
|||
return err;
|
||||
}
|
||||
|
||||
// Parse RTMP message to RTP packets, in FU-A if too large.
|
||||
if ((err = rtp->on_video(msg, format)) != srs_success) {
|
||||
// TODO: We should support more strategies.
|
||||
srs_warn("rtp: ignore video error %s", srs_error_desc(err).c_str());
|
||||
srs_error_reset(err);
|
||||
rtp->on_unpublish();
|
||||
}
|
||||
|
||||
// TODO: FIXME: Refactor to move to rtp?
|
||||
// Save the RTP packets for find_rtp_packet() to rtx or restore it.
|
||||
source->rtp_queue->push(msg->rtp_packets);
|
||||
|
||||
if ((err = hls->on_video(msg, format)) != srs_success) {
|
||||
// TODO: We should support more strategies.
|
||||
// apply the error strategy for hls.
|
||||
// @see https://github.com/ossrs/srs/issues/264
|
||||
std::string hls_error_strategy = _srs_config->get_hls_on_error(req->vhost);
|
||||
|
|
Loading…
Reference in a new issue