rtmp协议metadata设置title字段

This commit is contained in:
xiongziliang 2023-04-21 22:25:06 +08:00
parent ce16a0a9b6
commit bb26fead1e
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ TitleMeta::TitleMeta(float dur_sec, size_t fileSize, const std::map<std::string,
{
_metadata.set("duration", dur_sec);
_metadata.set("fileSize", (int)fileSize);
_metadata.set("server", kServerName);
_metadata.set("title", std::string("Streamed by ") + kServerName);
for (auto &pr : header) {
_metadata.set(pr.first, pr.second);
}

View File

@ -99,7 +99,7 @@ public:
*/
virtual void setMetaData(const AMFValue &metadata) {
_metadata = metadata;
_metadata.set("server", kServerName);
_metadata.set("title", std::string("Streamed by ") + kServerName);
_have_video = _metadata["videocodecid"];
_have_audio = _metadata["audiocodecid"];
if (_ring) {