Skip to content

Commit 45711f6

Browse files
author
Hinko Kocevar
committed
initial imort of aravis code
1 parent 6f896a8 commit 45711f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+5526
-1
lines changed

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616

1717
EXE = imAravis
1818
SOURCES = main.cpp
19+
SOURCES += imaravis.cpp
1920
SOURCES += ./imgui/imgui_impl_glfw.cpp ./imgui/imgui_impl_opengl3.cpp
2021
SOURCES += ./imgui/imgui.cpp ./imgui/imgui_demo.cpp ./imgui/imgui_draw.cpp ./imgui/imgui_widgets.cpp
2122
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
2223
UNAME_S := $(shell uname -s)
2324

2425
CXXFLAGS = -I./imgui -I.
26+
CXXFLAGS += $(shell PKG_CONFIG_PATH=./aravis/lib/x86_64-linux-gnu/pkgconfig pkg-config --cflags aravis-0.8)
2527
CXXFLAGS += -g -Wall -Wformat
26-
LIBS =
28+
LIBS = $(shell PKG_CONFIG_PATH=./aravis/lib/x86_64-linux-gnu/pkgconfig pkg-config --libs aravis-0.8)
2729

2830
##---------------------------------------------------------------------
2931
## OPENGL LOADER

aravis/bin/arv-fake-gv-camera-0.8

217 KB
Binary file not shown.

aravis/bin/arv-tool-0.8

1.29 MB
Binary file not shown.

aravis/include/aravis-0.8/arv.h

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/* Aravis - Digital camera library
2+
*
3+
* Copyright © 2009-2019 Emmanuel Pacaud
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation; either
8+
* version 2 of the License, or (at your option) any later version.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General
16+
* Public License along with this library; if not, write to the
17+
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18+
* Boston, MA 02110-1301, USA.
19+
*
20+
* Author: Emmanuel Pacaud <[email protected]>
21+
*/
22+
23+
#ifndef ARV_H
24+
#define ARV_H
25+
26+
#define ARV_H_INSIDE
27+
28+
#include <arvtypes.h>
29+
30+
#include <arvbuffer.h>
31+
#include <arvcamera.h>
32+
#include <arvchunkparser.h>
33+
#include <arvdebug.h>
34+
#include <arvdevice.h>
35+
36+
#include <arvdomcharacterdata.h>
37+
#include <arvdomdocumentfragment.h>
38+
#include <arvdomdocument.h>
39+
#include <arvdomelement.h>
40+
#include <arvdomimplementation.h>
41+
#include <arvdomnamednodemap.h>
42+
#include <arvdomnode.h>
43+
#include <arvdomnodelist.h>
44+
#include <arvdomnodechildlist.h>
45+
#include <arvdomparser.h>
46+
#include <arvdomtext.h>
47+
48+
#include <arvenums.h>
49+
#include <arvevaluator.h>
50+
51+
#include <arvfakecamera.h>
52+
#include <arvfakedevice.h>
53+
#include <arvfakeinterface.h>
54+
#include <arvfakestream.h>
55+
56+
#include <arvfeatures.h>
57+
58+
#include <arvgc.h>
59+
#include <arvgcboolean.h>
60+
#include <arvgccategory.h>
61+
#include <arvgccommand.h>
62+
#include <arvgcconverter.h>
63+
#include <arvgcconverternode.h>
64+
#include <arvgcenumentry.h>
65+
#include <arvgcenumeration.h>
66+
#include <arvgcenums.h>
67+
#include <arvgcfeaturenode.h>
68+
#include <arvgcfloat.h>
69+
#include <arvgcfloatnode.h>
70+
#include <arvgcfloatregnode.h>
71+
#include <arvgcgroupnode.h>
72+
#include <arvgcindexnode.h>
73+
#include <arvgcintconverternode.h>
74+
#include <arvgcinteger.h>
75+
#include <arvgcintegernode.h>
76+
#include <arvgcintregnode.h>
77+
#include <arvgcintswissknifenode.h>
78+
#include <arvgcinvalidatornode.h>
79+
#include <arvgcnode.h>
80+
#include <arvgcmaskedintregnode.h>
81+
#include <arvgcport.h>
82+
#include <arvgcpropertynode.h>
83+
#include <arvgcregisterdescriptionnode.h>
84+
#include <arvgcregister.h>
85+
#include <arvgcregisternode.h>
86+
#include <arvgcselector.h>
87+
#include <arvgcstring.h>
88+
#include <arvgcstringregnode.h>
89+
#include <arvgcstructregnode.h>
90+
#include <arvgcstructentrynode.h>
91+
#include <arvgcswissknife.h>
92+
#include <arvgcswissknifenode.h>
93+
#include <arvgcvalueindexednode.h>
94+
95+
#include <arvgvdevice.h>
96+
#include <arvgvfakecamera.h>
97+
#include <arvgvinterface.h>
98+
#include <arvgvstream.h>
99+
100+
#include <arvinterface.h>
101+
#include <arvmisc.h>
102+
#include <arvrealtime.h>
103+
#include <arvstream.h>
104+
#include <arvstr.h>
105+
#include <arvsystem.h>
106+
107+
#if ARAVIS_HAS_USB
108+
#include <arvuvinterface.h>
109+
#include <arvuvdevice.h>
110+
#include <arvuvstream.h>
111+
#endif
112+
113+
#include <arvversion.h>
114+
#include <arvzip.h>
115+
#include <arvxmlschema.h>
116+
117+
#undef ARV_H_INSIDE
118+
119+
#endif

aravis/include/aravis-0.8/arvbuffer.h

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/* Aravis - Digital camera library
2+
*
3+
* Copyright © 2009-2019 Emmanuel Pacaud
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation; either
8+
* version 2 of the License, or (at your option) any later version.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General
16+
* Public License along with this library; if not, write to the
17+
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18+
* Boston, MA 02110-1301, USA.
19+
*
20+
* Author: Emmanuel Pacaud <[email protected]>
21+
*/
22+
23+
#ifndef ARV_BUFFER_H
24+
#define ARV_BUFFER_H
25+
26+
#if !defined (ARV_H_INSIDE) && !defined (ARAVIS_COMPILATION)
27+
#error "Only <arv.h> can be included directly."
28+
#endif
29+
30+
#include <arvtypes.h>
31+
32+
G_BEGIN_DECLS
33+
34+
/**
35+
* ArvBufferStatus:
36+
* @ARV_BUFFER_STATUS_UNKNOWN: unknown status
37+
* @ARV_BUFFER_STATUS_SUCCESS: the buffer contains a valid image
38+
* @ARV_BUFFER_STATUS_CLEARED: the buffer is cleared
39+
* @ARV_BUFFER_STATUS_TIMEOUT: timeout was reached before all packets are received
40+
* @ARV_BUFFER_STATUS_MISSING_PACKETS: stream has missing packets
41+
* @ARV_BUFFER_STATUS_WRONG_PACKET_ID: stream has packet with wrong id
42+
* @ARV_BUFFER_STATUS_SIZE_MISMATCH: the received image didn't fit in the buffer data space
43+
* @ARV_BUFFER_STATUS_FILLING: the image is currently being filled
44+
* @ARV_BUFFER_STATUS_ABORTED: the filling was aborted before completion
45+
*/
46+
47+
typedef enum {
48+
ARV_BUFFER_STATUS_UNKNOWN = -1,
49+
ARV_BUFFER_STATUS_SUCCESS = 0,
50+
ARV_BUFFER_STATUS_CLEARED,
51+
ARV_BUFFER_STATUS_TIMEOUT,
52+
ARV_BUFFER_STATUS_MISSING_PACKETS,
53+
ARV_BUFFER_STATUS_WRONG_PACKET_ID,
54+
ARV_BUFFER_STATUS_SIZE_MISMATCH,
55+
ARV_BUFFER_STATUS_FILLING,
56+
ARV_BUFFER_STATUS_ABORTED
57+
} ArvBufferStatus;
58+
59+
/**
60+
* ArvBufferPayloadType:
61+
* @ARV_BUFFER_PAYLOAD_TYPE_UNKNOWN: unknown payload type
62+
* @ARV_BUFFER_PAYLOAD_TYPE_IMAGE: image data
63+
* @ARV_BUFFER_PAYLOAD_TYPE_RAWDATA: raw data
64+
* @ARV_BUFFER_PAYLOAD_TYPE_FILE: file
65+
* @ARV_BUFFER_PAYLOAD_TYPE_CHUNK_DATA: chunk data
66+
* @ARV_BUFFER_PAYLOAD_TYPE_EXTENDED_CHUNK_DATA: extended chunk data
67+
* @ARV_BUFFER_PAYLOAD_TYPE_JPEG: JPEG data
68+
* @ARV_BUFFER_PAYLOAD_TYPE_JPEG2000: JPEG2000 data
69+
* @ARV_BUFFER_PAYLOAD_TYPE_H264: h264 data
70+
* @ARV_BUFFER_PAYLOAD_TYPE_MULTIZONE_IMAGE: multizone image
71+
* @ARV_BUFFER_PAYLOAD_TYPE_IMAGE_EXTENDED_CHUNK: image and chunk data
72+
*/
73+
74+
typedef enum {
75+
ARV_BUFFER_PAYLOAD_TYPE_UNKNOWN = -1,
76+
ARV_BUFFER_PAYLOAD_TYPE_IMAGE = 0x0001,
77+
ARV_BUFFER_PAYLOAD_TYPE_RAWDATA = 0x0002,
78+
ARV_BUFFER_PAYLOAD_TYPE_FILE = 0x0003,
79+
ARV_BUFFER_PAYLOAD_TYPE_CHUNK_DATA = 0x0004,
80+
ARV_BUFFER_PAYLOAD_TYPE_EXTENDED_CHUNK_DATA = 0x0005, /* Deprecated */
81+
ARV_BUFFER_PAYLOAD_TYPE_JPEG = 0x0006,
82+
ARV_BUFFER_PAYLOAD_TYPE_JPEG2000 = 0x0007,
83+
ARV_BUFFER_PAYLOAD_TYPE_H264 = 0x0008,
84+
ARV_BUFFER_PAYLOAD_TYPE_MULTIZONE_IMAGE = 0x0009,
85+
ARV_BUFFER_PAYLOAD_TYPE_IMAGE_EXTENDED_CHUNK = 0x4001
86+
} ArvBufferPayloadType;
87+
88+
#define ARV_TYPE_BUFFER (arv_buffer_get_type ())
89+
G_DECLARE_FINAL_TYPE (ArvBuffer, arv_buffer, ARV, BUFFER, GObject)
90+
91+
typedef void (*ArvFrameCallback) (ArvBuffer *buffer);
92+
93+
ArvBuffer * arv_buffer_new_allocate (size_t size);
94+
ArvBuffer * arv_buffer_new (size_t size, void *preallocated);
95+
ArvBuffer * arv_buffer_new_full (size_t size, void *preallocated,
96+
void *user_data, GDestroyNotify user_data_destroy_func);
97+
98+
ArvBufferStatus arv_buffer_get_status (ArvBuffer *buffer);
99+
100+
const void * arv_buffer_get_user_data (ArvBuffer *buffer);
101+
102+
ArvBufferPayloadType arv_buffer_get_payload_type (ArvBuffer *buffer);
103+
guint64 arv_buffer_get_timestamp (ArvBuffer *buffer);
104+
void arv_buffer_set_timestamp (ArvBuffer *buffer, guint64 timestamp_ns);
105+
guint64 arv_buffer_get_system_timestamp (ArvBuffer *buffer);
106+
void arv_buffer_set_system_timestamp (ArvBuffer *buffer, guint64 timestamp_ns);
107+
guint64 arv_buffer_get_frame_id (ArvBuffer *buffer);
108+
const void * arv_buffer_get_data (ArvBuffer *buffer, size_t *size);
109+
110+
void arv_buffer_get_image_region (ArvBuffer *buffer, gint *x, gint *y, gint *width, gint *height);
111+
gint arv_buffer_get_image_width (ArvBuffer *buffer);
112+
gint arv_buffer_get_image_height (ArvBuffer *buffer);
113+
gint arv_buffer_get_image_x (ArvBuffer *buffer);
114+
gint arv_buffer_get_image_y (ArvBuffer *buffer);
115+
ArvPixelFormat arv_buffer_get_image_pixel_format (ArvBuffer *buffer);
116+
117+
gboolean arv_buffer_has_chunks (ArvBuffer *buffer);
118+
const void * arv_buffer_get_chunk_data (ArvBuffer *buffer, guint64 chunk_id, size_t *size);
119+
120+
G_END_DECLS
121+
122+
#endif

0 commit comments

Comments
 (0)