mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 00:10:00 +02:00
Merge pull request #1 from overte-org/remove-hifiac
Remove the HiFiAC codec
This commit is contained in:
commit
b26254657e
16 changed files with 2 additions and 334 deletions
|
@ -7,8 +7,6 @@ target_bullet()
|
||||||
set(INTERFACE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../interface")
|
set(INTERFACE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../interface")
|
||||||
add_subdirectory("${INTERFACE_DIR}" "libraries/interface")
|
add_subdirectory("${INTERFACE_DIR}" "libraries/interface")
|
||||||
include_directories("${INTERFACE_DIR}/src")
|
include_directories("${INTERFACE_DIR}/src")
|
||||||
set(HIFI_CODEC_PLUGIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/hifiCodec")
|
|
||||||
add_subdirectory("${HIFI_CODEC_PLUGIN_DIR}" "libraries/hifiCodecPlugin")
|
|
||||||
|
|
||||||
target_link_libraries(native-lib android log m interface)
|
target_link_libraries(native-lib android log m interface)
|
||||||
|
|
||||||
|
|
|
@ -17,21 +17,6 @@ allprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task renameHifiACTaskDebug() {
|
|
||||||
doLast {
|
|
||||||
def sourceFile = new File("${appDir}/build/intermediates/cmake/debug/obj/arm64-v8a/","libhifiCodec.so")
|
|
||||||
def destinationFile = new File("${appDir}/src/main/jniLibs/arm64-v8a", "libplugins_libhifiCodec.so")
|
|
||||||
copy { from sourceFile; into destinationFile.parent; rename(sourceFile.name, destinationFile.name) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
task renameHifiACTaskRelease(type: Copy) {
|
|
||||||
doLast {
|
|
||||||
def sourceFile = new File("${appDir}/build/intermediates/cmake/release/obj/arm64-v8a/","libhifiCodec.so")
|
|
||||||
def destinationFile = new File("${appDir}/src/main/jniLibs/arm64-v8a", "libplugins_libhifiCodec.so")
|
|
||||||
copy { from sourceFile; into destinationFile.parent; rename(sourceFile.name, destinationFile.name) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -109,10 +94,8 @@ android {
|
||||||
// FIXME
|
// FIXME
|
||||||
def uploadDumpSymsTask = rootProject.getTasksByName("uploadBreakpadDumpSyms${variant.name.capitalize()}", false).first()
|
def uploadDumpSymsTask = rootProject.getTasksByName("uploadBreakpadDumpSyms${variant.name.capitalize()}", false).first()
|
||||||
def runDumpSymsTask = rootProject.getTasksByName("runBreakpadDumpSyms${variant.name.capitalize()}", false).first()
|
def runDumpSymsTask = rootProject.getTasksByName("runBreakpadDumpSyms${variant.name.capitalize()}", false).first()
|
||||||
def renameHifiACTask = rootProject.getTasksByName("renameHifiACTask${variant.name.capitalize()}", false).first()
|
|
||||||
runDumpSymsTask.dependsOn(task)
|
runDumpSymsTask.dependsOn(task)
|
||||||
variant.assemble.dependsOn(uploadDumpSymsTask)
|
variant.assemble.dependsOn(uploadDumpSymsTask)
|
||||||
variant.mergeResources.dependsOn(renameHifiACTask)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,4 @@ target_oculus_mobile()
|
||||||
|
|
||||||
add_subdirectory("${CMAKE_SOURCE_DIR}/interface" "libraries/interface")
|
add_subdirectory("${CMAKE_SOURCE_DIR}/interface" "libraries/interface")
|
||||||
include_directories("${CMAKE_SOURCE_DIR}/interface/src")
|
include_directories("${CMAKE_SOURCE_DIR}/interface/src")
|
||||||
add_subdirectory("${CMAKE_SOURCE_DIR}/plugins/hifiCodec" "libraries/hifiCodecPlugin")
|
|
||||||
target_link_libraries(questInterface android log m interface)
|
target_link_libraries(questInterface android log m interface)
|
||||||
|
|
|
@ -1,21 +1,6 @@
|
||||||
import org.apache.tools.ant.taskdefs.condition.Os
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
task renameHifiACTaskDebug() {
|
|
||||||
doLast {
|
|
||||||
def sourceFile = new File("${appDir}/build/intermediates/cmake/debug/obj/arm64-v8a/","libhifiCodec.so")
|
|
||||||
def destinationFile = new File("${appDir}/src/main/jniLibs/arm64-v8a", "libplugins_libhifiCodec.so")
|
|
||||||
copy { from sourceFile; into destinationFile.parent; rename(sourceFile.name, destinationFile.name) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
task renameHifiACTaskRelease(type: Copy) {
|
|
||||||
doLast {
|
|
||||||
def sourceFile = new File("${appDir}/build/intermediates/cmake/release/obj/arm64-v8a/","libhifiCodec.so")
|
|
||||||
def destinationFile = new File("${appDir}/src/main/jniLibs/arm64-v8a", "libplugins_libhifiCodec.so")
|
|
||||||
copy { from sourceFile; into destinationFile.parent; rename(sourceFile.name, destinationFile.name) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -93,10 +78,8 @@ android {
|
||||||
// FIXME
|
// FIXME
|
||||||
def uploadDumpSymsTask = rootProject.getTasksByName("uploadBreakpadDumpSyms${variant.name.capitalize()}", false).first()
|
def uploadDumpSymsTask = rootProject.getTasksByName("uploadBreakpadDumpSyms${variant.name.capitalize()}", false).first()
|
||||||
def runDumpSymsTask = rootProject.getTasksByName("runBreakpadDumpSyms${variant.name.capitalize()}", false).first()
|
def runDumpSymsTask = rootProject.getTasksByName("runBreakpadDumpSyms${variant.name.capitalize()}", false).first()
|
||||||
def renameHifiACTask = rootProject.getTasksByName("renameHifiACTask${variant.name.capitalize()}", false).first()
|
|
||||||
runDumpSymsTask.dependsOn(task)
|
runDumpSymsTask.dependsOn(task)
|
||||||
variant.assemble.dependsOn(uploadDumpSymsTask)
|
variant.assemble.dependsOn(uploadDumpSymsTask)
|
||||||
variant.mergeResources.dependsOn(renameHifiACTask)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,21 +232,6 @@ task uploadBreakpadDumpSymsRelease(type:io.github.httpbuilderng.http.HttpTask, d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task renameHifiACTaskDebug() {
|
|
||||||
doLast {
|
|
||||||
def sourceFile = new File("${appDir}/build/intermediates/cmake/debug/obj/arm64-v8a/","libhifiCodec.so")
|
|
||||||
def destinationFile = new File("${appDir}/src/main/jniLibs/arm64-v8a", "libplugins_libhifiCodec.so")
|
|
||||||
copy { from sourceFile; into destinationFile.parent; rename(sourceFile.name, destinationFile.name) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
task renameHifiACTaskRelease(type: Copy) {
|
|
||||||
doLast {
|
|
||||||
def sourceFile = new File("${appDir}/build/intermediates/cmake/release/obj/arm64-v8a/","libhifiCodec.so")
|
|
||||||
def destinationFile = new File("${appDir}/src/main/jniLibs/arm64-v8a", "libplugins_libhifiCodec.so")
|
|
||||||
copy { from sourceFile; into destinationFile.parent; rename(sourceFile.name, destinationFile.name) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME this code is prototyping the desired functionality for doing build time binary dependency resolution.
|
// FIXME this code is prototyping the desired functionality for doing build time binary dependency resolution.
|
||||||
// See the comment on the qtBundle task above
|
// See the comment on the qtBundle task above
|
||||||
/*
|
/*
|
||||||
|
|
45
cmake/externals/hifiAudioCodec/CMakeLists.txt
vendored
45
cmake/externals/hifiAudioCodec/CMakeLists.txt
vendored
|
@ -1,45 +0,0 @@
|
||||||
include(ExternalProject)
|
|
||||||
include(SelectLibraryConfigurations)
|
|
||||||
|
|
||||||
set(EXTERNAL_NAME hifiAudioCodec)
|
|
||||||
|
|
||||||
string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
set(DOWNLOAD_URL "${EXTERNAL_BUILD_ASSETS}/dependencies/codecSDK-win-2.0.zip")
|
|
||||||
set(DOWNLOAD_MD5 9199d4dbd6b16bed736b235efe980e67)
|
|
||||||
elseif (APPLE)
|
|
||||||
set(DOWNLOAD_URL "${EXTERNAL_BUILD_ASSETS}/dependencies/codecSDK-mac-2.0.zip")
|
|
||||||
set(DOWNLOAD_MD5 21649881e7d5dc94f922179be96f76ba)
|
|
||||||
elseif (ANDROID)
|
|
||||||
set(DOWNLOAD_URL "${EXTERNAL_BUILD_ASSETS}/dependencies/codecSDK-android-2.0.zip")
|
|
||||||
set(DOWNLOAD_MD5 aef2a852600d498d58aa586668191683)
|
|
||||||
elseif (UNIX)
|
|
||||||
set(DOWNLOAD_URL "${EXTERNAL_BUILD_ASSETS}/dependencies/codecSDK-linux-2.0.zip")
|
|
||||||
set(DOWNLOAD_MD5 67fb7755f9bcafb98a9fceea53bc7481)
|
|
||||||
else()
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ExternalProject_Add(
|
|
||||||
${EXTERNAL_NAME}
|
|
||||||
URL ${DOWNLOAD_URL}
|
|
||||||
URL_MD5 ${DOWNLOAD_MD5}
|
|
||||||
CONFIGURE_COMMAND ""
|
|
||||||
BUILD_COMMAND ""
|
|
||||||
INSTALL_COMMAND ""
|
|
||||||
LOG_DOWNLOAD 1
|
|
||||||
)
|
|
||||||
|
|
||||||
# Hide this external target (for ide users)
|
|
||||||
set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals")
|
|
||||||
|
|
||||||
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)
|
|
||||||
|
|
||||||
set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${SOURCE_DIR}/include CACHE STRING INTERNAL)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${SOURCE_DIR}/Release/audio.lib CACHE STRING INTERNAL)
|
|
||||||
else()
|
|
||||||
set(${EXTERNAL_NAME_UPPER}_LIBRARIES ${SOURCE_DIR}/Release/libaudio.a CACHE STRING INTERNAL)
|
|
||||||
endif()
|
|
|
@ -1,22 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright 2018 High Fidelity, Inc.
|
|
||||||
# Created by Gabriel Calero and Cristian Duarte on 2018/10/05
|
|
||||||
#
|
|
||||||
# Distributed under the Apache License, Version 2.0.
|
|
||||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
#
|
|
||||||
macro(TARGET_HIFIAUDIOCODEC)
|
|
||||||
if (ANDROID)
|
|
||||||
set(HIFIAC_INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/hifiAC/codecSDK)
|
|
||||||
set(HIFIAC_LIB_DIR "${HIFIAC_INSTALL_DIR}/Release")
|
|
||||||
set(HIFIAC_INCLUDE_DIRS "${HIFIAC_INSTALL_DIR}/include" CACHE STRING INTERNAL)
|
|
||||||
list(APPEND HIFIAC_LIBS "${HIFIAC_LIB_DIR}/libaudio.a")
|
|
||||||
set(HIFIAC_LIBRARIES ${HIFIAC_LIBS} CACHE STRING INTERNAL)
|
|
||||||
else()
|
|
||||||
add_dependency_external_projects(hifiAudioCodec)
|
|
||||||
target_include_directories(${TARGET_NAME} PRIVATE ${HIFIAUDIOCODEC_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(${TARGET_NAME} ${HIFIAUDIOCODEC_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
target_include_directories(${TARGET_NAME} PRIVATE ${HIFIAC_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(${TARGET_NAME} ${HIFIAC_LIBRARIES})
|
|
||||||
endmacro()
|
|
|
@ -1418,8 +1418,8 @@
|
||||||
"name": "codec_preference_order",
|
"name": "codec_preference_order",
|
||||||
"label": "Audio Codec Preference Order",
|
"label": "Audio Codec Preference Order",
|
||||||
"help": "List of codec names in order of preferred usage",
|
"help": "List of codec names in order of preferred usage",
|
||||||
"placeholder": "opus, hifiAC, zlib, pcm",
|
"placeholder": "opus, zlib, pcm",
|
||||||
"default": "opus,hifiAC,zlib,pcm",
|
"default": "opus,zlib,pcm",
|
||||||
"advanced": true
|
"advanced": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -67,11 +67,6 @@ ANDROID_PACKAGES = {
|
||||||
'sharedLibFolder': 'lib/release',
|
'sharedLibFolder': 'lib/release',
|
||||||
'includeLibs': ['libtbb.so', 'libtbbmalloc.so'],
|
'includeLibs': ['libtbb.so', 'libtbbmalloc.so'],
|
||||||
},
|
},
|
||||||
'hifiAC': {
|
|
||||||
'baseUrl': 'https://cdn-1.vircadia.com/eu-c-1/vircadia-public/dependencies/',
|
|
||||||
'file': 'codecSDK-android_armv8-2.0.zip',
|
|
||||||
'checksum': '1cbef929675818fc64c4101b72f84a6a'
|
|
||||||
},
|
|
||||||
'etc2comp': {
|
'etc2comp': {
|
||||||
'file': 'etc2comp-patched-armv8-libcpp.tgz',
|
'file': 'etc2comp-patched-armv8-libcpp.tgz',
|
||||||
'checksum': '14b02795d774457a33bbc60e00a786bc'
|
'checksum': '14b02795d774457a33bbc60e00a786bc'
|
||||||
|
|
|
@ -57,11 +57,6 @@ add_subdirectory(${DIR})
|
||||||
set(DIR "opusCodec")
|
set(DIR "opusCodec")
|
||||||
add_subdirectory(${DIR})
|
add_subdirectory(${DIR})
|
||||||
|
|
||||||
if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
|
||||||
set(DIR "hifiCodec")
|
|
||||||
add_subdirectory(${DIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# example plugins
|
# example plugins
|
||||||
set(DIR "JSAPIExample")
|
set(DIR "JSAPIExample")
|
||||||
add_subdirectory(${DIR})
|
add_subdirectory(${DIR})
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#
|
|
||||||
# Created by Brad Hefta-Gaub on 7/10/2016
|
|
||||||
# Copyright 2016 High Fidelity, Inc.
|
|
||||||
#
|
|
||||||
# Distributed under the Apache License, Version 2.0.
|
|
||||||
# See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
#
|
|
||||||
|
|
||||||
set(TARGET_NAME hifiCodec)
|
|
||||||
setup_hifi_client_server_plugin()
|
|
||||||
link_hifi_libraries(shared audio plugins)
|
|
||||||
target_hifiAudioCodec()
|
|
||||||
if (BUILD_SERVER)
|
|
||||||
install_beside_console()
|
|
||||||
endif ()
|
|
|
@ -1,95 +0,0 @@
|
||||||
//
|
|
||||||
// HiFiCodec.cpp
|
|
||||||
// plugins/hifiCodec/src
|
|
||||||
//
|
|
||||||
// Created by Brad Hefta-Gaub on 7/10/2016
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "HiFiCodec.h"
|
|
||||||
|
|
||||||
#include <AudioCodec.h>
|
|
||||||
#include <AudioConstants.h>
|
|
||||||
#include <PerfStat.h>
|
|
||||||
|
|
||||||
|
|
||||||
const char* HiFiCodec::NAME { "hifiAC" };
|
|
||||||
|
|
||||||
void HiFiCodec::init() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void HiFiCodec::deinit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HiFiCodec::activate() {
|
|
||||||
CodecPlugin::activate();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HiFiCodec::deactivate() {
|
|
||||||
CodecPlugin::deactivate();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool HiFiCodec::isSupported() const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
class HiFiEncoder : public Encoder, public AudioEncoder {
|
|
||||||
public:
|
|
||||||
HiFiEncoder(int sampleRate, int numChannels) : AudioEncoder(sampleRate, numChannels) {
|
|
||||||
_encodedSize = (AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL * sizeof(int16_t) * numChannels) / 4; // codec reduces by 1/4th
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void encode(const QByteArray& decodedBuffer, QByteArray& encodedBuffer) override {
|
|
||||||
PerformanceTimer perfTimer("HiFiEncoder::encode");
|
|
||||||
|
|
||||||
encodedBuffer.resize(_encodedSize);
|
|
||||||
AudioEncoder::process((const int16_t*)decodedBuffer.constData(), (int16_t*)encodedBuffer.data(), AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL);
|
|
||||||
}
|
|
||||||
private:
|
|
||||||
int _encodedSize;
|
|
||||||
};
|
|
||||||
|
|
||||||
class HiFiDecoder : public Decoder, public AudioDecoder {
|
|
||||||
public:
|
|
||||||
HiFiDecoder(int sampleRate, int numChannels) : AudioDecoder(sampleRate, numChannels) {
|
|
||||||
_decodedSize = AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL * sizeof(int16_t) * numChannels;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void decode(const QByteArray& encodedBuffer, QByteArray& decodedBuffer) override {
|
|
||||||
PerformanceTimer perfTimer("HiFiEncoder::decode");
|
|
||||||
|
|
||||||
decodedBuffer.resize(_decodedSize);
|
|
||||||
AudioDecoder::process((const int16_t*)encodedBuffer.constData(), (int16_t*)decodedBuffer.data(), AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void lostFrame(QByteArray& decodedBuffer) override {
|
|
||||||
PerformanceTimer perfTimer("HiFiEncoder::lostFrame");
|
|
||||||
|
|
||||||
decodedBuffer.resize(_decodedSize);
|
|
||||||
// this performs packet loss interpolation
|
|
||||||
AudioDecoder::process(nullptr, (int16_t*)decodedBuffer.data(), AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL, false);
|
|
||||||
}
|
|
||||||
private:
|
|
||||||
int _decodedSize;
|
|
||||||
};
|
|
||||||
|
|
||||||
Encoder* HiFiCodec::createEncoder(int sampleRate, int numChannels) {
|
|
||||||
return new HiFiEncoder(sampleRate, numChannels);
|
|
||||||
}
|
|
||||||
|
|
||||||
Decoder* HiFiCodec::createDecoder(int sampleRate, int numChannels) {
|
|
||||||
return new HiFiDecoder(sampleRate, numChannels);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HiFiCodec::releaseEncoder(Encoder* encoder) {
|
|
||||||
delete encoder;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HiFiCodec::releaseDecoder(Decoder* decoder) {
|
|
||||||
delete decoder;
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
//
|
|
||||||
// HiFiCodec.h
|
|
||||||
// plugins/hifiCodec/src
|
|
||||||
//
|
|
||||||
// Created by Brad Hefta-Gaub on 7/10/2016
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef hifi_HiFiCodec_h
|
|
||||||
#define hifi_HiFiCodec_h
|
|
||||||
|
|
||||||
#include <plugins/CodecPlugin.h>
|
|
||||||
|
|
||||||
class HiFiCodec : public CodecPlugin {
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
// Plugin functions
|
|
||||||
bool isSupported() const override;
|
|
||||||
const QString getName() const override { return NAME; }
|
|
||||||
|
|
||||||
void init() override;
|
|
||||||
void deinit() override;
|
|
||||||
|
|
||||||
/// Called when a plugin is being activated for use. May be called multiple times.
|
|
||||||
bool activate() override;
|
|
||||||
/// Called when a plugin is no longer being used. May be called multiple times.
|
|
||||||
void deactivate() override;
|
|
||||||
|
|
||||||
virtual Encoder* createEncoder(int sampleRate, int numChannels) override;
|
|
||||||
virtual Decoder* createDecoder(int sampleRate, int numChannels) override;
|
|
||||||
virtual void releaseEncoder(Encoder* encoder) override;
|
|
||||||
virtual void releaseDecoder(Decoder* decoder) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
static const char* NAME;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // hifi_HiFiCodec_h
|
|
|
@ -1,46 +0,0 @@
|
||||||
//
|
|
||||||
// Created by Brad Hefta-Gaub on 7/10/2016
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <mutex>
|
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
|
||||||
#include <QtCore/QtPlugin>
|
|
||||||
#include <QtCore/QStringList>
|
|
||||||
|
|
||||||
#include <plugins/RuntimePlugin.h>
|
|
||||||
#include <plugins/CodecPlugin.h>
|
|
||||||
|
|
||||||
#include "HiFiCodec.h"
|
|
||||||
|
|
||||||
class HiFiCodecProvider : public QObject, public CodecProvider {
|
|
||||||
Q_OBJECT
|
|
||||||
Q_PLUGIN_METADATA(IID CodecProvider_iid FILE "plugin.json")
|
|
||||||
Q_INTERFACES(CodecProvider)
|
|
||||||
|
|
||||||
public:
|
|
||||||
HiFiCodecProvider(QObject* parent = nullptr) : QObject(parent) {}
|
|
||||||
virtual ~HiFiCodecProvider() {}
|
|
||||||
|
|
||||||
virtual CodecPluginList getCodecPlugins() override {
|
|
||||||
static std::once_flag once;
|
|
||||||
std::call_once(once, [&] {
|
|
||||||
|
|
||||||
CodecPluginPointer hiFiCodec(std::make_shared<HiFiCodec>());
|
|
||||||
if (hiFiCodec->isSupported()) {
|
|
||||||
_codecPlugins.push_back(hiFiCodec);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
return _codecPlugins;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
CodecPluginList _codecPlugins;
|
|
||||||
};
|
|
||||||
|
|
||||||
#include "HiFiCodecProvider.moc"
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"name":"HiFi 4:1 Audio Codec",
|
|
||||||
"version":1
|
|
||||||
}
|
|
|
@ -10,7 +10,6 @@ RUN mkdir -p /etc/hifi/server/plugins /etc/hifi/server/resources /etc/hifi/serve
|
||||||
COPY ./assignment-client /etc/hifi/server/
|
COPY ./assignment-client /etc/hifi/server/
|
||||||
#COPY ./oven /etc/hifi/server/
|
#COPY ./oven /etc/hifi/server/
|
||||||
COPY ./domain-server /etc/hifi/server/
|
COPY ./domain-server /etc/hifi/server/
|
||||||
COPY ./plugins/hifiCodec/libhifiCodec.so /etc/hifi/server/plugins/
|
|
||||||
RUN true
|
RUN true
|
||||||
COPY ./plugins/pcmCodec/libpcmCodec.so /etc/hifi/server/plugins/
|
COPY ./plugins/pcmCodec/libpcmCodec.so /etc/hifi/server/plugins/
|
||||||
# Dummy statement
|
# Dummy statement
|
||||||
|
|
Loading…
Reference in a new issue