Skip to content

Add sdk-playback option using Huawei IVS_SDK_PlaybackPlatform - #2

Open
gunnxx wants to merge 11 commits into
nodefluxio:playbackfrom
gunnxx:sdk-playback
Open

Add sdk-playback option using Huawei IVS_SDK_PlaybackPlatform#2
gunnxx wants to merge 11 commits into
nodefluxio:playbackfrom
gunnxx:sdk-playback

Conversation

@gunnxx

@gunnxx gunnxx commented Aug 9, 2018

Copy link
Copy Markdown

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

Comment thread modules/api/CMakeLists.txt Outdated
# 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
Copy Markdown
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

Comment thread modules/huawei/CMakeLists.txt Outdated
# 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
Copy Markdown
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
Copy Markdown
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

gunnxx commented Aug 9, 2018

Copy link
Copy Markdown
Author

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
Copy Markdown
Contributor

Sure. I'll take a look.

@gunnxx

gunnxx commented Aug 10, 2018

Copy link
Copy Markdown
Author

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