3 // Copyright 1999, Be Incorporated. All Rights Reserved.
4 // This file may be used under the terms of the Be Sample Code License.
6 #if !defined(_MEDIA_RECORDER_NODE_H)
7 #define _MEDIA_RECORDER_NODE_H
9 #include <MediaEventLooper.h>
10 #include <BufferConsumer.h>
17 class BMediaRecorderNode
: public BMediaEventLooper
, public BBufferConsumer
{
24 // these are not thread safe; we should fix that...
26 const media_format
& format
);
28 media_input
* out_input
);
33 return BMediaEventLooper::ControlThread();
41 virtual BMediaAddOn
*AddOn(
42 int32
* internal_id
) const;
44 virtual void HandleEvent(
45 const media_timed_event
*event
,
49 virtual status_t
HandleMessage(
54 /* Someone, probably the producer, is asking you about this format. Give */
55 /* your honest opinion, possibly modifying *format. Do not ask upstream */
56 /* producer about the format, since he's synchronously waiting for your */
58 virtual status_t
AcceptFormat(
59 const media_destination
& dest
,
60 media_format
* format
);
61 virtual status_t
GetNextInput(
63 media_input
* out_input
);
64 virtual void DisposeInputCookie(
66 virtual void BufferReceived(
68 virtual void ProducerDataStatus(
69 const media_destination
& for_whom
,
71 bigtime_t at_performance_time
);
72 virtual status_t
GetLatencyFor(
73 const media_destination
& for_whom
,
74 bigtime_t
* out_latency
,
75 media_node_id
* out_timesource
);
76 virtual status_t
Connected(
77 const media_source
& producer
,
78 const media_destination
& where
,
79 const media_format
& with_format
,
80 media_input
* out_input
);
81 virtual void Disconnected(
82 const media_source
& producer
,
83 const media_destination
& where
);
84 virtual status_t
FormatChanged(
85 const media_source
& producer
,
86 const media_destination
& consumer
,
88 const media_format
& format
);
92 virtual ~BMediaRecorderNode();
94 BMediaRecorder
* _mRecorder
;
95 media_format _mOKFormat
;
102 using namespace BPrivate
;
104 #endif // _MEDIA_RECORDER_NODE_H