mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
完善代码
This commit is contained in:
parent
a9048b4a4d
commit
4bb9bef320
@ -64,12 +64,13 @@ int main(int argc,char *argv[]){
|
||||
return;
|
||||
}
|
||||
auto player = userData;
|
||||
media = createMedia("app","media");
|
||||
media = createMedia("app","media",0,0,0);
|
||||
if(player_containAudio(player) == 1){
|
||||
media_initAudio(media,
|
||||
player_getAudioChannel(player),
|
||||
player_getAudioSampleBit(player),
|
||||
player_getAudioSampleRate(player));
|
||||
player_getAudioSampleRate(player),
|
||||
0);
|
||||
}
|
||||
|
||||
if(player_containVideo(player) == 1){
|
||||
@ -98,7 +99,7 @@ int main(int argc,char *argv[]){
|
||||
|
||||
////////输入aac///////////
|
||||
if(media){
|
||||
media_inputAAC(media,data,len,timeStamp);
|
||||
media_inputAAC(media,data,len,timeStamp,1);
|
||||
}
|
||||
},player);
|
||||
|
||||
|
@ -173,6 +173,7 @@ void FlvRecorder::startRecord(const string &vhost, const string &app, const stri
|
||||
}
|
||||
|
||||
void FlvRecorder::startRecord(const RtmpMediaSource::Ptr &media, const string &file_path) {
|
||||
stop();
|
||||
lock_guard<recursive_mutex> lck(_file_mtx);
|
||||
//开辟文件写缓存
|
||||
std::shared_ptr<char> fileBuf(new char[FILE_BUF_SIZE],[](char *ptr){
|
||||
|
Loading…
Reference in New Issue
Block a user