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
96d815fc
Commit
96d815fc
authored
Dec 14, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: add pkt_size field to AVFrame
parent
a8b3f0c5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
2 deletions
+22
-2
APIchanges
doc/APIchanges
+3
-0
avcodec.h
libavcodec/avcodec.h
+12
-0
options.c
libavcodec/options.c
+1
-0
utils.c
libavcodec/utils.c
+4
-0
version.h
libavcodec/version.h
+2
-2
No files found.
doc/APIchanges
View file @
96d815fc
...
...
@@ -15,6 +15,9 @@ libavutil: 2012-10-22
API changes, most recent first:
2012-12-15 - xxxxxxx - lavc 54.80.100 - avcodec.h
Add pkt_size field to AVFrame.
2012-11-25 - xxxxxxx - lavu 52.9.100 - opt.h
Add the following convenience functions to opt.h:
av_opt_get_image_size
...
...
libavcodec/avcodec.h
View file @
96d815fc
...
...
@@ -1467,6 +1467,16 @@ typedef struct AVFrame {
* - decoding: Read by user.
*/
int64_t
channels
;
/**
* size of the corresponding packet containing the compressed
* frame. It must be accessed using av_frame_get_pkt_size() and
* av_frame_set_pkt_size().
* It is set to a negative value if unknown.
* - encoding: unused
* - decoding: set by libavcodec, read by user.
*/
int
pkt_size
;
}
AVFrame
;
/**
...
...
@@ -1490,6 +1500,8 @@ AVDictionary *av_frame_get_metadata (const AVFrame *frame);
void
av_frame_set_metadata
(
AVFrame
*
frame
,
AVDictionary
*
val
);
int
av_frame_get_decode_error_flags
(
const
AVFrame
*
frame
);
void
av_frame_set_decode_error_flags
(
AVFrame
*
frame
,
int
val
);
int
av_frame_get_pkt_size
(
const
AVFrame
*
frame
);
void
av_frame_set_pkt_size
(
AVFrame
*
frame
,
int
val
);
struct
AVCodecInternal
;
...
...
libavcodec/options.c
View file @
96d815fc
...
...
@@ -248,6 +248,7 @@ const AVClass *avcodec_get_class(void)
static
const
AVOption
frame_options
[]
=
{
{
"best_effort_timestamp"
,
""
,
FOFFSET
(
best_effort_timestamp
),
AV_OPT_TYPE_INT64
,
{.
i64
=
AV_NOPTS_VALUE
},
INT64_MIN
,
INT64_MAX
,
0
},
{
"pkt_pos"
,
""
,
FOFFSET
(
pkt_pos
),
AV_OPT_TYPE_INT64
,
{.
i64
=
-
1
},
INT64_MIN
,
INT64_MAX
,
0
},
{
"pkt_size"
,
""
,
FOFFSET
(
pkt_size
),
AV_OPT_TYPE_INT64
,
{.
i64
=
-
1
},
INT64_MIN
,
INT64_MAX
,
0
},
{
"sample_aspect_ratio"
,
""
,
FOFFSET
(
sample_aspect_ratio
),
AV_OPT_TYPE_RATIONAL
,
{.
dbl
=
0
},
0
,
INT_MAX
,
0
},
{
"width"
,
""
,
FOFFSET
(
width
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
0
},
{
"height"
,
""
,
FOFFSET
(
height
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
0
},
...
...
libavcodec/utils.c
View file @
96d815fc
...
...
@@ -512,10 +512,12 @@ void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame)
frame
->
pkt_pts
=
s
->
pkt
->
pts
;
frame
->
pkt_pos
=
s
->
pkt
->
pos
;
frame
->
pkt_duration
=
s
->
pkt
->
duration
;
frame
->
pkt_size
=
s
->
pkt
->
size
;
}
else
{
frame
->
pkt_pts
=
AV_NOPTS_VALUE
;
frame
->
pkt_pos
=
-
1
;
frame
->
pkt_duration
=
0
;
frame
->
pkt_size
=
-
1
;
}
frame
->
reordered_opaque
=
s
->
reordered_opaque
;
...
...
@@ -677,6 +679,7 @@ void avcodec_get_frame_defaults(AVFrame *frame)
frame
->
best_effort_timestamp
=
AV_NOPTS_VALUE
;
frame
->
pkt_duration
=
0
;
frame
->
pkt_pos
=
-
1
;
frame
->
pkt_size
=
-
1
;
frame
->
key_frame
=
1
;
frame
->
sample_aspect_ratio
=
(
AVRational
)
{
0
,
1
};
frame
->
format
=
-
1
;
/* unknown */
...
...
@@ -723,6 +726,7 @@ MAKE_ACCESSORS(AVFrame, frame, int, channels)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int
,
sample_rate
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
AVDictionary
*
,
metadata
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int
,
decode_error_flags
)
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int
,
pkt_size
)
MAKE_ACCESSORS
(
AVCodecContext
,
codec
,
AVRational
,
pkt_timebase
)
MAKE_ACCESSORS
(
AVCodecContext
,
codec
,
const
AVCodecDescriptor
*
,
codec_descriptor
)
...
...
libavcodec/version.h
View file @
96d815fc
...
...
@@ -29,8 +29,8 @@
#include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR
79
#define LIBAVCODEC_VERSION_MICRO 10
2
#define LIBAVCODEC_VERSION_MINOR
80
#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