Allow overriding application name with -DAPPNAME="Name here"
This commit is contained in:
parent
a8e04e1787
commit
771fad390a
21 changed files with 57 additions and 49 deletions
|
@ -21,6 +21,7 @@
|
|||
#define PRETTY_ARG_MSTIME(t) PRETTY_ARG_TIME(t / 1000), (int)(t % 1000)
|
||||
#if DEBUG > -1
|
||||
|
||||
#define APPIDENT APPNAME "/" PACKAGE_VERSION
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#include "config.h"
|
||||
#include <inttypes.h>
|
||||
|
|
|
@ -117,7 +117,11 @@ namespace HTTP{
|
|||
}
|
||||
|
||||
if (method.size()){H.method = method;}
|
||||
H.SetHeader("User-Agent", "MistServer " PACKAGE_VERSION);
|
||||
if (link.host.find("mistserver") != std::string::npos){
|
||||
H.SetHeader("User-Agent", "MistServer" PACKAGE_VERSION);
|
||||
}else{
|
||||
H.SetHeader("User-Agent", APPIDENT);
|
||||
}
|
||||
H.SetHeader("X-Version", PACKAGE_VERSION);
|
||||
H.SetHeader("Accept", "*/*");
|
||||
if (authStr.size() && (link.user.size() || link.pass.size())){
|
||||
|
|
|
@ -840,7 +840,7 @@ namespace SDP{
|
|||
|
||||
M.setCodec(tid, codecRTP2Mist(answerVideoFormat.encodingName));
|
||||
if (M.getCodec(tid).empty()){
|
||||
FAIL_MSG("Failed to convert the format codec into one that MistServer understands. %s.",
|
||||
FAIL_MSG("Failed to convert the format codec into one that " APPNAME " understands. %s.",
|
||||
answerVideoFormat.encodingName.c_str());
|
||||
return false;
|
||||
}
|
||||
|
@ -859,7 +859,7 @@ namespace SDP{
|
|||
|
||||
M.setCodec(tid, codecRTP2Mist(answerAudioFormat.encodingName));
|
||||
if (M.getCodec(tid).empty()){
|
||||
FAIL_MSG("Failed to convert the format codec into one that MistServer understands. %s.",
|
||||
FAIL_MSG("Failed to convert the format codec into one that " APPNAME " understands. %s.",
|
||||
answerAudioFormat.encodingName.c_str());
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1515,9 +1515,10 @@ namespace TS{
|
|||
entry.setFreeCAM(true); // Not conditional access
|
||||
std::string sdti;
|
||||
sdti += (char)0x48;
|
||||
sdti += (char)(15 + streamName.size()); // length
|
||||
sdti += (char)(4 + strlen(APPNAME) + streamName.size()); // length
|
||||
sdti += (char)1; // digital television service
|
||||
sdti.append("\012MistServer");
|
||||
sdti += (char)strlen(APPNAME);
|
||||
sdti.append(APPNAME);
|
||||
sdti += (char)streamName.size();
|
||||
sdti.append(streamName);
|
||||
entry.setESInfo(sdti);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue