Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
717b2074
Commit
717b2074
authored
Oct 04, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: add a Producer Reference Time AVPacketSideData type
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
ea5a9106
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
2 deletions
+39
-2
APIchanges
doc/APIchanges
+3
-0
avcodec.h
libavcodec/avcodec.h
+10
-0
avpacket.c
libavcodec/avpacket.c
+22
-0
internal.h
libavcodec/internal.h
+2
-0
version.h
libavcodec/version.h
+2
-2
No files found.
doc/APIchanges
View file @
717b2074
...
...
@@ -15,6 +15,9 @@ libavutil: 2017-10-21
API changes, most recent first:
2020-01-15 - xxxxxxxxxx - lavc 58.66.100 - avcodec.h
Add AV_PKT_DATA_PRFT and AVProducerReferenceTime.
2019-12-27 - xxxxxxxxxx - lavu 56.38.100 - eval.h
Add av_expr_count_func().
...
...
libavcodec/avcodec.h
View file @
717b2074
...
...
@@ -1176,6 +1176,11 @@ typedef struct AVCPBProperties {
uint64_t
vbv_delay
;
}
AVCPBProperties
;
typedef
struct
AVProducerReferenceTime
{
int64_t
wallclock
;
int
flags
;
}
AVProducerReferenceTime
;
/**
* The decoder will keep a reference to the frame and may reuse it later.
*/
...
...
@@ -1410,6 +1415,11 @@ enum AVPacketSideDataType {
*/
AV_PKT_DATA_AFD
,
/**
* Producer Reference Time data corresponding to the AVProducerReferenceTime struct.
*/
AV_PKT_DATA_PRFT
,
/**
* The number of side data types.
* This is not part of the public API/ABI in the sense that it may
...
...
libavcodec/avpacket.c
View file @
717b2074
...
...
@@ -741,3 +741,25 @@ int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, i
return
0
;
}
int
ff_side_data_set_prft
(
AVPacket
*
pkt
,
int64_t
timestamp
)
{
AVProducerReferenceTime
*
prft
;
uint8_t
*
side_data
;
int
side_data_size
;
side_data
=
av_packet_get_side_data
(
pkt
,
AV_PKT_DATA_PRFT
,
&
side_data_size
);
if
(
!
side_data
)
{
side_data_size
=
sizeof
(
AVProducerReferenceTime
);
side_data
=
av_packet_new_side_data
(
pkt
,
AV_PKT_DATA_PRFT
,
side_data_size
);
}
if
(
!
side_data
||
side_data_size
<
sizeof
(
AVProducerReferenceTime
))
return
AVERROR
(
ENOMEM
);
prft
=
(
AVProducerReferenceTime
*
)
side_data
;
prft
->
wallclock
=
timestamp
;
prft
->
flags
=
0
;
return
0
;
}
libavcodec/internal.h
View file @
717b2074
...
...
@@ -392,6 +392,8 @@ AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx);
int
ff_side_data_set_encoder_stats
(
AVPacket
*
pkt
,
int
quality
,
int64_t
*
error
,
int
error_count
,
int
pict_type
);
int
ff_side_data_set_prft
(
AVPacket
*
pkt
,
int64_t
timestamp
);
/**
* Check AVFrame for A53 side data and allocate and fill SEI message with A53 info
*
...
...
libavcodec/version.h
View file @
717b2074
...
...
@@ -28,8 +28,8 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 6
5
#define LIBAVCODEC_VERSION_MICRO 10
3
#define LIBAVCODEC_VERSION_MINOR 6
6
#define LIBAVCODEC_VERSION_MICRO 10
0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment