Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gstreamer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luzpaz
gstreamer
Commits
4db7fc58
Commit
4db7fc58
authored
Apr 19, 2011
by
Sebastian Dröge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bufferlist: Implement gst_buffer_list_foreach()
parent
8e76da20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
gst/gstbufferlist.c
gst/gstbufferlist.c
+29
-0
No files found.
gst/gstbufferlist.c
View file @
4db7fc58
...
...
@@ -194,6 +194,35 @@ void
gst_buffer_list_foreach
(
GstBufferList
*
list
,
GstBufferListFunc
func
,
gpointer
user_data
)
{
guint
i
,
len
;
g_return_if_fail
(
GST_IS_BUFFER_LIST
(
list
));
g_return_if_fail
(
func
!=
NULL
);
len
=
list
->
array
->
len
;
for
(
i
=
0
;
i
<
len
;)
{
GstBuffer
*
buf
,
*
buf_ret
;
gboolean
ret
;
buf
=
buf_ret
=
g_array_index
(
list
->
array
,
GstBuffer
*
,
i
);
ret
=
func
(
&
buf_ret
,
i
,
user_data
);
/* Check if the function changed the buffer */
if
(
buf
!=
buf_ret
)
{
if
(
buf_ret
==
NULL
)
{
g_array_remove_index
(
list
->
array
,
i
);
}
else
{
g_array_index
(
list
->
array
,
GstBuffer
*
,
i
)
=
buf_ret
;
}
}
if
(
!
ret
)
break
;
/* If the buffer was not removed by func go to the next buffer */
if
(
buf_ret
!=
NULL
)
i
++
;
}
}
/**
...
...
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