Skip to content

Commit

Permalink
onebinary: fix toUTF16 namespace conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
iameli committed May 16, 2024
1 parent aaa4713 commit 8fca97c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ onebinary_stuff += 'MistInTS'
# onebinary_stuff += 'MistInTSRIST'
# onebinary_stuff += 'MistInTSSRT'
onebinary_stuff += 'MistOutAAC'
# onebinary_stuff += 'MistOutCMAF'
onebinary_stuff += 'MistOutCMAF'
onebinary_stuff += 'MistOutDTSC'
onebinary_stuff += 'MistOutEBML'
onebinary_stuff += 'MistOutFLAC'
Expand Down
4 changes: 2 additions & 2 deletions src/output/output_cmaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ namespace Mist{
/* Smooth Streaming Manifest Generation */
/****************************************/

std::string toUTF16(const std::string &original){
std::string toUTF16CMAF(const std::string &original){
std::string result;
result.append("\377\376", 2);
for (std::string::const_iterator it = original.begin(); it != original.end(); it++){
Expand Down Expand Up @@ -845,7 +845,7 @@ namespace Mist{
smoothAdaptation("video", vTracks, r);
r << "</SmoothStreamingMedia>\n";

return toUTF16(r.str());
return toUTF16CMAF(r.str());
}

/**********************************/
Expand Down
4 changes: 2 additions & 2 deletions src/output/output_mp4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ std::set<std::string> supportedAudio;
std::set<std::string> supportedVideo;

namespace Mist{
std::string toUTF16(const std::string &original){
std::string toUTF16MP4(const std::string &original){
std::stringstream result;
result << (char)0xFF << (char)0xFE;
for (std::string::const_iterator it = original.begin(); it != original.end(); it++){
Expand Down Expand Up @@ -90,7 +90,7 @@ namespace Mist{


std::string OutMP4::protectionHeader(size_t idx){
std::string tmp = toUTF16(M.getPlayReady(idx));
std::string tmp = toUTF16MP4(M.getPlayReady(idx));
tmp.erase(0, 2); // remove first 2 characters
std::stringstream resGen;
resGen << (char)((tmp.size() + 10) & 0xFF);
Expand Down

0 comments on commit 8fca97c

Please sign in to comment.