inspirit / capturedevice Goto Github PK
View Code? Open in Web Editor NEWAdobe Air Native Extension for video capturing from cameras
License: GNU Lesser General Public License v2.1
Adobe Air Native Extension for video capturing from cameras
License: GNU Lesser General Public License v2.1
Support?
Is it possible to attach this to a netstream? Just like a regular camera object?
I think there is an error with source paths:
The Main.as calls:
import ru.inspirit.asfeat.capture.CaptureDeviceInfo
While the structure is in fact:
ru.inspirit.capture.CaptureDeviceInfo
I've tried to correct that, but couldn't make it work at all on my Mac or my iPhone.
// setup for specific data
capt.setupForDataType(CaptureDevice.GET_FRAME_BITMAP); //Error
I am using a Logitech® HD Pro Webcam C920.
I am trying to get a still image from my webcam.This feature should be accessible through Direct Show on windows. The video feed is working perfectly, but my camera also has a still image feature, which is able to capture a still image in 15Mega pixel.
I am assuming the captureStillImage() function would be able to grab this high resolution image, but the CaptureDevice.EVENT_STILL_IMAGE_READY never dispatches.
mycapt = new CaptureDevice(dev.name, 1920 , 1080, 60, 3);
capt.setupForDataType(CaptureDevice.GET_FRAME_BITMAP);
mycapt.addEventListener(CaptureDevice.EVENT_STILL_IMAGE_READY, onStillImageReady)
mycapt.captureStillImage()
Am i missing something?
/Thanks
Dennis
I am running AIR 4.0, Windows 7, using Flashdevelop. I have installed the logitech drivers
Hi,
I'm having difficulties understanding how to show the camera pictures depending on the orientation of the device. The rotations are even not the same for the rear and the front cameras. I'm not very familiar with IOS development, so maybe this is something known.
What method could be used to ensure we always do the right transformation on the grabbed bitmapdata to rotate it in front of user ?
I thought of applying rotation to the bitmapdata depending on camera/orientation, is that the only method ?
I mean, byte array with YYYYY.... that would save both some memory and cpu time
I finally got to compile actual ipa with this :) The code was
package com.example{
import ru.inspirit.capture.CaptureDevice;
import flash.text.TextField;
import ru.inspirit.capture.CaptureDeviceInfo;
import flash.events.Event;
import flash.display.Sprite;
public class Main extends Sprite {
private var capture : CaptureDevice ;
private var tf : TextField ;
public function Main( ){
tf = new TextField();
tf.autoSize = "left";
tf.textColor = 0xFF00;
addChild(tf);
try {
CaptureDevice.initialize();
var device : CaptureDeviceInfo = CaptureDevice.getDevices(false)[0];
capture = new CaptureDevice(device.name, 320, 240);
capture.setupForDataType(CaptureDevice.GET_FRAME_BITMAP);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
tf.text = "OK";
} catch ( e : Error ) {
tf.text = "SHIT :( " + e.toString();
}
}
private function onEnterFrame ( e : Event ) : void {
var newFrame : Boolean = capture.requestFrame(CaptureDevice.GET_FRAME_BITMAP);
if ( newFrame ) {
graphics.clear();
graphics.beginBitmapFill(capture.bmp);
graphics.drawRect(0, 0, 320, 240);
}
}
}
}
App compiles and installs on device with no problem, however all I have is this black screen. No crash reports, nothing.
What did I miss?
Is it possible to combine Starling framework with this native extension?
I'm asking this because you use your own implementation of Stage3D to draw the webcam texture (GPUImage). Is there a simple way to implement this with Starling?
Thank you.
Due to the implementation of AIR on iOS, all code is compiled into the application, meaning we are essentially distributing a binary of your lib, which according to GPGL requires that we release entire source code of our applications, even if we have never modified your source code at all.
Any thoughts on switching to something less restrictive?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.