* A BBuffer does not know where it came from, so

BBufferConsumer::BufferReceived() cannot know whom to send the "buffer is
  late" notification (unless we only have a single input). To solve this, the
  media_header now contains extra fields that can be used to create a
  media_source object.
* Unfortunately, BBufferProducer::SendBuffer() cannot know the output either in
  case there is more than one. Hence, I deprecated the existing SendBuffer()
  call and moved it into "private" - IOW old sources using it won't compile
  anymore under Haiku.
* I introduced a new SendBuffer() variant that also gets the media_source as
  argument.
* Updated all sources (that are part of the image) to use the new variant.
* Removed some purposely commented out code in the audio mixer.
* Implemented late buffer notification, as well as late buffer handling in the
  audio mixer; this is a bit of work in progress, so the debug output is left
  in there.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36184 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-04-12 13:15:46 +00:00
parent 5819c3f9ff
commit b289aaf66b
19 changed files with 533 additions and 497 deletions
+5
View File
@@ -138,6 +138,7 @@ protected:
// NOTE: Use this function to pass on the buffer on to the BBufferConsumer.
status_t SendBuffer(BBuffer* buffer,
const media_source& source,
const media_destination& destination);
status_t SendDataStatus(int32 status,
@@ -205,6 +206,10 @@ private:
virtual status_t _Reserved_BufferProducer_14(void*);
virtual status_t _Reserved_BufferProducer_15(void*);
// deprecated calls
status_t SendBuffer(BBuffer* buffer,
const media_destination& destination);
private:
friend class BBufferConsumer;
friend class BMediaNode;
+2 -1
View File
@@ -671,7 +671,8 @@ struct media_header {
};
type_code user_data_type;
uchar user_data[64]; // user_data_type indicates what this is
uint32 _reserved_[2];
int32 source;
port_id source_port;
off_t file_pos; // where in a file this data came from
size_t orig_size; // and how big it was. if unused, zero out