external/stagefright-plugins
リビジョン | 8756e69e58087c3d68bca95c7244b6d0932fe50e (tree) |
---|---|
日時 | 2018-05-15 19:28:20 |
作者 | Michael Goffioul <michael.goffioul@gmai...> |
コミッター | Chih-Wei Huang |
Enable compilation on oreo-x86.
These changes are based on a simple port of frameworks/av port to
oreo-x86 containing only necessary changes. Notable differences from
nougat-x86:
- no support for non-PCM16 output
@@ -9,6 +9,7 @@ LOCAL_SHARED_LIBRARIES += \ | ||
9 | 9 | libbinder \ |
10 | 10 | libmedia \ |
11 | 11 | libffmpeg_utils \ |
12 | + liblog \ | |
12 | 13 | |
13 | 14 | LOCAL_MODULE:= libffmpeg_extractor |
14 | 15 |
@@ -571,7 +571,7 @@ sp<MetaData> FFmpegExtractor::setAudioFormat(AVStream *stream) | ||
571 | 571 | meta->setInt32(kKeySampleRate, avctx->sample_rate); |
572 | 572 | meta->setInt32(kKeyBlockAlign, avctx->block_align); |
573 | 573 | meta->setInt32(kKeySampleFormat, avctx->sample_fmt); |
574 | - meta->setInt32(kKeyPcmEncoding, sampleFormatToEncoding(avctx->sample_fmt)); | |
574 | + //meta->setInt32(kKeyPcmEncoding, sampleFormatToEncoding(avctx->sample_fmt)); | |
575 | 575 | meta->setCString('ffmt', findMatchingContainer(mFormatCtx->iformat->name)); |
576 | 576 | setDurationMetaData(stream, meta); |
577 | 577 | } |
@@ -9,13 +9,14 @@ LOCAL_SRC_FILES := \ | ||
9 | 9 | ffmpeg_hwaccel.c \ |
10 | 10 | |
11 | 11 | LOCAL_C_INCLUDES += \ |
12 | - $(TOP)/frameworks/native/include/media/hardware \ | |
13 | - $(TOP)/frameworks/av/media/libstagefright/include | |
12 | + $(TOP)/frameworks/native/include/media/hardware | |
14 | 13 | |
15 | 14 | LOCAL_SHARED_LIBRARIES += \ |
16 | 15 | libdl \ |
17 | 16 | libffmpeg_utils \ |
18 | 17 | $(if $(filter true,$(BOARD_USE_LIBAV)),libavresample,libswresample) \ |
18 | + liblog \ | |
19 | + libnativewindow \ | |
19 | 20 | libswscale \ |
20 | 21 | libstagefright_omx |
21 | 22 |
@@ -18,7 +18,7 @@ | ||
18 | 18 | #define LOG_TAG "FFmpegOMXPlugin" |
19 | 19 | #include <utils/Log.h> |
20 | 20 | |
21 | -#include "include/SoftOMXComponent.h" | |
21 | +#include <media/stagefright/omx/SoftOMXComponent.h> | |
22 | 22 | |
23 | 23 | #include <media/stagefright/foundation/ADebug.h> |
24 | 24 | #include <media/stagefright/foundation/AString.h> |
@@ -588,7 +588,7 @@ void SoftFFmpegAudio::adjustAudioParams() { | ||
588 | 588 | |
589 | 589 | OMX_ERRORTYPE SoftFFmpegAudio::internalSetParameter( |
590 | 590 | OMX_INDEXTYPE index, const OMX_PTR params) { |
591 | - //ALOGV("internalSetParameter index:0x%x", index); | |
591 | + ALOGV("internalSetParameter index:0x%x", index); | |
592 | 592 | switch ((int)index) { |
593 | 593 | case OMX_IndexParamStandardComponentRole: |
594 | 594 | { |
@@ -19,7 +19,7 @@ | ||
19 | 19 | |
20 | 20 | #define SOFT_FFMPEGAUDIO_H_ |
21 | 21 | |
22 | -#include "SimpleSoftOMXComponent.h" | |
22 | +#include <media/stagefright/omx/SimpleSoftOMXComponent.h> | |
23 | 23 | |
24 | 24 | #ifndef __GNUC__ |
25 | 25 | //fix DECLARE_ALIGNED |
@@ -19,7 +19,7 @@ | ||
19 | 19 | |
20 | 20 | #define SOFT_FFMPEGVIDEO_H_ |
21 | 21 | |
22 | -#include "SoftVideoDecoderOMXComponent.h" | |
22 | +#include <media/stagefright/omx/SoftVideoDecoderOMXComponent.h> | |
23 | 23 | |
24 | 24 | #include "utils/ffmpeg_utils.h" |
25 | 25 |
@@ -8,6 +8,10 @@ LOCAL_SRC_FILES := \ | ||
8 | 8 | ffmpeg_cmdutils.c \ |
9 | 9 | codec_utils.cpp |
10 | 10 | |
11 | +LOCAL_SHARED_LIBRARIES += \ | |
12 | + liblog \ | |
13 | + libmedia | |
14 | + | |
11 | 15 | LOCAL_MODULE := libffmpeg_utils |
12 | 16 | |
13 | 17 | # Workaround for inline assembly tricks in FFMPEG which don't play nice with |
@@ -605,9 +605,6 @@ AudioEncoding sampleFormatToEncoding(AVSampleFormat fmt) { | ||
605 | 605 | case AV_SAMPLE_FMT_S16: |
606 | 606 | case AV_SAMPLE_FMT_S16P: |
607 | 607 | return kAudioEncodingPcm16bit; |
608 | - case AV_SAMPLE_FMT_S32: | |
609 | - case AV_SAMPLE_FMT_S32P: | |
610 | - return kAudioEncodingPcm32bit; | |
611 | 608 | case AV_SAMPLE_FMT_FLT: |
612 | 609 | case AV_SAMPLE_FMT_FLTP: |
613 | 610 | return kAudioEncodingPcmFloat; |
@@ -626,9 +623,6 @@ AVSampleFormat encodingToSampleFormat(AudioEncoding encoding) { | ||
626 | 623 | return AV_SAMPLE_FMT_U8; |
627 | 624 | case kAudioEncodingPcm16bit: |
628 | 625 | return AV_SAMPLE_FMT_S16; |
629 | - case kAudioEncodingPcm24bitPacked: | |
630 | - case kAudioEncodingPcm32bit: | |
631 | - return AV_SAMPLE_FMT_S32; | |
632 | 626 | case kAudioEncodingPcmFloat: |
633 | 627 | return AV_SAMPLE_FMT_FLT; |
634 | 628 | default: |