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_CONVERTER_APP_H
6 #define MEDIA_CONVERTER_APP_H
9 #include <Application.h>
10 #include <Directory.h>
12 #include <MediaDefs.h>
13 #include <MediaFormats.h>
17 class MediaConverterWindow
;
19 class MediaConverterApp
: public BApplication
{
22 virtual ~MediaConverterApp();
26 virtual void MessageReceived(BMessage
* message
);
27 virtual void ReadyToRun();
28 virtual void RefsReceived(BMessage
* message
);
31 bool IsConverting() const;
32 void StartConverting();
34 void SetStatusMessage(const char* message
);
37 BEntry
_CreateOutputFile(BDirectory directory
,
39 media_file_format
* outputFormat
);
41 static int32
_RunConvertEntry(void* castToMediaConverterApp
);
43 status_t
_ConvertFile(BMediaFile
* inFile
,
45 media_codec_info
* audioCodec
,
46 media_codec_info
* videoCodec
,
47 int32 audioQuality
, int32 videoQuality
,
48 bigtime_t StartTime
, bigtime_t EndTime
);
50 MediaConverterWindow
* fWin
;
51 thread_id fConvertThreadID
;
53 volatile bool fCancel
;
56 #endif // MEDIA_CONVERTER_APP_H