Skip to content
Browse files

#MP1-4113

Change default RTSP max payload size from 1450 to 12288 to ensure CableCARD tuner compatibility.
  • Loading branch information...
1 parent d536b48 commit 03e97750f2b3f9dd834a037b644a6daf8dbb6638 @mm1352000 mm1352000 committed Aug 5, 2013
View
6 DirectShowFilters/MPIPTVSource/MPIPTVSource/MPIPTVSource.ini
@@ -104,15 +104,15 @@ FileOpenConnectionMaximumAttempts = 3
; waiting timeout for receiving data (in ms, multiplies of 1000)
RtspReceiveDataTimeout = 10000
+; maximum payload size that we should expect to receive
+RtspUdpSinkMaxPayloadSize = 12288
+
; minimum UDP port used for communication
RtspUdpPortRangeStart = 45000
; maximum UDP port used for communication
RtspUdpPortRangeEnd = 46000
-; maximum payload size that we should expect to receive
-RtspUdpSinkMaxPayloadSize = 1450
-
; maximum count of tear down requests
RtspTeardownRequestMaximumCount = 5
View
6 DirectShowFilters/MPIPTVSource/MPIPTV_RTSP/MPIPTV_RTSP.cpp
@@ -66,6 +66,7 @@ CMPIPTV_RTSP::CMPIPTV_RTSP()
this->rtspSource = NULL;
this->rtspUdpSink = NULL;
this->rtspUdpGroupsock = NULL;
+ this->rtspUdpSinkMaxPayloadSize = RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT;
this->rtspUdpPortRangeStart = RTSP_UDP_PORT_RANGE_START_DEFAULT;
this->rtspUdpPortRangeEnd = RTSP_UDP_PORT_RANGE_END_DEFAULT;
this->rtspTeardownRequestMaximumCount = RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT_DEFAULT;
@@ -114,17 +115,18 @@ int CMPIPTV_RTSP::Initialize(HANDLE lockMutex, CParameterCollection *configurati
int result = this->CMPIPTV_UDP::Initialize(lockMutex, configuration);
this->receiveDataTimeout = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_RECEIVE_DATA_TIMEOUT, true, RTSP_RECEIVE_DATA_TIMEOUT_DEFAULT);
+ this->rtspUdpSinkMaxPayloadSize = this->configurationParameters->GetValueUnsignedInt(CONFIGURATION_RTSP_UDP_SINK_MAX_PAYLOAD_SIZE, true, RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT);
this->rtspUdpPortRangeStart = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_UDP_PORT_RANGE_START, true, RTSP_UDP_PORT_RANGE_START_DEFAULT);
this->rtspUdpPortRangeEnd = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_UDP_PORT_RANGE_END, true, RTSP_UDP_PORT_RANGE_END_DEFAULT);
- this->rtspUdpSinkMaxPayloadSize = this->configurationParameters->GetValueUnsignedInt(CONFIGURATION_RTSP_UDP_SINK_MAX_PAYLOAD_SIZE, true, RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT);
this->rtspTeardownRequestMaximumCount = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT, true, RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT_DEFAULT);
this->rtspTeardownRequestTimeout = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_TEARDOWN_REQUEST_TIMEOUT, true, RTSP_TEARDOWN_REQUEST_TIMEOUT_DEFAULT);
this->openConnetionMaximumAttempts = this->configurationParameters->GetValueLong(CONFIGURATION_RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS, true, RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS_DEFAULT);
+ this->receiveDataTimeout = (this->receiveDataTimeout < 0) ? RTSP_RECEIVE_DATA_TIMEOUT_DEFAULT : this->receiveDataTimeout;
+ this->rtspUdpSinkMaxPayloadSize = (this->rtspUdpSinkMaxPayloadSize < 0) ? RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT : this->rtspUdpSinkMaxPayloadSize;
this->rtspUdpPortRangeStart = (this->rtspUdpPortRangeStart <= 1024) ? RTSP_UDP_PORT_RANGE_START_DEFAULT : this->rtspUdpPortRangeStart;
this->rtspUdpPortRangeEnd = (this->rtspUdpPortRangeEnd < this->rtspUdpPortRangeStart) ? min(65535, this->rtspUdpPortRangeStart + 1000) : min(65535, this->rtspUdpPortRangeEnd);
this->rtspTeardownRequestMaximumCount = (this->rtspTeardownRequestMaximumCount <= 0) ? RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT_DEFAULT : this->rtspTeardownRequestMaximumCount;
- this->receiveDataTimeout = (this->receiveDataTimeout < 0) ? RTSP_RECEIVE_DATA_TIMEOUT_DEFAULT : this->receiveDataTimeout;
this->rtspTeardownRequestTimeout = (this->rtspTeardownRequestTimeout < 0) ? RTSP_TEARDOWN_REQUEST_TIMEOUT_DEFAULT : this->rtspTeardownRequestTimeout;
this->openConnetionMaximumAttempts = (this->openConnetionMaximumAttempts < 0) ? RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS_DEFAULT : this->openConnetionMaximumAttempts;
View
4 DirectShowFilters/MPIPTVSource/MPIPTV_RTSP/MPIPTV_RTSP.h
@@ -36,19 +36,19 @@
// we should get data in ten seconds
#define RTSP_RECEIVE_DATA_TIMEOUT_DEFAULT 10000
#define RTSP_PORT_DEFAULT 554
+#define RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT 12288
#define RTSP_UDP_PORT_RANGE_START_DEFAULT 45000
#define RTSP_UDP_PORT_RANGE_END_DEFAULT 46000
-#define RTSP_UDP_SINK_MAX_PAYLOAD_SIZE_DEFAULT 1450
#define RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT_DEFAULT 5
#define RTSP_TEARDOWN_REQUEST_TIMEOUT_DEFAULT 100
#define RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS_DEFAULT 3
#define CONFIGURATION_SECTION_RTSP _T("RTSP")
#define CONFIGURATION_RTSP_RECEIVE_DATA_TIMEOUT _T("RtspReceiveDataTimeout")
+#define CONFIGURATION_RTSP_UDP_SINK_MAX_PAYLOAD_SIZE _T("RtspUdpSinkMaxPayloadSize")
#define CONFIGURATION_RTSP_UDP_PORT_RANGE_START _T("RtspUdpPortRangeStart")
#define CONFIGURATION_RTSP_UDP_PORT_RANGE_END _T("RtspUdpPortRangeEnd")
-#define CONFIGURATION_RTSP_UDP_SINK_MAX_PAYLOAD_SIZE _T("RtspUdpSinkMaxPayloadSize")
#define CONFIGURATION_RTSP_TEARDOWN_REQUEST_MAXIMUM_COUNT _T("RtspTeardownRequestMaximumCount")
#define CONFIGURATION_RTSP_TEARDOWN_REQUEST_TIMEOUT _T("RtspTeardownRequestTimeout")
#define CONFIGURATION_RTSP_OPEN_CONNECTION_MAXIMUM_ATTEMPTS _T("RtspOpenConnectionMaximumAttempts")

0 comments on commit 03e9775

Please sign in to comment.
Something went wrong with that request. Please try again.