Directshow does not work well on windows 7 64 bit? - windows

I created a small app that capture video from lifecam camera and grab image. It works well on window xp,7 32bits, but on window 7 64bits sometimes connect to camera failed and timeout grabbing image. I don't know that whether directshow api work well on window 7 64bits or not?Thank for any helping to make this problem clearly.

Related

Screenshot of window with hardware accelerated rendering

I'm trying to get a screenshot of windows using PrintWindow. Windows using hardware rendering are not captured. For example Chrome, Edge. In Windows 7 they are captured, but in Windows 10, 11 they are no longer there. There is a suspicion that this is due to the version of WDDM. Is there any possibility:
capture hardware rendering?
disable hardware rendering for the whole system?
Disable or otherwise affect WDDM?
I 've made a simple capture library here. Code is here and it's based on Desktop Duplication API. Microsoft sample is here. It uses hardware capturing.
My work primarily captures video with sound, but there is a frame callback you can use to capture a frame. Apparently it's the same API that is used to capture games etc.

Windows 8 orientation from desktop application

I am developing a windows 8 compatible desktop service that uses a camera preview stream. On convertible laptops (dell xps 12), i am having trouble with the orientation of the camera. basically i need to rotate the stream in sync with the stream. I am using windows rt apis (SimpleOrientationSensor, DisplayProperties, DisplayInformation) to get this orientation information.
if i only use SimpleOrientationSensor, that does not always change in sync with the windows desktop. sometimes the desktop orientation is locked, and SimpleOrientationSensor fires events but the desktop doesn't change orientations (laptop mode).
I tried using DisplayProperties, but it only reports "landscape" while running from a service, and per http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.display.displayproperties.aspx, DisplayProperties is deprecated: "DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation."
if i try to use DisplayInformation.GetForCurrentView() from my desktop app, i get an exception "Windows.Graphics.Display: GetForCurrentView must be called on a thread that is associated with a CoreWindow".
I can use SimpleOrientationSensor, but I am wondering if there is an event or property for laptop mode (locked orientation) vs tablet mode (any orientation) in these convertible laptops. any help appreciated!
Update:
I found the GetSystemMetrics() API, which doesn't seem to work very well (bad error handling). Also found a registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl ConvertibleSlateMode DWORD which seems more reliable, this is what i am implementing with.
I also found this article: https://software.intel.com/en-us/articles/detecting-slateclamshell-mode-screen-orientation-in-convertible-pc

How to "disable" HD screens for Windows Phone app Store?

When I started working on our company's Windows Phone app project there was no full HD resolution for WP. But now there is and I'm supposed to disable the app for full HD devices in the WP Store. How do I exactly do that?
The main reason for this is that the app has a thick black ribbon on top of the screen when used with a full HD device.
I have noticed that when you update or upload .xap file, the Store recognizes the requirements of the app. The Store says the app works on all screens. How do I set the requirements so that the app is disabled HD resolution screens?
The app is made to support WP versions 7.1 through 8. I eyed the Internet for help but it seems that because the app is WP 7 compatible I can't describe the resolutions in the WMAppManifest where the Store would easily to find it. Or can I?
It would be so great if I could do this some easy way instead of going through the whole app to make it work "better" on HD screens.
There is no way how you can prevent users with certain display resolutions from installing your app. A similar question was asked here, it was about installation prevention of apps for specific device types. What you can do is to do the check in code.
You could check the device's display resolution when starting the application. If the size exceeds your limit, you could inform the user about that and exit the application.
How can I get a screen resolution of Device (Windows Phone)
However, I don't know how this would affect the app certification.
Windows Phone 7.1 only supports 800 x 480 resolution and Windows Phone 8 supports multiple resolution.
The scaling used for Windows Phone 7x apps on Windows Phone 8 means that one 720p and 1080p devices, you will get a black band. There is nothing you can do.
You could recompile the app as Windows Phone 8 app and have both WP7x and WP8 xaps available and this will ensure that the space is consumed correctly and the black band isn't shown.

top margin issue for windows phone 7 apps on windows phone 8

The windows phone 7 application which I developed using 7.1 SDK occupies the entire screen on wp7. But the same application when opened in Windows Phone 8 shows some extra margin on top because of which my app was not able use the space on top. Any idea how to fix this?
WP7 only supports only one resolution (480x800).
For 480x800 WP8 devices that's obviously fine.
For 1280x768 devices this scales fine as this is the same aspect ratio.
However 1280x720 devices have a different aspect ratio which leaves the black bars at the top of the screen.
The only way to fix this is to upgrade your project to WP8 using the WP8 SDK (whilst watching out for any subtle issues that may bring).

When/how is an application added to the Windows 7 Volume Mixer window?

I'm trying to get an application which ran okay on XP to run properly on Windows 7 (this is not something I wrote - I'm helping a friend.)
It was able to play audio on XP but cannot on Windows 7 - nothing is heard. Have exhausted a search and check of all settings in Windows 7 as regards audio (have spent many hours searching and reading.)
There is no entry in the Windows 7 Volume Mixer for the application at any time while it is running.
By playing with some other applications I've found that it seems that an application is not added to the Mixer until it actually creates a sound but I've found at least one program which is added to the Mixer right when the program starts and before it has played any sounds.
Is there an API which allows an application to "register" itself with the Windows 7 Volume Mixer so that an entry for it appears in the Mixer even though it has not yet produced any sounds?
According to this blog post, the audio subsystem keeps track of PIDs that play audio and the volume mixer is able to access this list. It is possible to change the name displayed in SndVol with IAudioSessionControl, so maybe that alone is enough for it to be "registered"
An app slider is added to the mixer when an audio session is created. There are two things that can cause an audio session to be created: First off, when an audio stream created by the app transitions to the "start" state. The other case is when an application manipulates the audio volume using the IAudioSessionControl interface.

Resources