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
3844f802
Commit
3844f802
authored
Jan 26, 2012
by
Wim Taymans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pad: add probe id to the info
parent
b6d11d84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
gst/gstpad.c
gst/gstpad.c
+6
-4
gst/gstpad.h
gst/gstpad.h
+3
-0
No files found.
gst/gstpad.c
View file @
3844f802
...
...
@@ -1170,7 +1170,7 @@ gst_pad_add_probe (GstPad * pad, GstPadProbeType mask,
"pad is in use, delay idle callback"
);
GST_OBJECT_UNLOCK
(
pad
);
}
else
{
GstPadProbeInfo
info
=
{
GST_PAD_PROBE_TYPE_IDLE
,
};
GstPadProbeInfo
info
=
{
GST_PAD_PROBE_TYPE_IDLE
,
res
,
};
/* the pad is idle now, we can signal the idle callback now */
GST_CAT_LOG_OBJECT
(
GST_CAT_SCHEDULING
,
pad
,
...
...
@@ -2827,6 +2827,8 @@ probe_hook_marshal (GHook * hook, ProbeMarshall * data)
if
(
callback
==
NULL
)
return
;
info
->
id
=
hook
->
hook_id
;
GST_OBJECT_UNLOCK
(
pad
);
ret
=
callback
(
pad
,
info
,
hook
->
data
);
...
...
@@ -2871,7 +2873,7 @@ no_match:
G_STMT_START { \
if (G_UNLIKELY (pad->num_probes)) { \
/* we start with passing NULL as the data item */
\
GstPadProbeInfo info = { mask,
NULL, offs, size };
\
GstPadProbeInfo info = { mask,
0, NULL, offs, size };
\
ret = do_probe_callbacks (pad, &info, defaultval); \
/* store the possibly updated data item */
\
data = GST_PAD_PROBE_INFO_DATA (&info); \
...
...
@@ -2890,7 +2892,7 @@ no_match:
G_STMT_START { \
if (G_UNLIKELY (pad->num_probes)) { \
/* pass NULL as the data item */
\
GstPadProbeInfo info = { mask,
NULL, 0, 0 };
\
GstPadProbeInfo info = { mask,
0, NULL, 0, 0 };
\
ret = do_probe_callbacks (pad, &info, defaultval); \
if (G_UNLIKELY (ret != defaultval && ret != GST_FLOW_OK)) \
goto label; \
...
...
@@ -2900,7 +2902,7 @@ no_match:
#define PROBE_FULL(pad,mask,data,offs,size,label,defaultval) \
G_STMT_START { \
if (G_UNLIKELY (pad->num_probes)) { \
GstPadProbeInfo info = { mask,
data, offs, size };
\
GstPadProbeInfo info = { mask,
0, data, offs, size };
\
ret = do_probe_callbacks (pad, &info, defaultval); \
data = GST_PAD_PROBE_INFO_DATA (&info); \
if (G_UNLIKELY (ret != defaultval && ret != GST_FLOW_OK)) \
...
...
gst/gstpad.h
View file @
3844f802
...
...
@@ -514,6 +514,7 @@ typedef enum
/**
* GstPadProbeInfo:
* @type: the current probe type
* @id: the id of the probe
* @data: type specific data, check the @type field to know the datatype.
* This field can be NULL.
* @offset: offset of pull probe, this field is valid when @type contains
...
...
@@ -526,6 +527,7 @@ typedef enum
typedef
struct
{
GstPadProbeType
type
;
gulong
id
;
gpointer
data
;
guint64
offset
;
guint
size
;
...
...
@@ -534,6 +536,7 @@ typedef struct
}
GstPadProbeInfo
;
#define GST_PAD_PROBE_INFO_TYPE(d) ((d)->type)
#define GST_PAD_PROBE_INFO_ID(d) ((d)->id)
#define GST_PAD_PROBE_INFO_DATA(d) ((d)->data)
#define GST_PAD_PROBE_INFO_BUFFER(d) GST_BUFFER_CAST(GST_PAD_PROBE_INFO_DATA(d))
...
...
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