rtsp server issue solved

This commit is contained in:
Castillo, Gerard
2014-02-14 14:00:33 +01:00
parent e0fb6a3db7
commit 88657442b5
2 changed files with 16 additions and 23 deletions

View File

@@ -89,7 +89,7 @@ void BasicRTSPOnlySubsession
::setSDPLines() {
//TODO: should be more dynamic
//VStream
if(avType == 1){
if(avType == 1 || avType == 0){
unsigned estBitrate = 5000;
char const* mediaType = "video";
uint8_t rtpPayloadType = 96;
@@ -123,7 +123,7 @@ void BasicRTSPOnlySubsession
fSDPLines = sdpLines;
}
//AStream
if(avType == 2){
if(avType == 2 || avType == 0){
unsigned estBitrate = 384;
char const* mediaType = "audio";
uint8_t rtpPayloadType = 97;
@@ -172,7 +172,7 @@ void BasicRTSPOnlySubsession::getStreamParameters(unsigned clientSessionId,
Port& serverRTCPPort,
void*& streamToken) {
if(Vdestination == NULL && avType == 1){
if(Vdestination == NULL && (avType == 1 || avType == 0)){
if (fSDPLines == NULL){
setSDPLines();
}
@@ -183,7 +183,7 @@ void BasicRTSPOnlySubsession::getStreamParameters(unsigned clientSessionId,
destinationAddr.s_addr = destinationAddress;
Vdestination = new Destinations(destinationAddr, clientRTPPort,clientRTCPPort);
}
if(Adestination == NULL && avType == 2){
if(Adestination == NULL && (avType == 2 || avType == 0)){
if (fSDPLines == NULL){
setSDPLines();
}
@@ -208,8 +208,7 @@ void BasicRTSPOnlySubsession::startStream(unsigned clientSessionId,
struct response *resp = NULL;
if (Vdestination != NULL){
if(avType == 1){
if(avType == 1 || avType == 0){
char pathV[1024];
memset(pathV, 0, sizeof(pathV));
@@ -238,8 +237,7 @@ void BasicRTSPOnlySubsession::startStream(unsigned clientSessionId,
}
if(Adestination != NULL){
if(avType == 2){
if(avType == 2 || avType == 0){
char pathA[1024];
struct msg_sender *msg = (struct msg_sender *)
@@ -271,13 +269,10 @@ void BasicRTSPOnlySubsession::startStream(unsigned clientSessionId,
}
void BasicRTSPOnlySubsession::deleteStream(unsigned clientSessionId, void*& streamToken){
if (Vdestination == NULL){
} else {
char pathV[1024];
Vdestination = NULL;
if(avType == 1 || Vdestination != NULL){
if (Vdestination != NULL){
if(avType == 1 || avType == 0){
char pathV[1024];
Vdestination = NULL;
memset(pathV, 0, sizeof(pathV));
enum module_class path_sender[] = { MODULE_CLASS_SENDER, MODULE_CLASS_NONE };
append_message_path(pathV, sizeof(pathV), path_sender);
@@ -299,13 +294,10 @@ void BasicRTSPOnlySubsession::deleteStream(unsigned clientSessionId, void*& stre
}
}
if(Adestination == NULL){
} else {
char pathA[1024];
Adestination = NULL;
if(avType == 2 || Adestination != NULL){
if(Adestination != NULL){
if(avType == 2 || avType == 0){
char pathA[1024];
Adestination = NULL;
memset(pathA, 0, sizeof(pathA));
enum module_class path_sender[] = { MODULE_CLASS_AUDIO, MODULE_CLASS_SENDER, MODULE_CLASS_NONE };
append_message_path(pathA, sizeof(pathA), path_sender);