History

avcodec: add a Producer Reference Time AVPacketSideData type

James Almer committed 7 years ago

Commit 717b2071 parent ea5a9105 files · +39 −2Browse files

Unified · Split

5 files
  1. doc/APIchanges +3 −0
  2. libavcodec/avcodec.h +10 −0
  3. libavcodec/avpacket.c +22 −0
  4. libavcodec/internal.h +2 −0
  5. libavcodec/version.h +2 −2
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2017-10-21 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182020-01-15 - xxxxxxxxxx - lavc 58.66.100 - avcodec.h
19 Add AV_PKT_DATA_PRFT and AVProducerReferenceTime.
20
182019-12-27 - xxxxxxxxxx - lavu 56.38.100 - eval.h212019-12-27 - xxxxxxxxxx - lavu 56.38.100 - eval.h
19 Add av_expr_count_func().22 Add av_expr_count_func().
20 23
libavcodec/avcodec.h+10−0
@@ -1176,6 +1176,11 @@ typedef struct AVCPBProperties { · 1175 unmodified lines
1176 uint64_t vbv_delay;1176 uint64_t vbv_delay;
1177} AVCPBProperties;1177} AVCPBProperties;
1178 1178
1179typedef struct AVProducerReferenceTime {
1180 int64_t wallclock;
1181 int flags;
1182} AVProducerReferenceTime;
1183
1179/**1184/**
1180 * The decoder will keep a reference to the frame and may reuse it later.1185 * The decoder will keep a reference to the frame and may reuse it later.
1181 */1186 */
@@ -1410,6 +1415,11 @@ enum AVPacketSideDataType { · 228 unmodified lines
1410 */1415 */
1411 AV_PKT_DATA_AFD,1416 AV_PKT_DATA_AFD,
1412 1417
1418 /**
1419 * Producer Reference Time data corresponding to the AVProducerReferenceTime struct.
1420 */
1421 AV_PKT_DATA_PRFT,
1422
1413 /**1423 /**
1414 * The number of side data types.1424 * The number of side data types.
1415 * This is not part of the public API/ABI in the sense that it may1425 * This is not part of the public API/ABI in the sense that it may
libavcodec/avpacket.c+22−0
@@ -741,3 +741,25 @@ int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, i · 740 unmodified lines
741 741
742 return 0;742 return 0;
743}743}
744
745int ff_side_data_set_prft(AVPacket *pkt, int64_t timestamp)
746{
747 AVProducerReferenceTime *prft;
748 uint8_t *side_data;
749 int side_data_size;
750
751 side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_PRFT, &side_data_size);
752 if (!side_data) {
753 side_data_size = sizeof(AVProducerReferenceTime);
754 side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_PRFT, side_data_size);
755 }
756
757 if (!side_data || side_data_size < sizeof(AVProducerReferenceTime))
758 return AVERROR(ENOMEM);
759
760 prft = (AVProducerReferenceTime *)side_data;
761 prft->wallclock = timestamp;
762 prft->flags = 0;
763
764 return 0;
765}
libavcodec/internal.h+2−0
@@ -392,6 +392,8 @@ AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx); · 391 unmodified lines
392 392
393int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type);393int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type);
394 394
395int ff_side_data_set_prft(AVPacket *pkt, int64_t timestamp);
396
395/**397/**
396 * Check AVFrame for A53 side data and allocate and fill SEI message with A53 info398 * Check AVFrame for A53 side data and allocate and fill SEI message with A53 info
397 *399 *
libavcodec/version.h+2−2
@@ -28,8 +28,8 @@ · 27 unmodified lines
28#include "libavutil/version.h"28#include "libavutil/version.h"
29 29
30#define LIBAVCODEC_VERSION_MAJOR 5830#define LIBAVCODEC_VERSION_MAJOR 58
31#define LIBAVCODEC_VERSION_MINOR 6531#define LIBAVCODEC_VERSION_MINOR 66
32#define LIBAVCODEC_VERSION_MICRO 10332#define LIBAVCODEC_VERSION_MICRO 100
33 33
34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \34#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
35 LIBAVCODEC_VERSION_MINOR, \35 LIBAVCODEC_VERSION_MINOR, \

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