Arianit
Newbie

Posts: 30
|
 |
« on: May 17, 2010, 06:42:36 am » |
|
The graph is up and running but I need to check if the stream is still present on the input of NWSourcePlus. Any idea as how can this be done? Also after the demux I need to check if there is audio and/or video data present. Does samplegraber have to be used in this case? Or is there a way to do so from the demuxer directly? Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
IrinaM
|
 |
« Reply #1 on: May 18, 2010, 11:01:51 pm » |
|
Hello Arianit, The graph is up and running but I need to check if the stream is still present on the input of NWSourcePlus. Any idea as how can this be done? In GraphEdit you can see label "OK. Data present." or "Data not available." on the "Advanced settings" page of NWSource-Plus properties dialog. You can get this information programmatically using ENS_data_enable and ENS_data_null notifications. The NWSource-Plus filter sends them continuously during the work. If data is not available more then timeout value (you can get or set it using ENS_timeout property) the NWSource filter sends the EC_COMPLETE event. Also after the demux I need to check if there is audio and/or video data present. Does samplegraber have to be used in this case? Or is there a way to do so from the demuxer directly? Sorry, I do not understand what you want to get. If the NWSource-Plus filter is connected with the Push Demuxer and the Push Demuxer created output pins, it usually means that data is present. You can use Renderer filters and check it.
|
|
|
|
|
Logged
|
|
|
|
Arianit
Newbie

Posts: 30
|
 |
« Reply #2 on: May 19, 2010, 12:57:06 am » |
|
In GraphEdit you can see label "OK. Data present." or "Data not available." on the "Advanced settings" page of NWSource-Plus properties dialog. You can get this information programmatically using ENS_data_enable and ENS_data_null notifications. The NWSource-Plus filter sends them continuously during the work. If data is not available more then timeout value (you can get or set it using ENS_timeout property) the NWSource filter sends the EC_COMPLETE event. Thank you Irina. I'll try this out. Sorry, I do not understand what you want to get. If the NWSource-Plus filter is connected with the Push Demuxer and the Push Demuxer created output pins, it usually means that data is present. You can use Renderer filters and check it.
OK, What I'm trying to say is the case when, say there was audio present when the graph was setup but after a certain time there is no audio any more on the stream.
|
|
|
|
|
Logged
|
|
|
|
|
IrinaM
|
 |
« Reply #3 on: May 19, 2010, 10:46:21 pm » |
|
OK, What I'm trying to say is the case when, say there was audio present when the graph was setup but after a certain time there is no audio any more on the stream. You can use SampleGraber in this case or you can dump received stream to a file: Elecard NWSource-Plus Filter -> Elecard Sink Filter, and then you can try to demux it using Elecard MPEG Demultiplexer and Elecard Push Demultiplexer (graph in this case: File Source (Async) -> Elecard Stream Pump -> Elecard Push Demultiplexer -> ...). If you will get different results then problem is in Push Demultiplexer. Are you sure that audio data is present on broadcasting side? If YES and you can see video when audio disappears, it means that NWSource can receive TS. So, in this case the problem is in a stream or in demuxer
|
|
|
|
|
Logged
|
|
|
|
Arianit
Newbie

Posts: 30
|
 |
« Reply #4 on: May 20, 2010, 12:54:03 am » |
|
No, I'm not sure that audio is present on the broadcasting side and this is precisely what I'm trying to establish. There is live transcoding going on. On start there is audio present and demux confirms it, and I want to make sure (as it is live transcoding there isn't time to sink this into a file and test afterwards) that there is audio always, if not, raise the alarm.
|
|
|
|
|
Logged
|
|
|
|
|
IrinaM
|
 |
« Reply #5 on: May 20, 2010, 11:39:10 pm » |
|
Arianit, I understood what you want to do.  However for the test purposes I recommend to you to use not only SampleGraber, but also to dump a received stream in a file and analyze it. After dumping you can check if audio disappears in received transport stream or it is the problem of a components. In this case you can build graph like this: NWSource-Plus -> InfTee -> PushDemuxer -> SampleGraber1 -> ... -> SampleGraber2 -> ... ... -> Sink Filter
|
|
|
|
|
Logged
|
|
|
|
Arianit
Newbie

Posts: 30
|
 |
« Reply #6 on: June 25, 2010, 01:02:05 am » |
|
Hi Irina The following topic was helpful in what I'm trying to do http://www.elecard.com/forum/index.php?topic=3544.0Now I'm facing a different problem. I have more than one NWSourcePlus filter in the graph, and when I receive notification I can't tell which one has no data. So I subscribe for notifications for all sources and then I receive a notification but don't know from which source it has come. How can I find out this?
|
|
|
|
|
Logged
|
|
|
|
|
IrinaM
|
 |
« Reply #7 on: June 27, 2010, 07:57:14 pm » |
|
Hi Arianit,
For example, you can create new object of the Config class (class inhereted from IModuleCallback) for each NWSource filter. See NWPlayer sample code.
|
|
|
|
« Last Edit: June 27, 2010, 07:59:03 pm by IrinaM »
|
Logged
|
|
|
|
Arianit
Newbie

Posts: 30
|
 |
« Reply #8 on: June 29, 2010, 06:11:19 am » |
|
Irina, I need some extra help on this. This is what I'm doing to register callbacks // subscride notifyes HRESULT EEngine::SubscribeNotify(IModuleCallback *module_callback) { HRESULT hr = S_OK; for (vector<CFilterWrapper*>::iterator i = m_pvfNWSourcePlus.begin(); i != m_pvfNWSourcePlus.end(); i++) { if(m_cNWSourceConfig) { m_cNWSourceConfig.Release(); } hr = (*i)->QueryInterface(&m_cNWSourceConfig); if (m_cNWSourceConfig == NULL) return E_UNEXPECTED;
hr = m_cNWSourceConfig->RegisterForNotifies(module_callback); } return hr; } and this is my callback HRESULT STDMETHODCALLTYPE EPageFile::OnModuleNotify(const long cParams, GUID *pParamIDs) { if (cParams == 1 && pParamIDs[0] == ENS_data_null ) { CAutoLock lock_it(&m_DataLock); AfxMessageBox("ENS_data_null!", MB_ICONERROR); // take action }
return S_OK; } Now, how can I tell in OnModuleNotify() what NWSource has made this call?
|
|
|
|
|
Logged
|
|
|
|
|
IrinaM
|
 |
« Reply #9 on: June 30, 2010, 11:24:47 pm » |
|
Arianit, you created one callback class object - module_callback, and it gets all events from all NWSource filters. I advise you to create separate callback class object for each NWSource filter and set some identifier in constructor. For example, it maybe filter number in source filters list if you want to inform that "filter number X lost data".
|
|
|
|
|
Logged
|
|
|
|
Arianit
Newbie

Posts: 30
|
 |
« Reply #10 on: November 26, 2010, 08:49:32 am » |
|
Hi, What happens with the NWSourcePlus if while receiving the stream changes into encrypted stream? Will I get ENS_data_null? Because, this is not what I am seeing. Many thanks Arianit
|
|
|
|
|
Logged
|
|
|
|
|
IrinaM
|
 |
« Reply #11 on: November 29, 2010, 01:14:10 am » |
|
Arianit,
In case if RTP headers still not encrypted then there are no differences between recieve encrypted or non encrypted data. If RTP headers also encrypted then NWS will skip packets (which he cannot recognize) and ENS_data_null will be fired.
|
|
|
|
|
Logged
|
|
|
|
Arianit
Newbie

Posts: 30
|
 |
« Reply #12 on: December 01, 2010, 05:52:24 am » |
|
Hi Irina, OK so let me rephrase this question. The stream is encrypted in Transport Stream Level (RTP Headers are not encrypted). I can see that NWS still receives Data available. In my graph, made up of NWS ->pushDemux->Decoder (audio + Video)->Encoder(A+V)->Mux->NWrenderer can you give any advice how should I detect that the Transport stream is encrypted? I don't need to decrypt this stream, only to be able to tell when the TS has gone into encryption and then when it has switched back. Cheers
|
|
|
|
|
Logged
|
|
|
|
|
IrinaM
|
 |
« Reply #13 on: December 01, 2010, 07:41:19 am » |
|
Hi Arianit, I can recommend you to make your own analyzing filter and place it between source and push demuxer...
|
|
|
|
|
Logged
|
|
|
|
|