1 /* 2 * This file is part of FFmpeg. 3 * 4 * FFmpeg is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * FFmpeg is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with FFmpeg; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 /** 20 * @file 21 * timestamp utils, mostly useful for debugging/logging purposes 22 */ 23 24 module ffmpeg.libavutil.timestamp; 25 26 import ffmpeg.libavutil.rational; 27 28 extern (C): 29 import ffmpeg; @nogc nothrow: 30 31 enum AV_TS_MAX_STRING_SIZE = 32; 32 33 /** 34 * Fill the provided buffer with a string containing a timestamp 35 * representation. 36 * 37 * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE 38 * @param ts the timestamp to represent 39 * @return the buffer in input 40 */ 41 char* av_ts_make_string (char* buf, long ts); 42 43 /** 44 * Convenience macro, the return value should be used only directly in 45 * function arguments but never stand-alone. 46 */ 47 48 /** 49 * Fill the provided buffer with a string containing a timestamp time 50 * representation. 51 * 52 * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE 53 * @param ts the timestamp to represent 54 * @param tb the timebase of the timestamp 55 * @return the buffer in input 56 */ 57 char* av_ts_make_time_string (char* buf, long ts, AVRational* tb); 58 59 /** 60 * Convenience macro, the return value should be used only directly in 61 * function arguments but never stand-alone. 62 */ 63 64 /* AVUTIL_TIMESTAMP_H */