docs: Document basecamerabinsrc

This commit is contained in:
Thibault Saunier 2020-06-23 10:03:04 -04:00
parent ad49ae42f7
commit 059e8ff44a
8 changed files with 39 additions and 266 deletions

View file

@ -0,0 +1,7 @@
# BaseCamerabinSrc Library
This library should be linked to by getting cflags and libs from
gstreamer-plugins-bad-{{ gst_api_version.md }}.pc and adding
-lgstbasecamerabinsrc-{{ gst_api_version.md }} to the library flags.
> NOTE: This library API is considered *unstable*

View file

@ -0,0 +1 @@
gi-index

View file

@ -114,6 +114,7 @@ if build_gir
{'name': 'codecparsers', 'lib': gstcodecparsers_dep},
{'name': 'opencv', 'lib': gstopencv_dep, 'c_source_patterns': ['*.h', '*.cpp'], 'extra_c_flags': ['-x c++']},
{'name': 'adaptivedemux', 'lib': gstadaptivedemux_dep},
{'name': 'basecamerabinsrc', 'gir': basecamerabin_gir, 'lib': gstbasecamerabin_dep},
{'name': 'webrtc', 'gir': webrtc_gir, 'lib': gstwebrtc_dep, 'suffix': 'lib'},
{'name': 'audio', 'gir': audio_gir, 'lib': gstbadaudio_dep, 'prefix': 'bad-'},
{'name': 'transcoder', 'gir': transcoder_gir, 'lib': gst_transcoder_dep},

View file

@ -2586,135 +2586,6 @@
"filename": "gstcamerabin",
"license": "LGPL",
"other-types": {
"GstBaseCameraSrc": {
"hierarchy": [
"GstBaseCameraSrc",
"GstBin",
"GstElement",
"GstObject",
"GInitiallyUnowned",
"GObject"
],
"interfaces": [
"GstChildProxy"
],
"kind": "object",
"properties": {
"auto-start": {
"blurb": "Automatically starts capture when going to the PAUSED state",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "false",
"mutable": "null",
"readable": true,
"type": "gboolean",
"writable": true
},
"max-zoom": {
"blurb": "Digital zoom factor (e.g. 1.5 means 1.5x)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "10",
"max": "3.40282e+38",
"min": "1",
"mutable": "null",
"readable": true,
"type": "gfloat",
"writable": false
},
"mode": {
"blurb": "The capture mode (still image capture or video recording)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "mode-image (1)",
"mutable": "null",
"readable": true,
"type": "GstCameraBin2Mode",
"writable": true
},
"post-previews": {
"blurb": "If capture preview images should be posted to the bus",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "true",
"mutable": "null",
"readable": true,
"type": "gboolean",
"writable": true
},
"preview-caps": {
"blurb": "The caps of the preview image to be posted (NULL means ANY)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "ANY",
"mutable": "null",
"readable": true,
"type": "GstCaps",
"writable": true
},
"preview-filter": {
"blurb": "A custom preview filter to process preview image data",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"mutable": "null",
"readable": true,
"type": "GstElement",
"writable": true
},
"ready-for-capture": {
"blurb": "Informs this element is ready for starting another capture",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "true",
"mutable": "null",
"readable": true,
"type": "gboolean",
"writable": false
},
"zoom": {
"blurb": "Digital zoom factor (e.g. 1.5 means 1.5x)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "1",
"max": "3.40282e+38",
"min": "1",
"mutable": "null",
"readable": true,
"type": "gfloat",
"writable": true
}
},
"signals": {
"start-capture": {
"action": true,
"args": [],
"return-type": "void",
"when": "last"
},
"stop-capture": {
"action": true,
"args": [],
"return-type": "void",
"when": "last"
}
}
},
"GstCamFlags": {
"kind": "flags",
"values": [
@ -218949,135 +218820,6 @@
"filename": "gstuvch264",
"license": "LGPL",
"other-types": {
"GstBaseCameraSrc": {
"hierarchy": [
"GstBaseCameraSrc",
"GstBin",
"GstElement",
"GstObject",
"GInitiallyUnowned",
"GObject"
],
"interfaces": [
"GstChildProxy"
],
"kind": "object",
"properties": {
"auto-start": {
"blurb": "Automatically starts capture when going to the PAUSED state",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "false",
"mutable": "null",
"readable": true,
"type": "gboolean",
"writable": true
},
"max-zoom": {
"blurb": "Digital zoom factor (e.g. 1.5 means 1.5x)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "10",
"max": "3.40282e+38",
"min": "1",
"mutable": "null",
"readable": true,
"type": "gfloat",
"writable": false
},
"mode": {
"blurb": "The capture mode (still image capture or video recording)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "mode-video (2)",
"mutable": "null",
"readable": true,
"type": "GstCameraBin2Mode",
"writable": true
},
"post-previews": {
"blurb": "If capture preview images should be posted to the bus",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "true",
"mutable": "null",
"readable": true,
"type": "gboolean",
"writable": true
},
"preview-caps": {
"blurb": "The caps of the preview image to be posted (NULL means ANY)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "ANY",
"mutable": "null",
"readable": true,
"type": "GstCaps",
"writable": true
},
"preview-filter": {
"blurb": "A custom preview filter to process preview image data",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"mutable": "null",
"readable": true,
"type": "GstElement",
"writable": true
},
"ready-for-capture": {
"blurb": "Informs this element is ready for starting another capture",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "true",
"mutable": "null",
"readable": true,
"type": "gboolean",
"writable": false
},
"zoom": {
"blurb": "Digital zoom factor (e.g. 1.5 means 1.5x)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "1",
"max": "3.40282e+38",
"min": "1",
"mutable": "null",
"readable": true,
"type": "gfloat",
"writable": true
}
},
"signals": {
"start-capture": {
"action": true,
"args": [],
"return-type": "void",
"when": "last"
},
"stop-capture": {
"action": true,
"args": [],
"return-type": "void",
"when": "last"
}
}
},
"GstCameraBin2Mode": {
"kind": "enum",
"values": [

View file

@ -32,7 +32,7 @@
*
* * 3 pads: viewfinder, image capture, video capture
*
* During construct_pipeline() vmethod a subclass can add several elements into
* During `construct_pipeline()` vmethod a subclass can add several elements into
* the bin and expose 3 srcs pads as ghostpads implementing the 3 pad templates.
*
* However the subclass is responsible for adding the pad templates for the
@ -60,7 +60,7 @@
* dataflow methods on these pads. This way all functionality can be implemented
* directly in the subclass without extra elements.
*
* The src will receive the capture mode from #GstCameraBin2 on the
* The src will receive the capture mode from `GstCameraBin2` on the
* #GstBaseCameraSrc:mode property. Possible capture modes are defined in
* #GstCameraBinMode.
*/
@ -73,6 +73,14 @@
#include <gst/glib-compat-private.h>
#include "gstbasecamerasrc.h"
#define DEFAULT_WIDTH 640
#define DEFAULT_HEIGHT 480
#define DEFAULT_CAPTURE_WIDTH 800
#define DEFAULT_CAPTURE_HEIGHT 600
#define DEFAULT_FPS_N 0 /* makes it use the default */
#define DEFAULT_FPS_D 1
#define DEFAULT_ZOOM MIN_ZOOM
enum
{
PROP_0,
@ -546,8 +554,6 @@ gst_base_camera_src_class_init (GstBaseCameraSrcClass * klass)
gst_element_class_set_static_metadata (gstelement_class,
"Base class for camerabin src bin", "Source/Video",
"Abstracts capture device for camerabin2", "Rob Clark <rob@ti.com>");
gst_type_mark_as_plugin_api (GST_TYPE_BASE_CAMERA_SRC, 0);
}
static void

View file

@ -22,8 +22,7 @@
* SECTION:camerabingeneral
* @short_description: helper functions for #GstCameraBin and it's modules
*
* Common helper functions for #GstCameraBin, #GstCameraBinImage and
* #GstCameraBinVideo.
* Common helper functions for #GstCameraBin.
*
*/
#ifdef HAVE_CONFIG_H

View file

@ -22,6 +22,24 @@ gstbasecamerabin = library('gstbasecamerabinsrc-' + api_version,
dependencies : [gstapp_dep],
)
_sources = []
if build_gir
basecamerabin_gir = gnome.generate_gir(gstbasecamerabin,
sources : camerabin_sources + camerabin_headers,
namespace : 'GstBadBaseCameraBin',
nsversion : api_version,
identifier_prefix : 'Gst',
symbol_prefix : 'gst',
export_packages : 'gstreamer-bad-base-camerabinsrc-1.0',
includes : ['Gst-1.0', 'GstApp-1.0'],
install : false, # Only for the documentation
extra_args : gir_init_section + ['-DGST_USE_UNSTABLE_API'],
dependencies : [gstapp_dep],
build_by_default : true,
)
_sources += [basecamerabin_gir]
endif
gstbasecamerabin_dep = declare_dependency(link_with : gstbasecamerabin,
include_directories : [libsinc],
dependencies : [gstapp_dep])

View file

@ -847,7 +847,6 @@ gst_camera_bin_class_init (GstCameraBin2Class * klass)
NULL, NULL, NULL, G_TYPE_NONE, 0);
gst_type_mark_as_plugin_api (GST_TYPE_CAM_FLAGS, 0);
gst_type_mark_as_plugin_api (GST_TYPE_CAMERABIN_MODE, 0);
}
static void
@ -866,7 +865,7 @@ gst_camera_bin_init (GstCameraBin2 * camera)
g_cond_init (&camera->video_state_cond);
/* capsfilters are created here as we proxy their caps properties and
* this way we avoid having to store the caps while on NULL state to
* this way we avoid having to store the caps while on NULL state to
* set them later */
camera->videobin_capsfilter = gst_element_factory_make ("capsfilter",
"videobin-capsfilter");