Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9013611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:18:41+00:00 2026-06-16T03:18:41+00:00

I have a buffer that contain packets read by ffmpeg from a video file

  • 0

I have a buffer that contain packets read by ffmpeg from a video file encoded using H264/AAC
According to Apple document, audio stream encoded in AAC can be decode with hardware support,

how to decode the audio stream with hardware support ?

UPDATE: I use Audio Queue Service to output the audio. Right now i decode AAC packet using ffmpeg and send LPCM audio to AQS. According to the Apple document, I can send directly AAC audio to AQ and it will take care of decoding task. Does it decode with hardware? Do i need, and how to set Audio Queue’s parameter to enable audio hardware decoding?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:18:42+00:00Added an answer on June 16, 2026 at 3:18 am

    You can tell the system to not use hardware decoding but probably not the other way around.

    constant to determine which hardware codecs can be used.

    enum {
        kAudioFormatProperty_HardwareCodecCapabilities = 'hwcc',
    };
    

    Constants
    kAudioFormatProperty_HardwareCodecCapabilities
    A UInt32 value indicating the number of codecs from the specified list that can be used, if the application were to begin using them in the specified order. Set the inSpecifier parameter to an array of AudioClassDescription structures that describes a set of one or more audio codecs. If the property value is the same as the size of the array in the inSpecifier parameter, all of the specified codecs can be used.
    Available in iOS 3.0 and later.
    Declared in AudioFormat.h.
    Discussion
    Use this property to determine whether a desired set of codecs can be simultaneously instantiated.

    Hardware-based codecs can be used only when playing or recording using Audio Queue Services or using interfaces, such as AV Foundation, which use Audio Queue Services. In particular, you cannot use hardware-based audio codecs with OpenAL or when using the I/O audio unit.

    When describing the presence of a hardware codec, the system does not consider the current audio session category. Some categories disallow the use of hardware codecs. A set of hardware codecs is considered available, by this constant, based only on whether the hardware supports the specified combination of codecs.

    Some codecs may be available in both hardware and software implementations. Use the kAudioFormatProperty_Encoders and kAudioFormatProperty_Decoders constants to determine whether a given codec is present, and whether it is hardware or software-based.

    Software-based codecs can always be instantiated, so there is no need to use this constant when using software encoding or decoding.

    The following code example illustrates how to check whether or not a hardware AAC encoder and a hardware AAC decoder are available, in that order of priority:

    AudioClassDescription requestedCodecs[2] = {
        {
            kAudioEncoderComponentType,
            kAudioFormatAAC,
            kAppleHardwareAudioCodecManufacturer
        },
        {
            kAudioDecoderComponentType,
            kAudioFormatAAC,
            kAppleHardwareAudioCodecManufacturer
        }
    };
    
    UInt32 successfulCodecs = 0;
    size = sizeof (successfulCodecs);
    OSStatus result =   AudioFormatGetProperty (
                            kAudioFormatProperty_HardwareCodecCapabilities,
                            requestedCodecs,
                            sizeof (requestedCodecs),
                            &size,
                            &successfulCodecs
                        );
    switch (successfulCodecs) {
        case 0:
            // aac hardware encoder is unavailable. aac hardware decoder availability
            // is unknown; could ask again for only aac hardware decoding
        case 1:
            // aac hardware encoder is available but, while using it, no hardware
            // decoder is available.
        case 2:
            // hardware encoder and decoder are available simultaneously
    }
    

    https://github.com/mooncatventures-group/sampleDecoder

    You probably better off using audioUnits however rather than audio queue

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a driver, that extracts a value from IRP buffer. Now based
I have a buffer in class 'bufferClass' that will generate a signal to tell
I have a direct buffer holding Integers that are already sorted (i.e. 1,1,3,3,3,3,7,7,....). Most
I have a legacy DLL written in C that I'd like to call from
I have a binary file I've loaded using an NSData object. Is there a
I have a program that XORs two files together using one time pad encryption.
I have an string input-buffer that contains html. That html contains a lot of
I have a JSON object that contain a set of key:values. I want to
I'm writing a program which is supposed to read two strings that can contain
I have a capture card that captures SDI video with embedded audio. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.