0

There is an project named GMF bridge and GMF play which is available on the following link http://www.gdcl.co.uk/gmfbridge/ in this project we are able to give the file as input and play it but how can i give the H264 packet as input and make it Play continuously as it takes the path of the file as input....

the original code was as follows:-

HRESULT hr = m_pPlayer->AddClip(ofn.lpstrFile, &pClip);
ClipPlayer::AddClip(const char* path, ClipEntry** ppClip)
{
    list<ClipEntry>::iterator it = m_Clips.insert(m_Clips.end(), ClipEntry());
    ClipEntry* pClip = &(*it);
    *ppClip = pClip;
HRESULT hr = pClip->Create(m_pController, path);
.....
...
}

what i did is

i opened the file and parse the NAL unit and save the NAL unit into an byte array and gave the BYTEArray instead of file name.

Dany
  • 2,034
  • 8
  • 34
  • 54

1 Answers1

0

You first have to create your own source filter which sends your byte array to other directshow filters. I have read somewhere that the sdk contains an example which reads a file into memory and uses that, but I am currently not able to verify that.

Next you have to modify the ClipEntry class to use the source filter you have created instead of the standard filesource.

wimh
  • 15,072
  • 6
  • 47
  • 98
  • sir can you give me the some example/link of code where we receive the data from socket connection and pass the buffer to player – Dany Jan 02 '13 at 11:20
  • sir if we have any source filter how to use that source filter plz tell – Dany Jan 02 '13 at 11:34
  • I think you can modify the [pushsource example](http://msdn.microsoft.com/en-us/library/windows/desktop/dd377481(v=vs.85%29.aspx) to your needs. You can also buy a buy a udp source filter, just use google.... – wimh Jan 02 '13 at 11:53
  • Sir can you tell how to use push source example – Dany Jan 02 '13 at 12:07
  • Sir in Push source Where is the main there is no documentation available how to use and understand it – Dany Jan 02 '13 at 13:29
  • Directshow has a reputation of having a steep learning curve. At least you must learn some basics before you will be able to create your own filter. There are some [tutorials](http://stackoverflow.com/q/2077997/33499). When you know more about Directshow, the examples will show you how to use the base classes. – wimh Jan 02 '13 at 14:47