preview

Directshow Preview Only and Capture & Preview with a single Graph

天涯浪子 提交于 2019-11-28 11:25:09
问题 I have a Directshow application that needs to preview a webcam video, and when user clicks 'Record' it needs to start capturing the video to a file. To that end I created a single Capture Graph, with PREVIEW pin connected to a RENDER filter and CAPTURE pin connected to a AVI_MUX filter that saves to a file. It looks something like this: /[PREVIEW PIN]-->[VIDEO_RENDERER]--->[SCREEN] [VIDEO CAPTURE FILTER] / \ \[CAPTURE PIN]--->[AVI_MUX]--->[FILE WRITER] When I call Run() on the graph the video

C# - on mouseover at taskbar, a preview is generated. how can i achieve this by C# coding

不羁岁月 提交于 2019-11-28 09:33:53
I am developing a winForm application in which i am list all the running processes. on mouseover of any process, i want preview window like (In Windows 7, when you mouse over an application in your task bar, a preview is generated showing the contents of the application window.) See Image. Any idea how to achieve this, i am not able to get it. Any suggestion will be helpful. Thanks.. full example at this site You need two functions : [DllImport("dwmapi.dll")] static extern int DwmRegisterThumbnail(IntPtr dest, IntPtr src, out IntPtr thumb); [DllImport("dwmapi.dll")] static extern int

Android (Camera) - How to synchronize stopPreview() with onPictureTaken()?

早过忘川 提交于 2019-11-28 09:08:46
问题 I have an app in which the client uses the camera to take a picture. The preview of the image is being shown in the tablet using a SurfaceView, before the person hits my "click" button. When the person hits the click button, the method onPictureTaken is called, and, in that method, I save the image and also call the camera.stopPreview() method (so the user can see the picture that was taken). There is an issue, however... If the user is moving around the tablet at the moment that the picture

Android camera preview is dark

心已入冬 提交于 2019-11-28 07:46:25
I am trying to create a custom camera app. I followed the Android Developer example from here with minor tweaks. However, my camera preview turns out to be rather dark. On the other hand, the stock camera gives a much brighter preview. I have tried several settings to make it work better but it seems none of them are having any impact. Relevant code is posted here. CameraActivity (Main) protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_camera); if(CameraHelper.checkCameraHardware(this)) { mHelper = new CameraHelper(this,

android studio designer preview: how to include device frame?

此生再无相见时 提交于 2019-11-27 23:33:13
There seems to be tons of answers to the opposite question "how to remove device frame" which instructs user to click the "settings" button inside preview to uncheck "include device frame (if available)". But for me using 2.2.2 on a mac and 2.2.1 earlier, such a button with that option never was available. Out of the box (dmg) Android Studio Designer always only shows the viewport without any device frame. This explanation of the Designer settings suggests that option is only available if "include device frame" option is selected, but for me that is a chicken & egg issue. I'm using the default

Android “tools” namespace in layout xml documentation

最后都变了- 提交于 2019-11-27 19:03:47
Per the question here, What's "tools:context" in Android layout files? The 'tools' namespace reference (xmlns:tools="http://schemas.android.com/tools") has begun to appear in my layouts recently, and I want to know more. The original post only described the 'tools:context' attribute, but I have also noticed usage of the "tools:listitem" attribute appearing when I have designated a preview layout item for a listview, i.e. <ListView android:id="@+id/lvCustomer" tools:listitem="@layout/customer_list_item" > </ListView> Are there more elements? What brought me to this 'tools' namespace is that I

AVCaptureVideoPreviewLayer (camera preview) freezes/stuck after moving to background and back

一个人想着一个人 提交于 2019-11-27 17:24:52
问题 Cant figure this one out. Everything works fine when the app is active, and than sometimes when i move the app to the background(pressing the home button) and than going back, the previewlayer freezes/stuck. Im using viewWillAppear and viewDidAppear for the set up. This is how i set everything up : var backCamera = AVCaptureDevice.devicesWithMediaType(AVMediaTypeVideo) var global_device : AVCaptureDevice! var captureSession: AVCaptureSession? override func viewWillAppear(animated: Bool) {

No “Docked Mode” option in “Preview” settings in Android Studio once undocked

别说谁变了你拦得住时间么 提交于 2019-11-27 17:04:11
问题 Here is the Docked mode option for "Preview" window. I removed the docked mode i.e. undocked it. And here is what I got. There is no more "Docked Mode" option. Now I cannot properly work with designing layouts. Preview automatically hides when I change anything in the layout. 回答1: Here is the simple solution for reverting to "Docked Mode". Select the Preview Window Go to Window menu > Active Tool Window There you go. The Preview window is in Docked Mode. And there is the option for Docked

Scaled live iPhone Camera view in center, “CGAffineTransformTranslate” not working

烈酒焚心 提交于 2019-11-27 15:13:00
问题 I have a little problem which I could not solve. I really hope someone can help me with that. I wanted to resize the live camera view and place it in the center, using the following code below: picker.cameraViewTransform = CGAffineTransformScale(picker.cameraViewTransform, 0.5, 0.56206); picker.cameraViewTransform = CGAffineTransformTranslate(picker.cameraViewTransform, 80, 120); But all I got was a scaled 1/2 sized view on the top left of the screen. It seems as though

Using readAsDataURL() for image preview

大城市里の小女人 提交于 2019-11-27 14:09:09
jsFiddle URL: http://jsfiddle.net/Xotic750/AjtLx Been working on this all day and I can't see the issue. It's probably due to my narrow understanding of how FileReader objects work but what I'm trying to do is use readAsDataURL() to obtain images a user has selected and preview them on the screen in a table. Everything is working minus...you guessed it...the preview...well sort of. I'm thinking I'm close because the preview will work, BUT it only displays the last image of the set. Say for example if I uploaded 6 images then the first row of 3 images would be broken, the second row the first 2