Peter Johnson
9a8f66e3e5
SourceImpl: Add no-copy PutFrame.
2016-12-04 21:45:37 -08:00
Peter Johnson
ef39713219
Revert "Don't output \r\n before boundary. This throws off some clients."
...
This reverts commit ae8c8ec230 .
2016-12-04 21:45:37 -08:00
Peter Johnson
1f93a4ab4f
Change acronym class names to use MixedCase (UsbCamera, MjpegServer). ( #22 )
2016-12-04 00:08:47 -08:00
Thad House
3625f11e08
Adds C methods that take a cv::Mat* ( #21 )
...
Some implementations of OpenCV use cv::Mat as their native pointer
rather then CvMat, so we need to support both in the C interface
2016-11-30 22:00:44 -08:00
Peter Johnson
ae8c8ec230
Don't output \r\n before boundary. This throws off some clients.
2016-11-18 19:52:22 -08:00
Peter Johnson
ec8c0eb3c2
Fix FPS setting and crash in reapplying settings.
2016-11-18 19:23:35 -08:00
Peter Johnson
3d898dd8f7
MJPEGServer: Fix URI %xx-decoding.
2016-11-18 19:03:35 -08:00
Peter Johnson
df18e178ee
MJPEGServer: Provide a bare-bones HTML root page.
2016-11-18 18:58:03 -08:00
Peter Johnson
71a6e08988
MJPEGServer: Make a couple of tweaks for Axis camera compatibility.
2016-11-18 18:33:49 -08:00
Peter Johnson
a05636d9a6
Add data accessors for USBCamera and MJPEGServer.
...
USBCamera: getPath()
MJPEGServer: getListenAddress() and getPort()
2016-11-18 17:21:03 -08:00
Peter Johnson
5eecbfd9bf
Implement immediate notify on network interfaces event.
2016-11-18 16:27:26 -08:00
Peter Johnson
65514b3028
USBCamera: Update description on reconnect.
2016-11-18 16:16:04 -08:00
Peter Johnson
bad4ca4666
Add event for network interfaces change.
2016-11-18 12:41:08 -08:00
Peter Johnson
5fecc57e8a
Add methods to get the hostname and network interfaces.
2016-11-18 12:41:08 -08:00
Peter Johnson
9945459a41
Notify sink enable and disable events.
2016-11-18 12:41:08 -08:00
Peter Johnson
22c11fad36
Notify source property events.
2016-11-18 12:41:08 -08:00
Peter Johnson
c6b527d452
Notify source connect, disconnect, and video mode changes.
2016-11-18 12:41:08 -08:00
Peter Johnson
8e9911d330
Notify on sink source change.
2016-11-18 12:41:08 -08:00
Peter Johnson
b245725941
Notify on source and sink create and destroy.
2016-11-18 12:41:08 -08:00
Peter Johnson
154ae5dcbf
Notifier: Take Impl rather than handle in notification functions.
...
Also take CS_EventKind rather than RawEvent::Kind.
Still provide the handle methods for the basic events (this is particularly
useful for create and destroy events).
This makes these functions easier to use from within the implementation.
2016-11-18 12:41:08 -08:00
Peter Johnson
bae2037086
Handle: Add methods to get Data struct from Impl pointer.
...
Also make a number of methods in UnlimitedHandleResource inline.
2016-11-18 12:41:08 -08:00
Peter Johnson
791cabbc26
Rename Type to Kind.
2016-11-18 12:41:08 -08:00
Peter Johnson
3381340eb5
Add method to get source/sink type.
...
Also provide convenience method to enumerate all sinks connected to a source.
2016-11-18 12:41:08 -08:00
Peter Johnson
0bcafedebf
MJPEGServerImpl: Refactor NeedsDHT.
2016-11-18 12:40:31 -08:00
Peter Johnson
7e0e8286eb
SourceImpl: Refactor frame allocation into AllocFrame.
2016-11-18 12:40:31 -08:00
Peter Johnson
5ae1162378
Move MJPEG DHT insertion from SourceImpl to MJPEGServerImpl.
...
OpenCV imdecode supports images with no DHT, so it's not necessary to
add it on the source side.
2016-11-18 12:40:31 -08:00
Peter Johnson
c80c4ae55c
MJPEGServer: Use worker thread model.
...
Also make the worker thread a class for future per-client configuration use.
Depends on wpiutil #153 .
2016-11-18 12:40:31 -08:00
Peter Johnson
254b88bdbe
Start adding support for non-MJPEG frame types.
...
Not yet supported by MJPEGServer.
2016-11-18 12:40:31 -08:00
Peter Johnson
f83ff41e47
Rename from cameraserver to cscore.
...
This is primarily to avoid header naming conflicts with wpilib.
2016-11-05 22:11:55 -07:00
Peter Johnson
29d8d1d74c
Implement listener interfaces.
2016-11-05 13:19:02 -07:00
Peter Johnson
8d2efb2838
Improve listener interface.
...
Now a structure is passed back, enabling combining the existing source
and sink listeners and adding property listeners as well.
2016-11-05 13:19:02 -07:00
Peter Johnson
46085824ae
Add DHT data to MJPEG source images if not present.
2016-11-02 21:32:13 -07:00
Peter Johnson
e10b399f51
CvSource: Implement NotifyError.
2016-10-28 00:47:18 -07:00
Peter Johnson
39a8195386
CvSourceImpl: Add stub for CreateProperty(callback).
2016-10-28 00:46:43 -07:00
Peter Johnson
43331419f6
MJPEGServer: Output boundary at start of image instead of end.
...
This avoids hiccups/timeouts causing the next image being seen as a
completely new file rather than a continuation of a multi-part.
2016-10-26 23:58:22 -07:00
Peter Johnson
c66a55d81a
Implement CvSink.
...
* Make CvSink constructor explicit.
* Add SetDescription function.
2016-10-26 23:37:00 -07:00
Peter Johnson
9a44a38141
Fix source and sink refcounting.
2016-10-26 23:34:44 -07:00
Peter Johnson
5f69cb2a5b
SinkImpl: Refactor GetDescription, add GetError, SetEnabled.
2016-10-26 23:31:48 -07:00
Peter Johnson
a5f63c3ae3
SourceImpl::GetNextFrame(): Avoid spurious wakeups.
2016-10-26 23:31:18 -07:00
Peter Johnson
0053962182
SourceImpl: add PutError().
...
The error message is stored as a normal frame with unknown pixel format.
2016-10-26 23:30:13 -07:00
Peter Johnson
c462d0b249
CvSourceImpl.h: Remove unnecessary include.
2016-10-26 23:26:15 -07:00
Peter Johnson
7ca6c5ef34
Remove RemoveSourceProperty.
2016-10-24 22:29:58 -07:00
Peter Johnson
511d551546
Implement most CvSource functionality.
2016-10-24 20:27:00 -07:00
Peter Johnson
7ea13f7e03
Refactor properties from USBCameraImpl to SourceImpl.
2016-10-23 18:20:56 -07:00
Peter Johnson
9142cbb820
CvSource: Update interface functions.
...
- Add SetDescription
- Supply minimum, maximum, step, defaultValue, and value to CreateProperty
- Add SetEnumPropertyChoices
2016-10-23 08:43:06 -07:00
Peter Johnson
1f6b386325
Implement frame timestamps and use wpi::Now() for generation.
2016-10-22 22:09:47 -07:00
Peter Johnson
218718a063
Add OpenCV dependency and update OpenCV interfaces.
...
This requires the wpilibsuite/opencv packages with PRs 1-3 applied.
2016-10-22 09:57:33 -07:00
Peter Johnson
0a8e0e9746
MJPEGServer: Pass resolution and FPS requests to source.
2016-10-17 20:16:49 -07:00
Peter Johnson
9caa0af4d9
USBCamera, HTTPCamera: Name functions consistent with classes.
2016-10-15 23:07:28 -07:00
Peter Johnson
30f4ecd171
Rename HTTPSink to MJPEGServer.
2016-10-15 22:44:26 -07:00