Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Multimedia
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 1-Nov-10 23:42pm
mezik3K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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).
  Permalink  
Comments
mezik at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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?
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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?
  Permalink  

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

  Print Answers RSS
0 Marcin Kozub 265
1 Richard MacCutchan 239
2 OriginalGriff 208
3 Sergey Alexandrovich Kryukov 185
4 Praneet Nadkar 167
0 OriginalGriff 7,913
1 Sergey Alexandrovich Kryukov 7,232
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,865


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 17 Nov 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100