Skip to content

Commit e905fce

Browse files
committed
For #1638, #307, add comments in RTMP/RTP message for RTC.
1 parent 9e856c8 commit e905fce

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

trunk/src/app/srs_app_rtp.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ srs_error_t SrsRtpMuxer::frame_to_packet(SrsSharedPtrMessage* shared_frame, SrsF
7777
uint8_t header = sample.bytes[0];
7878
uint8_t nal_type = header & kNalTypeMask;
7979

80+
// TODO: FIXME: Magic number? Doc?
8081
// ignore SEI nal
8182
if (nal_type == 0x06 || nal_type == 0x09) {
8283
continue;
@@ -253,6 +254,7 @@ void SrsRtp::dispose()
253254
}
254255
}
255256

257+
// TODO: FIXME: Dead code?
256258
srs_error_t SrsRtp::cycle()
257259
{
258260
srs_error_t err = srs_success;
@@ -338,7 +340,8 @@ srs_error_t SrsRtp::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* forma
338340
srs_error_t SrsRtp::on_video(SrsSharedPtrMessage* shared_video, SrsFormat* format)
339341
{
340342
srs_error_t err = srs_success;
341-
343+
344+
// TODO: FIXME: Maybe it should config on vhost level.
342345
if (!enabled) {
343346
return err;
344347
}

trunk/src/app/srs_app_source.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1122,15 +1122,20 @@ srs_error_t SrsOriginHub::on_video(SrsSharedPtrMessage* shared_video, bool is_se
11221122
return err;
11231123
}
11241124

1125+
// Parse RTMP message to RTP packets, in FU-A if too large.
11251126
if ((err = rtp->on_video(msg, format)) != srs_success) {
1127+
// TODO: We should support more strategies.
11261128
srs_warn("rtp: ignore video error %s", srs_error_desc(err).c_str());
11271129
srs_error_reset(err);
11281130
rtp->on_unpublish();
11291131
}
11301132

1133+
// TODO: FIXME: Refactor to move to rtp?
1134+
// Save the RTP packets for find_rtp_packet() to rtx or restore it.
11311135
source->rtp_queue->push(msg->rtp_packets);
11321136

11331137
if ((err = hls->on_video(msg, format)) != srs_success) {
1138+
// TODO: We should support more strategies.
11341139
// apply the error strategy for hls.
11351140
// @see https://github.com/ossrs/srs/issues/264
11361141
std::string hls_error_strategy = _srs_config->get_hls_on_error(req->vhost);

0 commit comments

Comments
 (0)