2 * Copyright 2005, Jérôme Duval. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Inspired by SoundCapture from Be newsletter (Media Kit Basics: Consumers and Producers)
13 #include <MediaTrack.h>
16 class ScopeView
: public BView
19 ScopeView(BRect rect
, uint32 resizeFlags
);
21 void AttachedToWindow();
22 void DetachedFromWindow();
23 void Draw(BRect updateRect
);
24 void SetMainTime(bigtime_t timestamp
);
25 void SetLeftTime(bigtime_t timestamp
);
26 void SetRightTime(bigtime_t timestamp
);
27 void SetTotalTime(bigtime_t timestamp
, bool reset
);
28 void RenderTrack(BMediaTrack
*track
, const media_format
&format
);
29 void CancelRendering();
30 virtual void FrameResized(float width
, float height
);
31 virtual void MouseDown(BPoint position
);
35 static int32
RenderLaunch(void *data
);
37 template<typename T
, typename U
> void ComputeRendering();
46 BMediaTrack
*fMediaTrack
;
47 media_format fPlayFormat
;
53 int32 fPreview
[20000];
57 #endif /* SCOPEVIEW_H */