3 // Andrew Bachmann, 2002
5 // A class to encapsulate and manipulate
6 // all the information for a particular
7 // output of a media node.
9 #if !defined(_MEDIA_OUTPUT_INFO_H)
10 #define _MEDIA_OUTPUT_INFO_H
12 #include <MediaDefs.h>
13 #include <MediaNode.h>
14 #include <BufferProducer.h>
15 #include <BufferGroup.h>
20 MediaOutputInfo(BBufferProducer
* _node
, char * name
);
23 virtual status_t
SetBufferGroup(BBufferGroup
* group
);
25 virtual status_t
FormatProposal(media_format
* format
);
27 virtual status_t
FormatChangeRequested(
28 const media_destination
& destination
,
29 media_format
* io_format
);
31 virtual status_t
PrepareToConnect(
32 const media_destination
& where
,
33 media_format
* format
,
34 media_source
* out_source
,
37 virtual status_t
Connect(
38 const media_destination
& destination
,
39 const media_format
& format
,
41 bigtime_t _downstreamLatency
);
43 virtual status_t
Disconnect();
45 virtual status_t
EnableOutput(bool enabled
);
47 virtual status_t
AdditionalBufferRequested(
48 media_buffer_id prev_buffer
,
50 const media_seek_tag
* prev_tag
);
54 virtual status_t
CreateBufferGroup();
58 virtual uint32
ComputeBufferSize();
59 virtual bigtime_t
ComputeBufferPeriod();
60 static uint32
ComputeBufferSize(const media_format
& format
);
61 static bigtime_t
ComputeBufferPeriod(const media_format
& format
);
64 BBufferProducer
* producer
;
70 BBufferGroup
* bufferGroup
;
73 bigtime_t downstreamLatency
;
75 bigtime_t bufferPeriod
;
77 // This format is the least restrictive we can
78 // support in the general case. (no restrictions
80 media_format generalFormat
;
82 // This format is the next least restrictive. It
83 // takes into account the content that we are using.
84 // It should be the same as above with a few wildcards
85 // removed. Wildcards for things we are flexible on
86 // may still be present.
87 media_format wildcardedFormat
;
89 // This format provides default values for all fields.
90 // These defaults are used to resolve all wildcards.
91 media_format fullySpecifiedFormat
;
93 // do we need media_seek_tag in here?
96 #endif // _MEDIA_OUTPUT_INFO_H