Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
91efa79e
Commit
91efa79e
authored
Mar 16, 2014
by
Nicolas Dufresne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v4l2transform: Ensure internal buffer pools actication
parent
7a4b0760
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
sys/v4l2/gstv4l2transform.c
sys/v4l2/gstv4l2transform.c
+17
-7
No files found.
sys/v4l2/gstv4l2transform.c
View file @
91efa79e
...
@@ -291,11 +291,22 @@ gst_v4l2_transform_decide_allocation (GstBaseTransform * trans,
...
@@ -291,11 +291,22 @@ gst_v4l2_transform_decide_allocation (GstBaseTransform * trans,
GstV4l2Transform
*
self
=
GST_V4L2_TRANSFORM
(
trans
);
GstV4l2Transform
*
self
=
GST_V4L2_TRANSFORM
(
trans
);
gboolean
ret
=
FALSE
;
gboolean
ret
=
FALSE
;
if
(
gst_v4l2_object_decide_allocation
(
self
->
v4l2capture
,
query
))
if
(
gst_v4l2_object_decide_allocation
(
self
->
v4l2capture
,
query
))
{
GstBufferPool
*
pool
=
GST_BUFFER_POOL
(
self
->
v4l2capture
->
pool
);
ret
=
GST_BASE_TRANSFORM_CLASS
(
parent_class
)
->
decide_allocation
(
trans
,
ret
=
GST_BASE_TRANSFORM_CLASS
(
parent_class
)
->
decide_allocation
(
trans
,
query
);
query
);
if
(
!
gst_buffer_pool_set_active
(
pool
,
TRUE
))
goto
activate_failed
;
}
return
ret
;
return
ret
;
activate_failed:
GST_ELEMENT_ERROR
(
self
,
RESOURCE
,
SETTINGS
,
(
"failed to activate bufferpool"
),
(
"failed to activate bufferpool"
));
return
GST_FLOW_ERROR
;
}
}
/* TODO */
/* TODO */
...
@@ -417,18 +428,17 @@ gst_v4l2_transform_prepare_output_buffer (GstBaseTransform * trans,
...
@@ -417,18 +428,17 @@ gst_v4l2_transform_prepare_output_buffer (GstBaseTransform * trans,
goto
beach
;
goto
beach
;
}
}
/* Ensure input internal pool is active */
if
(
!
gst_buffer_pool_set_active
(
pool
,
TRUE
))
goto
activate_failed
;
GST_DEBUG_OBJECT
(
self
,
"Queue input buffer"
);
GST_DEBUG_OBJECT
(
self
,
"Queue input buffer"
);
ret
=
gst_v4l2_buffer_pool_process
(
GST_V4L2_BUFFER_POOL
(
pool
),
inbuf
);
ret
=
gst_v4l2_buffer_pool_process
(
GST_V4L2_BUFFER_POOL
(
pool
),
inbuf
);
if
(
ret
!=
GST_FLOW_OK
)
if
(
G_UNLIKELY
(
ret
!=
GST_FLOW_OK
)
)
goto
beach
;
goto
beach
;
pool
=
gst_base_transform_get_buffer_pool
(
trans
);
pool
=
gst_base_transform_get_buffer_pool
(
trans
);
if
(
!
gst_buffer_pool_is_active
(
pool
))
{
if
(
!
gst_buffer_pool_set_active
(
pool
,
TRUE
))
goto
activate_failed
;
}
GST_DEBUG_OBJECT
(
self
,
"Dequeue output buffer"
);
GST_DEBUG_OBJECT
(
self
,
"Dequeue output buffer"
);
ret
=
gst_buffer_pool_acquire_buffer
(
pool
,
outbuf
,
NULL
);
ret
=
gst_buffer_pool_acquire_buffer
(
pool
,
outbuf
,
NULL
);
g_object_unref
(
pool
);
g_object_unref
(
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