AR-Camera - Page 3

AR-Camera

Requests for features in the spring code.

Moderator: Moderators

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: AR-Camera

Post by PicassoCT »

Hi, im currently trying the following steps in order:
  • -Integrate Openh264 encoder into spring as a library

    -Integrate Openh264 decoder into the android app

    -Have Spring Videostreamed from a seperate thread to the AR-Device

    -Fun & Profit
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: AR-Camera

Post by PicassoCT »

Currently working and failing with a CMake file for this.

I added the openh264 encoder as a subproject to the git-repository.
https://github.com/PicassoCT/spring/tree/arcamdev
https://github.com/PicassoCT/spring/tre ... /lib/openh

The idea is to compile the static binarys of the encoder- and then call the library to stream out the frame dropped by the gl-environment.

Problem is:
I suck with CMAKE. So any help would be appreciated.

Code: Select all

# Spring supplied CMake build file

#trigger compiling via make file
add_custom_target(
		COMMAND make all
		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/openh264
	)

#add the resulting artefacts

SET( openh264ressources,
	"openh264/libencoder.a"
	"openh264/libcommon.a"
	"openh264/libconsole_common.a"
	"openh264/libopenh264.a"
	"openh264/libprocessing.a"
	)


#add the resulting binaries as libraries
ADD_LIBRARY(encoder STATIC ${openh264ressources})
target_link_libraries(encoder ${OPENH_LIBRARY})


ADD_LIBRARY(common STATIC ${openh264ressources})
SET_TARGET_PROPERTIES(common ${OPENH_LIBRARY})

ADD_LIBRARY(console STATIC ${openh264ressources})
SET_TARGET_PROPERTIES(console ${OPENH_LIBRARY})

ADD_LIBRARY(processing STATIC ${openh264ressources})
SET_TARGET_PROPERTIES(processing ${OPENH_LIBRARY})

#add the header files to use the decoder/encorder in the project
target_include_directories(code_api ${CMAKE_CURRENT_SOURCE_DIR}/openh264/codec/api/svc/)

set_global(SPRING_OPENH_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/rts/lib/openh/openh264/")
set_global(SPRING_OPENH264_LIBRARY encoder)
https://github.com/PicassoCT/spring/blo ... eLists.txt
Last edited by PicassoCT on 11 Jan 2019, 08:47, edited 1 time in total.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: AR-Camera

Post by abma »

when looking at https://github.com/PicassoCT/spring/tre ... /lib/openh :

- CMakeCache.txt & error.txt must be removed
- https://github.com/PicassoCT/spring/blo ... gitmodules -> rts/lib/openh264 but this folder doesn't exist. a submodule like file exists in https://github.com/PicassoCT/spring/tre ... /lib/openh
- "make all" is called for compiling from cmake: thats generally bad as it very likely breaks cross-platform compile.
- to link against the external build lib you can not use "add_library", you have to use "target_link_libraries" IMHO. not sure if there is a better way
Post Reply

Return to “Feature Requests”