Imported Upstream version 0.13.2+dsfg1
This commit is contained in:
commit
fb3990e9e5
2036 changed files with 287360 additions and 0 deletions
32
libobs/media-io/frame-rate.h
Normal file
32
libobs/media-io/frame-rate.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct media_frames_per_second {
|
||||
uint32_t numerator;
|
||||
uint32_t denominator;
|
||||
};
|
||||
|
||||
static inline double media_frames_per_second_to_frame_interval(
|
||||
struct media_frames_per_second fps)
|
||||
{
|
||||
return (double)fps.denominator / fps.numerator;
|
||||
}
|
||||
|
||||
static inline double media_frames_per_second_to_fps(
|
||||
struct media_frames_per_second fps)
|
||||
{
|
||||
return (double)fps.numerator / fps.denominator;
|
||||
}
|
||||
|
||||
static inline bool media_frames_per_second_is_valid(
|
||||
struct media_frames_per_second fps)
|
||||
{
|
||||
return fps.numerator && fps.denominator;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue