Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gst-plugins-bad
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Justin Kim
gst-plugins-bad
Commits
b87b5a49
Commit
b87b5a49
authored
Sep 25, 2017
by
Justin Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ahc2src: implement get_capabilities
Signed-off-by:
Justin Kim
<
justin.kim@collabora.com
>
parent
3a7a2501
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
sys/androidmedia/gstahc2src.c
sys/androidmedia/gstahc2src.c
+47
-0
No files found.
sys/androidmedia/gstahc2src.c
View file @
b87b5a49
...
...
@@ -177,6 +177,43 @@ enum
static
guint
signals
[
LAST_SIGNAL
]
=
{
0
};
static
GstPhotographyCaps
gst_ahc2_src_get_capabilities
(
GstPhotography
*
photo
)
{
GstAHC2Src
*
self
=
GST_AHC2_SRC
(
photo
);
GstAHC2SrcPrivate
*
priv
=
GST_AHC2_SRC_GET_PRIVATE
(
self
);
GstPhotographyCaps
caps
=
GST_PHOTOGRAPHY_CAPS_EV_COMP
|
GST_PHOTOGRAPHY_CAPS_WB_MODE
|
GST_PHOTOGRAPHY_CAPS_TONE
|
GST_PHOTOGRAPHY_CAPS_SCENE
|
GST_PHOTOGRAPHY_CAPS_FLASH
|
GST_PHOTOGRAPHY_CAPS_FOCUS
;
ACameraMetadata
*
metadata
=
NULL
;
ACameraMetadata_const_entry
entry
;
g_return_val_if_fail
(
priv
->
camera_manager
!=
NULL
,
caps
);
g_return_val_if_fail
(
priv
->
camera_id_list
!=
NULL
,
caps
);
g_return_val_if_fail
(
priv
->
camera_index
<
priv
->
camera_id_list
->
numCameras
,
caps
);
if
(
ACameraManager_getCameraCharacteristics
(
priv
->
camera_manager
,
priv
->
camera_id_list
->
cameraIds
[
priv
->
camera_index
],
&
metadata
)
!=
ACAMERA_OK
)
{
return
caps
;
}
if
(
ACameraMetadata_getConstEntry
(
metadata
,
ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS
,
&
entry
)
==
ACAMERA_OK
)
{
if
(
entry
.
count
>
1
)
{
caps
|=
GST_PHOTOGRAPHY_CAPS_ZOOM
;
}
}
g_clear_pointer
(
&
metadata
,
(
GDestroyNotify
)
ACameraMetadata_free
);
return
caps
;
}
static
gboolean
gst_ahc2_src_get_white_balance_mode
(
GstPhotography
*
photo
,
GstPhotographyWhiteBalanceMode
*
mode
)
...
...
@@ -738,6 +775,14 @@ gst_ahc2_src_get_property (GObject * object,
case
PROP_MAX_IMAGES
:
g_value_set_int
(
value
,
priv
->
max_images
);
break
;
case
PROP_CAPABILITIES
:{
GstPhotographyCaps
caps
;
caps
=
gst_ahc2_src_get_capabilities
(
GST_PHOTOGRAPHY
(
self
));
g_value_set_ulong
(
value
,
caps
);
break
;
}
case
PROP_WHITE_BALANCE_MODE
:
{
GstPhotographyWhiteBalanceMode
wb
;
if
(
gst_ahc2_src_get_white_balance_mode
(
GST_PHOTOGRAPHY
(
self
),
&
wb
))
...
...
@@ -1195,6 +1240,8 @@ gst_ahc2_src_photography_init (gpointer g_iface, gpointer iface_data)
{
GstPhotographyInterface
*
iface
=
g_iface
;
iface
->
get_capabilities
=
gst_ahc2_src_get_capabilities
;
iface
->
get_white_balance_mode
=
gst_ahc2_src_get_white_balance_mode
;
iface
->
set_white_balance_mode
=
gst_ahc2_src_set_white_balance_mode
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment