Elecard
May 22, 2013, 02:24:40 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Configuring RTSP Source filter  (Read 2091 times)
Arianit
Newbie
*
Posts: 30


View Profile
« on: May 24, 2010, 06:00:08 am »

I have problems with the following code which is taken from SDK:

   CComPtr<IModuleConfig> rtsp_config;
   HRESULT hr = m_fNWSourceRTSP->QueryInterface(IID_IModuleConfig, (void**)&rtsp_config);
   if (FAILED(hr))
      return hr;

   CComVariant val;
   //val = m_cur_config.rtsp_config.server_url.c_str();
   val.vt = VT_BSTR;
   val.bstrVal = SysAllocString(m_cCurrentConfig.rtsp_config.server_url.c_str());
   hr = rtsp_config->SetValue(&ERTSP_server_url, &val);
 /*******  This Allways returns E_UNEXPECTED  *******/
            if (FAILED(hr))
      return hr;
Logged
IrinaM
Moderator
*****
Posts: 139


View Profile
« Reply #1 on: May 24, 2010, 07:26:43 pm »

Hello Arianit,
I think you use wrong type of server URL. 
The Elecard RTSP NetSource filter requests the selected media file from VOD server with string of the following type:
             elecard_rtsp://server_address:port[/data_path]
where
             server_address – server IP address
             port – number of port used for RTSP connections (unsigned integer value from 1 to 65535; default value is 554)
             data_path – media file for playback

For example: elecard_rtsp://127.0.0.1:554/movie.mpg
Logged
Arianit
Newbie
*
Posts: 30


View Profile
« Reply #2 on: May 25, 2010, 01:49:12 am »

Hi Irina,
I would expect to see that problem (wrong type of URL) later on , when I try to run the graph. This is still in the phase of trying to configure the RTSP source filter. I tried different formats of URL: with IP, with dns name, with port without port number it just doesn’t like the SetValue(&ERTSP_server_url, &val); and it always always returns E_UNEXPECTED  *******/. This seems to be behaviour as if I try to set value of a parameter with the wrong vt type.
I tried in two ways by not setting vt:
   CComVariant val;
   val = m_cur_config.rtsp_config.server_url.c_str();
   hr = rtsp_config->SetValue(&ERTSP_server_url, &val);
Or setting vt:
CComVariant val;
 val.vt = VT_BSTR;
 val.bstrVal = SysAllocString(m_cCurrentConfig.rtsp_config.server_url.c_str());
 hr = rtsp_config->SetValue(&ERTSP_server_url, &val);

Again all the code has been lifted from you SDK and the graph is not running yet at this point.
By the way thank you very much for your prompt replies.
Logged
IrinaM
Moderator
*****
Posts: 139


View Profile
« Reply #3 on: May 25, 2010, 08:46:01 pm »

Arianit, what server application do you use? Elecard VOD Server? Maybe server application has wrong settings.
Do you try to use other client (for example, VLC Player) for playing this RTSP request? What results?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!