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

stream: Add functions to get/set fields of Stream #129

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

xaionaro
Copy link
Contributor

@xaionaro xaionaro commented Jan 13, 2025

Just adding few missing Getters/Setters to Stream.

Copy link
Owner

@asticode asticode left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

A few changes needed 👍

stream.go Outdated
@@ -120,3 +130,15 @@ func (s *Stream) TimeBase() Rational {
func (s *Stream) SetTimeBase(r Rational) {
s.c.time_base = r.c
}

type PTSWrapBits int
Copy link
Owner

Choose a reason for hiding this comment

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

Can you remove this type? No need for it, you can use the int type directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Owner

Choose a reason for hiding this comment

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

Can you add tests as well here for all getters/setters you've added, ordered alphabetically in the form

s1.SetEventFlags(1)
require.Equal(t, 1, s1.EventFlags())

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@xaionaro xaionaro force-pushed the feature/stream_get_set_fields branch from 18a9855 to b3e7034 Compare January 13, 2025 16:56
@asticode asticode merged commit a908f28 into asticode:master Jan 14, 2025
3 checks passed
@asticode
Copy link
Owner

Thanks again for the PR! ❤️

Let me know whether you need a tag 👍

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