2015-04-07 20:50 GMT+02:00 Dario Casalinuovo <b.vitruvio@xxxxxxxxx>:
I don't have much experience with this code, I'll to try to answer
with my understanding.
A TODO in BBufferGroup #110 states that we should avoid to add more than one
BBuffer::ID() to each group, but in SharedBufferList there's a function
named _RequestBuffersInOtherGroups that find in the current list buffers
with the same ID. i've guessed that it's a workaround and should be removed.
Secondarily, i've found that when the consumer set the BBufferGroup of the
producer and they live in the same team there's just this situation of a new
group created with the consumer's buffers and since the SharedBufferList is
a static variable those buffers are just duplicated (BBufferProducer line
#270). I've tried to fix it by detecting if we live in the same team, and in
case just create a BBufferGroup with the blank constructor.
To be more clear, should i return an error when BBufferGroup::AddBuffer find
that the ID is already present? And in case i'm right, how should work
reclaiming buffers from other groups?
Unfortunately i'm realizing the media_kit is in pitiful state and my changes
actually break something on the client side but before to go forward and
make it to work i want to be sure i'm doing the correct assumptions. In
particular, the current code seems to workaround having duplicated buffer
IDs and from what i can understand this problem should just be resolved.