|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
|
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #ifndef OMXCodecDescriptorUtil_h_ |
|
7 #define OMXCodecDescriptorUtil_h_ |
|
8 |
|
9 #include <stagefright/foundation/AMessage.h> |
|
10 #include <stagefright/MediaErrors.h> |
|
11 |
|
12 #include <nsTArray.h> |
|
13 |
|
14 #include "OMXCodecWrapper.h" |
|
15 |
|
16 namespace android { |
|
17 // Generate decoder config blob using aConfigData provided by encoder. |
|
18 // The output will be stored in aOutputBuf. |
|
19 // aFormat specifies the output format: AVC_MP4 is for MP4 file, and AVC_NAL is |
|
20 // for RTP packet used by WebRTC. |
|
21 status_t GenerateAVCDescriptorBlob(sp<AMessage>& aConfigData, |
|
22 nsTArray<uint8_t>* aOutputBuf, |
|
23 OMXVideoEncoder::BlobFormat aFormat); |
|
24 |
|
25 } |
|
26 |
|
27 #endif // OMXCodecDescriptorUtil_h_ |