Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am searching for a way to record video using directShow. I managed to build a graph using a webcam source and aviMux and file writer. this worked fine. My problem is i need to record video from my own created samples. So is there a way to do this? I was using VFW Avi API to do this , but it does not work every time and not with every codec. SO I thought to use DirectShow but What should I do?
Do I need to write a source filter that would recive buffers to write? or is there a filter like that? also can I overwrite the samples in samplegrabber? maybe I would use it in my graph?
I would be glad for any help
thanks
mezik.
Posted

Hello,

In Direct X SDK version 9 (Direct Show is included there),
look at "Push Source" sample, this sample captures screen
using Windows GDI. It has an output Pins but does not have any
input pins.

That means Push Source is a Generator of frames.

I have modified Push Source example in one of the projects of mine to receive frames from TCP/IP and UDP connections.

I believe customizing Push Source example of Direct X 9 will solve your problem.

Boris Tkachenko
www.LinuxCAD.com (I wrote that).
 
Share this answer
 
Comments
mezik 4-Nov-10 6:32am    
Hi thanks
I started working with PushSource sample. I am trying to add a COM interface to the filter so I can pass my bitmaps to it. If you have any idea how to do this I would be glad.
Adding simpleATL object does not work, becaus the project does not support atl. ( tried changing the settings (using ATL dynamicaly linked) but this did not help)

So if you have any idea I would be glad
thanks in advance
mezik
Member 13158716 28-Apr-17 9:27am    
Hi, Mezik.

I´ve tried to send you an e-mail but I couldn´t find the address.
I´d like to talk to you about ASF format file frames.
Please, contact me: informacao@periciadigital.com.br

Thanks

Sérgio
Hi thanks.
I started working with the PushSource sample.
I am trying to add a COM Interface to the filter so I can pass my bitmaps to it,
If you have any idea how to do this, I would be gald.

thanks in advance
mezik
 
Share this answer
 
Why do you need "com interface"? Why COM? And I would be glad if you would let me take care of whatever you are trying to do for about $800, is that a deal?, so you can take vacation.

Where does you bitmaps come from?
 
Share this answer
 
Hi I have mangaed to complete my mission

Generally I have created my own source filter, I pass it my own samples generated by a program. (The samples are passed via COM to the source filter)
then I build a recording graph and have my own bitmap samples written into the file.


I have added to com interface to the filter by this method found it in:

https://groups.google.com/group/microsoft.public.win32.programmer.directx.video/browse_thread/thread/eb03cb897ea31f26/1fd3aec2bf91be3f?hl=iw&ie=UTF-8&q=IMyFilter&pli=1[^]

Well I am thinking of posting an article on this here because it is a very rare issue and was not easy to find the answer on the net

well this is all for now.


----------------
about your question how would you pass the images online to the source filter. images that are created in a separete thread?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900