Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
62b39d41
Commit
62b39d41
authored
Mar 08, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: add pkt_duration field to AVFrame
parent
0da9bce5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletion
+23
-1
APIchanges
doc/APIchanges
+3
-0
avcodec.h
libavcodec/avcodec.h
+11
-0
utils.c
libavcodec/utils.c
+8
-0
version.h
libavcodec/version.h
+1
-1
No files found.
doc/APIchanges
View file @
62b39d41
...
@@ -15,6 +15,9 @@ libavutil: 2011-04-18
...
@@ -15,6 +15,9 @@ libavutil: 2011-04-18
API changes, most recent first:
API changes, most recent first:
2012-06-05 - xxxxxxx - lavc 54.24.100
Add pkt_duration field to AVFrame.
2012-06-04 - xxxxxxx - lafi 2.78.100
2012-06-04 - xxxxxxx - lafi 2.78.100
Add avfilter_default_filter_name() function in avfilter.h.
Add avfilter_default_filter_name() function in avfilter.h.
...
...
libavcodec/avcodec.h
View file @
62b39d41
...
@@ -1277,6 +1277,15 @@ typedef struct AVFrame {
...
@@ -1277,6 +1277,15 @@ typedef struct AVFrame {
*/
*/
int64_t
pkt_pos
;
int64_t
pkt_pos
;
/**
* duration of the corresponding packet, expressed in
* AVStream->time_base units, 0 if unknown.
* Code outside libavcodec should access this field using:
* av_frame_get_pkt_duration(frame)
* - encoding: unused
* - decoding: Read by user.
*/
int64_t
pkt_duration
;
}
AVFrame
;
}
AVFrame
;
/**
/**
...
@@ -1285,10 +1294,12 @@ typedef struct AVFrame {
...
@@ -1285,10 +1294,12 @@ typedef struct AVFrame {
* they should not be accessed directly outside libavcodec.
* they should not be accessed directly outside libavcodec.
*/
*/
int64_t
av_frame_get_best_effort_timestamp
(
const
AVFrame
*
frame
);
int64_t
av_frame_get_best_effort_timestamp
(
const
AVFrame
*
frame
);
int64_t
av_frame_get_pkt_duration
(
const
AVFrame
*
frame
);
int64_t
av_frame_get_pkt_pos
(
const
AVFrame
*
frame
);
int64_t
av_frame_get_pkt_pos
(
const
AVFrame
*
frame
);
int64_t
av_frame_get_channel_layout
(
const
AVFrame
*
frame
);
int64_t
av_frame_get_channel_layout
(
const
AVFrame
*
frame
);
int
av_frame_get_sample_rate
(
const
AVFrame
*
frame
);
int
av_frame_get_sample_rate
(
const
AVFrame
*
frame
);
void
av_frame_set_best_effort_timestamp
(
AVFrame
*
frame
,
int64_t
val
);
void
av_frame_set_best_effort_timestamp
(
AVFrame
*
frame
,
int64_t
val
);
void
av_frame_set_pkt_duration
(
AVFrame
*
frame
,
int64_t
val
);
void
av_frame_set_pkt_pos
(
AVFrame
*
frame
,
int64_t
val
);
void
av_frame_set_pkt_pos
(
AVFrame
*
frame
,
int64_t
val
);
void
av_frame_set_channel_layout
(
AVFrame
*
frame
,
int64_t
val
);
void
av_frame_set_channel_layout
(
AVFrame
*
frame
,
int64_t
val
);
void
av_frame_set_sample_rate
(
AVFrame
*
frame
,
int
val
);
void
av_frame_set_sample_rate
(
AVFrame
*
frame
,
int
val
);
...
...
libavcodec/utils.c
View file @
62b39d41
...
@@ -265,9 +265,11 @@ void ff_init_buffer_info(AVCodecContext *s, AVFrame *pic)
...
@@ -265,9 +265,11 @@ void ff_init_buffer_info(AVCodecContext *s, AVFrame *pic)
if
(
s
->
pkt
)
{
if
(
s
->
pkt
)
{
pic
->
pkt_pts
=
s
->
pkt
->
pts
;
pic
->
pkt_pts
=
s
->
pkt
->
pts
;
pic
->
pkt_pos
=
s
->
pkt
->
pos
;
pic
->
pkt_pos
=
s
->
pkt
->
pos
;
pic
->
pkt_duration
=
s
->
pkt
->
duration
;
}
else
{
}
else
{
pic
->
pkt_pts
=
AV_NOPTS_VALUE
;
pic
->
pkt_pts
=
AV_NOPTS_VALUE
;
pic
->
pkt_pos
=
-
1
;
pic
->
pkt_pos
=
-
1
;
pic
->
pkt_duration
=
0
;
}
}
pic
->
reordered_opaque
=
s
->
reordered_opaque
;
pic
->
reordered_opaque
=
s
->
reordered_opaque
;
pic
->
sample_aspect_ratio
=
s
->
sample_aspect_ratio
;
pic
->
sample_aspect_ratio
=
s
->
sample_aspect_ratio
;
...
@@ -384,9 +386,11 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
...
@@ -384,9 +386,11 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
if
(
avctx
->
pkt
)
{
if
(
avctx
->
pkt
)
{
frame
->
pkt_pts
=
avctx
->
pkt
->
pts
;
frame
->
pkt_pts
=
avctx
->
pkt
->
pts
;
frame
->
pkt_pos
=
avctx
->
pkt
->
pos
;
frame
->
pkt_pos
=
avctx
->
pkt
->
pos
;
frame
->
pkt_duration
=
avctx
->
pkt
->
duration
;
}
else
{
}
else
{
frame
->
pkt_pts
=
AV_NOPTS_VALUE
;
frame
->
pkt_pts
=
AV_NOPTS_VALUE
;
frame
->
pkt_pos
=
-
1
;
frame
->
pkt_pos
=
-
1
;
frame
->
pkt_duration
=
0
;
}
}
frame
->
reordered_opaque
=
avctx
->
reordered_opaque
;
frame
->
reordered_opaque
=
avctx
->
reordered_opaque
;
...
@@ -521,9 +525,11 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
...
@@ -521,9 +525,11 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
if
(
s
->
pkt
)
{
if
(
s
->
pkt
)
{
pic
->
pkt_pts
=
s
->
pkt
->
pts
;
pic
->
pkt_pts
=
s
->
pkt
->
pts
;
pic
->
pkt_pos
=
s
->
pkt
->
pos
;
pic
->
pkt_pos
=
s
->
pkt
->
pos
;
pic
->
pkt_duration
=
s
->
pkt
->
duration
;
}
else
{
}
else
{
pic
->
pkt_pts
=
AV_NOPTS_VALUE
;
pic
->
pkt_pts
=
AV_NOPTS_VALUE
;
pic
->
pkt_pos
=
-
1
;
pic
->
pkt_pos
=
-
1
;
pic
->
pkt_duration
=
0
;
}
}
pic
->
reordered_opaque
=
s
->
reordered_opaque
;
pic
->
reordered_opaque
=
s
->
reordered_opaque
;
pic
->
sample_aspect_ratio
=
s
->
sample_aspect_ratio
;
pic
->
sample_aspect_ratio
=
s
->
sample_aspect_ratio
;
...
@@ -661,6 +667,7 @@ void avcodec_get_frame_defaults(AVFrame *pic){
...
@@ -661,6 +667,7 @@ void avcodec_get_frame_defaults(AVFrame *pic){
memset
(
pic
,
0
,
sizeof
(
AVFrame
));
memset
(
pic
,
0
,
sizeof
(
AVFrame
));
pic
->
pts
=
pic
->
pkt_dts
=
pic
->
pkt_pts
=
pic
->
best_effort_timestamp
=
AV_NOPTS_VALUE
;
pic
->
pts
=
pic
->
pkt_dts
=
pic
->
pkt_pts
=
pic
->
best_effort_timestamp
=
AV_NOPTS_VALUE
;
pic
->
pkt_duration
=
0
;
pic
->
pkt_pos
=
-
1
;
pic
->
pkt_pos
=
-
1
;
pic
->
key_frame
=
1
;
pic
->
key_frame
=
1
;
pic
->
sample_aspect_ratio
=
(
AVRational
){
0
,
1
};
pic
->
sample_aspect_ratio
=
(
AVRational
){
0
,
1
};
...
@@ -682,6 +689,7 @@ AVFrame *avcodec_alloc_frame(void){
...
@@ -682,6 +689,7 @@ AVFrame *avcodec_alloc_frame(void){
void av_##name##_set_##field(str *s, type v) { s->field = v; }
void av_##name##_set_##field(str *s, type v) { s->field = v; }
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
best_effort_timestamp
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
best_effort_timestamp
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
pkt_duration
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
pkt_pos
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
pkt_pos
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
channel_layout
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
channel_layout
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int
,
sample_rate
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int
,
sample_rate
)
...
...
libavcodec/version.h
View file @
62b39d41
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
*/
*/
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 2
3
#define LIBAVCODEC_VERSION_MINOR 2
4
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
...
...
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