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

Fix ni package cmake and update changelog #76

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 2024-05-08 version v1.1.2:

* FIXED: Issues in cmake integration for NI's internal build system

# 2024-04-30 version v1.1.1:

* ADDED: Cmake integration for NI's internal build system
* FIXED: An issue where `media_foundation_helper` could produce an integer overflow resulting in a freeze while reading a file

# 2023-12-20 version v1.1.0:

* ADDED: Possibility of creating a custom decoder via `istream_source`
Expand Down
14 changes: 10 additions & 4 deletions NI.package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ function( pr_init_ni_nimedia_package_path )
endfunction()
pr_init_ni_nimedia_package_path()

if( APPLE OR WIN32 )
set( APPLE_OR_WINDOWS TRUE )
endif()

set( NIMEDIA_PCM_INCLUDE_DIRS "${NI_NIMEDIA_PACKAGE_PATH}/pcm/inc" )

if ( NOT (EXISTS ${NIMEDIA_PCM_INCLUDE_DIRS}) )
Expand Down Expand Up @@ -120,7 +124,7 @@ set( audiostream_sources
"${NI_NIMEDIA_PACKAGE_PATH}/audiostream/src/ni/media/iostreams/stream_buffer.h"
"${NI_NIMEDIA_PACKAGE_PATH}/audiostream/src/ni/media/iostreams/write_obj.h"
)
if ( APPLE OR WIN32 )
if ( APPLE_OR_WINDOWS )
list( APPEND audiostream_sources
"${NI_NIMEDIA_PACKAGE_PATH}/audiostream/src/ni/media/audio/mp3/mp3_file_source.h"
"${NI_NIMEDIA_PACKAGE_PATH}/audiostream/src/ni/media/audio/mp3/mp3_vector_source.h"
Expand Down Expand Up @@ -162,6 +166,8 @@ list( APPEND codec_libraries flacpp )
find_package( NILibVorbis REQUIRED )
list( APPEND codec_libraries libvorbis )
if ( APPLE )
find_library( COREAUDIOTOOLBOX_FRAMEWORK AudioToolbox )
list( APPEND codec_libraries ${COREAUDIOTOOLBOX_FRAMEWORK})
if ( NOT IOS )
find_library( CORESERVICES_FRAMEWORK CoreServices )
list( APPEND codec_libraries ${CORESERVICES_FRAMEWORK} )
Expand All @@ -186,13 +192,13 @@ target_link_libraries( audiostream PUBLIC pcm
target_compile_definitions( audiostream PRIVATE
NIMEDIA_ENABLE_AIFF_DECODING=1
NIMEDIA_ENABLE_FLAC_DECODING=1
NIMEDIA_ENABLE_MP3_DECODING=1
NIMEDIA_ENABLE_MP4_DECODING=1
NIMEDIA_ENABLE_MP3_DECODING=$<BOOL:${APPLE_OR_WINDOWS}>
NIMEDIA_ENABLE_MP4_DECODING=$<BOOL:${APPLE_OR_WINDOWS}>
NIMEDIA_ENABLE_OGG_DECODING=1
NIMEDIA_ENABLE_WAV_DECODING=1
NIMEDIA_ENABLE_WMA_DECODING=$<BOOL:${NIMEDIA_ENABLE_WMA_DECODING}> #wma support is off by default, clients need to turn it on
NIMEDIA_ENABLE_WAV_ENCODING=1
NIMEDIA_ENABLE_ITUNES_DECODING=1
NIMEDIA_ENABLE_ITUNES_DECODING=$<BOOL:${IOS}>
)

add_library( ni-media INTERFACE )
Expand Down
Loading