Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sebastian Dröge
gst-plugins-base
Commits
a46485e3
Commit
a46485e3
authored
May 17, 2011
by
Sebastian Dröge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gst: Update for caps/pad template related API changes
parent
5348de76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
16 deletions
+18
-16
gst/adder/gstadder.c
gst/adder/gstadder.c
+2
-4
gst/videorate/gstvideorate.c
gst/videorate/gstvideorate.c
+10
-8
gst/videoscale/gstvideoscale.c
gst/videoscale/gstvideoscale.c
+2
-2
gst/videotestsrc/gstvideotestsrc.c
gst/videotestsrc/gstvideotestsrc.c
+4
-2
No files found.
gst/adder/gstadder.c
View file @
a46485e3
...
...
@@ -190,10 +190,8 @@ gst_adder_sink_getcaps (GstPad * pad, GstCaps * filter)
/* get the allowed caps on this sinkpad */
sinkcaps
=
gst_pad_get_current_caps
(
pad
);
if
(
sinkcaps
==
NULL
)
{
sinkcaps
=
(
GstCaps
*
)
gst_pad_get_pad_template_caps
(
pad
);
if
(
sinkcaps
)
gst_caps_ref
(
sinkcaps
);
else
sinkcaps
=
gst_pad_get_pad_template_caps
(
pad
);
if
(
!
sinkcaps
)
sinkcaps
=
gst_caps_new_any
();
}
...
...
gst/videorate/gstvideorate.c
View file @
a46485e3
...
...
@@ -233,8 +233,7 @@ static gboolean
gst_video_rate_transformcaps
(
GstPad
*
in_pad
,
GstCaps
*
in_caps
,
GstPad
*
out_pad
,
GstCaps
**
out_caps
,
GstCaps
*
filter
)
{
GstCaps
*
intersect
;
const
GstCaps
*
in_templ
;
GstCaps
*
intersect
,
*
in_templ
;
gint
i
;
GSList
*
extra_structures
=
NULL
;
GSList
*
iter
;
...
...
@@ -242,6 +241,7 @@ gst_video_rate_transformcaps (GstPad * in_pad, GstCaps * in_caps,
in_templ
=
gst_pad_get_pad_template_caps
(
in_pad
);
intersect
=
gst_caps_intersect_full
(
in_caps
,
in_templ
,
GST_CAPS_INTERSECT_FIRST
);
gst_caps_unref
(
in_templ
);
/* all possible framerates are allowed */
for
(
i
=
0
;
i
<
gst_caps_get_size
(
intersect
);
i
++
)
{
...
...
@@ -310,12 +310,14 @@ gst_video_rate_getcaps (GstPad * pad, GstCaps * filter)
}
}
else
{
/* no peer, our padtemplate is enough then */
if
(
filter
)
caps
=
gst_caps_intersect_full
(
filter
,
gst_pad_get_pad_template_caps
(
pad
),
GST_CAPS_INTERSECT_FIRST
);
else
caps
=
gst_caps_copy
(
gst_pad_get_pad_template_caps
(
pad
));
caps
=
gst_pad_get_pad_template_caps
(
pad
);
if
(
filter
)
{
GstCaps
*
intersection
;
intersection
=
gst_caps_intersect_full
(
filter
,
caps
,
GST_CAPS_INTERSECT_FIRST
);
gst_caps_unref
(
caps
);
caps
=
intersection
;
}
}
return
caps
;
...
...
gst/videoscale/gstvideoscale.c
View file @
a46485e3
...
...
@@ -180,14 +180,14 @@ static GstPadTemplate *
gst_video_scale_src_template_factory
(
void
)
{
return
gst_pad_template_new
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
gst_caps_ref
(
gst_video_scale_get_capslist
())
)
;
gst_video_scale_get_capslist
());
}
static
GstPadTemplate
*
gst_video_scale_sink_template_factory
(
void
)
{
return
gst_pad_template_new
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
gst_caps_ref
(
gst_video_scale_get_capslist
())
)
;
gst_video_scale_get_capslist
());
}
...
...
gst/videotestsrc/gstvideotestsrc.c
View file @
a46485e3
...
...
@@ -172,6 +172,7 @@ gst_video_test_src_class_init (GstVideoTestSrcClass * klass)
GstElementClass
*
gstelement_class
;
GstBaseSrcClass
*
gstbasesrc_class
;
GstPushSrcClass
*
gstpushsrc_class
;
GstCaps
*
templ_caps
;
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
...
...
@@ -296,9 +297,10 @@ gst_video_test_src_class_init (GstVideoTestSrcClass * klass)
"Video test source"
,
"Source/Video"
,
"Creates a test video stream"
,
"David A. Schleef <ds@schleef.org>"
);
templ_caps
=
gst_video_test_src_getcaps
(
NULL
,
NULL
);
gst_element_class_add_pad_template
(
gstelement_class
,
gst_pad_template_new
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
gst_video_test_src_getcaps
(
NULL
,
NULL
))
);
gst_pad_template_new
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
templ_caps
));
gst_caps_unref
(
templ_caps
);
gstbasesrc_class
->
get_caps
=
gst_video_test_src_getcaps
;
gstbasesrc_class
->
set_caps
=
gst_video_test_src_setcaps
;
...
...
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