Skip to content
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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

OCP-5999 rtph266depay #43

wants to merge 11 commits into from

Conversation

cfoch
Copy link

@cfoch cfoch commented Nov 21, 2024

No description provided.

@carlosfg-flu
Copy link

Could you add the Jira ID to the PR title?

@cfoch cfoch changed the title rtph266depay OCP-5999 rtph266depay Nov 25, 2024
@carlosfg-flu
Copy link

Still a draft?

@carlosfg-flu
Copy link

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;

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);

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?

Copy link
Author

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.

Comment on lines +162 to +160
if (!gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE))
return NULL;

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.

Comment on lines 159 to 157
if (outbuf == NULL)
return NULL;

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.

Copy link
Author

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.

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.

Comment on lines 355 to 352
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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/INFO/DEBUG/

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.

Base automatically changed from rtph266pay to main November 25, 2024 13:54
@carlosfg-flu carlosfg-flu self-requested a review November 27, 2024 07:08
Copy link

@carlosfg-flu carlosfg-flu left a 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.

@cfoch cfoch marked this pull request as ready for review November 27, 2024 10:49
cfoch and others added 10 commits December 5, 2024 08:43
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants