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
2c8ee254
Commit
2c8ee254
authored
Sep 05, 2015
by
Hendrik Leppkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: remove deprecated old audio decode API
parent
c956cb2c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
108 deletions
+0
-108
avcodec.h
libavcodec/avcodec.h
+0
-60
utils.c
libavcodec/utils.c
+0
-45
version.h
libavcodec/version.h
+0
-3
No files found.
libavcodec/avcodec.h
View file @
2c8ee254
...
@@ -4145,66 +4145,6 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
...
@@ -4145,66 +4145,6 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
*/
*/
enum
AVChromaLocation
avcodec_chroma_pos_to_enum
(
int
xpos
,
int
ypos
);
enum
AVChromaLocation
avcodec_chroma_pos_to_enum
(
int
xpos
,
int
ypos
);
#if FF_API_OLD_DECODE_AUDIO
/**
* Wrapper function which calls avcodec_decode_audio4.
*
* @deprecated Use avcodec_decode_audio4 instead.
*
* Decode the audio frame of size avpkt->size from avpkt->data into samples.
* Some decoders may support multiple frames in a single AVPacket, such
* decoders would then just decode the first frame. In this case,
* avcodec_decode_audio3 has to be called again with an AVPacket that contains
* the remaining data in order to decode the second frame etc.
* If no frame
* could be outputted, frame_size_ptr is zero. Otherwise, it is the
* decompressed frame size in bytes.
*
* @warning You must set frame_size_ptr to the allocated size of the
* output buffer before calling avcodec_decode_audio3().
*
* @warning The input buffer must be FF_INPUT_BUFFER_PADDING_SIZE larger than
* the actual read bytes because some optimized bitstream readers read 32 or 64
* bits at once and could read over the end.
*
* @warning The end of the input buffer avpkt->data should be set to 0 to ensure that
* no overreading happens for damaged MPEG streams.
*
* @warning You must not provide a custom get_buffer() when using
* avcodec_decode_audio3(). Doing so will override it with
* avcodec_default_get_buffer. Use avcodec_decode_audio4() instead,
* which does allow the application to provide a custom get_buffer().
*
* @note You might have to align the input buffer avpkt->data and output buffer
* samples. The alignment requirements depend on the CPU: On some CPUs it isn't
* necessary at all, on others it won't work at all if not aligned and on others
* it will work but it will have an impact on performance.
*
* In practice, avpkt->data should have 4 byte alignment at minimum and
* samples should be 16 byte aligned unless the CPU doesn't need it
* (AltiVec and SSE do).
*
* @note Codecs which have the CODEC_CAP_DELAY capability set have a delay
* between input and output, these need to be fed with avpkt->data=NULL,
* avpkt->size=0 at the end to return the remaining frames.
*
* @param avctx the codec context
* @param[out] samples the output buffer, sample type in avctx->sample_fmt
* If the sample format is planar, each channel plane will
* be the same size, with no padding between channels.
* @param[in,out] frame_size_ptr the output buffer size in bytes
* @param[in] avpkt The input AVPacket containing the input buffer.
* You can create such packet with av_init_packet() and by then setting
* data and size, some decoders might in addition need other fields.
* All decoders are designed to use the least fields possible though.
* @return On error a negative value is returned, otherwise the number of bytes
* used or zero if no frame data was decompressed (used) from the input AVPacket.
*/
attribute_deprecated
int
avcodec_decode_audio3
(
AVCodecContext
*
avctx
,
int16_t
*
samples
,
int
*
frame_size_ptr
,
AVPacket
*
avpkt
);
#endif
/**
/**
* Decode the audio frame of size avpkt->size from avpkt->data into frame.
* Decode the audio frame of size avpkt->size from avpkt->data into frame.
*
*
...
...
libavcodec/utils.c
View file @
2c8ee254
...
@@ -2280,51 +2280,6 @@ fail:
...
@@ -2280,51 +2280,6 @@ fail:
return
ret
;
return
ret
;
}
}
#if FF_API_OLD_DECODE_AUDIO
int
attribute_align_arg
avcodec_decode_audio3
(
AVCodecContext
*
avctx
,
int16_t
*
samples
,
int
*
frame_size_ptr
,
AVPacket
*
avpkt
)
{
AVFrame
*
frame
=
av_frame_alloc
();
int
ret
,
got_frame
=
0
;
if
(
!
frame
)
return
AVERROR
(
ENOMEM
);
ret
=
avcodec_decode_audio4
(
avctx
,
frame
,
&
got_frame
,
avpkt
);
if
(
ret
>=
0
&&
got_frame
)
{
int
ch
,
plane_size
;
int
planar
=
av_sample_fmt_is_planar
(
avctx
->
sample_fmt
);
int
data_size
=
av_samples_get_buffer_size
(
&
plane_size
,
avctx
->
channels
,
frame
->
nb_samples
,
avctx
->
sample_fmt
,
1
);
if
(
*
frame_size_ptr
<
data_size
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"output buffer size is too small for "
"the current frame (%d < %d)
\n
"
,
*
frame_size_ptr
,
data_size
);
av_frame_free
(
&
frame
);
return
AVERROR
(
EINVAL
);
}
memcpy
(
samples
,
frame
->
extended_data
[
0
],
plane_size
);
if
(
planar
&&
avctx
->
channels
>
1
)
{
uint8_t
*
out
=
((
uint8_t
*
)
samples
)
+
plane_size
;
for
(
ch
=
1
;
ch
<
avctx
->
channels
;
ch
++
)
{
memcpy
(
out
,
frame
->
extended_data
[
ch
],
plane_size
);
out
+=
plane_size
;
}
}
*
frame_size_ptr
=
data_size
;
}
else
{
*
frame_size_ptr
=
0
;
}
av_frame_free
(
&
frame
);
return
ret
;
}
#endif
int
attribute_align_arg
avcodec_decode_audio4
(
AVCodecContext
*
avctx
,
int
attribute_align_arg
avcodec_decode_audio4
(
AVCodecContext
*
avctx
,
AVFrame
*
frame
,
AVFrame
*
frame
,
int
*
got_frame_ptr
,
int
*
got_frame_ptr
,
...
...
libavcodec/version.h
View file @
2c8ee254
...
@@ -55,9 +55,6 @@
...
@@ -55,9 +55,6 @@
#ifndef FF_API_VIMA_DECODER
#ifndef FF_API_VIMA_DECODER
#define FF_API_VIMA_DECODER (LIBAVCODEC_VERSION_MAJOR < 57)
#define FF_API_VIMA_DECODER (LIBAVCODEC_VERSION_MAJOR < 57)
#endif
#endif
#ifndef FF_API_OLD_DECODE_AUDIO
#define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 57)
#endif
#ifndef FF_API_OLD_ENCODE_AUDIO
#ifndef FF_API_OLD_ENCODE_AUDIO
#define FF_API_OLD_ENCODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 57)
#define FF_API_OLD_ENCODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 57)
#endif
#endif
...
...
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