|
If quoting it here didn't help then sorry. It was easier to copy/paste than to type it.
|
|
|
|
|
Richie308 wrote: the documentation doesn't provide an answer either way.
As posted in another reply... yes it does. MSDN online has almost everything. Google performs the best searches of MSDN material. Put "MSDN" as the first keyword in your google search input. Figuring out what keywords to use is the... ummm ... key to researching these days. In case Bob is listening.... of course Articles at CodeProject are another great resource.
led mike
|
|
|
|
|
Richie308 wrote: I'm trying to use them asynchronously.
You never said that until now.
Google is your friend: "MSDN WinInet MFC"
finds: http://support.microsoft.com/kb/164983[^]
SUMMARY
The MFC WinInet classes (CInternetSession, CInternetConnection, and so forth) are not designed to be used with asynchronous WinInet connections or file transfer. Instead, developers looking for asynchronous-like behavior in their MFC WinInet application should implement separate synchronous WinInet sessions in secondary threads.
led mike
|
|
|
|
|
led mike wrote: You never said that until now.
Well you would not have known, because you initially responded with childish sarcasm, instead of like a helpful human being.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Richie308 wrote: because you initially responded with childish sarcasm, instead of like a helpful human being.
For a few poeple, the sarcam will help them understand the need to develop skills related to finding information and reading it rather than having to rely on others for help. Others who can help because they did read the documentation. For those few that heed the message, they will significantly improve thier development skills. For the rest that don't heed the message but rather complain about the delivery, they will continue to struggle but that is their choice. A few insults and complaints hurled at me by lazy people that won't amount to anything anyway are worth bearing if I may help even a single person become a "professional" developer. But if you prefer to whine about it go right ahead, it has no effect on me.
Also, no one knew about your async requirement because you didn't post it, not for any other reason.
led mike
|
|
|
|
|
You can rationalize being a jerk if you want to, but it will not improve you.
Rich
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Richie308 wrote: You can rationalize being a jerk lazy unskilled developer if you want to, but it will not improve you.
led mike
|
|
|
|
|
It's not your job to police the boards for people whom you think are lazy. If you think someone is lazy, just don't answer them.
This is not YOUR board, you don't make the rules. Quit trying to prove you're better than the next guy, and shut up.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Richie308 wrote: and shut up.
I am not the one that had to post a question asking for help, or did that fact escape you? If I feel like handing out other advice along with the particular solution some lazy mental midget asks for I will. All your whining won't stop me.
Richie308 wrote: It's not your job to police the boards
But apparently it is your job? Obviously logic is not one of your strong skills.
led mike
|
|
|
|
|
|
I'm sorry for reposting this but I was not able to get back to work on this project until just now.
I am currently designing a 2D/3D interface package based on Direct3D, but need to include a DirectShow VMR9 window in the interface which will be diplaying video from a capture card or pre-recorded videos.
The problem is that I have a render loop that constantly updates and redraws the interface, which causes the embedded video to flash. Is there a way that I can tell part of a surface not to be redrawn, i.e. the surface behind the vid window? It is on top of a large fullscreen size surface which holds a background image. Else is there a simple way to place individual frames of a my video onto a Direct3D surface which can then be drawn on top of the backgroung image.
I'm fairly new to Direct3D and very new to DirectShow. Any help is appreciated.
Thanks,
Dustin
P.S. I have tried using ExcludeClipRect() but it appaerantly only works with GDI. I have also tried telling the video to repaint after the interface was drawn, but to no avail.
|
|
|
|
|
Writing your own renderer is one option. The sample base classes included with the DirectShow
SDK make it relatively simple.
The Texture3D9 Sample[^] in the DirectShow SDK may help for rendering video to a Direct3D surface.
|
|
|
|
|
I've tried looking through that sample but can't really make heads or tails of it, mainly because I don't really have a clue about how DirectShow actually works. I have searched everywhere for a good tutorial, but everone I can find does things that I don't need and doesn't do the things that I do.
I've got a file loading and playing just fine with full control over playback, but that's where my success ends. I need to be able to load multiple videos and play them back based on events generated by the interface. The problem is I don't know how the videos are actually stored. Do I need to create a multiple IVMRWindowlessControl9 or IGraphBuilder. Which interfaces can be reused and which cannot.
If anybody knows of a good tutorial that would teach me all this I would very much appreciate it. It seems DirectShow is far less popular than the other DirectX APIs.
Thanks for your help,
Dustin
|
|
|
|
|
Using the VMR in windowless mode is not too helpful since you only have control at the window
(HWND) level.
Using the VMR in renderless mode provides almost exactly what you need to do except the Direct3D
surfaces are created to match the video stream. If you're already managing the surfaces and the
video is secondary then this is (in a sense) the reverse of what you need.
If you have code running with direct show and the only problem is flicker then I still think the
easiest route would be to write your own renderer instead of the VMR (unless you're really using
the mixing features of the renderer).
I personally found the Windows Media Format SDK to be more flexible, although I work mainly with
ASF files (.wma, .wmv, etc.) and prefer to write my own renderers. If you can work with ASF files
then it's fairly simple (and there's decent sample code in the SDK) to read streams from a file.
Using the asynchronous reader you can set up to read a file and you'll get a callback called for
each frame of video, at the right time, and in the right order. What you do with the frame is up
to you. If you work with 24-bit RGB video, it's a fairly simple blt to a Direct3D surface, GDI
device context, or whatever.
A downside is, besides mpeg-4, the only video codes included for free are the windows media
codecs.
Might be worth taking a look at the Windows Media Format SDK[^]
|
|
|
|
|
Thank you very much for the advice. You're right, I do not need most of the features in VMR and I can work with any format I want as I am authoring the videos. I will give it a go, although there may be more questions coming.
Thanks for always being so helpful Mark,
Dustin
|
|
|
|
|
Mark,
I just wanted to let you know I fixed the problem. All I did was take the '9' off of everything regarding VMR so that I am now using the original version VMR7. I have no idea why this fixed the problem or even what inspired me to try it, but it now works. I just LOVE Microsoft.
Thanks for the help,
Dustin
|
|
|
|
|
Cool! I'll note that for future reference, thanks!
Cheers!
Mark
|
|
|
|
|
I have created a new button with CreateWindow() and option WS_VISIBLE | WS_CHILD.
How can I modify these options later in the code ? Is it possible?
For example, How can I tell the button that it is WS_OVERLAPPEDWINDOW now?
|
|
|
|
|
You want a button with WS_OVERLAPPED (title bar and border), WS_CAPTION, WS_SYSMENU,
WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles?
Check out the SetWindowLong()/SetWindowLongPtr() APIs.
Mark
|
|
|
|
|
I will look for them, thanks.
If you have a short example , it would be great.
|
|
|
|
|
LONG lCurrentStyle = ::SetWindowLong(hwnd, GWL_STYLE);
lCurrentStyle |= WS_OVERLAPPEDWINDOW;
::SetWindowLong(hwnd, GWL_STYLE, lCurrentStyle);
Check out the docs for SetWindowLong(). You may need to call SetWindowPos() or other API
after setting certain styles.
|
|
|
|
|
Thank you for help!
I understand how it works now. And it works well
Problem solved.
|
|
|
|
|
You can use ModifyStyle , too.
ModifyStyle(0,WS_OVERLAPPEDWINDOW );
|
|
|
|
|
It looks like what I was searching for, but... I can't find it.
I'm not using MFC, CView Cstatic etc...
I'm using "windows.h" with HWND etc...
Where can I find this method or something similar ?
|
|
|
|
|
You need to use SetWindowLong then.
e.g. If you want to add WS_CHILD style to a window you can do like this,
SetWindowLong(hWnd,GWL_STYLE,WS_CHILD);
|
|
|
|