Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
828bd088
Commit
828bd088
authored
12 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
lavc: add sample rate and channel layout to AVFrame.
Rationale is the same as for video width/height etc.
parent
37f4a976
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/APIchanges
+3
-0
3 additions, 0 deletions
doc/APIchanges
libavcodec/avcodec.h
+16
-0
16 additions, 0 deletions
libavcodec/avcodec.h
libavcodec/utils.c
+4
-0
4 additions, 0 deletions
libavcodec/utils.c
libavcodec/version.h
+1
-1
1 addition, 1 deletion
libavcodec/version.h
with
24 additions
and
1 deletion
doc/APIchanges
+
3
−
0
View file @
828bd088
...
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
...
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
API changes, most recent first:
2012-xx-xx - xxxxxxx - lavc 54.13.0 - avcodec.h
Add sample_rate and channel_layout fields to AVFrame.
2012-xx-xx - xxxxxxx - lavr 0.0.1
2012-xx-xx - xxxxxxx - lavr 0.0.1
Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8.
Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8.
...
...
This diff is collapsed.
Click to expand it.
libavcodec/avcodec.h
+
16
−
0
View file @
828bd088
...
@@ -1207,6 +1207,22 @@ typedef struct AVFrame {
...
@@ -1207,6 +1207,22 @@ typedef struct AVFrame {
* - decoding: Set by libavcodec.
* - decoding: Set by libavcodec.
*/
*/
uint8_t
motion_subsample_log2
;
uint8_t
motion_subsample_log2
;
/**
* Sample rate of the audio data.
*
* - encoding: unused
* - decoding: set by get_buffer()
*/
int
sample_rate
;
/**
* Channel layout of the audio data.
*
* - encoding: unused
* - decoding: set by get_buffer()
*/
uint64_t
channel_layout
;
}
AVFrame
;
}
AVFrame
;
struct
AVCodecInternal
;
struct
AVCodecInternal
;
...
...
This diff is collapsed.
Click to expand it.
libavcodec/utils.c
+
4
−
0
View file @
828bd088
...
@@ -356,6 +356,10 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
...
@@ -356,6 +356,10 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
else
frame
->
pkt_pts
=
AV_NOPTS_VALUE
;
else
frame
->
pkt_pts
=
AV_NOPTS_VALUE
;
frame
->
reordered_opaque
=
avctx
->
reordered_opaque
;
frame
->
reordered_opaque
=
avctx
->
reordered_opaque
;
frame
->
sample_rate
=
avctx
->
sample_rate
;
frame
->
format
=
avctx
->
sample_fmt
;
frame
->
channel_layout
=
avctx
->
channel_layout
;
if
(
avctx
->
debug
&
FF_DEBUG_BUFFERS
)
if
(
avctx
->
debug
&
FF_DEBUG_BUFFERS
)
av_log
(
avctx
,
AV_LOG_DEBUG
,
"default_get_buffer called on frame %p, "
av_log
(
avctx
,
AV_LOG_DEBUG
,
"default_get_buffer called on frame %p, "
"internal audio buffer used
\n
"
,
frame
);
"internal audio buffer used
\n
"
,
frame
);
...
...
This diff is collapsed.
Click to expand it.
libavcodec/version.h
+
1
−
1
View file @
828bd088
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
*/
*/
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 1
2
#define LIBAVCODEC_VERSION_MINOR 1
3
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment