Make UEFI boot-platform build again
[haiku.git] / src / servers / media_addon / MediaFilePlayer.h
blob5ef0bb55e0fba994b2dd9f4b2eca971c498fbb63
1 /*
2 * Copyright (c) 2004, Marcus Overhagen <marcus@overhagen.de>. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _MEDIA_FILE_PLAYER_H
6 #define _MEDIA_FILE_PLAYER_H
9 #include <Entry.h>
10 #include <MediaDefs.h>
11 #include <MediaFile.h>
12 #include <MediaTrack.h>
13 #include <SoundPlayer.h>
14 #include <String.h>
17 void PlayMediaFile(const char* media_type, const char* media_name);
20 class MediaFilePlayer
22 public:
23 MediaFilePlayer(const char* media_type,
24 const char* media_name,
25 entry_ref* ref);
26 ~MediaFilePlayer();
28 status_t InitCheck();
30 bool IsPlaying();
31 void Restart();
32 void Stop();
34 const char* Name();
35 const entry_ref* Ref();
37 static void PlayFunction(void* cookie, void* buffer,
38 size_t size,
39 const media_raw_audio_format& format);
41 private:
42 BString fName;
43 status_t fInitCheck;
44 entry_ref fRef;
45 BSoundPlayer* fSoundPlayer;
46 BMediaFile* fPlayFile;
47 BMediaTrack* fPlayTrack;
48 media_format fPlayFormat;
51 #endif // _MEDIA_FILE_PLAYER_H