media: Set B_CLONEABLE_AREA where applicable.
Cloning cloned buffers seems especially strange, but apparently it is actually done. The buffer management code really needs to be cleaned up...
This commit is contained in:
parent
23121bac3b
commit
964cab4615
@ -69,7 +69,7 @@ BBufferGroup::BBufferGroup(size_t size, int32 count, uint32 placement,
|
||||
|
||||
void* startAddress;
|
||||
area_id bufferArea = create_area("some buffers area", &startAddress,
|
||||
placement, areaSize, lock, B_READ_AREA | B_WRITE_AREA);
|
||||
placement, areaSize, lock, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
|
||||
if (bufferArea < 0) {
|
||||
ERROR("BBufferGroup: failed to allocate %ld bytes area\n", areaSize);
|
||||
fInitError = (status_t)bufferArea;
|
||||
|
@ -2420,7 +2420,7 @@ BMediaRoster::GetParameterWebFor(const media_node& node, BParameterWeb** _web)
|
||||
area_id area;
|
||||
void *data;
|
||||
area = create_area("parameter web data", &data, B_ANY_ADDRESS, size,
|
||||
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
|
||||
B_NO_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
|
||||
if (area < B_OK) {
|
||||
ERROR("BMediaRoster::GetParameterWebFor couldn't create area of "
|
||||
"size %" B_PRId32 "\n", size);
|
||||
|
@ -44,7 +44,8 @@ SharedBufferList::Create(SharedBufferList** _list)
|
||||
SharedBufferList* list;
|
||||
|
||||
area_id area = create_area("shared buffer list", (void**)&list,
|
||||
B_ANY_ADDRESS, size, B_LAZY_LOCK, B_READ_AREA | B_WRITE_AREA);
|
||||
B_ANY_ADDRESS, size, B_LAZY_LOCK,
|
||||
B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
|
||||
if (area < 0)
|
||||
return area;
|
||||
|
||||
|
@ -495,7 +495,7 @@ BTimeSource::FinishCreate()
|
||||
(const_cast<BPrivate::media::TimeSourceTransmit**>(&fBuf));
|
||||
|
||||
fArea = create_area(name, buf, B_ANY_ADDRESS, TS_AREA_SIZE,
|
||||
B_FULL_LOCK, B_READ_AREA | B_WRITE_AREA);
|
||||
B_FULL_LOCK, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA);
|
||||
|
||||
if (fArea <= 0) {
|
||||
ERROR("BTimeSource::BTimeSource couldn't create area, node %" B_PRId32
|
||||
|
@ -208,7 +208,7 @@ BufferManager::_CloneArea(area_id area)
|
||||
|
||||
void* address;
|
||||
area_id clonedArea = clone_area("media_server cloned buffer", &address,
|
||||
B_ANY_ADDRESS, B_READ_AREA | B_WRITE_AREA, area);
|
||||
B_ANY_ADDRESS, B_READ_AREA | B_WRITE_AREA | B_CLONEABLE_AREA, area);
|
||||
|
||||
TRACE("BufferManager::_CloneArea() cloned area %" B_PRId32 ", clone id %"
|
||||
B_PRId32 "\n", area, clonedArea);
|
||||
|
Loading…
Reference in New Issue
Block a user