-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transmux RTC to RTMP. #2252
Transmux RTC to RTMP. #2252
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2252 +/- ##
===========================================
- Coverage 55.55% 55.11% -0.45%
===========================================
Files 126 126
Lines 55494 55887 +393
===========================================
- Hits 30832 30801 -31
- Misses 24662 25086 +424 | Impacted Files | Coverage Δ | |' '| Impacted Files | Coverage Δ | | Continue to review full report at Codecov.
|
@@ -1,9 +1,11 @@ | |||
static const AVCodec * const codec_list[] = { | |||
&ff_aac_encoder, | |||
&ff_opus_encoder, | |||
&ff_libfdk_aac_encoder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FDK aac has a LICENSE issue, I remember it is GPL or something like that, SRS cannot use this LICENSE.
At most, SRS can only use LGPL and link it with so library. Of course, there is no problem with Apache, BSD, and MIT licenses.
TRANS_BY_GPT3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that to say that the source code of fdk aac cannot be used to compile ffmpeg, and instead we need to use the .so library to compile ffmpeg, and then call fdk aac through ffmpeg's interface?
TRANS_BY_GPT3
codec_ctx_->frame_size = frame_->nb_samples; | ||
} | ||
|
||
if (SrsAudioCodecIdAAC == codec_id_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic seems to be somewhat unreasonable. Does FFmpeg have a corresponding function to implement copying?
TRANS_BY_GPT3
@@ -416,6 +432,10 @@ SrsAudioRecode::SrsAudioRecode(SrsAudioCodecId src_codec, SrsAudioCodecId dst_co | |||
dec_ = NULL; | |||
enc_ = NULL; | |||
resample_ = NULL; | |||
|
|||
fw_audio_dec = new SrsFileWriter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug code?
TRANS_BY_GPT3
@@ -1273,6 +1275,157 @@ SrsRtpFrameBufferEnum SrsRtpJitterBuffer::InsertPacket(uint16_t seq, uint32_t ts | |||
return buffer_state; | |||
} | |||
|
|||
|
|||
#if 1 | |||
SrsRtpFrameBufferEnum SrsRtpJitterBuffer::InsertPacket2(const SrsRtpPacket2 *pkt, const char*nalu, int nalu_len, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug code?
TRANS_BY_GPT3
} | ||
|
||
|
||
//TODO:huping modify. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it commented out?
TRANS_BY_GPT3
@@ -498,6 +499,7 @@ class ISrsSourceBridger | |||
virtual srs_error_t on_audio(SrsSharedPtrMessage* audio) = 0; | |||
virtual srs_error_t on_video(SrsSharedPtrMessage* video) = 0; | |||
virtual void on_unpublish() = 0; | |||
virtual srs_error_t on_rtp(SrsRtpPacket2* pkt) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on_audio/on_video
is the frame processing function for RTMP.
on_rtp
is the packet processing function for RTP.
It is not ideal to have these two APIs together.
TRANS_BY_GPT3
Fixed by #2303 |
Hello srs maintainer:
The functionality of converting RTC to RTMP has been implemented based on the concept of srs birdger. This includes transcoding opus to aac and using jitter buffer to frame h264.
Issue:
#2200
TRANS_BY_GPT3