Comments (3)
Hi Chris,
You can get the functionality you're looking for by implementing your own
CamUnitDriver to accompany your custom unit, instead of using the stock driver.
Specifically, you'll want to override the start() and stop() methods of
CamUnitDriver
to do the initialization and cleanup you're looking for. See
trunk/plugins/dc1394/input_dc1394.c for an example.
Original comment by [email protected]
on 12 Apr 2010 at 5:56
- Changed state: WontFix
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from camunits.
Thanks Albert,
I actually am using a custom CamUnitDriver for other things already. I was using
the start() and stop() method for the library initialization, but it seemed
inappropriate since there's no fundamental reason that the driver couldn't be
instantiated multiple times as a GType. I guess don't have the clearest
understanding of what the plugin does and why it is seperate from the driver.
Is the
plugin meant to only serve as a thin GModule wrapper around a single Driver
instance?
Is it sane to assume that a CamUnitDriver will only be instantiated once?
Original comment by [email protected]
on 12 Apr 2010 at 6:16
from camunits.
Hi Chris,
That's correct. The plugin is a thin wrapper around a CamUnitDriver.
It is safe to assume that there will only be one instance of a CamUnitDriver in
memory. Under "normal" usage of CamUnits, the start() method of a driver is
called
when the first CamUnitChain is created, and the stop() method of a driver is
called
when the last CamUnitChain is destroyed.
Original comment by [email protected]
on 12 Apr 2010 at 7:18
from camunits.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camunits.