Miscellaneous Utilities

Miscellaneous Utilities — Miscellaneous utility functions and enums

Functions

Types and Values

Object Hierarchy

    GEnum
    ╰── ApertureBarcode

Description

Functions

aperture_init ()

void
aperture_init (int *argc,
               char ***argv);

Initializes the Aperture library, if it hasn't been initialized already.

This will initialize GStreamer for you. If you don't want this, initialize GStreamer yourself before calling aperture_init().

Parameters

argc

pointer to the number of command line arguments, or NULL.

[inout][optional]

argv

pointer to the program's command line arguments, or NULL.

[array length=argc][inout][nullable][optional][transfer none]

Since: 0.1


aperture_is_initialized ()

gboolean
aperture_is_initialized (void);

Gets whether Aperture is initialized.

Returns

TRUE if the library is initialized, otherwise FALSE

Since: 0.1


aperture_is_barcode_detection_enabled ()

gboolean
aperture_is_barcode_detection_enabled (void);

Determines whether the barcode detection features of Aperture are enabled.

This is based on whether the zbar element is available to GStreamer. It is part of the gst-plugins-bad package. Note that many distributions don't enable the zbar component of gst-plugins-bad by default, because it needs an extra dependency (the zbar library). You may need to find a gst-plugins-bad-extras package or similar, or compile that particular plugin yourself. For a Flatpak example, see the demo application in Aperture's source code.

Note that Aperture itself does *not* need to be recompiled to enable barcode detection. It is based solely on whether the GStreamer plugin is available.

Returns

TRUE if barcode detection is available, otherwise FALSE

Since: 0.1


aperture_barcode_type_from_string ()

ApertureBarcode
aperture_barcode_type_from_string (const char *string);

aperture_get_diagnostic_info ()

char *
aperture_get_diagnostic_info (void);

Gets a string containing useful debugging information, suitable for including in bug reports, for example. This could include versions of relevant libraries, basic software and hardware information, etc.

No guarantees are made about the format of the string.

Returns

the diagnostic string. Free with g_free().

[transfer full]

Since: 0.1

Types and Values

enum ApertureBarcode

Represents the type of a barcode detected in a video stream.

Different barcode types are used for different purposes and different types of data, so it is important to check a barcode's type before attempting to use its data.

Members

APERTURE_BARCODE_UNKNOWN

A barcode was detected, but Aperture does not recognize its type.

 

APERTURE_BARCODE_COMPOSITE

The code is a composite of multiple barcode types.

 

APERTURE_BARCODE_EAN2

https://en.wikipedia.org/wiki/EAN-2

 

APERTURE_BARCODE_EAN5

https://en.wikipedia.org/wiki/EAN-5

 

APERTURE_BARCODE_EAN8

https://en.wikipedia.org/wiki/EAN-8

 

APERTURE_BARCODE_EAN13

https://en.wikipedia.org/wiki/International_Article_Number

 

APERTURE_BARCODE_UPCA

https://en.wikipedia.org/wiki/Universal_Product_Code

 

APERTURE_BARCODE_UPCE

https://en.wikipedia.org/wiki/Universal_Product_Code#UPC-E

 

APERTURE_BARCODE_ISBN10

https://en.wikipedia.org/wiki/International_Standard_Book_Number

 

APERTURE_BARCODE_ISBN13

https://en.wikipedia.org/wiki/International_Standard_Book_Number

 

APERTURE_BARCODE_I25

https://en.wikipedia.org/wiki/Interleaved_2_of_5

 

APERTURE_BARCODE_DATABAR

https://en.wikipedia.org/wiki/GS1_DataBar

 

APERTURE_BARCODE_DATABAR_EXP

https://en.wikipedia.org/wiki/GS1_DataBar

 

APERTURE_BARCODE_CODABAR

https://en.wikipedia.org/wiki/Codabar

 

APERTURE_BARCODE_CODE39

https://en.wikipedia.org/wiki/Code_39

 

APERTURE_BARCODE_CODE93

https://en.wikipedia.org/wiki/Code_93

 

APERTURE_BARCODE_CODE128

https://en.wikipedia.org/wiki/Code_128

 

APERTURE_BARCODE_PDF417

https://en.wikipedia.org/wiki/PDF417

 

APERTURE_BARCODE_QR

https://en.wikipedia.org/wiki/QR_code

 

Since: 0.1