Summary: | nicesrc: Some minor cleanups | ||
---|---|---|---|
Product: | nice | Reporter: | Sebastian Dröge (slomo) <slomo> |
Component: | General | Assignee: | Olivier Crête <olivier.crete> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | medium | CC: | slomo |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
nicesrc: Keep the mutex locked whenever accessing the queue
nicesrc: Attach the receive callback in READY->PAUSED and detach in PAUSED->READY nicesrc: Clear the output buffer queue when shutting down and disposing |
Description
Sebastian Dröge (slomo)
2015-03-19 09:37:10 UTC
Created attachment 114465 [details] [review] nicesrc: Keep the mutex locked whenever accessing the queue Created attachment 114466 [details] [review] nicesrc: Attach the receive callback in READY->PAUSED and detach in PAUSED->READY Receiving data before the element is ready to push them does not seem like the best idea. Created attachment 114467 [details] [review] nicesrc: Clear the output buffer queue when shutting down and disposing Comment on attachment 114465 [details] [review] nicesrc: Keep the mutex locked whenever accessing the queue Review of attachment 114465 [details] [review]: ----------------------------------------------------------------- I think the queue is only accessed from the streaming thread, so no need for locking. Comment on attachment 114466 [details] [review] nicesrc: Attach the receive callback in READY->PAUSED and detach in PAUSED->READY Review of attachment 114466 [details] [review]: ----------------------------------------------------------------- The data is received from the gmainloop ran in the streaming thread, so it shouldn't be a problem. Comment on attachment 114467 [details] [review] nicesrc: Clear the output buffer queue when shutting down and disposing Review of attachment 114467 [details] [review]: ----------------------------------------------------------------- Pushed this one Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Mar 19 09:21:23 2015 +0100 nicesrc: Clear the output buffer queue when shutting down and disposing https://bugs.freedesktop.org/show_bug.cgi?id=89673 (In reply to Olivier Crête from comment #4) > Comment on attachment 114465 [details] [review] [review] > nicesrc: Keep the mutex locked whenever accessing the queue > > Review of attachment 114465 [details] [review] [review]: > ----------------------------------------------------------------- > > I think the queue is only accessed from the streaming thread, so no need for > locking. It's also accessed from unlock(), which is called from any thread (In reply to Olivier Crête from comment #5) > Comment on attachment 114466 [details] [review] [review] > nicesrc: Attach the receive callback in READY->PAUSED and detach in > PAUSED->READY > > Review of attachment 114466 [details] [review] [review]: > ----------------------------------------------------------------- > > The data is received from the gmainloop ran in the streaming thread, so it > shouldn't be a problem. But attaching the callback will let libnice start doing its stuff and trying to establish the connection. Seems wrong to start with that in READY already Arg, you're right, sorry, patches merged commit e3860ddfb5667de8f3f9be27838ea7e4152faf01 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Mar 19 09:19:23 2015 +0100 nicesrc: Attach the receive callback in READY->PAUSED and detach in PAUSED->READY Receiving data before the element is ready to push them does not seem like the best idea. https://bugs.freedesktop.org/show_bug.cgi?id=89673 commit 34d03c15a14e9ea46ef2f3201f12b90755154296 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Mar 19 09:17:38 2015 +0100 nicesrc: Keep the mutex locked whenever accessing the queue https://bugs.freedesktop.org/show_bug.cgi?id=89673 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.