|
|
Comments and Discussions
|
|
 |
|

|
Just compiled the Sample with VS2010 and SDK 7.1
replaced several places like this:
this->trackBarX1->Scroll += new System::EventHandler(this, &DirectShowVMR9::Form1::trackBarX1_Scroll);
It works but a hint is displayed:
warning D9035: Option "clr:oldsyntax" has been deprecated and will be removed in a future release
<CLRSupport>OldSyntax</CLRSupport>
Managed Extensions for C++ syntax is deprecated in Microsoft Visual C++ 2005 (and above)
After switching this to normal clr Support the line
public __gc class Form1 : public System::Windows::Forms::Form
shows error
Form1.h: error C4980: "__gc": use of this keyword requires /clr:oldSyntax
and
HRESULT renderFiles(String* file1, String* file2)
Form1.h: error C3699: "*": Diese Referenzierung kann nicht für den Typ "System::String" verwendet werden.
Compiler replaces "*" to ^"
|
|
|
|

|
Hi,
I'm Developing a live video streaming application in vc++ using DirectX VideoMixingRenderer7 filter. I can able to draw rubber band rectangle on video using DirectX SetAlphaBitmap() through my mouse move. if my video frame size(4CIF) is greater than my picture box control size, it's working fine. Suppose, my video frame size(CIF) is less than my picture box control size,
1) only 3 sides of the rectangle can be visible.
2) sometimes 2 sides only can be visible.
3) Above two context has been happen randomly.
Please, somebody help me out from this issue.
Thanx in advance,
Regards
Surez
|
|
|
|

|
HI all,
have you implemented such a livevideo rotation or flip H/V filter?
Any help would be appreciated.
giuegiu@hotmail.com
|
|
|
|

|
I want to show live videoin background of 3D object. do you know how to implements this?
Nothing is impossible
|
|
|
|
|

|
When I build the code in Visual Studio Team System 2008 then I encounter the follwing error in the event handler of the system class.
error C3350: 'System::EventHandler' : a delegate constructor expects 2 argument(s)c:\documents and settings\vmukti\desktop\directshowvmr9_src\Form1.h 384 DirectShowVMR9
|
|
|
|

|
This project was successfully compiled on Visual Studio .Net 2003, I have not tried compiling it on a newer version.
The same error has been posted before by someone else. A part of it was as follows:
**********
e:\down\codeproject\directshowvmr9_src\Form1.h(365) : error C3350: 'System::EventHandler' : a delegate constructor expects 2 argument(s)
e:\down\codeproject\directshowvmr9_src\Form1.h(384) : error C3867: 'DirectShowVMR9::Form1::trackBarY2_Scroll': function call missing argument list; use '&DirectShowVMR9::Form1::trackBarY2_Scroll' to create a pointer to member
**********
The answer, I believe, is embedded inside the error: "use '&DirectShowVMR9::Form1::trackBarY2_Scroll' to create a pointer to member"
Did you try using the ampersand?
|
|
|
|

|
After "use '&DirectShowVMR9::Form1::trackBarY2_Scroll' to create a pointer to member".
you need to do other change.
Form1.cpp:
using namespace DirectShowVMR9;
//ADD
[STAThread]
//ADD
int APIENTRY _tWinMain(HINSTANCE hInstance, ...
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
and then program should work.
|
|
|
|

|
Hello Mr Sameer
I need ur help regarding VFW ,becoz I guess you have used VFW and DirectShow,plz help me
I would like to know what is the purpose of VFW Format dialog box.I know Format dialog box is used to select the image dimensions and bit depth. But is it necessry to use it.As if you see skype only uses Vfw Source dialog box and not using display and format dialog boxes. (My query) Is it necessary to use format dialog box or not.?If not then why ? ,if yes why it is necessary ..
Kindly Help me..
Thanks in advance
|
|
|
|

|
Can you make your code to a wmp plugin? so,we can use your code in the wmp like substitle plugin,we don't want to rewrite a media player because
we have already a windows media player.
sunny_chn
|
|
|
|

|
I'm sorry, I'm preoccupied with a lot of work, and what you want would require a lot of research.
|
|
|
|

|
I didn't find your E-mail address, so I have to reply message to your article.
Do you know DShow better? I have a question about the "infinite pin tee filter".I have made a media player with DShow, I want to achieve its input pin to two output pins, then display one multimedia file in two Picture Control Tools, and control the two pins with different ways.
Could you help me kindly? Thank you. You could send me E-mail to me(zds9924@hotmail.com).
|
|
|
|

|
1.) First, join the Video Decoder pin to the Infinite Pin Tee Filter.
2.) Then, join the Tee Filter's output pin to what ever you want (maybe to a VMR9 filter for PictureBox1).
3.) The 2nd step will create a another output pin on the Tee Filter, which you can now connect (to another VMR9 filter for PictureBox2).
|
|
|
|

|
I'm so glad to see your reply.
I know the theory aobut the filter,but I don't know the function about the DShow filter exactly.
Could you tell me your e-mail address, and help me have a look at my programming.Thans.
|
|
|
|

|
Can anyone tell me the way to create a direct show filter for video cropping and video hue,saturation for particular selected area within the video.
gaurav mahajan
|
|
|
|
|

|
it is impossible to can with VB6 or VB.NET (studio 2005)
thanks
|
|
|
|

|
i'm sorry, i did not understand your question.
|
|
|
|

|
in VB6 i want to play 2 video files with alpha%
This code is perfect and use very low CPU.
How i can that in VB6 or VB.NET?
thanks
|
|
|
|

|
i'm sorry i am not aware of such a method. please refer to the following link:
http://www.ureader.com/message/398536.aspx
|
|
|
|

|
I can make this work in VB6:
1 Master video with alpha% (V1)
1 Transparent video and with alpha% (V2)
1 Transparent BITMAP and with alpha% (B1)
all works fine but i have some quetions.
A. How i can hide or show one video or the bitmap (only solution i have is the rezise to witdh=0 and height=0)
B. How i can stop one video (V2) and others works with no problem.
C. How i can stop the video (V1) and play other (V1')
D. How i can pause one video (V2) and others videos (V1) continues to play
If any help me in C++ and i try converted at VB6.
(I try for all there 1 month)
thanks
|
|
|
|

|
In this case, I think it would be better if you created an ATL ActiveX control in C++ and called it's functions through VB.
|
|
|
|

|
i dont know C++
can you make this DLL you?
all my quetions it is imbossible to make in c++?
|
|
|
|

|
This link contains source code:
http://www.codeguru.com/cpp/g-m/directx/article.php/c4351
But it exports only 3 functions. You will need to extend it's functionality. I'm sorry, I do not have the time to create such a module for you.
|
|
|
|

|
thanks foy your time
I find this site and work, but i have make the program in VB6 with VMR9 and pins
and i want to make some extra (my questions) for my project.
|
|
|
|

|
i m using vc2003 to compile ur project.
but i get a linking error,
Form1.obj : error LNK2001: unresolved external symbol __check_commonlanguageruntime_version
D:\DirectShowVMR9_src\Release\DirectShowVMR9.exe : fatal error LNK1120: 1 unresolved externals
when i was trying to compile a release build.
in debug build, everything is running well.
can u give me any suggestion ?
many many thanks.
jztan
|
|
|
|

|
you need to specify the path to your libraries for the release build too.
|
|
|
|
|

|
references:
http://msdn2.microsoft.com/en-us/library/799kze2z(vs.71).aspx
http://www.ddj.com/windows/184416689 (topic: Application Domains and Unmanaged Calls)
|
|
|
|

|
waw, seem like i got a lot of thing to do b4 i can build this project correctly.
thank u.
|
|
|
|

|
Hi,
can I change merit value for ACM filter using filmerit_30en.exe or other similar stuff.
It seems to me not.
thanks
jdsc
|
|
|
|

|
haven't tried that, but
http://www.videohelp.com/tools/RadLight_Filter_Manager
works well for me.
|
|
|
|

|
EZGrabberMgr.obj : error LNK2001: unresolved external symbol _CLSID_NullRenderer
EZGrabberMgr.obj : error LNK2001: unresolved external symbol _IID_ISampleGrabber
EZGrabberMgr.obj : error LNK2001: unresolved external symbol _CLSID_SampleGrabber
EZGrabberMgr.obj : error LNK2001: unresolved external symbol _IID_ICaptureGraphBuilder2
i am using platform sdk release for windows Vista
i have also linked the libraries strmiids .lib ,strmbasd.lib ,dxguid.lib,
My include paths are also set
plz helpppp
|
|
|
|

|
How have you linked the libraries? Have you set the paths for 'Library files'? [Tools-->Options-->Directories-->Show directories for-->Library files]
Make sure your Platform SDK paths (both Include and Library) are right at the top.
Also, you must set these directories again if you change your build type from Debug to Release (or vice-versa)
|
|
|
|

|
Is there a way to have a single filter graph with both VMR7 and VMR9 filters. Coz, if I create such a graph, when I try deleting any of the filter through my code, the VMR7 filters stops playing.
Or is there any event that shall notify that the filter has stopped playing so that it can be handled when that notification or event occurs?
Any help will be welcome..
- Manu
|
|
|
|

|
I'm facing with issues while trying to continuously add and delete VMR9 filters in filter graphs for my application. But after creating and deleting some 53 VMR9s, my application stops connecting more VMR9s in the filter graph.
What actually happens is I add a VMR9 filter to the filter graph and establish connections. Then delete the graph, again create a new VMR9 and continue adding and deleting, till as many times it successfully adds and connects the filters. But after creating and connecting the 53rd VMR9 filter, DirectX fails to connect the filters in the graph eventhough it creates one.
It seems like some kind of memory leak, that doesnt not release the VMR9 filters, even though I've ensured in the code, that I release the filters. So, it creates the next VMR9 instead of recreating or reusing the last destroyed one.
Can anyone please suggest what should I do in order fix this issues.
|
|
|
|

|
I found the solution for my issue regarding this. Its necessary to release every instance thats created due to QueryInterface() calls, just before another QueryInterface(), as if we fail to do this, the reference count keeps on incrementing eachtime we call QueryInterface() even though for the same variable name and when we Release() for the filter object is called just once, it just reduces the reference count by 1 and thus the leakage as the reference count needs to be 0 after Release() call for a queried render-filter.
-Manu
|
|
|
|

|
Hello,
I want to save the result of the VMR9 mixing in a .avi file instead that on the screen.
How to get the output of the VMR9 ? And to redirect this resulting image in a file ?
Thank you,
Christophe,
CJ
|
|
|
|

|
Hi
first it should be clear that VMR9 is a renderer filter,
and renderer filters donot have output pin, which can be
connected to another filter.
So you yourself have to write a mixer filter which must be
a transform filter so can be connect to a file writer filter.
|
|
|
|

|
Hi I have GraphFilter getting from IRenderEngine. i overlaid text on video using the vmr9.how to save video file with the text?.Kindly explain more. Advance Thanks!!! boopathi_tpgit@yahoo.com
|
|
|
|

|
Hi
As earlier said you that VMR9 is a rederer filter
and renderrer filters donot have output pins, meaning they
can get media data from other filters (through input pins)
but they cannot output data because they donot have output pins.
So any filter having a output pin will be able to send its data
to file writer filter. (BTW file writer is also a renderer
filter ).
So if you want to overlay text over video you must have a
filter which can do ovelay work for you and then connect
that filter to the file writer.
You yourself can write such a filter, for an example
see the sdk filter exampl
RGBFilters this example have many filters but the
TransSmpte will work for you it tells how to write
over video.
|
|
|
|

|
open task manager on any other window while video is playing results in greenish lines on video window.
Can anybody reproduce the behaviour. I am using RenderStream to render video using BDA analog capture device on DELL D800 laptop.
Please any suggestions or solutions
Thanks in advance
Shovit
|
|
|
|

|
Sorry, firstly, thankyou for such a fine example to work with. Secondly, Can I change the VMR picture window to full screen? If so, how?
Thankyou once again, apologies for the initial abrupt question
Alan
-- modified at 10:40 Friday 6th October, 2006
|
|
|
|

|
Aoa,
Do you know how to enumerate a pin on a filter containing two pins in the same direction? I want to find 2nd output pin on a filter that has two output pins.
Thanks
|
|
|
|

|
---->(2)
(1)----> Filter
---->(3)
IEnumPins *pEnum;
IPin *pPin;
pFilter->EnumPins(&pEnum);
pEnum->Next(1, &pPin, NULL); // pPin now contains pointer to INPUT pin (1)
pEnum->Next(1, &pPin, NULL); // pPin now contains pointer to OUTPUT pin (2)
pEnum->Next(1, &pPin, NULL); // pPin now contains pointer to OUTPUT pin (3), which is what you want
The sequence (almost) always has INPUT pins enumerated first, followed by OUTPUT pins.
Another example to show the sequence scheme is:
(1)----> ---->(3)
Filter
(2)----> ---->(4)
|
|
|
|

|
Hello, this is a great project.
But is it possible to hear only the sound of one video???
Can i change it during playtime???
|
|
|
|

|
Thank you. Yes, just disconnect the input pin to your DirectSound Audio Renderer filter.
|
|
|
|

|
Assalamoalikum!
i have tried your code as the way it is
It gives no errors but i cant see the video ... now i am stuck
My scenario is that i have a preview mode and a capture mode
I have implemented "preview mode" through VMR in the preview window.
It works fine through it.
Now about the problem i am facing i have a child window that starts showing the same preview on button click in it( say "capture window").
I had implemented this scenario through GRABBER but i want to do it through VMR although i am running an instance of appilication in the same application and on the same dialog
Through your code i got no errors through out i mean till
m_hr=pMC->Run();
i get no errors still i cant preview the video
more over i am getting the rectangle of the child window as
RECT rcDest;
::GetClientRect (hWnd,&rcDest);
still i cant preview it how to proceed???
Thanks and regards
if you want to look through Code then its like
/*
m_DlghWnd: the handle of the dialog which have both child windows that is preview (for which i have written the code through VMR) and the capture window which will show the image stream on button click
hWnd: it is the handle of the child window in which i want to start the preview stream
Requirement: Both windows should be previewed after the button click
*/
HRESULT CCameraPreview::TestVideo(HWND m_DlghWnd,HWND hWnd)
{
r = new VMR9NormalizedRect;
r->left = 0;
r->top = 0;
r->right = 1;
r->bottom = 1;
pWC = NULL;
pMix = NULL;
pGB = NULL;
pVmr = NULL;
pConfig = NULL;
pMC = NULL;
pMS = NULL;
// create an instance of the Filter Graph Manager
m_hr=CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
IID_IGraphBuilder, (void **)&pGB);
// create an instance of the VMR9 filter
m_hr=CoCreateInstance(CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC,
IID_IBaseFilter, (void**)&pVmr);
// add the VMR9 filter to the Graph Manager
m_hr=pGB->AddFilter(pVmr, L"Video");
// get a pointer to the IVMRFilterConfig9 interface
m_hr=pVmr->QueryInterface(IID_IVMRFilterConfig9, (void**)&pConfig);
// make sure VMR9 is in windowless mode
m_hr=pConfig->SetRenderingMode(VMR9Mode_Windowless);
// get a pointer to the IVMRWindowlessControl9 interface
m_hr=pVmr->QueryInterface(IID_IVMRWindowlessControl9, (void**)&pWC);
// explicitly convert System::Drawing::Rectangle type to RECT type
RECT rcDest;
::GetClientRect (hWnd,&rcDest);
// set destination rectangle for the video
m_hr=pWC->SetVideoPosition(NULL, &rcDest);
// specify the container window that the video should be clipped to
m_hr=pWC->SetVideoClippingWindow(hWnd);
// IVMRMixerControl manipulates video streams
m_hr=pVmr->QueryInterface(IID_IVMRMixerControl9, (void**)&pMix);
// IMediaSeeking seeks to a position in the video stream
m_hr=pGB->QueryInterface(IID_IMediaSeeking, (void **)&pMS);
// IMediaControl controls flow of data through the graph
m_hr=pGB->QueryInterface(IID_IMediaControl, (void **)&pMC);
m_hr=pMC->Run();
return m_hr;
-- modified at 3:45 Monday 4th September, 2006
Jabeen
|
|
|
|

|
W Salaam.
Make sure HWND is not null. Also, do you hear sound?
Regards,
Sameer
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
This article describes how to dynamically mix two video files (.mpeg, .mpg, .avi and .dat). Mixing involves alpha-blending and stretching/shrinking and positioning of the two video streams, individually, using DirectShow's VMR9 filter.
| Type | Article |
| Licence | |
| First Posted | 3 Jan 2005 |
| Views | 287,142 |
| Bookmarked | 90 times |
|
|