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-good
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
George Kiagiadakis
gst-plugins-good
Commits
8f6bd0db
Commit
8f6bd0db
authored
Apr 04, 2014
by
Nicolas Dufresne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v4l2object: Don't hardcode min/max use default instead
parent
f6d425bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
sys/v4l2/gstv4l2object.c
sys/v4l2/gstv4l2object.c
+11
-5
No files found.
sys/v4l2/gstv4l2object.c
View file @
8f6bd0db
...
...
@@ -3174,10 +3174,16 @@ gboolean
gst_v4l2_object_propose_allocation
(
GstV4l2Object
*
obj
,
GstQuery
*
query
)
{
GstBufferPool
*
pool
;
guint
size
=
0
;
/* we need at least 2 buffers to operate */
guint
size
,
min
,
max
;
GstCaps
*
caps
;
gboolean
need_pool
;
/* Set defaults allocation parameters */
size
=
obj
->
sizeimage
;
min
=
GST_V4L2_MIN_BUFFERS
;
max
=
VIDEO_MAX_FRAME
;
gst_query_parse_allocation
(
query
,
&
caps
,
&
need_pool
);
if
(
caps
==
NULL
)
...
...
@@ -3192,7 +3198,7 @@ gst_v4l2_object_propose_allocation (GstV4l2Object * obj, GstQuery * query)
/* we had a pool, check caps */
config
=
gst_buffer_pool_get_config
(
pool
);
gst_buffer_pool_config_get_params
(
config
,
&
pcaps
,
&
size
,
NULL
,
NULL
);
gst_buffer_pool_config_get_params
(
config
,
&
pcaps
,
NULL
,
NULL
,
NULL
);
GST_DEBUG_OBJECT
(
obj
->
element
,
"we had a pool with caps %"
GST_PTR_FORMAT
,
pcaps
);
...
...
@@ -3203,12 +3209,12 @@ gst_v4l2_object_propose_allocation (GstV4l2Object * obj, GstQuery * query)
}
gst_structure_free
(
config
);
}
/* we need at least 2 buffers to operate */
gst_query_add_allocation_pool
(
query
,
pool
,
size
,
2
,
0
);
gst_query_add_allocation_pool
(
query
,
pool
,
size
,
min
,
max
);
/* we also support various metadata */
/* FIXME should it be set per class ? */
gst_query_add_allocation_meta
(
query
,
GST_VIDEO_META_API_TYPE
,
NULL
);
/* FIXME probe for crop support */
gst_query_add_allocation_meta
(
query
,
GST_VIDEO_CROP_META_API_TYPE
,
NULL
);
if
(
pool
)
...
...
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