-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCP-5999 rtph266depay #43
base: main
Are you sure you want to change the base?
Conversation
Could you add the Jira ID to the PR title? |
Still a draft? |
Asan reports some leaks with this pipeline; but they can be in the decoder/payloader. I'm not sure. GST_TRACERS='leaks(stack-traces-flags=full,filters=266,check-refs=true)' \
GST_DEBUG='GST_TRACER:7,rtph266*:5,flu*:5' \
gst-launch-1.0 \
-v \
videotestsrc \
! fluh266enc \
preset=faster \
! rtph266pay \
! rtph266depay \
! fluh266dec \
! videoconvert \
! autovideosink \
; |
GST_MEMDUMP_OBJECT (rtph266depay, "nal data: ", map.data, map.size); | ||
|
||
/* *INDENT-OFF* */ | ||
nal_unit_type = (map.data[sizeof (sync_bytes) + 1] >> 3) & 0b00011111; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that you are the only one using this compiler extension in GStreamer: grep -rE '\b0b[01]+'
|
||
g_assert (rtph266depay->alignment == GST_H266_ALIGNMENT_AU); | ||
|
||
keyframe = NAL_TYPE_IS_KEY (nal_unit_type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused. A parameter set is a keyframe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what rtph265depay does. I will check later.
if (!gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE)) | ||
return NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick
This can be a g_assert ()
as you just allocated the buffer; it can't be possible you can not map.
if (outbuf == NULL) | ||
return NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick
This can be a g_assert ()
, as you just allocated the buffer, it shouldn't be possible for the buffer to be NULL
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible if the allocation failed, no enough memory, for example. Unlikely, but possible. I will use G_UNLIKELY.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible if the allocation failed, no enough memory, for example.
You're right; gst_buffer_new_allocate()
works differently than I thought. Glib always aborts when an allocation fails, AFAIK. I thought this allocation would follow the same rules, but it doesn't.
However, aborting is a good and usual way to handle when there is no more memory.
GST_INFO_OBJECT (rtph266depay, "marker: %d", marker); | ||
|
||
GST_INFO_OBJECT (rtph266depay, | ||
"NAL header nal_unit_type %d, nuh_temporal_id_plus1 %d", nal_unit_type, | ||
nuh_temporal_id_plus1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/INFO/DEBUG/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really think these shouldn't be INFO messages but GST_DEBUG_OBJECT()
.
| 4 | INFO | Logs all informational messages. These are typically used for |
| | | events in the system that only happen once, or are important |
| | | and rare enough to be logged at this level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. However, I strongly suggest changing the INFO
messages to DEBUG
and stopping using the 0b10101
compiler extension.
OCP-5966 rtph266pay
Keep a cache of all Parameter Sets received, then, send them when it's appropriated according with the `config-interval` parameter. Issue: OCP_6005
Add support for two types of aggregation: * zero-latency: Only aggregate Parameter Set NALUs * max: Try to aggregate entires NALUs Issue: OCP_6005
UNKOWN -> UNKNOWN Issue: OCP_6005
Remove X from XPS. Now it's only Package Set. Issue: OCP_6005
Explain the more complex part of the algorithm, as it was proveen to be hard to understand. Issue: OCP_6005
Add missing Nalu fields to these parameters. Issue: OCP_6005
Add commentaries with references to section numbers of the standards. Issue: OCP_6005
OCP-6005 rtph266pay: Add config-interval and AP
No description provided.