Skip to content

AVDTP: Avoid explicit in_use management#928

Open
zxzxwu wants to merge 2 commits into
google:mainfrom
zxzxwu:avdtp
Open

AVDTP: Avoid explicit in_use management#928
zxzxwu wants to merge 2 commits into
google:mainfrom
zxzxwu:avdtp

Conversation

@zxzxwu
Copy link
Copy Markdown
Collaborator

@zxzxwu zxzxwu commented May 20, 2026

Delegate in_use to a property checking if stream state is IDLE.

@zxzxwu zxzxwu requested a review from uier May 20, 2026 09:07
@zxzxwu
Copy link
Copy Markdown
Collaborator Author

zxzxwu commented May 20, 2026

cc @laozhuxinlu

Comment thread bumble/avdtp.py Outdated
Comment thread bumble/avdtp.py Outdated
Comment thread bumble/avdtp.py Outdated
seid=seid,
media_type=media_type,
tsep=tsep,
in_use=0,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems LocalStreamEndPoint wont use the in_use and will compute the in_use based on steam state. But it's a required field in SteamEndPoint... I think it's okay, just feel a bit redundant here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I turned to make SteamEndPoint an ABC without __init__, so we don't need to init _in_use at all.

cc @barbibulle

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