Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-stagefright-plugins: Commit

external/stagefright-plugins


Commit MetaInfo

Révision8756e69e58087c3d68bca95c7244b6d0932fe50e (tree)
l'heure2018-05-15 19:28:20
AuteurMichael Goffioul <michael.goffioul@gmai...>
CommiterChih-Wei Huang

Message de Log

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

Change Summary

Modification

--- a/extractor/Android.mk
+++ b/extractor/Android.mk
@@ -9,6 +9,7 @@ LOCAL_SHARED_LIBRARIES += \
99 libbinder \
1010 libmedia \
1111 libffmpeg_utils \
12+ liblog \
1213
1314 LOCAL_MODULE:= libffmpeg_extractor
1415
--- a/extractor/FFmpegExtractor.cpp
+++ b/extractor/FFmpegExtractor.cpp
@@ -571,7 +571,7 @@ sp<MetaData> FFmpegExtractor::setAudioFormat(AVStream *stream)
571571 meta->setInt32(kKeySampleRate, avctx->sample_rate);
572572 meta->setInt32(kKeyBlockAlign, avctx->block_align);
573573 meta->setInt32(kKeySampleFormat, avctx->sample_fmt);
574- meta->setInt32(kKeyPcmEncoding, sampleFormatToEncoding(avctx->sample_fmt));
574+ //meta->setInt32(kKeyPcmEncoding, sampleFormatToEncoding(avctx->sample_fmt));
575575 meta->setCString('ffmt', findMatchingContainer(mFormatCtx->iformat->name));
576576 setDurationMetaData(stream, meta);
577577 }
--- a/omx/Android.mk
+++ b/omx/Android.mk
@@ -9,13 +9,14 @@ LOCAL_SRC_FILES := \
99 ffmpeg_hwaccel.c \
1010
1111 LOCAL_C_INCLUDES += \
12- $(TOP)/frameworks/native/include/media/hardware \
13- $(TOP)/frameworks/av/media/libstagefright/include
12+ $(TOP)/frameworks/native/include/media/hardware
1413
1514 LOCAL_SHARED_LIBRARIES += \
1615 libdl \
1716 libffmpeg_utils \
1817 $(if $(filter true,$(BOARD_USE_LIBAV)),libavresample,libswresample) \
18+ liblog \
19+ libnativewindow \
1920 libswscale \
2021 libstagefright_omx
2122
--- a/omx/FFmpegOMXPlugin.cpp
+++ b/omx/FFmpegOMXPlugin.cpp
@@ -18,7 +18,7 @@
1818 #define LOG_TAG "FFmpegOMXPlugin"
1919 #include <utils/Log.h>
2020
21-#include "include/SoftOMXComponent.h"
21+#include <media/stagefright/omx/SoftOMXComponent.h>
2222
2323 #include <media/stagefright/foundation/ADebug.h>
2424 #include <media/stagefright/foundation/AString.h>
--- a/omx/SoftFFmpegAudio.cpp
+++ b/omx/SoftFFmpegAudio.cpp
@@ -588,7 +588,7 @@ void SoftFFmpegAudio::adjustAudioParams() {
588588
589589 OMX_ERRORTYPE SoftFFmpegAudio::internalSetParameter(
590590 OMX_INDEXTYPE index, const OMX_PTR params) {
591- //ALOGV("internalSetParameter index:0x%x", index);
591+ ALOGV("internalSetParameter index:0x%x", index);
592592 switch ((int)index) {
593593 case OMX_IndexParamStandardComponentRole:
594594 {
--- a/omx/SoftFFmpegAudio.h
+++ b/omx/SoftFFmpegAudio.h
@@ -19,7 +19,7 @@
1919
2020 #define SOFT_FFMPEGAUDIO_H_
2121
22-#include "SimpleSoftOMXComponent.h"
22+#include <media/stagefright/omx/SimpleSoftOMXComponent.h>
2323
2424 #ifndef __GNUC__
2525 //fix DECLARE_ALIGNED
--- a/omx/SoftFFmpegVideo.h
+++ b/omx/SoftFFmpegVideo.h
@@ -19,7 +19,7 @@
1919
2020 #define SOFT_FFMPEGVIDEO_H_
2121
22-#include "SoftVideoDecoderOMXComponent.h"
22+#include <media/stagefright/omx/SoftVideoDecoderOMXComponent.h>
2323
2424 #include "utils/ffmpeg_utils.h"
2525
--- a/utils/Android.mk
+++ b/utils/Android.mk
@@ -8,6 +8,10 @@ LOCAL_SRC_FILES := \
88 ffmpeg_cmdutils.c \
99 codec_utils.cpp
1010
11+LOCAL_SHARED_LIBRARIES += \
12+ liblog \
13+ libmedia
14+
1115 LOCAL_MODULE := libffmpeg_utils
1216
1317 # Workaround for inline assembly tricks in FFMPEG which don't play nice with
--- a/utils/codec_utils.cpp
+++ b/utils/codec_utils.cpp
@@ -605,9 +605,6 @@ AudioEncoding sampleFormatToEncoding(AVSampleFormat fmt) {
605605 case AV_SAMPLE_FMT_S16:
606606 case AV_SAMPLE_FMT_S16P:
607607 return kAudioEncodingPcm16bit;
608- case AV_SAMPLE_FMT_S32:
609- case AV_SAMPLE_FMT_S32P:
610- return kAudioEncodingPcm32bit;
611608 case AV_SAMPLE_FMT_FLT:
612609 case AV_SAMPLE_FMT_FLTP:
613610 return kAudioEncodingPcmFloat;
@@ -626,9 +623,6 @@ AVSampleFormat encodingToSampleFormat(AudioEncoding encoding) {
626623 return AV_SAMPLE_FMT_U8;
627624 case kAudioEncodingPcm16bit:
628625 return AV_SAMPLE_FMT_S16;
629- case kAudioEncodingPcm24bitPacked:
630- case kAudioEncodingPcm32bit:
631- return AV_SAMPLE_FMT_S32;
632626 case kAudioEncodingPcmFloat:
633627 return AV_SAMPLE_FMT_FLT;
634628 default:
Afficher sur ancien navigateur de dépôt.