|
| 1 | +// |
| 2 | +// Notice Regarding Standards. AMD does not provide a license or sublicense to |
| 3 | +// any Intellectual Property Rights relating to any standards, including but not |
| 4 | +// limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; |
| 5 | +// AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3 |
| 6 | +// (collectively, the "Media Technologies"). For clarity, you will pay any |
| 7 | +// royalties due for such third party technologies, which may include the Media |
| 8 | +// Technologies that are owed as a result of AMD providing the Software to you. |
| 9 | +// |
| 10 | +// MIT license |
| 11 | +// |
| 12 | +// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. |
| 13 | +// |
| 14 | +// Permission is hereby granted, free of charge, to any person obtaining a copy |
| 15 | +// of this software and associated documentation files (the "Software"), to deal |
| 16 | +// in the Software without restriction, including without limitation the rights |
| 17 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 18 | +// copies of the Software, and to permit persons to whom the Software is |
| 19 | +// furnished to do so, subject to the following conditions: |
| 20 | +// |
| 21 | +// The above copyright notice and this permission notice shall be included in |
| 22 | +// all copies or substantial portions of the Software. |
| 23 | +// |
| 24 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 25 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 26 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 27 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 28 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 29 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 30 | +// THE SOFTWARE. |
| 31 | +// |
| 32 | + |
| 33 | +//------------------------------------------------------------------------------------------------- |
| 34 | +// Audio session interface declaration |
| 35 | +//------------------------------------------------------------------------------------------------- |
| 36 | +#ifndef __AMFAudioCapture_h__ |
| 37 | +#define __AMFAudioCapture_h__ |
| 38 | + |
| 39 | +#pragma once |
| 40 | + |
| 41 | +#include "public/include/components/Component.h" |
| 42 | + |
| 43 | +// Set to capture from either a microphone or desktop |
| 44 | +#define AUDIOCAPTURE_SOURCE L"AudioCaptureSource" // amf_bool true for microphone, false for desktop; |
| 45 | + |
| 46 | +// In the case of capturing a microphone, the AUDIOCAPTURE_DEVICE_ACTIVE property |
| 47 | +// can be set to -1 so that the active input devices are looked up. If the initialization |
| 48 | +// is successful then the AUDIOCAPTURE_DEVICE_NAME and AUDIOCAPTURE_DEVICE_COUNT |
| 49 | +// properties will be set. |
| 50 | +#define AUDIOCAPTURE_DEVICE_ACTIVE L"AudioCaptureDeviceActive" // amf_int64 |
| 51 | +#define AUDIOCAPTURE_DEVICE_COUNT L"AudioCaptureDeviceCount" // amf_int64 |
| 52 | +#define AUDIOCAPTURE_DEVICE_NAME L"AudioCaptureDeviceName" // String |
| 53 | + |
| 54 | +// Codec used for audio capture |
| 55 | +#define AUDIOCAPTURE_CODEC L"AudioCaptureCodec" // amf_int64, AV_CODEC_ID_PCM_F32LE |
| 56 | +// Sample rate used for audio capture |
| 57 | +#define AUDIOCAPTURE_SAMPLERATE L"AudioCaptureSampleRate" // amf_int64, 44100,def |
| 58 | +// Sample count used for audio capture |
| 59 | +#define AUDIOCAPTURE_SAMPLES L"AudioCaptureSampleCount" // amf_int64, 1024 |
| 60 | +// Bitrate used for audio capture |
| 61 | +#define AUDIOCAPTURE_BITRATE L"AudioCaptureBitRate" // amf_int64, 1024 |
| 62 | +// Channel count used for audio capture |
| 63 | +#define AUDIOCAPTURE_CHANNELS L"AudioCaptureChannelCount" // amf_int64, 2 |
| 64 | +// Format used for audio capture |
| 65 | +#define AUDIOCAPTURE_FORMAT L"AudioCaptureFormat" // amf_int64, AMFAF_U8 |
| 66 | +// Block alignment |
| 67 | +#define AUDIOCAPTURE_BLOCKALIGN L"AudioCaptureBlockAlign" // amf_int64, AMFAF_U8 |
| 68 | +// Audio frame size |
| 69 | +#define AUDIOCAPTURE_FRAMESIZE L"AudioCaptureFrameSize" // amf_int64, AMFAF_U8 |
| 70 | +// Audio low latency state |
| 71 | +#define AUDIOCAPTURE_LOWLATENCY L"AudioCaptureLowLatency" // amf_int64; |
| 72 | + |
| 73 | +// Optional interface that provides current time |
| 74 | +#define AUDIOCAPTURE_CURRENT_TIME_INTERFACE L"CurrentTimeInterface" // interface to current time object |
| 75 | + |
| 76 | +extern "C" |
| 77 | +{ |
| 78 | + // Component that allows the recording of inputs such as microphones or the audio that is being |
| 79 | + // rendered. The direction that is captured is controlled by the AUDIOCAPTURE_CAPTURE property |
| 80 | + // |
| 81 | + AMF_RESULT AMF_CDECL_CALL AMFCreateComponentAudioCapture(amf::AMFContext* pContext, amf::AMFComponent** ppComponent); |
| 82 | +} |
| 83 | + |
| 84 | +#endif |
0 commit comments