Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upExpose a way to implement a backoff protocol, refactor errors and other minor improvements #176
Conversation
|
r? @Manishearth |
|
what worries me about this change is that we are exposing a gstreamer specific behavior, when the interface is supposed to be generic. |
|
Well, despite the event name choice, I don't think this is a Gstreamer specific behavior. What we are exposing is a way for the Player to control the flow of data that it receives. I expect other backends to have equivalent needs, and if they don't, we can still just signal the need of data. Anyway, I am open to suggestions about how to implement a backoff protocol in a different way :) |
| pub struct GStreamerPlayer { | ||
| inner: RefCell<Option<Arc<Mutex<PlayerInner>>>>, | ||
| observers: Arc<Mutex<PlayerEventObserverList>>, | ||
| renderers: Arc<Mutex<FrameRendererList>>, |
This comment has been minimized.
This comment has been minimized.
Manishearth
Dec 28, 2018
Member
do both the lists and the individual renderers need to be behind Arcs and mutexes? I feel like having Vec inside the list may be fine here?
ferjm commentedDec 21, 2018
•
edited
This PR exposes the
EnoughDataandNeedDataPlayer events that allow consumers to implement a backoff protocol.I made a couple of significant refactors:
PlayerInnerto avoid deadlocks. For more information, you can read this IRC conversation.