Digital Devices Octopus NET CT/2 Erfahrungen? | Page 10

Discussion in 'TV-Karten' started by Deichgraf, October 21, 2013.

  1. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,518
    Likes Received:
    4,730
    Ratings:
    +8,196 / 17
    Home Country:
    New Zealand New Zealand
    If I've understood correctly then the answer is yes.

    https://github.com/MediaPortal/Medi...Library/Implementations/TunerDetector.cs#L631



    That function is called [by event from the MP2 UPnP library] on SSDP byebye. It is intended to tell the TV service controller that the tuner is no longer available, then unload the tuner. Unloading the tuner will free all sub-channels, which will close all RTSP/RTP and RTCP connections.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. KayDiefenthal
    • Premium Supporter

    KayDiefenthal MP Donator

    Joined:
    July 18, 2006
    Messages:
    1,115
    Likes Received:
    71
    Occupation:
    Carpenter, Electrican
    Location:
    Germany - Bonn
    Ratings:
    +89 / 0
    Home Country:
    Germany Germany
    ok you had think on it

    had in the last time only apps seen where Notify and M-Search Responses are ignored
    so is the Problem that the Client inst informed that the Server Connection was lost some of Sat>Ip Receivers had this Problem too
    the Inverto idl 6650n webedition as Exsample
     
  4. KayDiefenthal
    • Premium Supporter

    KayDiefenthal MP Donator

    Joined:
    July 18, 2006
    Messages:
    1,115
    Likes Received:
    71
    Occupation:
    Carpenter, Electrican
    Location:
    Germany - Bonn
    Ratings:
    +89 / 0
    Home Country:
    Germany Germany
    i have buy a new SatIpServer Triax Tss 400 and test it with the current rtsp code
    and there are Problems with Responses

    RtspResponse.cs had this line

    the regex Match is false

    response._body = sections[1];
    and throw an out of index Exception
    so had i look what is the responseString and it is "" aka string.empty

    at moment had i no idea from where the Problem Comes
     
  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,518
    Likes Received:
    4,730
    Ratings:
    +8,196 / 17
    Home Country:
    New Zealand New Zealand
    Hello Kay

    If this regex does not match:
    Code (Text):
    1. Match m = REGEX_STATUS_LINE.Match(responseString);
    ...then it will be a problem.
    Can you provide a Wireshark trace?

    Regards and thanks,
    mm
    :)
     
  6. KayDiefenthal
    • Premium Supporter

    KayDiefenthal MP Donator

    Joined:
    July 18, 2006
    Messages:
    1,115
    Likes Received:
    71
    Occupation:
    Carpenter, Electrican
    Location:
    Germany - Bonn
    Ratings:
    +89 / 0
    Home Country:
    Germany Germany
    sure have both added one is created with dvbviewer as reference
     

    Attached Files:

    • Thank You! Thank You! x 1
  7. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,518
    Likes Received:
    4,730
    Ratings:
    +8,196 / 17
    Home Country:
    New Zealand New Zealand
    Thanks Kay! :) (y)

    My guess is that the SAT>IP server doesn't like the RTSP SETUP request (packet number 62). The response (packet number 64) is a request to close the TCP connection.

    If I'm right, the question is what is wrong with the SETUP request.

    The request:
    DVBViewer's request:
    Differences:
    • order of SETUP parameters
    • PIDs parameter value
    • space between "...pids=... RTSP/1.0" (DVBViewer only has one space)
    • order of headers (CSeq, Transport)
    • client port
    I think the problem could be number 3.

    I don't see any reason that my code would insert two spaces there. In fact, my code uses a different order for the parameters (src, freq, pol, sr, fec, msys, mtype, plts, ro, pids):
    https://github.com/MediaPortal/Medi...ementations/SatIp/TunerSatIpSatellite.cs#L144
    https://github.com/MediaPortal/Medi...ementations/SatIp/TunerSatIpSatellite.cs#L199

    Are you using different code? ;)
    In any case, please try to remove the extra space.
     
  8. KayDiefenthal
    • Premium Supporter

    KayDiefenthal MP Donator

    Joined:
    July 18, 2006
    Messages:
    1,115
    Likes Received:
    71
    Occupation:
    Carpenter, Electrican
    Location:
    Germany - Bonn
    Ratings:
    +89 / 0
    Home Country:
    Germany Germany
    think i had it

    Code (Text):
    1. publicRtspStatusCode SendRequest(RtspRequest request, out RtspResponse response)
    2. {
    3. response = null;
    4. lock (_lockObject)
    5. {
    6. NetworkStream stream = null;
    7. int retryCount = 0;
    8. while (true)
    9. {
    10. try
    11. {
    12. if (_client == null)
    13. {
    14. _client = newTcpClient(_serverHost, _serverPort);
    15. }
    16. }
    17. catch (Exception ex)
    18. {
    19. //this.LogError(ex, "RTSP: failed to connect to server");
    20. returnRtspStatusCode.RequestTimeOut;
    21. }
    22. try
    23. {
    24. //this is new
    25. if ((_client!= null)&&(!_client.Connected))
    26. {
    27. _client.Connect(IPAddress.Parse(_serverHost), _serverPort);
    28. }
    29. stream = _client.GetStream();
    30. if (stream == null)
    31. {
    32. thrownewException();
    33. }
    34. break;
    35. }
    36. catch (Exception ex)
    37. {
    38. _client.Close();
    39. _client = null;
    40. if (retryCount == 1)
    41. {
    42. // this.LogError(ex, "RTSP: failed to open stream to server");
    43. returnRtspStatusCode.RequestTimeOut;
    44. }
    45. retryCount++;
    46. }
    47. }
    48. try
    49. {
    50. // Send the request and get the response.
    51. request.Headers.Add("CSeq", _cseq.ToString());
    52. _cseq++;
    53. byte[] requestBytes = request.Serialise();
    54. stream.Write(requestBytes, 0, requestBytes.Length);
    55. byte[] responseBytes = newbyte[_client.ReceiveBufferSize];
    56. int byteCount = stream.Read(responseBytes, 0, responseBytes.Length);
    57. response = RtspResponse.Deserialise(responseBytes, byteCount);
    58. // Did we get the whole response?
    59. string contentLengthString;
    60. int contentLength = 0;
    61. if (response.Headers.TryGetValue("Content-Length", out contentLengthString))
    62. {
    63. contentLength = int.Parse(contentLengthString);
    64. if ((string.IsNullOrEmpty(response.Body) && contentLength > 0) || response.Body.Length < contentLength)
    65. {
    66. if (response.Body == null)
    67. {
    68. response.Body = string.Empty;
    69. }
    70. while (byteCount > 0 && response.Body.Length < contentLength)
    71. {
    72. byteCount = stream.Read(responseBytes, 0, responseBytes.Length);
    73. response.Body += System.Text.Encoding.UTF8.GetString(responseBytes, 0, byteCount);
    74. }
    75. }
    76. }
    77. return response.StatusCode;
    78. }
    79. finally
    80. {
    81. stream.Close();
    82. }
    83. }
    84. }
    i had add this
    if ((_client!= null)&&(!_client.Connected))
    {
    _client.Connect(IPAddress.Parse(_serverHost), _serverPort);
    }


    so recieves it a Response
     
  9. KayDiefenthal
    • Premium Supporter

    KayDiefenthal MP Donator

    Joined:
    July 18, 2006
    Messages:
    1,115
    Likes Received:
    71
    Occupation:
    Carpenter, Electrican
    Location:
    Germany - Bonn
    Ratings:
    +89 / 0
    Home Country:
    Germany Germany
    hi mm to the whitespaces if i dont use rtspclient.cs and use a socket

    with this code

    Code (Text):
    1.  
    2. privatevoid Connect()
    3.  
    4. {
    5.  
    6. _rtspSocket = newSocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
    7.  
    8. var ip = IPAddress.Parse(RtspDevice.Address);
    9.  
    10. var rtspEndpoint = newIPEndPoint(ip, 554);
    11.  
    12. _rtspSocket.Connect(rtspEndpoint);
    13.  
    14. }
    15.  
    16. privatevoid Disconnect()
    17.  
    18. {
    19.  
    20. if (_rtspSocket != null && _rtspSocket.Connected)
    21.  
    22. {
    23.  
    24. _rtspSocket.Shutdown(SocketShutdown.Both);
    25.  
    26. _rtspSocket.Close();
    27.  
    28. }
    29.  
    30. }
    31.  
    32. privatevoid SendRequest(RtspRequest request)
    33.  
    34. {
    35.  
    36. if (_rtspSocket == null)
    37.  
    38. {
    39.  
    40. }
    41.  
    42. try
    43.  
    44. {
    45.  
    46. request.Headers.Add("CSeq", _rtspSequenceNum.ToString());
    47.  
    48. _rtspSequenceNum++;
    49.  
    50. byte[] requestBytes = request.Serialise();
    51.  
    52. var requestBytesCount = _rtspSocket.Send(requestBytes, requestBytes.Length, SocketFlags.None);
    53.  
    54. if (requestBytesCount < 1)
    55.  
    56. {
    57.  
    58. }
    59.  
    60. }
    61.  
    62. catch (Exception e)
    63.  
    64. {
    65.  
    66. }
    67.  
    68. }
    69.  
    70. privatevoid ReceiveResponse(outRtspResponse response)
    71.  
    72. {
    73.  
    74. response = null;
    75.  
    76. var responseBytesCount = 0;
    77.  
    78. byte[] responseBytes = newbyte[1024];
    79.  
    80. try
    81.  
    82. {
    83.  
    84. responseBytesCount = _rtspSocket.Receive(responseBytes, responseBytes.Length, SocketFlags.None);
    85.  
    86. response = RtspResponse.Deserialise(responseBytes, responseBytesCount);
    87.  
    88. string contentLengthString;
    89.  
    90. int contentLength = 0;
    91.  
    92. if (response.Headers.TryGetValue("Content-Length", out contentLengthString))
    93.  
    94. {
    95.  
    96. contentLength = int.Parse(contentLengthString);
    97.  
    98. if ((string.IsNullOrEmpty(response.Body) && contentLength > 0) || response.Body.Length < contentLength)
    99.  
    100. {
    101.  
    102. if (response.Body == null)
    103.  
    104. {
    105.  
    106. response.Body = string.Empty;
    107.  
    108. }
    109.  
    110. while (responseBytesCount > 0 && response.Body.Length < contentLength)
    111.  
    112. {
    113.  
    114. responseBytesCount = _rtspSocket.Receive(responseBytes, responseBytes.Length, SocketFlags.None);
    115.  
    116. response.Body += System.Text.Encoding.UTF8.GetString(responseBytes, 0, responseBytesCount);
    117.  
    118. }
    119.  
    120. }
    121.  
    122. }
    123.  
    124. }
    125.  
    126. catch (SocketException)
    127.  
    128. {
    129.  
    130. }
    131.  
    132. }
    133.  
    134.  
    have i only one whitespace and working too
    but sometimes is the sessionid not found and the Triax stopp the Streaming but on this look i at time
     
  10. KayDiefenthal
    • Premium Supporter

    KayDiefenthal MP Donator

    Joined:
    July 18, 2006
    Messages:
    1,115
    Likes Received:
    71
    Occupation:
    Carpenter, Electrican
    Location:
    Germany - Bonn
    Ratings:
    +89 / 0
    Home Country:
    Germany Germany
    an Little hint for @mm1352000

    in rtspresponse.cs use you that to become the headers and their values
    Code (Text):
    1.  
    2. response._headers = new Dictionary<string, string>();
    3. foreach (var headerInfo in headers.Select(header => header.Split(  ':' )))
    4. {
    5. response._headers.Add(headerInfo[0], headerInfo[1].Trim());
    6. }
    7.  
    but that produce an Problem with the Rtp-Info Header from Play Response
    RTP-Info:url=rtsp://192.168.2.102/stream=6;seq=55977
    the result with your code is than RTP-Info "url=rtsp" and not "url=rtsp://192.168.2.102/stream=6;seq=55977"

    the littele fix for that can be
    Code (Text):
    1.  
    2. response._headers = new Dictionary<string, string>();
    3. foreach (var headerInfo in headers.Select(header => header.Split(new char[] { ':' }, 2)))
    4. {
    5. response._headers.Add(headerInfo[0], headerInfo[1].Trim());
    6. }
    7.  
    so is the Header RTP-Info with the value url=rtsp://192.168.2.102/stream=6;seq=55977
    and an regex for stream and seq values can be

    @"stream=(\d+);seq=(\d+)"
     
    • Thank You! Thank You! x 1
  11. visionsurfer

    visionsurfer Portal Pro

    Joined:
    September 18, 2006
    Messages:
    206
    Likes Received:
    4
    Ratings:
    +4 / 0
    Home Country:
    Germany Germany
    Guten Morgen,

    ich brauche neue TV Karten und ich bin am überlegen ob ich mir gleich die Digital Device SAT - IP Octopus Box kaufe.
    Funktioniert das ohne Probleme mit MP ? Wie ist da der Stand der Dinge ?

    Wenn es funktioniert, stellt sich noch die Frage, ob es so zuverlässig funktioniert, als wenn ich im TV Server direkt die TV Karten installiert hätte ? Also auch Reaktionen und Umschaltzeiten usw. ?

    Würde mich freuen zu erfahren wie der aktuelle Stand ist ? Das letzte Posting ist ja schon ein bisschen her.

    Grüße,
    Visionsurfer
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!