World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
timecode.h
См. документацию.
1 /*
2  * Copyright (c) 2006 Smartjog S.A.S, Baptiste Coudurier <baptiste.coudurier@gmail.com>
3  * Copyright (c) 2011-2012 Smartjog S.A.S, Clément Bœsch <clement.boesch@smartjog.com>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
27 #ifndef AVUTIL_TIMECODE_H
28 #define AVUTIL_TIMECODE_H
29 
30 #include <stdint.h>
31 #include "rational.h"
32 
33 #define AV_TIMECODE_STR_SIZE 23
34 
39 };
40 
41 typedef struct {
42  int start;
45  unsigned fps;
46 } AVTimecode;
47 
56 int av_timecode_adjust_ntsc_framenum2(int framenum, int fps);
57 
72 
85 char *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum);
86 
96 char *av_timecode_make_smpte_tc_string(char *buf, uint32_t tcsmpte, int prevent_df);
97 
105 char *av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit);
106 
119 int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx);
120 
131 int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *str, void *log_ctx);
132 
139 
140 #endif /* AVUTIL_TIMECODE_H */
av_timecode_make_string
char * av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum)
rational.h
AVTimecode::rate
AVRational rate
frame rate in rational form
Definition: timecode.h:44
av_timecode_adjust_ntsc_framenum2
int av_timecode_adjust_ntsc_framenum2(int framenum, int fps)
AVTimecode::fps
unsigned fps
frame per second; must be consistent with the rate field
Definition: timecode.h:45
av_timecode_make_mpeg_tc_string
char * av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit)
av_timecode_get_smpte_from_framenum
uint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum)
av_timecode_init_from_string
int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *str, void *log_ctx)
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: SDL_opengl_glext.h:2483
AVTimecode
Definition: timecode.h:41
AV_TIMECODE_FLAG_24HOURSMAX
@ AV_TIMECODE_FLAG_24HOURSMAX
timecode wraps after 24 hours
Definition: timecode.h:37
AVTimecode::start
int start
timecode frame start (first base frame number)
Definition: timecode.h:42
AV_TIMECODE_FLAG_ALLOWNEGATIVE
@ AV_TIMECODE_FLAG_ALLOWNEGATIVE
negative time values are allowed
Definition: timecode.h:38
AV_TIMECODE_FLAG_DROPFRAME
@ AV_TIMECODE_FLAG_DROPFRAME
timecode is drop frame
Definition: timecode.h:36
flags
EGLSyncKHR EGLint flags
Definition: SDL_egl.h:898
AVTimecode::flags
uint32_t flags
flags such as drop frame, +24 hours support, ...
Definition: timecode.h:43
av_timecode_make_smpte_tc_string
char * av_timecode_make_smpte_tc_string(char *buf, uint32_t tcsmpte, int prevent_df)
tc
const GLfloat * tc
Definition: SDL_opengl_glext.h:11116
AVRational
Definition: rational.h:58
av_timecode_check_frame_rate
int av_timecode_check_frame_rate(AVRational rate)
AVTimecodeFlag
AVTimecodeFlag
Definition: timecode.h:35
av_timecode_init
int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx)
uint32_t
unsigned __int32 uint32_t
Definition: SDL_config.h:39