Commit af93e1bc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove non-standard HTTP announce

(VLC no longer supports them anyway)
parent e37f8365
......@@ -161,16 +161,7 @@ void Message::AddProgram(Program *p)
fprintf(stderr, "Non permanent program not supported ...\n");
fprintf(stderr, "Announcing permanent session instead\n");
}
string m="m=video "+p->GetPort()+" ";
if( p->IsHTTP() )
{
m+="http 33\n";
}
else
{
m+="udp 33\n";
}
string m="m=video "+p->GetPort()+" udp 33\n";
string c;
......@@ -179,17 +170,8 @@ void Message::AddProgram(Program *p)
else
c="c=IN IP4 "+p->GetAddress()+"/"+p->GetTTL()+"\n";
// TODO ttl type should be specified
string a;
if( p->IsHTTP() )
{
a+= "a=type:http\n";
a+= "a=http-path:"+p->GetHTTPPath()+"\n";
}
else
{
a= "a=type:udp\n";
}
string a= "a=type:udp\n";
a+= "a=mux:m2t\n";
a+= "a=packetformat:RAW\n";
a+= "a=tool:"+(string)PACKAGE_STRING+"\n";
......
......@@ -335,18 +335,6 @@ int Config::Parse()
pp->SetIPVersion(tline);
}
if(strstr(line,"type=") && strstr(line,"http") )
{
pp->SetHTTP(true);
}
if(strstr(line,"path="))
{
strgeta(line,tline,'=');
something=1;
pp->SetHTTPPath(tline);
}
if(strstr(line,"playlist_group="))
{
char *tptr, *uptr, uline[6139];
......
......@@ -33,7 +33,7 @@ using namespace std;
#include "program.h"
Program::Program() : b_http(false), b_has_pl_group(false)
Program::Program() : b_has_pl_group(false)
{
/* Set default Values */
address="";
......@@ -55,22 +55,18 @@ string Program::GetSite(void) {return site;}
string Program::GetAddress(void){return address;}
string Program::GetPort(void){return port;}
string Program::GetTTL(void){return program_ttl;}
string Program::GetHTTPPath(void){return http_path;}
string Program::GetPlGroup(void){return pl_group;}
int Program::GetIPVersion(void){return program_ipversion;};
bool Program::IsPermanent(void){return permanent;}
bool Program::IsHTTP(void){return b_http;}
bool Program::HasPlGroup(void){return b_has_pl_group;}
void Program::SetHTTP(bool b){b_http = b;}
void Program::SetName(char* n){name=n;}
void Program::SetUser(char* u){user=u;}
void Program::SetMachine(char* m){machine=m;}
void Program::SetSite(char* s){site=s;}
void Program::SetAddress(char* a){address=a;}
void Program::SetHTTPPath(char *h){http_path=h;}
void Program::SetPlGroup(char *h){pl_group=h;}
void Program::SetHasPlGroup(bool b){b_has_pl_group = b ;}
void Program::SetPort(char* p)
......@@ -86,7 +82,7 @@ void Program::SetTTL(char *p){program_ttl=p;}
void Program::SetIPVersion(char *p){program_ipversion=atoi(p);}
Program::Program(string n, string u, string m, string s, string a,string p)
: program_ipversion(4), b_http (false), b_has_pl_group (false)
: program_ipversion(4), b_has_pl_group (false)
{
name=n;
user=u;
......
......@@ -37,7 +37,6 @@ class Program
string GetAddress();
string GetPort();
string GetTTL();
string GetHTTPPath();
string GetPlGroup();
int GetIPVersion();
......@@ -49,14 +48,11 @@ class Program
void SetAddress(char*);
void SetPort(char *);
void SetTTL(char *);
void SetHTTPPath(char *);
void SetPlGroup(char *);
void SetHasPlGroup(bool);
void SetIPVersion(char *);
void SetHTTP(bool);
bool IsPermanent();
bool IsHTTP();
bool HasPlGroup();
private:
......@@ -67,11 +63,9 @@ class Program
string address;
string port;
string program_ttl;
string http_path;
string pl_group;
int program_ipversion;
bool permanent;
bool b_http;
bool b_has_pl_group;
uint32_t start_time;
uint32_t stop_time;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment