Android 11 使用HAL层的ffmpeg库(1)
1.frameworks/av/media目录下面的修改
From edd6f1374c1f15783d9920ebda22ea915e503775 Mon Sep 17 00:00:00 2001
From: GW00219471 <zhumingxing@noboauto.com>
Date: Wed, 17 Jan 2024 15:16:10 +0800
Subject: [PATCH] =?UTF-8?q?[V35CUX-4542]:=E7=A7=BB=E6=A4=8Dcux=20=E8=A7=A3?==?UTF-8?q?=E7=A0=81=E4=BB=A3=E7=A0=81=E5=88=B0=E4=B8=BB=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit[MODULE]:Media
[REASON]:CR
[SOLUTION]:移植
[IMPACT]:NA
[TEST RECOMMENDATIONS]:NAChange-Id: I3077c4abbde3eb0caf483aeba8543ef6dcb7bedb
---media/codec2/components/mp3/C2SoftMp3Dec.cpp | 2 +-media/codec2/core/include/C2Config.h | 8 +media/codec2/sfplugin/CCodecConfig.cpp | 5 +media/codec2/sfplugin/Codec2InfoBuilder.cpp | 8 +media/libdatasource/FileSource.cpp | 16 ++.../include/datasource/FileSource.h | 7 +media/libstagefright/Android.bp | 6 +-media/libstagefright/FFMPEGUtil.cpp | 147 ++++++++++++++++++media/libstagefright/MediaCodec.cpp | 4 +-media/libstagefright/MediaCodecList.cpp | 2 +-.../MediaCodecListOverrides.cpp | 2 +-media/libstagefright/MediaCodecListWriter.cpp | 2 +-media/libstagefright/MediaExtractor.cpp | 2 +-.../libstagefright/MediaExtractorFactory.cpp | 2 +-media/libstagefright/Utils.cpp | 21 +++media/libstagefright/foundation/MediaDefs.cpp | 18 +++.../foundation/MetaDataBase.cpp | 2 +-.../media/stagefright/foundation/MediaDefs.h | 21 +++.../include/media/stagefright/FFMPEGUtil.h | 23 +++.../include/media/stagefright/MetaDataBase.h | 36 +++++.../manifest_media_c2_software.xml | 1 +21 files changed, 326 insertions(+), 9 deletions(-)create mode 100755 media/libstagefright/FFMPEGUtil.cppcreate mode 100755 media/libstagefright/include/media/stagefright/FFMPEGUtil.hdiff --git a/media/codec2/components/mp3/C2SoftMp3Dec.cpp b/media/codec2/components/mp3/C2SoftMp3Dec.cpp
index 3984f62278..28d0dbbfc9 100644
--- a/media/codec2/components/mp3/C2SoftMp3Dec.cpp
+++ b/media/codec2/components/mp3/C2SoftMp3Dec.cpp
@@ -14,7 +14,7 @@* limitations under the License.*/-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0#define LOG_TAG "C2SoftMp3Dec"#include <log/log.h>diff --git a/media/codec2/core/include/C2Config.h b/media/codec2/core/include/C2Config.h
index 29bccd5dc5..c1ca622cc1 100644
--- a/media/codec2/core/include/C2Config.h
+++ b/media/codec2/core/include/C2Config.h
@@ -249,6 +249,9 @@ enum C2ParamIndexKind : C2Param::type_index_t {// low latency modekParamIndexLowLatencyMode, // bool
+
+ // FFMPEG
+ kParamIndexRawCodecData,};}
@@ -2182,6 +2185,11 @@ inline C2TimestampGapAdjustmentStruct::C2TimestampGapAdjustmentStruct()typedef C2PortParam<C2Tuning, C2TimestampGapAdjustmentStruct> C2PortTimestampGapTuning;constexpr char C2_PARAMKEY_INPUT_SURFACE_TIMESTAMP_ADJUSTMENT[] = "input-surface.timestamp-adjustment";+// FFMPEG
+
+typedef C2StreamParam<C2Info, C2BlobValue, kParamIndexRawCodecData> C2StreamRawCodecDataInfo;
+constexpr char C2_PARAMKEY_RAW_CODEC_DATA[] = "coded.raw-codec-data";
+/// @}#endif // C2CONFIG_H_
diff --git a/media/codec2/sfplugin/CCodecConfig.cpp b/media/codec2/sfplugin/CCodecConfig.cpp
index 96f86e8d59..23548ba353 100644
--- a/media/codec2/sfplugin/CCodecConfig.cpp
+++ b/media/codec2/sfplugin/CCodecConfig.cpp
@@ -917,6 +917,11 @@ void CCodecConfig::initializeStandardParams() {KEY_AUDIO_SESSION_ID // we use "audio-hw-sync"KEY_OUTPUT_REORDER_DEPTH*/
+
+ // FFMPEG
+
+ add(ConfigMapper("raw-codec-data", C2_PARAMKEY_RAW_CODEC_DATA, "value")
+ .limitTo(D::DECODER & D::CODED));}status_t CCodecConfig::initialize(
diff --git a/media/codec2/sfplugin/Codec2InfoBuilder.cpp b/media/codec2/sfplugin/Codec2InfoBuilder.cpp
index b11224907e..721f76f02d 100644
--- a/media/codec2/sfplugin/Codec2InfoBuilder.cpp
+++ b/media/codec2/sfplugin/Codec2InfoBuilder.cpp
@@ -326,6 +326,11 @@ status_t Codec2InfoBuilder::buildMediaCodecList(MediaCodecListWriter* writer) {{ "media_codecs.xml", "media_codecs_performance.xml" },{ "/apex/com.android.media.swcodec/etc" });+ // Add ffmpeg codecs
+ parser.parseXmlFilesInSearchDirs(
+ { "media_codecs_ffmpeg_c2.xml" },
+ { "/system_ext/etc/" });
+// TODO: remove these c2-specific files once product moved to default file namesparser.parseXmlFilesInSearchDirs({ "media_codecs_c2.xml", "media_codecs_performance_c2.xml" });
@@ -360,6 +365,9 @@ status_t Codec2InfoBuilder::buildMediaCodecList(MediaCodecListWriter* writer) {nameAndAliases.insert(nameAndAliases.begin(), trait.name);for (const std::string &nameOrAlias : nameAndAliases) {bool isAlias = trait.name != nameOrAlias;
+ ALOGV("To create interface for %s'%s'",
+ isAlias ? "alias " : "",
+ nameOrAlias.c_str());std::shared_ptr<Codec2Client::Interface> intf =Codec2Client::CreateInterfaceByName(nameOrAlias.c_str());if (!intf) {
diff --git a/media/libdatasource/FileSource.cpp b/media/libdatasource/FileSource.cpp
index 3d34d0ca33..1f1cffdc7f 100644
--- a/media/libdatasource/FileSource.cpp
+++ b/media/libdatasource/FileSource.cpp
@@ -31,6 +31,7 @@ namespace android {FileSource::FileSource(const char *filename): mFd(-1),
+ mUri(filename),mOffset(0),mLength(-1),mName("<null>") {
@@ -87,6 +88,7 @@ FileSource::FileSource(int fd, int64_t offset, int64_t length)(long long) mOffset,(long long) mLength);+ fetchUriFromFd(fd);}FileSource::~FileSource() {
@@ -96,6 +98,20 @@ FileSource::~FileSource() {}}+void FileSource::fetchUriFromFd(int fd) {
+ ssize_t len = 0;
+ char path[PATH_MAX] = {0};
+ char link[PATH_MAX] = {0};
+
+ mUri.clear();
+
+ snprintf(path, PATH_MAX, "/proc/%d/fd/%d", getpid(), fd);
+ if ((len = readlink(path, link, sizeof(link)-1)) != -1) {
+ link[len] = '\0';
+ mUri.setTo(link);
+ }
+}
+status_t FileSource::initCheck() const {return mFd >= 0 ? OK : NO_INIT;}
diff --git a/media/libdatasource/include/datasource/FileSource.h b/media/libdatasource/include/datasource/FileSource.h
index dee0c335ea..5033b7d2e4 100644
--- a/media/libdatasource/include/datasource/FileSource.h
+++ b/media/libdatasource/include/datasource/FileSource.h
@@ -46,11 +46,16 @@ public:return mName;}+ virtual String8 getUri() {
+ return mUri;
+ }
+protected:virtual ~FileSource();virtual ssize_t readAt_l(off64_t offset, void *data, size_t size);int mFd;
+ String8 mUri;int64_t mOffset;int64_t mLength;Mutex mLock;
@@ -60,6 +65,8 @@ private:FileSource(const FileSource &);FileSource &operator=(const FileSource &);
+
+ void fetchUriFromFd(int fd);};} // namespace android
diff --git a/media/libstagefright/Android.bp b/media/libstagefright/Android.bp
index 2b62b8979d..0d8552ba7e 100644
--- a/media/libstagefright/Android.bp
+++ b/media/libstagefright/Android.bp
@@ -118,6 +118,7 @@ cc_library_static {srcs: ["Utils.cpp",
+ "FFMPEGUtil.cpp","MediaSource.cpp","HevcUtils.cpp",],
@@ -155,7 +156,9 @@ cc_library_static {cc_library_shared {name: "libstagefright_framecapture_utils",
- defaults: [
+
+
+defaults: ["skia_renderengine_deps",],srcs: [
@@ -218,6 +221,7 @@ cc_library {"CameraSource.cpp","CameraSourceTimeLapse.cpp","DataConverter.cpp",
+ "FFMPEGUtil.cpp","FrameDecoder.cpp","HevcUtils.cpp","InterfaceUtils.cpp",
diff --git a/media/libstagefright/FFMPEGUtil.cpp b/media/libstagefright/FFMPEGUtil.cpp
new file mode 100755
index 0000000000..b44d9054d6
--- /dev/null
+++ b/media/libstagefright/FFMPEGUtil.cpp
@@ -0,0 +1,147 @@
+#define LOG_NDEBUG 0
+#define LOG_TAG "FFMPEGUtil"
+#include <utils/Log.h>
+
+#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/foundation/ABuffer.h>
+#include <media/stagefright/MediaDefs.h>
+#include <media/stagefright/FFMPEGUtil.h>
+
+namespace android {
+
+enum MetaKeyType{
+ INT32, INT64, STRING, DATA, CSD
+};
+
+struct MetaKeyEntry{
+ int MetaKey;
+ const char* MsgKey;
+ MetaKeyType KeyType;
+};
+
+static const MetaKeyEntry MetaKeyTable[] {
+ {kKeyAACAOT , "aac-profile" , INT32},
+ {kKeyArbitraryMode , "use-arbitrary-mode" , INT32},
+ {kKeyBitsPerRawSample , "bits-per-raw-sample" , INT32},
+ {kKeyBitRate , "bitrate" , INT32},
+ {kKeyBlockAlign , "block-align" , INT32},
+ {kKeyChannelCount , "channel-count" , INT32},
+ {kKeyCodecId , "codec-id" , INT32},
+ {kKeyCodedSampleBits , "coded-sample-bits" , INT32},
+ {kKeyFileFormat , "file-format" , INT32},
+ {kKeyRawCodecData , "raw-codec-data" , DATA},
+ {kKeyRawCodecSpecificData , "raw-codec-specific-data", CSD},
+ {kKeyPcmEncoding , "pcm-encoding" , INT32},
+ {kKeySampleFormat , "sample-format" , INT32},
+ {kKeySampleRate , "sample-rate" , INT32},
+ {kKeyWMAVersion , "wma-version" , INT32}, // int32_t
+ {kKeyWMVVersion , "wmv-version" , INT32},
+ {kKeyThumbnailTime , "thumbnail-time" , INT64},
+};
+
+const char* FFMPEGUtil::getMsgKey(int key) {
+ static const size_t numMetaKeys =
+ sizeof(MetaKeyTable) / sizeof(MetaKeyTable[0]);
+ size_t i;
+ for (i = 0; i < numMetaKeys; ++i) {
+ if (key == MetaKeyTable[i].MetaKey) {
+ return MetaKeyTable[i].MsgKey;
+ }
+ }
+ return "unknown";
+}
+
+void FFMPEGUtil::convertMetaDataToMessageFF(
+ const MetaDataBase *meta, sp<AMessage> *format) {
+ const char * str_val;
+ int32_t int32_val;
+ int64_t int64_val;
+ uint32_t data_type;
+ const void * data;
+ size_t size;
+ static const size_t numMetaKeys =
+ sizeof(MetaKeyTable) / sizeof(MetaKeyTable[0]);
+ size_t i;
+ for (i = 0; i < numMetaKeys; ++i) {
+ if (MetaKeyTable[i].KeyType == INT32 &&
+ meta->findInt32(MetaKeyTable[i].MetaKey, &int32_val)) {
+ ALOGV("found metakey %s of type int32", MetaKeyTable[i].MsgKey);
+ format->get()->setInt32(MetaKeyTable[i].MsgKey, int32_val);
+ } else if (MetaKeyTable[i].KeyType == INT64 &&
+ meta->findInt64(MetaKeyTable[i].MetaKey, &int64_val)) {
+ ALOGV("found metakey %s of type int64", MetaKeyTable[i].MsgKey);
+ format->get()->setInt64(MetaKeyTable[i].MsgKey, int64_val);
+ } else if (MetaKeyTable[i].KeyType == STRING &&
+ meta->findCString(MetaKeyTable[i].MetaKey, &str_val)) {
+ ALOGV("found metakey %s of type string", MetaKeyTable[i].MsgKey);
+ format->get()->setString(MetaKeyTable[i].MsgKey, str_val);
+ } else if ( (MetaKeyTable[i].KeyType == DATA ||
+ MetaKeyTable[i].KeyType == CSD) &&
+ meta->findData(MetaKeyTable[i].MetaKey, &data_type, &data, &size)) {
+ ALOGV("found metakey %s of type data", MetaKeyTable[i].MsgKey);
+ if (MetaKeyTable[i].KeyType == CSD) {
+ const char *mime;
+ CHECK(meta->findCString(kKeyMIMEType, &mime));
+ if (strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC)) {
+ sp<ABuffer> buffer = new ABuffer(size);
+ memcpy(buffer->data(), data, size);
+ buffer->meta()->setInt32("csd", true);
+ buffer->meta()->setInt64("timeUs", 0);
+ format->get()->setBuffer("csd-0", buffer);
+ } else {
+ const uint8_t *ptr = (const uint8_t *)data;
+ CHECK(size >= 8);
+ int seqLength = 0, picLength = 0;
+ for (size_t i = 4; i < (size - 4); i++)
+ {
+ if ((*(ptr + i) == 0) && (*(ptr + i + 1) == 0) &&
+ (*(ptr + i + 2) == 0) && (*(ptr + i + 3) == 1))
+ seqLength = i;
+ }
+ sp<ABuffer> buffer = new ABuffer(seqLength);
+ memcpy(buffer->data(), data, seqLength);
+ buffer->meta()->setInt32("csd", true);
+ buffer->meta()->setInt64("timeUs", 0);
+ format->get()->setBuffer("csd-0", buffer);
+ picLength=size-seqLength;
+ sp<ABuffer> buffer1 = new ABuffer(picLength);
+ memcpy(buffer1->data(), (const uint8_t *)data + seqLength, picLength);
+ buffer1->meta()->setInt32("csd", true);
+ buffer1->meta()->setInt64("timeUs", 0);
+ format->get()->setBuffer("csd-1", buffer1);
+ }
+ } else {
+ sp<ABuffer> buffer = new ABuffer(size);
+ memcpy(buffer->data(), data, size);
+ format->get()->setBuffer(MetaKeyTable[i].MsgKey, buffer);
+ }
+ }
+ }
+}
+
+void FFMPEGUtil::convertMessageToMetaDataFF(
+ const sp<AMessage> &msg, sp<MetaData> &meta) {
+ AString str_val;
+ int32_t int32_val;
+ int64_t int64_val;
+ static const size_t numMetaKeys =
+ sizeof(MetaKeyTable) / sizeof(MetaKeyTable[0]);
+ size_t i;
+ for (i = 0; i < numMetaKeys; ++i) {
+ if (MetaKeyTable[i].KeyType == INT32 &&
+ msg->findInt32(MetaKeyTable[i].MsgKey, &int32_val)) {
+ ALOGV("found metakey %s of type int32", MetaKeyTable[i].MsgKey);
+ meta->setInt32(MetaKeyTable[i].MetaKey, int32_val);
+ } else if (MetaKeyTable[i].KeyType == INT64 &&
+ msg->findInt64(MetaKeyTable[i].MsgKey, &int64_val)) {
+ ALOGV("found metakey %s of type int64", MetaKeyTable[i].MsgKey);
+ meta->setInt64(MetaKeyTable[i].MetaKey, int64_val);
+ } else if (MetaKeyTable[i].KeyType == STRING &&
+ msg->findString(MetaKeyTable[i].MsgKey, &str_val)) {
+ ALOGV("found metakey %s of type string", MetaKeyTable[i].MsgKey);
+ meta->setCString(MetaKeyTable[i].MetaKey, str_val.c_str());
+ }
+ }
+}
+
+}
\ No newline at end of file
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index d1cbff1582..ecd3be6dae 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -14,7 +14,7 @@* limitations under the License.*/-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0#include "hidl/HidlSupport.h"#define LOG_TAG "MediaCodec"#include <utils/Log.h>
@@ -590,6 +590,7 @@ sp<MediaCodec> MediaCodec::CreateByType(uid_t uid) {Vector<AString> matchingCodecs;+ ALOGI("CreateByType component '%s' start.", mime.c_str());MediaCodecList::findMatchingCodecs(mime.c_str(),encoder,
@@ -607,6 +608,7 @@ sp<MediaCodec> MediaCodec::CreateByType(*err = ret;}if (ret == OK) {
+ ALOGI("Allocating component '%s' success.", componentName.c_str());return codec;}ALOGD("Allocating component '%s' failed (%d), try next one.",
diff --git a/media/libstagefright/MediaCodecList.cpp b/media/libstagefright/MediaCodecList.cpp
index 2b8324b53a..db90e25647 100644
--- a/media/libstagefright/MediaCodecList.cpp
+++ b/media/libstagefright/MediaCodecList.cpp
@@ -14,7 +14,7 @@* limitations under the License.*/-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0#define LOG_TAG "MediaCodecList"#include <utils/Log.h>diff --git a/media/libstagefright/MediaCodecListOverrides.cpp b/media/libstagefright/MediaCodecListOverrides.cpp
index 4a167d15ce..92a706ccc3 100644
--- a/media/libstagefright/MediaCodecListOverrides.cpp
+++ b/media/libstagefright/MediaCodecListOverrides.cpp
@@ -14,7 +14,7 @@* limitations under the License.*/-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0#define LOG_TAG "MediaCodecListOverrides"#include <utils/Log.h>diff --git a/media/libstagefright/MediaCodecListWriter.cpp b/media/libstagefright/MediaCodecListWriter.cpp
index c4fb19946d..8026b5da3d 100644
--- a/media/libstagefright/MediaCodecListWriter.cpp
+++ b/media/libstagefright/MediaCodecListWriter.cpp
@@ -14,7 +14,7 @@* limitations under the License.*/-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0#define LOG_TAG "MediaCodecListWriter"#include <utils/Log.h>diff --git a/media/libstagefright/MediaExtractor.cpp b/media/libstagefright/MediaExtractor.cpp
index 4ed3382135..11b44c9447 100644
--- a/media/libstagefright/MediaExtractor.cpp
+++ b/media/libstagefright/MediaExtractor.cpp
@@ -14,7 +14,7 @@* limitations under the License.*/-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0#define LOG_TAG "MediaExtractor"#include <utils/Log.h>#include <pwd.h>
diff --git a/media/libstagefright/MediaExtractorFactory.cpp b/media/libstagefright/MediaExtractorFactory.cpp
index c6e753d63d..a1b3fe9d24 100644
--- a/media/libstagefright/MediaExtractorFactory.cpp
+++ b/media/libstagefright/MediaExtractorFactory.cpp
@@ -14,7 +14,7 @@* limitations under the License.*/-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0#define LOG_TAG "MediaExtractorFactory"#include <utils/Log.h>diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp
index ccd01dd20b..580ffb8f97 100644
--- a/media/libstagefright/Utils.cpp
+++ b/media/libstagefright/Utils.cpp
@@ -51,6 +51,7 @@#include <stagefright/AVExtensions.h>#endif+#include <media/stagefright/FFMPEGUtil.h>namespace android {static status_t copyNALUToABuffer(sp<ABuffer> *buffer, const uint8_t *ptr, size_t length) {
@@ -720,6 +721,8 @@ static std::vector<std::pair<const char *, uint32_t>> stringMappings {{ "manufacturer", kKeyManufacturer },{ "title", kKeyTitle },{ "year", kKeyYear },
+ // FFMEG
+ { "file-format", kKeyFileFormat },}};@@ -757,6 +760,19 @@ static std::vector<std::pair<const char *, uint32_t>> int32Mappings {{ "thumbnail-height", kKeyThumbnailHeight },{ "track-id", kKeyTrackID },{ "valid-samples", kKeyValidSamples },
+ // FFMPEG
+ { "bits-per-raw-sample", kKeyBitsPerRawSample },
+ { "block-align", kKeyBlockAlign },
+ { "codec-id", kKeyCodecId },
+ { "coded-sample-bits", kKeyCodedSampleBits },
+ { "min-block-size", 'mibs' },
+ { "max-block-size", 'mabs' },
+ { "min-frame-size", 'mifs' },
+ { "max-frame-size", 'mafs' },
+ { "sample-format", kKeySampleFormat },
+ { "sample-rate", kKeySampleRate },
+ { "wma-version", kKeyWMAVersion },
+ { "wmv-version", kKeyWMVVersion },}};@@ -773,6 +789,9 @@ static std::vector<std::pair<const char *, uint32_t>> bufferMappings {{ "sei", kKeySEI },{ "text-format-data", kKeyTextFormatData },{ "thumbnail-csd-hevc", kKeyThumbnailHVCC },
+ // FFMPEG
+ { "raw-codec-data", kKeyRawCodecData },
+ { "raw-codec-specific-data", kKeyRawCodecSpecificData },}};@@ -1482,6 +1501,7 @@ AVUtils::get()->convertMetaDataToMessage(meta, &msg);parseDolbyVisionProfileLevelFromDvcc(ptr, size, msg);}+ FFMPEGUtil::convertMetaDataToMessageFF(meta, &msg);*format = msg;return OK;
@@ -2014,6 +2034,7 @@ status_t convertMessageToMetaData(const sp<AMessage> &msg, sp<MetaData> &meta) {#ifndef __NO_AVEXTENSIONS__AVUtils::get()->convertMessageToMetaData(msg, meta);#endif
+ FFMPEGUtil::convertMessageToMetaDataFF(msg, meta);#if 0ALOGI("converted %s to:", msg->debugString(0).c_str());
diff --git a/media/libstagefright/foundation/MediaDefs.cpp b/media/libstagefright/foundation/MediaDefs.cpp
index 7c422707a4..59a45fe8c7 100644
--- a/media/libstagefright/foundation/MediaDefs.cpp
+++ b/media/libstagefright/foundation/MediaDefs.cpp
@@ -80,6 +80,24 @@ const char *MEDIA_MIMETYPE_TEXT_CEA_608 = "text/cea-608";const char *MEDIA_MIMETYPE_TEXT_CEA_708 = "text/cea-708";const char *MEDIA_MIMETYPE_DATA_TIMED_ID3 = "application/x-id3v4";+const char *MEDIA_MIMETYPE_VIDEO_VC1 = "video/vc1";
+#ifndef __ANDROID_VNDK_EXT__
+const char *MEDIA_MIMETYPE_VIDEO_WMV = "video/x-ms-wmv";
+#endif
+const char *MEDIA_MIMETYPE_VIDEO_FFMPEG = "video/ffmpeg";
+
+#ifndef __ANDROID_VNDK_EXT__
+const char *MEDIA_MIMETYPE_AUDIO_APE = "audio/x-ape";
+#endif
+const char *MEDIA_MIMETYPE_AUDIO_PCM = "audio/x-pcm";
+const char *MEDIA_MIMETYPE_AUDIO_FFMPEG = "audio/ffmpeg";
+
+const char *MEDIA_MIMETYPE_CONTAINER_APE = "audio/x-ape";
+const char *MEDIA_MIMETYPE_CONTAINER_WMA = "audio/x-ms-wma";
+const char *MEDIA_MIMETYPE_CONTAINER_WMV = "video/x-ms-wmv";
+const char *MEDIA_MIMETYPE_CONTAINER_VC1 = "video/vc1";
+const char *MEDIA_MIMETYPE_CONTAINER_FFMPEG = "video/ffmpeg";
+#ifdef __ANDROID_VNDK_EXT__const char *MEDIA_MIMETYPE_AUDIO_EVRC = "audio/evrc";const char *MEDIA_MIMETYPE_VIDEO_WMV = "video/x-ms-wmv";
diff --git a/media/libstagefright/foundation/MetaDataBase.cpp b/media/libstagefright/foundation/MetaDataBase.cpp
index 4b439c60fc..617d3a7828 100644
--- a/media/libstagefright/foundation/MetaDataBase.cpp
+++ b/media/libstagefright/foundation/MetaDataBase.cpp
@@ -14,7 +14,7 @@* limitations under the License.*/-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0#define LOG_TAG "MetaDataBase"#include <inttypes.h>#include <utils/KeyedVector.h>
diff --git a/media/libstagefright/foundation/include/media/stagefright/foundation/MediaDefs.h b/media/libstagefright/foundation/include/media/stagefright/foundation/MediaDefs.h
index 56187c0851..39aa3cb8bd 100644
--- a/media/libstagefright/foundation/include/media/stagefright/foundation/MediaDefs.h
+++ b/media/libstagefright/foundation/include/media/stagefright/foundation/MediaDefs.h
@@ -38,7 +38,13 @@ extern const char *MEDIA_MIMETYPE_VIDEO_DIVX;extern const char *MEDIA_MIMETYPE_VIDEO_DIVX3;extern const char *MEDIA_MIMETYPE_VIDEO_XVID;extern const char *MEDIA_MIMETYPE_VIDEO_MJPEG;
+#ifndef __ANDROID_VNDK_EXT__
+extern const char *MEDIA_MIMETYPE_VIDEO_WMV;
+#endif+#ifndef __ANDROID_VNDK_EXT__
+extern const char *MEDIA_MIMETYPE_AUDIO_APE;
+#endifextern const char *MEDIA_MIMETYPE_AUDIO_AMR_NB;extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB;extern const char *MEDIA_MIMETYPE_AUDIO_MPEG; // layer III
@@ -82,6 +88,21 @@ extern const char *MEDIA_MIMETYPE_TEXT_CEA_608;extern const char *MEDIA_MIMETYPE_TEXT_CEA_708;extern const char *MEDIA_MIMETYPE_DATA_TIMED_ID3;+extern const char *MEDIA_MIMETYPE_VIDEO_VC1;
+extern const char *MEDIA_MIMETYPE_VIDEO_WMV;
+extern const char *MEDIA_MIMETYPE_VIDEO_FFMPEG;
+
+extern const char *MEDIA_MIMETYPE_AUDIO_APE;
+extern const char *MEDIA_MIMETYPE_AUDIO_PCM;
+extern const char *MEDIA_MIMETYPE_AUDIO_FFMPEG;
+
+extern const char *MEDIA_MIMETYPE_CONTAINER_APE;
+extern const char *MEDIA_MIMETYPE_CONTAINER_ASF;
+extern const char *MEDIA_MIMETYPE_CONTAINER_WMA;
+extern const char *MEDIA_MIMETYPE_CONTAINER_WMV;
+extern const char *MEDIA_MIMETYPE_CONTAINER_VC1;
+extern const char *MEDIA_MIMETYPE_CONTAINER_FFMPEG;
+// These are values exported to JAVA API that need to be in sync with// frameworks/base/media/java/android/media/AudioFormat.java. Unfortunately,// they are not defined in frameworks/av, so defining them here.
diff --git a/media/libstagefright/include/media/stagefright/FFMPEGUtil.h b/media/libstagefright/include/media/stagefright/FFMPEGUtil.h
new file mode 100755
index 0000000000..6f1637841e
--- /dev/null
+++ b/media/libstagefright/include/media/stagefright/FFMPEGUtil.h
@@ -0,0 +1,23 @@
+#ifndef FFMPEG_UTIL_H
+#define FFMPEG_UTIL_H
+
+#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/MetaData.h>
+
+namespace android {
+
+struct FFMPEGUtil {
+
+ static void convertMessageToMetaDataFF(
+ const sp<AMessage> &msg, sp<MetaData> &meta);
+
+ static void convertMetaDataToMessageFF(
+ const MetaDataBase *meta, sp<AMessage> *format);
+
+ static const char* getMsgKey(int key);
+
+};
+
+}
+
+#endif
\ No newline at end of file
diff --git a/media/libstagefright/include/media/stagefright/MetaDataBase.h b/media/libstagefright/include/media/stagefright/MetaDataBase.h
index 735a836cb8..8556bbdb5b 100644
--- a/media/libstagefright/include/media/stagefright/MetaDataBase.h
+++ b/media/libstagefright/include/media/stagefright/MetaDataBase.h
@@ -55,6 +55,11 @@ enum {kKeyMaxBitRate = 'mxBr', // int32_t (bps)kKeyBitsPerSample = 'bits', // int32_t (bits per sample)kKeyStreamHeader = 'stHd', // raw data
+ kKeyCodecId = 'cdid', // int32_t
+ kKeyCodedSampleBits = 'cosb', // int32_t
+ kKeySampleFormat = 'sfmt', // int32_t
+ kKeyBitsPerRawSample = 'sbit', // int32_t
+ kKeyFileFormat = 'ffmt', // cstringkKeyESDS = 'esds', // raw datakKeyAACProfile = 'aacp', // int32_tkKeyAVCC = 'avcc', // raw data
@@ -135,6 +140,23 @@ enum {kKeyIsUnreadable = 'unre', // bool (int32_t)+ // FFMPEG
+ kKeyRawCodecData = 'rcdt',
+ kKeyRawCodecSpecificData = 'rcsd', // raw data - added to support mmParser
+ kKeyWMAEncodeOpt = 'eopt', // int32_t
+ kKeyWMABlockAlign = 'blka', // int32_t
+ kKeyWMAVersion = 'wmav', // int32_t
+ kKeyWMAAdvEncOpt1 = 'ade1', // int16_t
+ kKeyWMAAdvEncOpt2 = 'ade2', // int32_t
+ kKeyWMAFormatTag = 'fmtt', // int64_t
+ kKeyWMABitspersample = 'bsps', // int64_t
+ kKeyWMAVirPktSize = 'vpks', // int64_t
+ kKeyWMVProfile = 'wmvp', // int32_t
+
+ kKeyWMVVersion = 'wmvv', // int32_t
+ kKeyRVVersion = '#rvv', // int32_t
+ kKeyBlockAlign = 'ablk', // int32_t , should be different from kKeyWMABlockAlign
+// An indication that a video buffer has been rendered.kKeyRendered = 'rend', // bool (int32_t)@@ -240,6 +262,8 @@ enum {kKeyHapticChannelCount = 'hapC',+ kKeyArbitraryMode = 'ArbM',
+/* MediaRecorder.h, error notifications can represent track ids with 4 bits only.* | track id | reserved | error or info type |* 31 28 16 0
@@ -259,6 +283,18 @@ enum {kTypeD263 = 'd263',};+enum {
+ kTypeWMA,
+ kTypeWMAPro,
+ kTypeWMALossLess,
+};
+
+enum {
+ kTypeWMVVer_7, // WMV1
+ kTypeWMVVer_8, // WMV2
+ kTypeWMVVer_9, // WMV3
+};
+enum {kCryptoModeUnencrypted = 0,kCryptoModeAesCtr = 1,
diff --git a/media/mediaserver/manifest_media_c2_software.xml b/media/mediaserver/manifest_media_c2_software.xml
index f23ed446aa..2b0cf32f47 100644
--- a/media/mediaserver/manifest_media_c2_software.xml
+++ b/media/mediaserver/manifest_media_c2_software.xml
@@ -6,6 +6,7 @@<interface><name>IComponentStore</name><instance>software</instance>
+ <instance>ffmpeg</instance></interface></hal></manifest>
--
2.17.1
2. /android/device/gwm/vcommon下面的修改
From d24f2f4c0a41cf678557a5393d2cbe85272d8e9f Mon Sep 17 00:00:00 2001
From: GW00219471 <zhumingxing@noboauto.com>
Date: Wed, 17 Jan 2024 16:09:21 +0800
Subject: [PATCH] =?UTF-8?q?[V35CUX-4542]:=E7=A7=BB=E6=A4=8Dcux=20=E8=A7=A3?==?UTF-8?q?=E7=A0=81=E4=BB=A3=E7=A0=81=E5=88=B0=E4=B8=BB=E7=BA=BF2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit[MODULE]:Media
[REASON]:CR
[SOLUTION]:移植
[IMPACT]:NA
[TEST RECOMMENDATIONS]:NAChange-Id: I3895d9af3ab0cdbe07323fdcccdca0cca3e43c60
---vcommon/common_install_packages.mk | 13 +++++++++++++1 file changed, 13 insertions(+)diff --git a/vcommon/common_install_packages.mk b/vcommon/common_install_packages.mk
index d841a3c..87a988f 100755
--- a/vcommon/common_install_packages.mk
+++ b/vcommon/common_install_packages.mk
@@ -120,6 +120,19 @@ PRODUCT_PACKAGES += \libpcm_player_engine \libpcm_player \+
+# NBCodecs
+PRODUCT_PACKAGES += \
+ libavcodec \
+ libavfilter \
+ libavformat \
+ libavutil \
+ libswscale \
+ libswresample \
+ libffmpeg_utils \
+ libffmpeg_extractor \
+ android.hardware.media.c2@1.1-ffmpeg-service
+#PssPRODUCT_PACKAGES += \nb_native_pssclient \
--
2.17.1
From 128b685b69d17b0c3041c196bc8540663b697a0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=8E=E6=98=9F=20zhumingxing?=<zhumingxing@noboauto.com>
Date: Wed, 24 Jan 2024 15:38:46 +0800
Subject: [PATCH] =?UTF-8?q?[V35CUX-4542]:=E7=A7=BB=E6=A4=8Dcux=20=E8=A7=A3?==?UTF-8?q?=E7=A0=81=E4=BB=A3=E7=A0=81=E5=88=B0=E4=B8=BB=E7=BA=BF2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit[MODULE]:Media
[REASON]:CR
[SOLUTION]:移植
[IMPACT]:NA
[TEST RECOMMENDATIONS]:NA
Change-Id: I53d12df2e8687c090b2318bac0a0855aa2aadd60
---vcommon/common_install_packages.mk | 6 ++++++1 file changed, 6 insertions(+)diff --git a/vcommon/common_install_packages.mk b/vcommon/common_install_packages.mk
index 87a988f..1540d17 100755
--- a/vcommon/common_install_packages.mk
+++ b/vcommon/common_install_packages.mk
@@ -132,6 +132,12 @@ PRODUCT_PACKAGES += \libffmpeg_utils \libffmpeg_extractor \android.hardware.media.c2@1.1-ffmpeg-service
+
+PRODUCT_PACKAGES += \
+ libcodec2_soft_common \
+ libcodec2_hidl@1.0 \
+ libcodec2_hidl@1.1
+#PssPRODUCT_PACKAGES += \
--
2.17.1
3. /android/device/gwm/vcommon/sepolicy/nobo/common/file_contexts修改
From bc2c79064e95c37a180a009e5aa89285564c3d54 Mon Sep 17 00:00:00 2001
From: GW00219471 <zhumingxing@noboauto.com>
Date: Wed, 17 Jan 2024 16:14:34 +0800
Subject: [PATCH] =?UTF-8?q?[V35CUX-4542]:=E7=A7=BB=E6=A4=8Dcux=20=E8=A7=A3?==?UTF-8?q?=E7=A0=81=E4=BB=A3=E7=A0=81=E5=88=B0=E4=B8=BB=E7=BA=BF3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit[MODULE]:Media
[REASON]:CR
[SOLUTION]:移植
[IMPACT]:NA
[TEST RECOMMENDATIONS]:NAChange-Id: I4a8ffc6d7e9fd67ccd881ef8feef2e45c8382c81
---nobo/common/file_contexts | 2 ++1 file changed, 2 insertions(+)diff --git a/nobo/common/file_contexts b/nobo/common/file_contexts
index 6b95908..560c258 100755
--- a/nobo/common/file_contexts
+++ b/nobo/common/file_contexts
@@ -203,3 +203,5 @@/sys/devices(/platform)?/soc/[a-z0-9]+.ssusb/mode u:object_r:sysfs_usb_mode:s0+/(system_ext|system/system_ext)/bin/hw/android\.hardware\.media\.c2@1\.1-ffmpeg-service u:object_r:mediaswcodec_exec:s0
+
--
2.17.1
4、 /android/prebuilts/abi-dumps/vndk/30修改内容
Android 11 使用HAL层的ffmpeg库(2)-CSDN博客
5、/android/device/gwm/vcommon/android_ivi_auto_commit.toml
From 5d71e3a927a462f6f75c8defa38ea20fa8f06fcd Mon Sep 17 00:00:00 2001
From: GW00219471 <zhumingxing@noboauto.com>
Date: Fri, 19 Jan 2024 13:27:56 +0800
Subject: [PATCH] =?UTF-8?q?[V35CUX-4542]:=E7=A7=BB=E6=A4=8Dcux=20=E8=A7=A3?==?UTF-8?q?=E7=A0=81=E4=BB=A3=E7=A0=81=E5=88=B0=E4=B8=BB=E7=BA=BF5=20=20au?==?UTF-8?q?to=20commit?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit[MODULE]:Media
[REASON]:CR
[SOLUTION]:移植
[IMPACT]:NA
[TEST RECOMMENDATIONS]:NAChange-Id: Ieb1b5f3ba0ab6f810923839fc9b30faa31fe05a5
---vcommon/android_ivi_auto_commit.toml | 82 ++++++++++++++++++++++++++++1 file changed, 82 insertions(+)diff --git a/vcommon/android_ivi_auto_commit.toml b/vcommon/android_ivi_auto_commit.toml
index 9d1ecee..5b37867 100755
--- a/vcommon/android_ivi_auto_commit.toml
+++ b/vcommon/android_ivi_auto_commit.toml
@@ -541,3 +541,85 @@ binary_repo_url = "ssh://10.255.33.240:29418/android/platform/vendor/nobo/prebuimodule = "GwmDisplayManager"src="../../../out/target/product/${TARGET_PRODUCT}/system/priv-app/GwmDisplayManager/GwmDisplayManager.apk"dest="target/product/xxx/system/priv-app/GwmDisplayManager/GwmDisplayManager.apk"
+
+# NoBoMediaCodec
+[[repositorys.copy_infos]]
+ module = "libffmpeg_utils"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib64/libffmpeg_utils.so"
+ dest="target/product/xxx/system/system_ext/lib64/libffmpeg_utils.so"
+[[repositorys.copy_infos]]
+ module = "libffmpeg_utils"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib32/libffmpeg_utils.so"
+ dest="target/product/xxx/system/system_ext/lib/libffmpeg_utils.so"
+[[repositorys.copy_infos]]
+ module = "android.hardware.media.c2@1.1-ffmpeg-service"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/bin/hw/android.hardware.media.c2@1.1-ffmpeg-service"
+ dest="target/product/xxx/system/system_ext/bin/hw/android.hardware.media.c2@1.1-ffmpeg-service"
+[[repositorys.copy_infos]]
+ module = "android.hardware.media.c2@1.1-ffmpeg-service.rc"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/etc/init/android.hardware.media.c2@1.1-ffmpeg-service.rc"
+ dest="target/product/xxx/system/system_ext/etc/init/android.hardware.media.c2@1.1-ffmpeg-service.rc"
+[[repositorys.copy_infos]]
+ module = "media_codecs_ffmpeg_c2.xml"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/etc/media_codecs_ffmpeg_c2.xml"
+ dest="target/product/xxx/system/system_ext/etc/media_codecs_ffmpeg_c2.xml"
+[[repositorys.copy_infos]]
+ module = "android.hardware.media.c2@1.1-ffmpeg.policy"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/etc/seccomp_policy/android.hardware.media.c2@1.1-ffmpeg.policy"
+ dest="target/product/xxx/system/system_ext/etc/seccomp_policy/android.hardware.media.c2@1.1-ffmpeg.policy"
+[[repositorys.copy_infos]]
+ module = "libffmpeg_extractor"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib64/extractors/libffmpeg_extractor.so"
+ dest="target/product/xxx/system/system_ext/lib64/extractors/libffmpeg_extractor.so"
+[[repositorys.copy_infos]]
+ module = "libffmpeg_extractor"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib/extractors/libffmpeg_extractor.so"
+ dest="target/product/xxx/system/system_ext/lib/extractors/libffmpeg_extractor.so"
+[[repositorys.copy_infos]]
+ module = "libavcodec"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib/libavcodec.so"
+ dest="target/product/xxx/system/system_ext/lib/libavcodec.so"
+[[repositorys.copy_infos]]
+ module = "libavcodec"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib64/libavcodec.so"
+ dest="target/product/xxx/system/system_ext/lib64/libavcodec.so"
+[[repositorys.copy_infos]]
+ module = "libavfilter"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib/libavfilter.so"
+ dest="target/product/xxx/system/system_ext/lib/libavfilter.so"
+[[repositorys.copy_infos]]
+ module = "libavfilter"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib64/libavfilter.so"
+ dest="target/product/xxx/system/system_ext/lib64/libavfilter.so"
+[[repositorys.copy_infos]]
+ module = "libavformat"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib/libavformat.so"
+ dest="target/product/xxx/system/system_ext/lib/libavformat.so"
+[[repositorys.copy_infos]]
+ module = "libavformat"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib64/libavformat.so"
+ dest="target/product/xxx/system/system_ext/lib64/libavformat.so"
+[[repositorys.copy_infos]]
+ module = "libavutil"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib64/libavutil.so"
+ dest="target/product/xxx/system/system_ext/lib64/libavutil.so"
+[[repositorys.copy_infos]]
+ module = "libavutil"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib/libavutil.so"
+ dest="target/product/xxx/system/system_ext/lib/libavutil.so"
+[[repositorys.copy_infos]]
+ module = "libswscale"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib/libswscale.so"
+ dest="target/product/xxx/system/system_ext/lib/libswscale.so"
+[[repositorys.copy_infos]]
+ module = "libswscale"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib64/libswscale.so"
+ dest="target/product/xxx/system/system_ext/lib64/libswscale.so"
+[[repositorys.copy_infos]]
+ module = "libswresample"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib64/libswresample.so"
+ dest="target/product/xxx/system/system_ext/lib64/libswresample.so"
+[[repositorys.copy_infos]]
+ module = "libswresample"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib/libswresample.so"
+ dest="target/product/xxx/system/system_ext/lib/libswresample.so"
--
2.17.1
From 8c5f28d036c4233da66366592ef4d77a45a4cdfc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=8E=E6=98=9F=20zhumingxing?=<zhumingxing@noboauto.com>
Date: Tue, 23 Jan 2024 09:56:04 +0800
Subject: [PATCH] =?UTF-8?q?[V35CUX-4542]:=E7=A7=BB=E6=A4=8Dcux=20=E8=A7=A3?==?UTF-8?q?=E7=A0=81=E4=BB=A3=E7=A0=81=E5=88=B0=E4=B8=BB=E7=BA=BF5=20=20au?==?UTF-8?q?to=20commit?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit[MODULE]:Media
[REASON]:CR
[SOLUTION]:移植 修改路径配置错误问题
[IMPACT]:NA
[TEST RECOMMENDATIONS]:NAChange-Id: I8015c0497a91849cd1b6b1909a05562103b10e8b
---vcommon/android_ivi_auto_commit.toml | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/vcommon/android_ivi_auto_commit.toml b/vcommon/android_ivi_auto_commit.toml
index 5b37867..5293d92 100755
--- a/vcommon/android_ivi_auto_commit.toml
+++ b/vcommon/android_ivi_auto_commit.toml
@@ -549,7 +549,7 @@ binary_repo_url = "ssh://10.255.33.240:29418/android/platform/vendor/nobo/prebuidest="target/product/xxx/system/system_ext/lib64/libffmpeg_utils.so"[[repositorys.copy_infos]]module = "libffmpeg_utils"
- src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib32/libffmpeg_utils.so"
+ src="../../../out/target/product/${TARGET_PRODUCT}/system/system_ext/lib/libffmpeg_utils.so"dest="target/product/xxx/system/system_ext/lib/libffmpeg_utils.so"[[repositorys.copy_infos]]module = "android.hardware.media.c2@1.1-ffmpeg-service"
--
2.17.1
相关文章:
Android 11 使用HAL层的ffmpeg库(1)
1.frameworks/av/media目录下面的修改 From edd6f1374c1f15783d9920ebda22ea915e503775 Mon Sep 17 00:00:00 2001 From: GW00219471 <zhumingxingnoboauto.com> Date: Wed, 17 Jan 2024 15:16:10 0800 Subject: [PATCH] ?UTF-8?q?[V35CUX-4542]:E7A7BBE6A48Dcux20E8…...
友力科技数据中心搬迁方案
将当前运行机房中的所有设备、应用系统安全搬迁至新数据中心机房,实现平滑切换、平稳过渡,最大限度地降低搬迁工作对业务的影响。 为了确保企事业单位能够顺利完成数据中心机房搬迁工作,我们根据实际经验提供了4个基本原则,希望能…...
GitHub敏感信息扫描工具
目录 功能设计 技术实现 程序使用 文件配置 下载地址 功能设计 GitPrey是根据企业关键词进行项目检索以及相应敏感文件和敏感文件内容扫描的工具,其设计思路如下: 根据关键词在GitHub中进行全局代码内容和路径的搜索(in:file,path),将项目结果做项目信息去重整理得到…...
Linux云计算 |【第一阶段】ENGINEER-DAY4
主要内容: 配置Linux网络参数、配置静态主机名、查看/修改/激活/禁用网络连接、指定DNS、虚拟网络连接、虚拟机克隆、SSH客户端、SCP远程复制、SSH无密码验证(SERVICE-DAY5)、虚拟网络类型 一、网络参数配置 修改网卡配置文件主要是需要配置…...
C++与VLC制作独属于你的动态壁纸背景
文章目录 前言效果展示为什么要做他如何实现他实现步骤获取桌面句柄代码获取桌面句柄libvlc_media_player_set_hwnd函数 动态壁纸代码 总结 前言 在当今的数字世界中,个性化和自定义化的体验越来越受到人们的欢迎。动态壁纸是其中一种很受欢迎的方式,它…...
平凯星辰黄东旭出席 2024 全球数字经济大会 · 开放原子开源数据库生态论坛
7 月 5 日,以“开源生态筑基础,数字经济铸未来”为主题的 2024 全球数字经济大会——开放原子开源数据库生态论坛在北京成功举办。平凯星辰(北京)科技有限公司联合创始人黄东旭发表了题为《TiDB 助力金融行业关键业务系统实践》的…...
Mac OS 下安装 NVM,1秒教会你
1.下载 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash或者wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash 2.安装成功后执行 nvm 提示 command not found 首先查看 ~/.bash_profile 文件是否存在&…...
搭建博客系统#Golang
WANLI 博客系统 项目介绍 基于vue3和gin框架开发的前后端分离个人博客系统,包含md格式的文本编辑展示,点赞评论收藏,新闻热点,匿名聊天室,文章搜索等功能。 点击跳转:Github 项目开源地址 功能展示 B 站…...
算法——滑动窗口(day6)
1004.最大连续1的个数 ||| 1004. 最大连续1的个数 III - 力扣(LeetCode) 题目解析: 这道题如果能转化为滑动窗口的话就会很简单,因为我们如果尝试去把0翻转为1再计数的话等到第2轮又得重新翻转回来,费时费力~ 那么我…...
推荐一款基于Spring Boot 框架开发的分布式文件管理系统,功能齐全,非常便捷(带私活源码)
前言 在数字化时代,文件管理是企业和个人用户的基本需求。然而,现有的文件管理系统往往存在一些痛点,如存储空间有限、文件共享困难、缺乏在线编辑功能、移动端适配性差等。这些问题限制了用户在不同设备和场景下的文件处理能力。 为了解决…...
Mysql-查询
1.基本查询 //查询所有内容 select * from 表名;//查询指定字段 select 字段1,字段2,字段3.....from 表名;//查询时给字段起别名 select 字段1 as 别名1 , 字段2 as 别名2 ... from 表名;//去重查询 select distinct 字段列表 from 表名; …...
广东科学技术职业学院计算机学院领导一行莅临泰迪智能科技参观交流
7月17日,广东科学技术职业学院计算机学院副院长张军、计算机学院副书记吴国庆、计算机学院大数据教学部部长谢文达、科技与校企合作部副部长黄相杰、科技与校企合作部副部长吴胜兵莅临广东泰迪智能科技股份有限公司产教融合实训基地参观交流,泰迪智能科技…...
exo 大模型算力共享;Llama3-70B是什么
目录 exo 大模型算力共享 exo框架的特点 如何使用exo框架 注意事项 结论 Llama3-70B是什么 一、基本信息 二、技术特点 三、性能与应用 四、未来发展 exo 大模型算力共享 exo框架的特点 异构支持:支持多种不同类型的设备,包括智能手机、平板电脑、笔记本电脑以及高…...
测试——Junit
内容大纲: 常用的五个注解 测试用例顺序指定 参数化 测试套件 断言 1. 常用的五个注解 1.1 Test 通常情况下,我们输入要写在main方法下,此时我想直接输出: Test void Test01(){System.out.println("第一个测试用例"); } 1.2 BeforeAll AfterAll BeforeALL在Tes…...
BUG ImportError: cannot import name ‘QAction‘ from ‘PySide6.QtWidgets‘
BUG ImportError: cannot import name ‘QAction’ from ‘PySide6.QtWidgets’ 环境 PySide6 6.7.2详情 在参考 PyQt5 的代码写 Pyside6 的右键菜单时遇到的错误。 错误代码 from PySide6.QtWidgets import QAction错误原因: 在PySdie6中…...
对某次应急响应中webshell的分析
文章前言 在之前处理一起应急事件时发现攻击者在WEB应用目录下上传了webshell,但是webshell似乎使用了某种加密混淆手法,无法直观的看到其中的木马连接密码,而客户非要让我们连接webshell来证实此文件为后门文件且可执行和利用(也是很恼火&a…...
Vue3新特性
Vue3新特性 1、Composition API1.1 什么是 Composition API1.2 常用 Composition API1.2.1 setup1.2.2 ref1.2.3 reactive1.2.4 computed1.2.5 watchEffect、watchPostEffect、watchSyncEffect1.2.6 watch 2、生命周期2.1 Vue3生命周期钩子2.2 vue2 和 vue3 关于生命周期的对比…...
一套功能齐全、二开友好的即时通讯IM工具,提供能力库和UI库,支持单聊、频道和机器人(附源码)
前言 在当今数字化时代,即时通讯(IM)和实时音视频(RTC)功能已成为众多应用的标配。然而,现有的解-决方案往往存在一些痛点,如架构落后、成本高昂、数据安全性和隐私保护不足,以及二次开发和部署的复杂性。 为了解决这些问题&…...
MySQL:JOIN 多表查询
多表查询 在关系型数据库中,表与表之间是有联系的,它们通过 外键 联系在一起,所以在实际应用中,经常使用多表查询。多表查询就是同时查询两个或两个以上的表。 MySQL多表查询是数据库操作中非常重要的一部分,它允许你…...
【机器学习】必会算法模型之:一文掌握 密度聚类,建议收藏。
密度聚类 1、引言2、密度聚类2.1 定义2.2 核心原理2.3 实现步骤2.4 算法公式2.5 代码示例 3、总结 1、引言 在机器学习的无监督学习领域,聚类是一项基础而重要的任务。 聚类算法通过将数据点分组,使同一组内的数据点具有更大的相似性,而组间…...
代码:前端与数据库交互的登陆界面
<!DOCTYPE html> <html lang"en"> <head> <meta charset"UTF-8"> <meta name"viewport" content"widthdevice-width, initial-scale1.0"> <title>登录</title> </head> <body>…...
发电机基础知识:负载组
什么是发电机负载组? 简单地说,负载组是一种可以产生人工电力负载的设备,用于测试发电机并验证发电机组的性能,包括相关组件,以确保通过使发电机发动机达到适当的工作温度和压力来满足适当的负载。 它是如何工作的&a…...
内网安全:各类密码的抓取
Mimikatz在线读取SAM文件 离线读取SAM文件 在线读取lsass进程 离线读取lsass进程 BrowserGhost浏览器密码抓取 Sharp-HackBrowserData浏览器密码抓取 SharpDecryptPwd数据库密码抓取 LaZagne各类密码的抓取 Windows其他类型抓NTLM Hash工具 sam文件和lsass进程就是Wind…...
前端面试题汇总2
1. CSS 中两个 .class1 .class2 从哪个开始解析 在 CSS 中,选择器 .class1 .class2 表示所有 class 为 class1 的元素中的 class 为 class2 的子元素。浏览器解析这个选择器时,从右向左解析。也就是说,浏览器首先找到所有 class 为 class2 的…...
分布式服务框架zookeeper+消息队列kafka
一、zookeeper概述 zookeeper是一个分布式服务框架,它主要是用来解决分布式应用中经常遇到的一些数据管理问题,如:命名服务,状态同步,配置中心,集群管理等。 在分布式环境下,经常需要对应用/服…...
服务攻防-应用协议cve
Cve-2015-3306 背景: ProFTPD 1.3.5中的mod_copy模块允许远程攻击者通过站点cpfr和site cpto命令读取和写入任意文件。 任何未经身份验证的客户端都可以利用这些命令将文件从文件系统的任何部分复制到选定的目标。 复制命令使用ProFTPD服务的权限执行,…...
Springcloud之gateway的使用详解
官网地址:https://docs.spring.io/spring-cloud-gateway/docs/4.0.4/reference/html/ 1.网关入门 helloword 网关不依赖start-web 导入的pom: <!--gateway--> <dependency><groupIdorg.springframework.cloud</groupId><arti…...
中望CAD 建筑 v2024 解锁版下载、安装教程 (超强的CAD三维制图)
前言 中望CAD建筑版是一款国产CAD制图软件,专注于建筑设计领域。中望CAD建筑版拥有丰富多样的建筑图块和图案,完美兼容各类建筑图纸。同时,它提供了绘图标准规范,使绘图更加规范和专业。更值得一提的是,该软件还具备智…...
windows edge自带的pdf分割工具(功能)
WPS分割pdf得会员,要充值!网上一顿乱找,发现最简单,最好用,免费的还是回到Windows。 Windows上直接在edge浏览器打开PDF,点击 打印 按钮,页面下选择对应页数 打印机 选择 另存为PDF,然后保存就…...
HTML5实现好看的天气预报网站源码
文章目录 1.设计来源1.1 获取天气接口1.2 PC端页面设计1.3 手机端页面设计 2.效果和源码2.1 动态效果2.2 源代码 源码下载万套模板,程序开发,在线开发,在线沟通 作者:xcLeigh 文章地址:https://blog.csdn.net/weixin_4…...
在网站上做教育直播平台多少钱/淘特app推广代理
另外%f标识的数会被当成double读取,即取出8个字节读取。...
巩义做网站/公司做网站怎么做
使用Linux系统时经常需要查看用户信息,除了cat /etc/passwd文件外,其实还有很多命令可以直接查看系统用户信息。下面总结一些Linux系统下查看用户的常用方法:id命令功能:打印指定用户的用户和组信息。语法:id [选项]..…...
长春做网站多少钱/培训心得体会感悟
Spring Boot的核心 入口类和SpringBootApplication Spring Boot的项目一般都会有*Application的入口类,入口类中会有main方法,这是一个标准的Java应用程序的入口方法。 SpringBootApplication注解是Spring Boot的核心注解,它其实是一个组合…...
怎么做网站栏目/网络营销平台排名
1、由于Jenkins是基于Java开发的,安装前确认操作系统已经安装了jdk和tomcat 如何安装,请参考WINDOWS/LINUX上部署TOMCAT服务器 2、下载war包: http://mirrors.jenkins-ci.org/war/latest/jenkins.war 3、用crt连接到linux服务器。用命令ps -e…...
中英文外贸网站模板 生成静态html/优化大师电脑版下载
你见过最无可奈何的代码是什么?今天,栈长就来总结一下我遇到过的一些神逻辑代码,不一定很全,但我真心写不出,真心让我自叹不如啊!1、耍猴的最佳手段还记得 XX 手机的抢购活动么,抢购按钮的代码类…...
如果创建网站/百度seo优化是做什么的
说在文前,菜鸟一个,如果有说的不对的,还请见谅,望能指出,让我这井底之蛙也能见见世面。 今天分享下一个比较常见的问题,端口被占用。 报错大致类型如下: 这里我是zookeeper开启的时候…...