-
Notifications
You must be signed in to change notification settings - Fork 10
/
Utils.h
36 lines (27 loc) · 1.11 KB
/
Utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* Copyright 2013-2023, Stefano Ceccherini <[email protected]>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#ifndef __UTILS_H
#define __UTILS_H
#include <MediaDefs.h>
#include <StorageDefs.h>
#include <SupportDefs.h>
#include <ObjectList.h>
class BPath;
class BRect;
class BString;
void PrintMediaFormat(const media_format& format);
bool IsFileFormatUsable(const media_file_format&);
bool IsFFMPEGAvailable();
bool GetMediaFileFormat(const BString& prettyName, media_file_format* outFormat);
void MakeGIFMediaFileFormat(media_file_format& outFormat);
void MakeNULLMediaFileFormat(media_file_format& outFormat);
BPath GetUniqueFileName(const BPath& fileName);
void FixRect(BRect &rect, const BRect& maxRect, const bool fixWidth = false, const bool fixHeight = false);
void GetWindowsFrameList(BObjectList<BRect> &framesList, int32 border = 0);
BRect GetWindowFrameForToken(int32 token, int32 border = 0);
int32 GetWindowTokenForFrame(BRect frame, int32 border = 0);
float CalculateFPS(const uint32& numFrames, const bigtime_t& elapsedTime);
uint64 GetFreeMemory();
#endif // __UTILS_H