Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sdk-playback option using Huawei IVS_SDK_PlaybackPlatform #2

Open
wants to merge 11 commits into
base: playback
Choose a base branch
from
Open

Add sdk-playback option using Huawei IVS_SDK_PlaybackPlatform #2

wants to merge 11 commits into from

Conversation

gunnxx
Copy link

@gunnxx gunnxx commented Aug 9, 2018

Edit include file path of spdlog to its relative path and edit CMakeLists option to make it compatible with Windows

# Set default compile flags for GCC
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "GCC detected, adding compile flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -pedantic -Wall -Wextra")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use -std=c++14

@@ -4,7 +4,7 @@ project(hwivs VERSION 0.1.0)
# ----------------------------------------------------------------------------
# Detect dependencies
# ----------------------------------------------------------------------------
find_library(IVS_SDK_LIBRARY NAMES IVS_SDK HINTS $ENV{IVS_SDK_PATH}/lib)
find_library(IVS_SDK_LIBRARY NAMES IVS_SDK HINTS $ENV{IVS_SDK_PATH}/sdklib)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the sdk path from Huawei is different for Linux (/lib) and Windows (/sdklib). You could use both in the find_library.

find_library(IVS_SDK_LIBRARY
    NAMES IVS_SDK
    HINTS $ENV{IVS_SDK_PATH}/lib $ENV{IVS_SDK_PATH}/sdklib
)

@ilhamadun
Copy link
Contributor

I'm having this error when compiling on Ubuntu.

/home/ilham/Documents/Nodeflux/sources/vms-api/modules/huawei/src/hw_ivs.cpp:291:21: error: ‘IVS_SDK_StartPlatformPlayBack’ was not declared in this scope
   int return_code = IVS_SDK_StartPlatformPlayBack(_session_id, camera_code.c_str(),
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ilham/Documents/Nodeflux/sources/vms-api/modules/huawei/src/hw_ivs.cpp:291:21: note: suggested alternative: ‘IVS_SDK_StopPlatformPlayBack’
   int return_code = IVS_SDK_StartPlatformPlayBack(_session_id, camera_code.c_str(),
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     IVS_SDK_StopPlatformPlayBack

It happened because the IVS_SDK_StartPlatformPlayBack is not exist in the sdk header for Linux. Maybe you could fix it by wrapping hwivs::HuaweiIVS::sdk_playback only for Windows.

@gunnxx
Copy link
Author

gunnxx commented Aug 9, 2018

Ok, I'll give it a try. I just knew about this compatibility thing.
By the way, the request-queue code is done, but not yet be built. I made it in request branch in my repo. Maybe you want to take a look.

@ilhamadun
Copy link
Contributor

Sure. I'll take a look.

@gunnxx
Copy link
Author

gunnxx commented Aug 10, 2018

I did wrap sdk-playback for windows only and throw away some unnecessary cmake line. Already run cmake .. and make on Ubuntu and cmake .. on Windows, and both success.

Edit : just ran make .i.e build project in windows, turns out there are libs (like boost) that is not windows standard library so the path depends on where the user put it. Path have to be input manually in the project-name -> properties. Hence the edit to minimize the manually input path.

@ilhamadun ilhamadun changed the base branch from master to playback August 30, 2018 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants