Tuesday, March 31, 2009

How to Assert the thread was closed (dead) or Not ?

How to Assert the thread was closed (dead) or Not ?:

WaitForSingleObject( hThread, INFINITE) ; // This statement will blocks until the thread dies.
if the Thread comes out of the loop, then hThread handle is like signalled.
The Next statement to WaitForSingleObject () will be executed.

How to modify the 3gp streaming filter to read Only rtp data?

How to modify the 3gp streaming filter to read Only rtp data?
================================================
( 3gp streaming stack it will receives the rtsp and rtp data)

Solution:Quick and dirty way to do this:
===============================
Use Some SDP file to create the dummy audio and video output pin. ( We can create it with rtsp:// URL itself);
Hard code the media type, File duration (instead of the file duration configure duration as much as we need to receive data for RTP),config data in a filter .

How to get SDP file for any RTSP file?

How to get SDP file for any RTSP file?
RTSP response will have the SDP description
if we are having rtsp URL, we can open it with Quick time Player and at the same time, we can open the Ethereal to capture the net logs.
RTSP response RTSP/1.1 200 OK will have a SDP description.
Even with this SDP description and save it into SDP file and open it in Quick time, we are able to play it in Quick time

Sunday, March 29, 2009

Audio goes off after seeking several times

Audio goes off after seeking several times :

When I seek several times, the audio goes off.

Reason:

After seeking, negative timestamps are set to video and audio media samples.

In case of video even though it was negative, it was rendered.But In case of audio,

it was not rendered fine because the audio is the reference clock for both video and audio.

Moreover audio and video are synchronized with this audio timestamp.

So the audio timestamp must not be negavtive, after seeking. if it is so, we cant predict the

rendering ( Sometimes it might render and sometimes it may not render)

Solution:

I modified Source filter in such a way to output positive timestamp for video and audio after seeking. Now the issue was resolved.

Wednesday, March 04, 2009

RegSvr32 error

 


I am able to compile the filter ; while registering I  got the following error:

---------------------------
RegSvr32
---------------------------
DllRegisterServer in D:\PushSource\Debug_Unicode\PushSource.dll failed.
Return code was: 0xc0000005
---------------------------
OK  
---------------------------


Solution:
============

 This error will come if any dependency has been removed
The problem is it doesnt have any dependency. I have checked it with depends.exe.

 

CFactoryTemplate g_Templates[3] =
{
    {
      g_wszPushDesktop,               // Name
      &CLSID_RxVideoReceiver,       // CLSID
      CRxReceiver::CreateInstance, // Method to create an instance of MyComponent
      NULL,                           // Initialization function
      &sudPushSourceDesktop           // Set-up information (for filters)
    }
};

 

I modified the above code as


CFactoryTemplate g_Templates[] =
{
    {
      g_wszPushDesktop,               // Name
      &CLSID_RxVideoReceiver,       // CLSID
      CRxReceiver::CreateInstance, // Method to create an instance of MyComponent
      NULL,                           // Initialization function
      &sudPushSourceDesktop           // Set-up information (for filters)
    }
};


Now I am not getting any errors.

 if I g_Templates[3] means, the regsvr32.exe expects the another 2 GUIDs and informations. Since it doesnt have the values,

it gives read violation error.