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 module ffmpeg.libavutil.timestamp; 24 25 import ffmpeg.libavutil; 26 27 extern (C) @nogc nothrow: 28 29 enum AV_TS_MAX_STRING_SIZE = 32; 30 31 /** 32 * Fill the provided buffer with a string containing a timestamp 33 * representation. 34 * 35 * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE 36 * @param ts the timestamp to represent 37 * @return the buffer in input 38 */ 39 char* av_ts_make_string (char* buf, long ts); 40 41 /** 42 * Convenience macro, the return value should be used only directly in 43 * function arguments but never stand-alone. 44 */ 45 46 /** 47 * Fill the provided buffer with a string containing a timestamp time 48 * representation. 49 * 50 * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE 51 * @param ts the timestamp to represent 52 * @param tb the timebase of the timestamp 53 * @return the buffer in input 54 */ 55 char* av_ts_make_time_string (char* buf, long ts, AVRational* tb); 56 57 /** 58 * Convenience macro, the return value should be used only directly in 59 * function arguments but never stand-alone. 60 */ 61 62 /* AVUTIL_TIMESTAMP_H */