I need to change the playback rate of a video file. The IMediaSeeking interface has a SetRate method which is supposed to do this - but I get an E_INVALIDARG when I pass the new rate. I have FiltrGraph manager which has a Source filter (using the AddSourceFilter method), a GrabberFilter and a NULL Renderer. (Changing the Null Renderer to a default renderer did not change the result - I am still not able to show the video in slow motion or fast forward (speeded up). If SetRate is the correct way to do it, is there sample code I can look at? (Will be happy to post my code here if needed). If there is another way to do this, I am open to all suggestions.
Greetings - my first question so please forgive any faux-pas I make..
My Win32 application loads a number of embedded Web browsers, each of which load and play a Flash movie.
I want to find a way to control the volume of each loaded Flash movie independently of each other. My target platform is Windows XP so I can't use the mixer APIs that I hear are available on Vista and 7.
Here is the code with error checking etc. removed (I'm using a very simple Flash API call to test)
I did and I get the same access violation error. Even if it worked though, wouldn't that just let me control an instance of Flash that I load versus an instance loaded by the browser (which is what I want)?
I think each browser instance must load it's own version of the plugin or controlling Flash parameters in one would control them all.
hFlashDLL and flash_stop_func appear to be valid but when I call the function itself I get an access violation.
My apologies, I missed this in your original post. Is there any more information from the access violation to give any indication of what it is complaining about? Also are you sure that native_ShockwaveFlash_StopPlay does not require any parameters?
>> Also are you sure that native_ShockwaveFlash_StopPlay does not require any parameters?
That was my thought too Richard - docs are a bit thin on the ground and that function name doesn't match any in the the other Flash API docs I've seen so I'm thinking those calls are wrapped somehow and that my part of the problem.
Nothing more useful in the error message as far as I can tell.
I just Googled native_ShockwaveFlash_StopPlay and found one hit; someone else complaining of the same issue. My only suggestion is to try and get some documentation on this library from someone else around the world.
HBITMAP m_Bitmap,m_OldBitmap,hMainBmp ;
//one intersting for you if you want to use of other resulition
//use of GetDC()->m_hDC and see result.
//one interesting for you if you want to use of other
m_Bitmap = CreateCompatibleBitmap(hdc,x,y);
m_OldBitmap=(HBITMAP) SelectObject(m_hdcMem, m_Bitmap);
BitBlt(m_hdcMem, 0,0,x,y, hdc,0,0,SRCCOPY);
hMainBmp =(HBITMAP) SelectObject(m_hdcMem, m_OldBitmap);
///////////Now you have a hbitmap of screen hMainBmp/////
m_Image.Save("C:\\image.bmp");//use of jpg instead bmp but if you can zip your file its good.
It's working for me.
Now i want to save file in format of .DAT.
Please help me
There's no such .DAT file. What you've got by capturing the screen is a bitmap, and you just save it to the disk by providing any extension you want to the filename. Or if by .DAT you want to have a file format that your app can only handle, encrypt (search the site) the bitmap and save it to ".DAT format".
Take a look at the example at the end of the documentation for CImage::Save()[^]. Because you said "image.dat", the call didn't know the format. You will need to explicitly specify it as bitmap format by doing it this way:
“Follow your bliss.” – Joseph Campbell
Last Visit: 28-Mar-20 5:11 Last Update: 28-Mar-20 5:11