Commit 52851aa6 authored by Nicolas Bouillot's avatar Nicolas Bouillot

Merge branch 'develop'

parents c4291228 2168f2b2
Nicolas Bouillot
\ No newline at end of file
Nicolas Bouillot
Francis Lecavalier
......@@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.5.1)
# Project Variables
set(NDI2SHMDATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(NDI2SHMDATA_VERSION_MAJOR 0)
set(NDI2SHMDATA_VERSION_MINOR 2)
set(NDI2SHMDATA_VERSION_MINOR 3)
set(NDI2SHMDATA_VERSION_PATCH 0)
set(NDI2SHMDATA_VERSION_STRING ${NDI2SHMDATA_VERSION_MAJOR}.${NDI2SHMDATA_VERSION_MINOR}.${NDI2SHMDATA_VERSION_PATCH})
set(SHMDATA_REQUIRED_VERSION 1.3)
......
# How to make new releases
First make sure `develop` branch reflects the desired `master`:
* create the release branch from develop: `git checkout develop && git checkout -b current_release`
* update AUTHORS.md
* Increase the version (major, minor or patch) or in the CMakeLists.txt file located at the root of the project
* Create a new entry in the NEWS.md file (top of the file) with version number, date and description of changes
* Commit and push, open a code review
Release into the master branch:
* remove release branch: `git branch -d current_release`
* merge into master: `git checkout master && git pull origin master && git merge --no-ff develop`
* tag the version `git tag -a vX.X.X -m"Short message that explains the new version"`
* push to master: `git push origin master --tags`
* rebase develop on master:`git checkout develop && git rebase master`
You're done.
# NDI2shmdata Changelog
ndi2shmdata [0.3.0] - 2019-04-26
--------------------------------
New Feature:
* ✨ Add user-configurable timeout for stream discovery
Bug Fixes:
* 🐛 Refactor signal handling to avoid undefined behaviors
NDI:
* 👽 Updating NDI SDK to 4.1
ndi2shmdata [0.2.0] - 2019-04-26
--------------------------------
......
......@@ -2,6 +2,8 @@
Tool that convert [shmdata](https://gitlab.com/sat-metalab/shmdata) to [NewTek's NDI](http://ndi.newtek.com), and _vice versa_.
NDI2Shmdata currently uses version 4.1 of the NDI SDK.
Example
=======
......
This diff is collapsed.
......@@ -3,11 +3,11 @@
// NOTE : The following MIT license applies to this file ONLY and not to the SDK as a whole. Please review the SDK documentation
// for the description of the full license terms, which are also provided in the file "NDI License Agreement.pdf" within the SDK or
// online at http://new.tk/ndisdk_license/. Your use of any part of this SDK is acknowledgment that you agree to the SDK license
// terms. The full NDI SDK may be downloaded at https://www.newtek.com/ndi/sdk/
// terms. The full NDI SDK may be downloaded at http://ndi.tv/
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
//
// Copyright(c) 2014-2018 NewTek, inc
// Copyright(c) 2014-2019 NewTek, inc
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
......@@ -21,7 +21,7 @@
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
// Structures and type definitions required by NDI finding
// The reference to an instance of the finder
......
......@@ -3,11 +3,11 @@
// NOTE : The following MIT license applies to this file ONLY and not to the SDK as a whole. Please review the SDK documentation
// for the description of the full license terms, which are also provided in the file "NDI License Agreement.pdf" within the SDK or
// online at http://new.tk/ndisdk_license/. Your use of any part of this SDK is acknowledgment that you agree to the SDK license
// terms. The full NDI SDK may be downloaded at https://www.newtek.com/ndi/sdk/
// terms. The full NDI SDK may be downloaded at http://ndi.tv/
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
//
// Copyright(c) 2014-2018 NewTek, inc
// Copyright(c) 2014-2019 NewTek, inc
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
......@@ -21,7 +21,7 @@
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
// It is important when using video to realize that often you are using difference clocks
// for different parts of the signal chain. Within NDI, the sender can send at the clock rate
......@@ -100,7 +100,7 @@ void NDIlib_framesync_destroy(NDIlib_framesync_instance_t p_instance);
// If you wish to know what the current incoming audio format is, then you can make a call
// with the parameters set to zero and it will then return the associated settings. For instance
// a call as follows :
// NDIlib_framesync_capture_audio(p_instance, p_audio_data, 0, 0, 0);
// NDIlib_framesync_capture_audio(p_instance, p_audio_data, 0, 0, 0);
//
// will return in p_audio_data the current received audio format if there is one or sample-rate
// and no_channels equal to zero if there is not one. At any time you can specify sample_rate and
......@@ -120,6 +120,27 @@ void NDIlib_framesync_free_audio(// The frame sync instance data
// The destination audio buffer that you wish to have filled in.
NDIlib_audio_frame_v2_t* p_audio_data);
// This function will tell you the approximate current depth of the audio queue to give you an indication
// of the number of audio samples you can request. Note that if you should treat the results of this function
// with some care because in reality the frame-sync API is meant to dynamically resample audio to match the
// rate that you are calling it. If you have an innacurate clock then this functon can be useful.
// for instance :
//
// while(true)
// { int no_samples = NDIlib_framesync_audio_queue_depth(p_instance);
// NDIlib_framesync_capture_audio( ... );
// play_audio( ... )
// NDIlib_framesync_free_audio( ... )
// inaccurate_sleep( 33ms );
// }
//
// Obviously because audio is being received in real-time there is no guarantee after the call that the
// number is correct since new samples might have been captured in that time. On syncronous use of this
// function however this will be the minimum number of samples in the queue at any later time until
// NDIlib_framesync_capture_audio is called.
PROCESSINGNDILIB_API
int NDIlib_framesync_audio_queue_depth(NDIlib_framesync_instance_t p_instance);
// This function will pull video samples from the frame-sync queue. This function
// will always immediately return a video sample by using time-base correction. You can
// specify the desired field type which is then used to return the best possible frame.
......
......@@ -3,11 +3,11 @@
// NOTE : The following MIT license applies to this file ONLY and not to the SDK as a whole. Please review the SDK documentation
// for the description of the full license terms, which are also provided in the file "NDI License Agreement.pdf" within the SDK or
// online at http://new.tk/ndisdk_license/. Your use of any part of this SDK is acknowledgment that you agree to the SDK license
// terms. The full NDI SDK may be downloaded at https://www.newtek.com/ndi/sdk/
// terms. The full NDI SDK may be downloaded at http://ndi.tv/
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
//
// Copyright(c) 2014-2018 NewTek, inc
// Copyright(c) 2014-2019 NewTek, inc
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
......@@ -21,17 +21,22 @@
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
// C++ implementations of default constructors are here to avoid them needing to be inline with
// all of the rest of the code.
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
// All the structs used and reasonable defaults are here
inline NDIlib_source_t::NDIlib_source_t(const char* p_ndi_name_, const char* p_url_address_)
: p_ndi_name(p_ndi_name_), p_url_address(p_url_address_) {}
inline NDIlib_video_frame_v2_t::NDIlib_video_frame_v2_t(int xres_, int yres_, NDIlib_FourCC_type_e FourCC_, int frame_rate_N_, int frame_rate_D_,
inline NDIlib_video_frame_v2_t::NDIlib_video_frame_v2_t(int xres_, int yres_, NDIlib_FourCC_video_type_e FourCC_, int frame_rate_N_, int frame_rate_D_,
float picture_aspect_ratio_, NDIlib_frame_format_type_e frame_format_type_,
int64_t timecode_, uint8_t* p_data_, int line_stride_in_bytes_, const char* p_metadata_, int64_t timestamp_)
: xres(xres_), yres(yres_), FourCC(FourCC_), frame_rate_N(frame_rate_N_), frame_rate_D(frame_rate_D_),
......@@ -43,7 +48,14 @@ inline NDIlib_audio_frame_v2_t::NDIlib_audio_frame_v2_t(int sample_rate_, int no
: sample_rate(sample_rate_), no_channels(no_channels_), no_samples(no_samples_), timecode(timecode_),
p_data(p_data_), channel_stride_in_bytes(channel_stride_in_bytes_), p_metadata(p_metadata_), timestamp(timestamp_) {}
inline NDIlib_video_frame_t::NDIlib_video_frame_t(int xres_, int yres_, NDIlib_FourCC_type_e FourCC_, int frame_rate_N_, int frame_rate_D_,
inline NDIlib_audio_frame_v3_t::NDIlib_audio_frame_v3_t(int sample_rate_, int no_channels_, int no_samples_, int64_t timecode_,
NDIlib_FourCC_audio_type_e FourCC_, uint8_t* p_data_, int channel_stride_in_bytes_,
const char* p_metadata_, int64_t timestamp_)
: sample_rate(sample_rate_), no_channels(no_channels_), no_samples(no_samples_), timecode(timecode_),
FourCC(FourCC_), p_data(p_data_), channel_stride_in_bytes(channel_stride_in_bytes_),
p_metadata(p_metadata_), timestamp(timestamp_) {}
inline NDIlib_video_frame_t::NDIlib_video_frame_t(int xres_, int yres_, NDIlib_FourCC_video_type_e FourCC_, int frame_rate_N_, int frame_rate_D_,
float picture_aspect_ratio_, NDIlib_frame_format_type_e frame_format_type_,
int64_t timecode_, uint8_t* p_data_, int line_stride_in_bytes_)
: xres(xres_), yres(yres_), FourCC(FourCC_), frame_rate_N(frame_rate_N_), frame_rate_D(frame_rate_D_),
......@@ -97,3 +109,7 @@ inline NDIlib_audio_frame_interleaved_32s_t::NDIlib_audio_frame_interleaved_32s_
inline NDIlib_audio_frame_interleaved_32f_t::NDIlib_audio_frame_interleaved_32f_t(int sample_rate_, int no_channels_, int no_samples_, int64_t timecode_, float* p_data_)
: sample_rate(sample_rate_), no_channels(no_channels_), no_samples(no_samples_), timecode(timecode_), p_data(p_data_) {}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
......@@ -3,11 +3,11 @@
// NOTE : The following MIT license applies to this file ONLY and not to the SDK as a whole. Please review the SDK documentation
// for the description of the full license terms, which are also provided in the file "NDI License Agreement.pdf" within the SDK or
// online at http://new.tk/ndisdk_license/. Your use of any part of this SDK is acknowledgment that you agree to the SDK license
// terms. The full NDI SDK may be downloaded at https://www.newtek.com/ndi/sdk/
// terms. The full NDI SDK may be downloaded at http://ndi.tv/
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
//
// Copyright(c) 2014-2018 NewTek, inc
// Copyright(c) 2014-2019 NewTek, inc
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
......@@ -21,65 +21,83 @@
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
// Is this library being compiled, or imported by another application.
#ifdef _WIN32
#define PROCESSINGNDILIB_DEPRECATED __declspec(deprecated)
#ifdef PROCESSINGNDILIB_EXPORTS
#ifdef __cplusplus
#define PROCESSINGNDILIB_API extern "C" __declspec(dllexport)
#else // __cplusplus
#define PROCESSINGNDILIB_API __declspec(dllexport)
#endif // __cplusplus
#else // PROCESSINGNDILIB_EXPORTS
#ifdef __cplusplus
#define PROCESSINGNDILIB_API extern "C" __declspec(dllimport)
#else // __cplusplus
#define PROCESSINGNDILIB_API __declspec(dllimport)
#endif // __cplusplus
#ifdef _WIN64
#define NDILIB_LIBRARY_NAME "Processing.NDI.Lib.x64.dll"
#define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V3"
#define NDILIB_REDIST_URL "http://new.tk/NDIRedistV3"
#else // _WIN64
#define NDILIB_LIBRARY_NAME "Processing.NDI.Lib.x86.dll"
#define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V3"
#define NDILIB_REDIST_URL "http://new.tk/NDIRedistV3"
#endif // _WIN64
#endif // PROCESSINGNDILIB_EXPORTS
#else // _WIN32
#ifdef __APPLE__
#define NDILIB_LIBRARY_NAME "libndi.3.dylib"
#define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V3"
#define NDILIB_REDIST_URL "http://new.tk/NDIRedistV3Apple"
#else // __APPLE__
#define NDILIB_LIBRARY_NAME "libndi.so.3"
#define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V3"
#define NDILIB_REDIST_URL ""
#endif // __APPLE__
#define PROCESSINGNDILIB_DEPRECATED
#ifdef __cplusplus
#define PROCESSINGNDILIB_API extern "C" __attribute((visibility("default")))
#else // __cplusplus
#define PROCESSINGNDILIB_API __attribute((visibility("default")))
#endif // __cplusplus
#endif // _WIN32
#ifdef PROCESSINGNDILIB_STATIC
# ifdef __cplusplus
# define PROCESSINGNDILIB_API extern "C"
# else // __cplusplus
# define PROCESSINGNDILIB_API
# endif // __cplusplus
#else // PROCESSINGNDILIB_STATIC
# ifdef _WIN32
# ifdef PROCESSINGNDILIB_EXPORTS
# ifdef __cplusplus
# define PROCESSINGNDILIB_API extern "C" __declspec(dllexport)
# else // __cplusplus
# define PROCESSINGNDILIB_API __declspec(dllexport)
# endif // __cplusplus
# else // PROCESSINGNDILIB_EXPORTS
# ifdef __cplusplus
# define PROCESSINGNDILIB_API extern "C" __declspec(dllimport)
# else // __cplusplus
# define PROCESSINGNDILIB_API __declspec(dllimport)
# endif // __cplusplus
# ifdef _WIN64
# define NDILIB_LIBRARY_NAME "Processing.NDI.Lib.x64.dll"
# define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V4"
# define NDILIB_REDIST_URL "http://new.tk/NDIRedistV4"
# else // _WIN64
# define NDILIB_LIBRARY_NAME "Processing.NDI.Lib.x86.dll"
# define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V4"
# define NDILIB_REDIST_URL "http://new.tk/NDIRedistV4"
# endif // _WIN64
# endif // PROCESSINGNDILIB_EXPORTS
# else // _WIN32
# ifdef __APPLE__
# define NDILIB_LIBRARY_NAME "libndi.4.dylib"
# define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V4"
# define NDILIB_REDIST_URL "http://new.tk/NDIRedistV4Apple"
# else // __APPLE__
# define NDILIB_LIBRARY_NAME "libndi.so.4"
# define NDILIB_REDIST_FOLDER "NDI_RUNTIME_DIR_V4"
# define NDILIB_REDIST_URL ""
# endif // __APPLE__
# ifdef __cplusplus
# define PROCESSINGNDILIB_API extern "C" __attribute((visibility("default")))
# else // __cplusplus
# define PROCESSINGNDILIB_API __attribute((visibility("default")))
# endif // __cplusplus
# endif // _WIN32
#endif // PROCESSINGNDILIB_STATIC
#ifndef PROCESSINGNDILIB_DEPRECATED
# ifdef _WIN32
# ifdef _MSC_VER
# define PROCESSINGNDILIB_DEPRECATED __declspec(deprecated)
# else // _MSC_VER
# define PROCESSINGNDILIB_DEPRECATED __attribute((deprecated))
# endif // _MSC_VER
# else // _WIN32
# define PROCESSINGNDILIB_DEPRECATED
# endif // _WIN32
#endif // PROCESSINGNDILIB_DEPRECATED
#ifndef NDILIB_CPP_DEFAULT_CONSTRUCTORS
#ifdef __cplusplus
#define NDILIB_CPP_DEFAULT_CONSTRUCTORS 1
#else // __cplusplus
#define NDILIB_CPP_DEFAULT_CONSTRUCTORS 0
#endif // __cplusplus
# ifdef __cplusplus
# define NDILIB_CPP_DEFAULT_CONSTRUCTORS 1
# else // __cplusplus
# define NDILIB_CPP_DEFAULT_CONSTRUCTORS 0
# endif // __cplusplus
#endif // NDILIB_CPP_DEFAULT_CONSTRUCTORS
#ifndef NDILIB_CPP_DEFAULT_VALUE
#ifdef __cplusplus
#define NDILIB_CPP_DEFAULT_VALUE(a) =(a)
#else // __cplusplus
#define NDILIB_CPP_DEFAULT_VALUE(a)
#endif // __cplusplus
# ifdef __cplusplus
# define NDILIB_CPP_DEFAULT_VALUE(a) =(a)
# else // __cplusplus
# define NDILIB_CPP_DEFAULT_VALUE(a)
# endif // __cplusplus
#endif // NDILIB_CPP_DEFAULT_VALUE
// Data structures shared by multiple SDKs
......
......@@ -3,11 +3,11 @@
// NOTE : The following MIT license applies to this file ONLY and not to the SDK as a whole. Please review the SDK documentation
// for the description of the full license terms, which are also provided in the file "NDI License Agreement.pdf" within the SDK or
// online at http://new.tk/ndisdk_license/. Your use of any part of this SDK is acknowledgment that you agree to the SDK license
// terms. The full NDI SDK may be downloaded at https://www.newtek.com/ndi/sdk/
// terms. The full NDI SDK may be downloaded at http://ndi.tv/
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
//
// Copyright(c) 2014-2018 NewTek, inc
// Copyright(c) 2014-2019 NewTek, inc
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
......@@ -21,7 +21,7 @@
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
// Has this receiver got PTZ control. Note that it might take a second or two after the connection for this value to be set.
// To avoid the need to poll this function, you can know when the value of this function might have changed when the
......@@ -32,7 +32,15 @@ bool NDIlib_recv_ptz_is_supported(NDIlib_recv_instance_t p_instance);
// Has this receiver got recording control. Note that it might take a second or two after the connection for this value to be set.
// To avoid the need to poll this function, you can know when the value of this function might have changed when the
// NDILib_recv_capture* call would return NDIlib_frame_type_status_change
PROCESSINGNDILIB_API
//
// Note on deprecation of this function :
// NDI version 4 includes the native ability to record all NDI streams using an external application that is provided with the
// SDK. This is better in many ways than the internal recording support which only ever supported remotely recording systems
// and NDI|HX. This functionality will be supported in the SDK for some time although we are recommending that you use the
// newer support which is more feature rich and supports the recording of all stream types, does not take CPU time to record
// NDI sources (it does not require any type of re-compression since it can just store the data in the file), it will synchronize
// all recorders on a system (and cross systems if NTP clock locking is used).
PROCESSINGNDILIB_DEPRECATED PROCESSINGNDILIB_API
bool NDIlib_recv_recording_is_supported(NDIlib_recv_instance_t p_instance);
// PTZ Controls
......@@ -118,34 +126,44 @@ bool NDIlib_recv_ptz_exposure_manual(NDIlib_recv_instance_t p_instance, const fl
// This will start recording.If the recorder was already recording then the message is ignored.A filename is passed in as a "hint".Since the recorder might
// already be recording(or might not allow complete flexibility over its filename), the filename might or might not be used.If the filename is empty, or
// not present, a name will be chosen automatically. If you do not with to provide a filename hint you can simply pass NULL.
PROCESSINGNDILIB_API
//
// See note above on depreciation and why this is, and how to replace this functionality.
PROCESSINGNDILIB_DEPRECATED PROCESSINGNDILIB_API
bool NDIlib_recv_recording_start(NDIlib_recv_instance_t p_instance, const char* p_filename_hint);
// Stop recording.
PROCESSINGNDILIB_API
//
// See note above on depreciation and why this is, and how to replace this functionality.
PROCESSINGNDILIB_DEPRECATED PROCESSINGNDILIB_API
bool NDIlib_recv_recording_stop(NDIlib_recv_instance_t p_instance);
// This will control the audio level for the recording.dB is specified in decibels relative to the reference level of the source. Not all recording sources support
// controlling audio levels.For instance, a digital audio device would not be able to avoid clipping on sources already at the wrong level, thus
// might not support this message.
PROCESSINGNDILIB_API
//
// See note above on depreciation and why this is, and how to replace this functionality.
PROCESSINGNDILIB_DEPRECATED PROCESSINGNDILIB_API
bool NDIlib_recv_recording_set_audio_level(NDIlib_recv_instance_t p_instance, const float level_dB);
// This will determine if the source is currently recording. It will return true while recording is in progress and false when it is not. Because there is
// one recorded and multiple people might be connected to it, there is a chance that it is recording which was initiated by someone else.
PROCESSINGNDILIB_API
//
// See note above on depreciation and why this is, and how to replace this functionality.
PROCESSINGNDILIB_DEPRECATED PROCESSINGNDILIB_API
bool NDIlib_recv_recording_is_recording(NDIlib_recv_instance_t p_instance);
// Get the current filename for recording. When this is set it will return a non-NULL value which is owned by you and freed using NDIlib_recv_free_string.
// If a file was already being recorded by another client, the massage will contain the name of that file. The filename contains a UNC path (when one is available)
// to the recorded file, and can be used to access the file on your local machine for playback. If a UNC path is not available, then this will represent the local
// filename. This will remain valid even after the file has stopped being recorded until the next file is started.
PROCESSINGNDILIB_API
PROCESSINGNDILIB_DEPRECATED PROCESSINGNDILIB_API
const char* NDIlib_recv_recording_get_filename(NDIlib_recv_instance_t p_instance);
// This will tell you whether there was a recording error and what that string is. When this is set it will return a non-NULL value which is owned by you and
// freed using NDIlib_recv_free_string. When there is no error it will return NULL.
PROCESSINGNDILIB_API
//
// See note above on depreciation and why this is, and how to replace this functionality.
PROCESSINGNDILIB_DEPRECATED PROCESSINGNDILIB_API
const char* NDIlib_recv_recording_get_error(NDIlib_recv_instance_t p_instance);
// In order to get the duration
......@@ -163,6 +181,8 @@ typedef struct NDIlib_recv_recording_time_t
} NDIlib_recv_recording_time_t;
// Get the current recording times. These remain
PROCESSINGNDILIB_API
// Get the current recording times.
//
// See note above on depreciation and why this is, and how to replace this functionality.
PROCESSINGNDILIB_DEPRECATED PROCESSINGNDILIB_API
bool NDIlib_recv_recording_get_times(NDIlib_recv_instance_t p_instance, NDIlib_recv_recording_time_t* p_times);
......@@ -3,11 +3,11 @@
// NOTE : The following MIT license applies to this file ONLY and not to the SDK as a whole. Please review the SDK documentation
// for the description of the full license terms, which are also provided in the file "NDI License Agreement.pdf" within the SDK or
// online at http://new.tk/ndisdk_license/. Your use of any part of this SDK is acknowledgment that you agree to the SDK license
// terms. The full NDI SDK may be downloaded at https://www.newtek.com/ndi/sdk/
// terms. The full NDI SDK may be downloaded at http://ndi.tv/
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
//
// Copyright(c) 2014-2018 NewTek, inc
// Copyright(c) 2014-2019 NewTek, inc
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
......@@ -21,46 +21,73 @@
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
// Structures and type definitions required by NDI finding
// The reference to an instance of the receiver
typedef void* NDIlib_recv_instance_t;
enum
typedef enum NDIlib_recv_bandwidth_e
{ NDIlib_recv_bandwidth_metadata_only = -10, // Receive metadata.
NDIlib_recv_bandwidth_audio_only = 10, // Receive metadata, audio.
NDIlib_recv_bandwidth_lowest = 0, // Receive metadata, audio, video at a lower bandwidth and resolution.
NDIlib_recv_bandwidth_highest = 100 // Receive metadata, audio, video at full resolution.
};
typedef int32_t NDIlib_recv_bandwidth_e;
enum
{ NDIlib_recv_color_format_BGRX_BGRA = 0, // No alpha channel: BGRX, Alpha channel: BGRA
NDIlib_recv_color_format_UYVY_BGRA = 1, // No alpha channel: UYVY, Alpha channel: BGRA
NDIlib_recv_color_format_RGBX_RGBA = 2, // No alpha channel: RGBX, Alpha channel: RGBA
NDIlib_recv_color_format_UYVY_RGBA = 3, // No alpha channel: UYVY, Alpha channel: RGBA
#ifdef _WIN32
// On Windows there are some APIs that require bottom to top images in RGBA format. Specifying
// this format will return images in this format. The image data pointer will still point to the
// "top" of the image, although he stride will be negative. You can get the "bottom" line of the image
// using : video_data.p_data + (video_data.yres - 1)*video_data.line_stride_in_bytes
NDIlib_recv_color_format_BGRX_BGRA_flipped = 200,
#endif
// Read the SDK documentation to understand the pros and cons of this format.
NDIlib_recv_bandwidth_audio_only = 10, // Receive metadata, audio.
NDIlib_recv_bandwidth_lowest = 0, // Receive metadata, audio, video at a lower bandwidth and resolution.
NDIlib_recv_bandwidth_highest = 100, // Receive metadata, audio, video at full resolution.
// Ensure this is 32bits in size
NDIlib_recv_bandwidth_max = 0xffffffff
} NDIlib_recv_bandwidth_e;
typedef enum NDIlib_recv_color_format_e
{ // When there is no alpha channel, this mode delivers BGRX
// When there is an alpha channel, this mode delivers BGRA
NDIlib_recv_color_format_BGRX_BGRA = 0,
// When there is no alpha channel, this mode delivers UYVY
// When there is an alpha channel, this mode delivers BGRA
NDIlib_recv_color_format_UYVY_BGRA = 1,
// When there is no alpha channel, this mode delivers BGRX
// When there is an alpha channel, this mode delivers RGBA
NDIlib_recv_color_format_RGBX_RGBA = 2,
// When there is no alpha channel, this mode delivers UYVY
// When there is an alpha channel, this mode delivers RGBA
NDIlib_recv_color_format_UYVY_RGBA = 3,
// This format will try to decode the video using the fastest available color format for the incoming
// video signal. This format follows the following guidelines, although different platforms might
// vary slightly based on their capabilities and specific performance profiles. In general if you want
// the best performance this mode should be used.
//
// When using this format, you should consider than allow_video_fields is true, and individual fields
// will always be delivered.
//
// For most video sources on most platforms, this will follow the following conventions
// No alpha channel : UYVY
// Alpha channel : UYVA
NDIlib_recv_color_format_fastest = 100,
// This format will try to provide the video in the format that is the closest to native for the incoming
// codec yielding the highest quality. Specifically, this allows for receiving on 16bpp color from many
// sources.
//
// When using this format, you should consider than allow_video_fields is true, and individual fields
// will always be delivered.
//
// For most video sources on most platforms, this will follow the following conventions
// No alpha channel : P216, or UYVY
// Alpha channel : PA16 or UYVA
NDIlib_recv_color_format_best = 101,
// Legacy definitions for backwards compatibility
NDIlib_recv_color_format_e_BGRX_BGRA = NDIlib_recv_color_format_BGRX_BGRA,
NDIlib_recv_color_format_e_UYVY_BGRA = NDIlib_recv_color_format_UYVY_BGRA,
NDIlib_recv_color_format_e_RGBX_RGBA = NDIlib_recv_color_format_RGBX_RGBA,
NDIlib_recv_color_format_e_UYVY_RGBA = NDIlib_recv_color_format_UYVY_RGBA
};
NDIlib_recv_color_format_e_UYVY_RGBA = NDIlib_recv_color_format_UYVY_RGBA,
typedef uint32_t NDIlib_recv_color_format_e;
// Force the size to be 32bits
NDIlib_recv_color_format_max = 0xffffffff
} NDIlib_recv_color_format_e;
// The creation structure that is used when you are creating a receiver
typedef struct NDIlib_recv_create_v3_t
......@@ -206,7 +233,7 @@ void NDIlib_recv_clear_connection_metadata(NDIlib_recv_instance_t p_instance);
PROCESSINGNDILIB_API
void NDIlib_recv_add_connection_metadata(NDIlib_recv_instance_t p_instance, const NDIlib_metadata_frame_t* p_metadata);
// Is this receiver currently connected to a source on the other end, or has the source not yet been found or is no longe ronline.
// Is this receiver currently connected to a source on the other end, or has the source not yet been found or is no longer online.
// This will normally return 0 or 1
PROCESSINGNDILIB_API
int NDIlib_recv_get_no_connections(NDIlib_recv_instance_t p_instance);
......
......@@ -3,11 +3,11 @@
// NOTE : The following MIT license applies to this file ONLY and not to the SDK as a whole. Please review the SDK documentation
// for the description of the full license terms, which are also provided in the file "NDI License Agreement.pdf" within the SDK or
// online at http://new.tk/ndisdk_license/. Your use of any part of this SDK is acknowledgment that you agree to the SDK license
// terms. The full NDI SDK may be downloaded at https://www.newtek.com/ndi/sdk/
// terms. The full NDI SDK may be downloaded at http://ndi.tv/
//
//***********************************************************************************************************************************************
//*************************************************************************************************************************************
//
// Copyright(c) 2014-2018 NewTek, inc