mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine codec, extract avc aac codec to app.
This commit is contained in:
parent
3dbe8ba9de
commit
6286759eaa
11 changed files with 715 additions and 616 deletions
|
@ -44,6 +44,7 @@ using namespace std;
|
|||
#include <srs_protocol_rtmp.hpp>
|
||||
#include <srs_app_pithy_print.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
#include <srs_app_avc_aac.hpp>
|
||||
|
||||
// max PES packets size to flush the video.
|
||||
#define SRS_AUTO_HLS_AUDIO_CACHE_SIZE 1024 * 1024
|
||||
|
@ -1014,7 +1015,7 @@ int SrsHlsCache::on_sequence_header(SrsHlsMuxer* muxer)
|
|||
return muxer->on_sequence_header();
|
||||
}
|
||||
|
||||
int SrsHlsCache::write_audio(SrsCodec* codec, SrsHlsMuxer* muxer, int64_t pts, SrsCodecSample* sample)
|
||||
int SrsHlsCache::write_audio(SrsAvcAacCodec* codec, SrsHlsMuxer* muxer, int64_t pts, SrsCodecSample* sample)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -1062,7 +1063,7 @@ int SrsHlsCache::write_audio(SrsCodec* codec, SrsHlsMuxer* muxer, int64_t pts, S
|
|||
}
|
||||
|
||||
int SrsHlsCache::write_video(
|
||||
SrsCodec* codec, SrsHlsMuxer* muxer, int64_t dts, SrsCodecSample* sample)
|
||||
SrsAvcAacCodec* codec, SrsHlsMuxer* muxer, int64_t dts, SrsCodecSample* sample)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -1123,7 +1124,7 @@ int SrsHlsCache::reap_segment(string log_desc, SrsHlsMuxer* muxer, int64_t segme
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsHlsCache::cache_audio(SrsCodec* codec, SrsCodecSample* sample)
|
||||
int SrsHlsCache::cache_audio(SrsAvcAacCodec* codec, SrsCodecSample* sample)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -1190,7 +1191,7 @@ int SrsHlsCache::cache_audio(SrsCodec* codec, SrsCodecSample* sample)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsHlsCache::cache_video(SrsCodec* codec, SrsCodecSample* sample)
|
||||
int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -1262,7 +1263,7 @@ SrsHls::SrsHls(SrsSource* _source)
|
|||
hls_enabled = false;
|
||||
|
||||
source = _source;
|
||||
codec = new SrsCodec();
|
||||
codec = new SrsAvcAacCodec();
|
||||
sample = new SrsCodecSample();
|
||||
jitter = new SrsRtmpJitter();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue