external/stagefright-plugins
Revisión | 84eca1825c3971489fa21389a565f0cf6a1e2555 (tree) |
---|---|
Tiempo | 2017-04-28 13:41:46 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Merge branch 'lollipop-x86' into multiwindow-hwaccel
@@ -38,7 +38,9 @@ | ||
38 | 38 | <Limit name="channel-count" max="8" /> |
39 | 39 | <Limit name="sample-rate" ranges="8000-192000" /> |
40 | 40 | </MediaCodec> |
41 | - <MediaCodec name="OMX.ffmpeg.dts.decoder" type="audio/dts" > | |
41 | + <MediaCodec name="OMX.ffmpeg.dts.decoder"> | |
42 | + <Type name="audio/vnd.dts" /> | |
43 | + <Type name="audio/dts" /> | |
42 | 44 | <Limit name="channel-count" max="8" /> |
43 | 45 | <Limit name="sample-rate" ranges="8000-192000" /> |
44 | 46 | </MediaCodec> |
@@ -15,7 +15,6 @@ | ||
15 | 15 | * limitations under the License. |
16 | 16 | */ |
17 | 17 | |
18 | -//#define LOG_NDEBUG 0 | |
19 | 18 | #define LOG_TAG "FFmpegExtractor" |
20 | 19 | #include <utils/Log.h> |
21 | 20 |
@@ -61,6 +60,7 @@ | ||
61 | 60 | #define DEBUG_DISABLE_VIDEO 0 |
62 | 61 | #define DEBUG_DISABLE_AUDIO 0 |
63 | 62 | #define DEBUG_PKT 0 |
63 | +#define DEBUG_EXTRADATA 0 | |
64 | 64 | #define DEBUG_FORMATS 0 |
65 | 65 | |
66 | 66 | enum { |
@@ -657,14 +657,14 @@ int FFmpegExtractor::stream_component_open(int stream_index) | ||
657 | 657 | } |
658 | 658 | return ret; |
659 | 659 | } |
660 | - | |
660 | +#if DEBUG_EXTRADATA | |
661 | 661 | if (avctx->extradata) { |
662 | 662 | ALOGV("video stream extradata:"); |
663 | 663 | hexdump(avctx->extradata, avctx->extradata_size); |
664 | 664 | } else { |
665 | 665 | ALOGV("video stream no extradata, but we can ignore it."); |
666 | 666 | } |
667 | - | |
667 | +#endif | |
668 | 668 | meta = setVideoFormat(mVideoStream); |
669 | 669 | if (meta == NULL) { |
670 | 670 | ALOGE("setVideoFormat failed"); |
@@ -699,14 +699,14 @@ int FFmpegExtractor::stream_component_open(int stream_index) | ||
699 | 699 | } |
700 | 700 | return ret; |
701 | 701 | } |
702 | - | |
702 | +#if DEBUG_EXTRADATA | |
703 | 703 | if (avctx->extradata) { |
704 | 704 | ALOGV("audio stream extradata(%d):", avctx->extradata_size); |
705 | 705 | hexdump(avctx->extradata, avctx->extradata_size); |
706 | 706 | } else { |
707 | 707 | ALOGV("audio stream no extradata, but we can ignore it."); |
708 | 708 | } |
709 | - | |
709 | +#endif | |
710 | 710 | meta = setAudioFormat(mAudioStream); |
711 | 711 | if (meta == NULL) { |
712 | 712 | ALOGE("setAudioFormat failed"); |
@@ -15,7 +15,6 @@ | ||
15 | 15 | * limitations under the License. |
16 | 16 | */ |
17 | 17 | |
18 | -//#define LOG_NDEBUG 0 | |
19 | 18 | #define LOG_TAG "SoftFFmpegAudio" |
20 | 19 | #include <utils/Log.h> |
21 | 20 | #include <cutils/properties.h> |
@@ -33,11 +32,13 @@ | ||
33 | 32 | |
34 | 33 | #define DEBUG_PKT 0 |
35 | 34 | #define DEBUG_FRM 0 |
35 | +#define DEBUG_EXTRADATA 0 | |
36 | 36 | |
37 | 37 | namespace android { |
38 | 38 | |
39 | 39 | template<class T> |
40 | 40 | static void InitOMXParams(T *params) { |
41 | + memset(params, 0, sizeof(T)); | |
41 | 42 | params->nSize = sizeof(T); |
42 | 43 | params->nVersion.s.nVersionMajor = 1; |
43 | 44 | params->nVersion.s.nVersionMinor = 0; |
@@ -980,9 +981,11 @@ int32_t SoftFFmpegAudio::handleExtradata() { | ||
980 | 981 | BufferInfo *inInfo = *inQueue.begin(); |
981 | 982 | OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader; |
982 | 983 | |
984 | +#if DEBUG_EXTRADATA | |
983 | 985 | ALOGI("got extradata, ignore: %d, size: %u", |
984 | 986 | mIgnoreExtradata, inHeader->nFilledLen); |
985 | 987 | hexdump(inHeader->pBuffer + inHeader->nOffset, inHeader->nFilledLen); |
988 | +#endif | |
986 | 989 | |
987 | 990 | if (mIgnoreExtradata) { |
988 | 991 | ALOGI("got extradata, size: %u, but ignore it", inHeader->nFilledLen); |
@@ -1035,8 +1038,10 @@ int32_t SoftFFmpegAudio::openDecoder() { | ||
1035 | 1038 | } |
1036 | 1039 | deinitVorbisHdr(); |
1037 | 1040 | } |
1041 | +#if DEBUG_EXTRADATA | |
1038 | 1042 | ALOGI("extradata is ready, size: %d", mCtx->extradata_size); |
1039 | 1043 | hexdump(mCtx->extradata, mCtx->extradata_size); |
1044 | +#endif | |
1040 | 1045 | mExtradataReady = true; |
1041 | 1046 | } |
1042 | 1047 |
@@ -15,7 +15,6 @@ | ||
15 | 15 | * limitations under the License. |
16 | 16 | */ |
17 | 17 | |
18 | -//#define LOG_NDEBUG 0 | |
19 | 18 | #define LOG_TAG "SoftFFmpegVideo" |
20 | 19 | #include <utils/Log.h> |
21 | 20 |
@@ -29,6 +28,7 @@ | ||
29 | 28 | |
30 | 29 | #define DEBUG_PKT 0 |
31 | 30 | #define DEBUG_FRM 0 |
31 | +#define DEBUG_EXTRADATA 0 | |
32 | 32 | |
33 | 33 | static int decoder_reorder_pts = -1; |
34 | 34 |
@@ -347,9 +347,11 @@ int32_t SoftFFmpegVideo::handleExtradata() { | ||
347 | 347 | BufferInfo *inInfo = *inQueue.begin(); |
348 | 348 | OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader; |
349 | 349 | |
350 | +#if DEBUG_EXTRADATA | |
350 | 351 | ALOGI("got extradata, ignore: %d, size: %u", |
351 | 352 | mIgnoreExtradata, inHeader->nFilledLen); |
352 | 353 | hexdump(inHeader->pBuffer + inHeader->nOffset, inHeader->nFilledLen); |
354 | +#endif | |
353 | 355 | |
354 | 356 | if (mIgnoreExtradata) { |
355 | 357 | ALOGI("got extradata, size: %u, but ignore it", inHeader->nFilledLen); |
@@ -388,8 +390,10 @@ int32_t SoftFFmpegVideo::openDecoder() { | ||
388 | 390 | } |
389 | 391 | |
390 | 392 | if (!mExtradataReady) { |
393 | +#if DEBUG_EXTRADATA | |
391 | 394 | ALOGI("extradata is ready, size: %d", mCtx->extradata_size); |
392 | 395 | hexdump(mCtx->extradata, mCtx->extradata_size); |
396 | +#endif | |
393 | 397 | mExtradataReady = true; |
394 | 398 | } |
395 | 399 |
@@ -14,7 +14,6 @@ | ||
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | 16 | |
17 | -//#define LOG_NDEBUG 0 | |
18 | 17 | #define LOG_TAG "codec_utils" |
19 | 18 | #include <utils/Log.h> |
20 | 19 |
@@ -14,7 +14,6 @@ | ||
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | 16 | |
17 | -//#define LOG_NDEBUG 0 | |
18 | 17 | #define LOG_TAG "FFMPEG" |
19 | 18 | #include <utils/Log.h> |
20 | 19 |
@@ -15,7 +15,6 @@ | ||
15 | 15 | * limitations under the License. |
16 | 16 | */ |
17 | 17 | |
18 | -//#define LOG_NDEBUG 0 | |
19 | 18 | #define LOG_TAG "FFMPEG" |
20 | 19 | #include <utils/Log.h> |
21 | 20 |