History

avutil: Add av_get_time_base_q()

This fixes usage of AV_TIME_BASE_Q in C++ applications, which cannot use compound literals directly in their code.

Derek Buitenhuis committed 12 years ago

Commit dac7e8a1 parent 6d149d24 files · +15 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavutil/avutil.h +6 −0
  3. libavutil/utils.c +5 −0
  4. libavutil/version.h +1 −1
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2012-10-22 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182014-04-xx - xxxxxxx - lavu 53.13.0 / 52.78.100 - avutil.h
19 Add av_get_time_base_q().
20
182014-04-xx - xxxxxxx - lavu 53.12.0 / 52.77.100 - crc.h212014-04-xx - xxxxxxx - lavu 53.12.0 / 52.77.100 - crc.h
19 Add AV_CRC_16_ANSI_LE crc variant.22 Add AV_CRC_16_ANSI_LE crc variant.
20 23
libavutil/avutil.h+6−0
@@ -246,6 +246,11 @@ const char *av_get_media_type_string(enum AVMediaType media_type); · 245 unmodified lines
246 246
247#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}247#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
248 248
249/**
250 * Return the fractional representation of the internal time base.
251 */
252AVRational av_get_time_base_q(void);
253
249/**254/**
250 * @}255 * @}
251 * @}256 * @}
@@ -282,6 +287,7 @@ char av_get_picture_type_char(enum AVPictureType pict_type); · 30 unmodified lines
282 287
283#include "common.h"288#include "common.h"
284#include "error.h"289#include "error.h"
290#include "rational.h"
285#include "version.h"291#include "version.h"
286#include "macros.h"292#include "macros.h"
287#include "mathematics.h"293#include "mathematics.h"
libavutil/utils.c+5−0
@@ -113,3 +113,8 @@ unsigned av_int_list_length_for_size(unsigned elsize, · 112 unmodified lines
113 }113 }
114 return i;114 return i;
115}115}
116
117AVRational av_get_time_base_q(void)
118{
119 return (AVRational){1, AV_TIME_BASE};
120}
libavutil/version.h+1−1
@@ -56,7 +56,7 @@ · 55 unmodified lines
56 */56 */
57 57
58#define LIBAVUTIL_VERSION_MAJOR 5258#define LIBAVUTIL_VERSION_MAJOR 52
59#define LIBAVUTIL_VERSION_MINOR 7759#define LIBAVUTIL_VERSION_MINOR 78
60#define LIBAVUTIL_VERSION_MICRO 10060#define LIBAVUTIL_VERSION_MICRO 100
61 61
62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t