This patch set adds audio_service_type to AVCodecContext and uses
it to set AVStream.disposition.  For AC-3, the bitstream mode is
used to set audio_service_type and vice-versa.

example:
ffmpeg -i AllSamples.wav -ab 224k -audio_service_type vi -acodec ac3 -y 
AllSamples_vi.mp4
ffmpeg -i AllSamples_vi.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'AllSamples_vi.mp4':
    Stream #0.0(und): Audio: ac3, 48000 Hz, 2 channels, s16, 224 kb/s (visual 
impaired)

Justin Ruggles (5):
  Add audio_service_type field to AVCodecContext for encoding and
    reporting     of the service type in the audio bitstream.
  Add APIchanges entry for audio_service_type.
  Use audio_service_type to set stream disposition.
  Get audio_service_type for AC-3 based on bitstream mode in the AC-3
    parser     and decoder, and vice-versa for the AC-3 encoder.
  mov: set audio service type for AC-3 from bitstream mode in the
    'dac3' atom.

 doc/APIchanges              |    3 +++
 doc/ffmpeg.texi             |   22 ++++++++++++++++++++++
 ffmpeg.c                    |    1 +
 libavcodec/aac_ac3_parser.c |    1 +
 libavcodec/aac_ac3_parser.h |    1 +
 libavcodec/ac3.h            |    1 +
 libavcodec/ac3_parser.c     |    5 ++++-
 libavcodec/ac3dec.c         |    5 +++++
 libavcodec/ac3dec.h         |    1 +
 libavcodec/ac3enc.c         |   16 +++++++++++++++-
 libavcodec/avcodec.h        |   20 ++++++++++++++++++++
 libavcodec/eac3dec.c        |    2 +-
 libavcodec/options.c        |   10 ++++++++++
 libavcodec/version.h        |    2 +-
 libavformat/mov.c           |    6 +++++-
 libavformat/utils.c         |   13 +++++++++++++
 16 files changed, 104 insertions(+), 5 deletions(-)

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to