Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
George Kiagiadakis
gst-plugins-base
Commits
a4b0f2a1
Commit
a4b0f2a1
authored
Dec 29, 2009
by
Olivier Crête
Browse files
rtpbasepayload: Store ptime from caps
https://bugzilla.gnome.org/show_bug.cgi?id=606050
parent
21151ba9
Changes
2
Hide whitespace changes
Inline
Side-by-side
gst-libs/gst/rtp/gstbasertppayload.c
View file @
a4b0f2a1
...
@@ -530,6 +530,7 @@ gst_basertppayload_set_outcaps (GstBaseRTPPayload * payload, gchar * fieldname,
...
@@ -530,6 +530,7 @@ gst_basertppayload_set_outcaps (GstBaseRTPPayload * payload, gchar * fieldname,
}
}
payload
->
priv
->
caps_max_ptime
=
DEFAULT_MAX_PTIME
;
payload
->
priv
->
caps_max_ptime
=
DEFAULT_MAX_PTIME
;
payload
->
abidata
.
ABI
.
ptime
=
0
;
/* the peer caps can override some of the defaults */
/* the peer caps can override some of the defaults */
peercaps
=
gst_pad_peer_get_caps
(
payload
->
srcpad
);
peercaps
=
gst_pad_peer_get_caps
(
payload
->
srcpad
);
...
@@ -547,7 +548,7 @@ gst_basertppayload_set_outcaps (GstBaseRTPPayload * payload, gchar * fieldname,
...
@@ -547,7 +548,7 @@ gst_basertppayload_set_outcaps (GstBaseRTPPayload * payload, gchar * fieldname,
GstStructure
*
s
,
*
d
;
GstStructure
*
s
,
*
d
;
const
GValue
*
value
;
const
GValue
*
value
;
gint
pt
;
gint
pt
;
g
u
int
max_ptime
;
gint
max_
ptime
,
ptime
;
/* peer provides caps we can use to fixate, intersect. This always returns a
/* peer provides caps we can use to fixate, intersect. This always returns a
* writable caps. */
* writable caps. */
...
@@ -561,9 +562,12 @@ gst_basertppayload_set_outcaps (GstBaseRTPPayload * payload, gchar * fieldname,
...
@@ -561,9 +562,12 @@ gst_basertppayload_set_outcaps (GstBaseRTPPayload * payload, gchar * fieldname,
/* get first structure */
/* get first structure */
s
=
gst_caps_get_structure
(
temp
,
0
);
s
=
gst_caps_get_structure
(
temp
,
0
);
if
(
gst_structure_get_
u
int
(
s
,
"maxptime"
,
&
max_ptime
))
if
(
gst_structure_get_int
(
s
,
"maxptime"
,
&
max_ptime
)
&&
max_ptime
>
0
)
payload
->
priv
->
caps_max_ptime
=
max_ptime
*
GST_MSECOND
;
payload
->
priv
->
caps_max_ptime
=
max_ptime
*
GST_MSECOND
;
if
(
gst_structure_get_int
(
s
,
"ptime"
,
&
ptime
)
&&
ptime
>
0
)
payload
->
abidata
.
ABI
.
ptime
=
ptime
;
if
(
gst_structure_get_int
(
s
,
"payload"
,
&
pt
))
{
if
(
gst_structure_get_int
(
s
,
"payload"
,
&
pt
))
{
/* use peer pt */
/* use peer pt */
GST_BASE_RTP_PAYLOAD_PT
(
payload
)
=
pt
;
GST_BASE_RTP_PAYLOAD_PT
(
payload
)
=
pt
;
...
...
gst-libs/gst/rtp/gstbasertppayload.h
View file @
a4b0f2a1
...
@@ -111,7 +111,12 @@ struct _GstBaseRTPPayload
...
@@ -111,7 +111,12 @@ struct _GstBaseRTPPayload
/*< private >*/
/*< private >*/
GstBaseRTPPayloadPrivate
*
priv
;
GstBaseRTPPayloadPrivate
*
priv
;
gpointer
_gst_reserved
[
GST_PADDING
-
(
sizeof
(
guint64
)
/
sizeof
(
gpointer
))
-
1
];
union
{
struct
{
guint
ptime
;
/* in ms */
}
ABI
;
gpointer
_gst_reserved
[
GST_PADDING
-
(
sizeof
(
guint64
)
/
sizeof
(
gpointer
))
-
1
];
}
abidata
;
};
};
struct
_GstBaseRTPPayloadClass
struct
_GstBaseRTPPayloadClass
...
...
Write
Preview
Supports
Markdown
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