1 // Copyright 1999, Be Incorporated. All Rights Reserved. 2 // Copyright 2000-2004, Jun Suzuki. All Rights Reserved. 3 // Copyright 2007, Stephan Aßmus. All Rights Reserved. 4 // This file may be used under the terms of the Be Sample Code License. 5 #ifndef MEDIA_FILE_INFO_VIEW_H 6 #define MEDIA_FILE_INFO_VIEW_H 7 8 9 #include <Entry.h> 10 #include <View.h> 11 12 13 class BMediaFile; 14 class BString; 15 16 class MediaFileInfoView : public BView { 17 public: 18 MediaFileInfoView(BRect frame, 19 uint32 resizingMode); 20 virtual ~MediaFileInfoView(); 21 22 protected: 23 virtual void Draw(BRect updateRect); 24 virtual void AttachedToWindow(); 25 26 public: 27 void Update(BMediaFile* file, entry_ref* ref); 28 bigtime_t Duration() const 29 { return fDuration; } 30 31 private: 32 void _GetFileInfo(BString* audioFormat, 33 BString* videoFormat, 34 BString* audioDetails, 35 BString* videoDetails, 36 BString* duration); 37 38 entry_ref fRef; 39 BMediaFile* fMediaFile; 40 bigtime_t fDuration; 41 }; 42 43 #endif // MEDIA_FILE_INFO_VIEW_H 44