Skip to content

Commit be9e981

Browse files
committed
1) Added EVS codec frame daformat group.
2) Some minor tunings of the core system to run chains of components. Tried to test all use-cases, keep an eye on it.
1 parent 42cb646 commit be9e981

7 files changed

Lines changed: 76 additions & 10 deletions

File tree

sources/jvxComponents/jvxAudioNodes/jvxAuNConvert/src/CjvxAuNConvert.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ CjvxAuNConvert::accept_negotiate_output(jvxLinkDataTransferType tp, jvxLinkDataD
299299

300300
// Modifify the number of output channels as requested
301301
node_output._common_set_node_params_a_1io.number_channels = preferredByOutput->con_params.number_channels;
302+
303+
// Adapt the parameters for forward direction
304+
adapt_output_parameters_forward();
305+
302306
if (res != JVX_NO_ERROR)
303307
{
304308
return res;
@@ -335,8 +339,13 @@ CjvxAuNConvert::accept_negotiate_output(jvxLinkDataTransferType tp, jvxLinkDataD
335339
// Override error message - can deal with it
336340
res = JVX_NO_ERROR;
337341
}
338-
// Modifify the number of output format as requested
342+
343+
// Modifify the number of output format as requested -- I think we do need this anymore
339344
node_output._common_set_node_params_a_1io.format = preferredByOutput->con_params.format;
345+
346+
// Adapt the parameters for forward direction
347+
adapt_output_parameters_forward();
348+
340349
if (res != JVX_NO_ERROR)
341350
{
342351
return res;

sources/jvxLibraries/jvx-app-host/src/CjvxAppHostBase.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,16 @@ JVX_APPHOST_CLASSNAME::check_system_build_integrity()
898898
(jvxDataFormat_str[JVX_DATAFORMAT_LIMIT].friendly != NULL))
899899
{
900900
integrityOk = false;
901+
902+
std::cout << "!!!!!!!!! SYSTEM INTEGRITY CHECK FAILED !!!!!!!!!!!!" << std::endl;
903+
if (theClassAssociation[JVX_COMPONENT_ALL_LIMIT].comp_class != jvxComponentTypeClass::JVX_COMPONENT_TYPE_LIMIT) std::cout << "-> Variable not setup propperly: theClassAssociation " << std::endl;
904+
if (jvxComponentType_class(JVX_COMPONENT_ALL_LIMIT) != jvxComponentTypeClass::JVX_COMPONENT_TYPE_LIMIT) std::cout << "-> Variable not setup propperly: jvxComponentType_class " << std::endl;
905+
if (theClassAssociation[JVX_COMPONENT_ALL_LIMIT].comp_sec_type != JVX_COMPONENT_ALL_LIMIT) std::cout << "-> Variable not setup propperly: theClassAssociation " << std::endl;
906+
if (jvxDataFormatGroup_size[JVX_DATAFORMAT_GROUP_LIMIT] != JVX_DATAFORMAT_GROUP_LIMIT) std::cout << "-> Variable not setup propperly: jvxDataFormatGroup_size " << std::endl;
907+
if (jvxDataFormatGroup_size_div[JVX_DATAFORMAT_GROUP_LIMIT] != JVX_DATAFORMAT_GROUP_LIMIT) std::cout << "-> Variable not setup propperly: jvxDataFormatGroup_size_div " << std::endl;
908+
if (jvxDataFormatGroup_str[JVX_DATAFORMAT_GROUP_LIMIT].friendly != NULL) std::cout << "-> Variable not setup propperly: jvxDataFormatGroup_str " << std::endl;
909+
if (jvxDataFormat_size[JVX_DATAFORMAT_LIMIT] != JVX_DATAFORMAT_LIMIT) std::cout << "-> Variable not setup propperly: jvxDataFormat_size " << std::endl;
910+
if (jvxDataFormat_str[JVX_DATAFORMAT_LIMIT].friendly != NULL) std::cout << "-> Variable not setup propperly: jvxDataFormat_str " << std::endl;
901911
}
902912

903913
return integrityOk;

sources/jvxLibraries/jvx-component-templates-base/include/jvxNodes/CjvxNodeBase1io.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class CjvxNodeBase1io : public IjvxNode, public CjvxObject,
4040
std::string prefix_descriptor_properties = "inout";
4141
std::string prefix_description_properties = "InOut";
4242

43+
jvxBool negCompromiseOnMismatch = true;
44+
4345
public:
4446
JVX_CALLINGCONVENTION CjvxNodeBase1io(JVX_CONSTRUCTOR_ARGUMENTS_MACRO_DECLARE);
4547
virtual JVX_CALLINGCONVENTION ~CjvxNodeBase1io() {};

sources/jvxLibraries/jvx-component-templates-base/src/jvxNodes/CjvxNodeBase1io.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,14 @@ CjvxNodeBase1io::accept_negotiate_output(jvxLinkDataTransferType tp, jvxLinkData
258258
neg_input.compare_core(preferredByOutput, &_common_set_ocon.theData_out, mismatch);
259259
if (mismatch)
260260
{
261-
res = JVX_ERROR_COMPROMISE;
261+
if (negCompromiseOnMismatch)
262+
{
263+
res = JVX_ERROR_COMPROMISE;
264+
}
265+
else
266+
{
267+
res = JVX_ERROR_UNSUPPORTED;
268+
}
262269
}
263270
}
264271

sources/jvxLibraries/jvx-component-templates-product/include/jvxAudioCodecs/CjvxAudioDecoder.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ namespace JVX_PROJECT_NAMESPACE {
101101
virtual void accept_input_parameters() = 0;
102102
virtual void test_set_output_parameters() = 0;
103103
virtual jvxErrorType updated_backward_format_spec(jvxLinkDataDescriptor& forward, jvxLinkDataDescriptor* ld_cp) = 0;
104+
105+
virtual jvxErrorType JVX_CALLINGCONVENTION activate_decoder();
106+
virtual jvxErrorType JVX_CALLINGCONVENTION deactivate_decoder();
107+
104108
};
105109

106110
#ifdef JVX_PROJECT_NAMESPACE

sources/jvxLibraries/jvx-component-templates-product/src/jvxAudioCodecs/CjvxAudioDecoder.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,19 @@ CjvxAudioDecoder::activate()
3030
JVX_ACTIVATE_DEFAULT_ONE_IN_ONE_OUT_CONNECTORS(
3131
NULL, static_cast<IjvxObject*>(this), "default", NULL,
3232
_common_set.theModuleName);
33+
34+
this->activate_decoder();
3335
}
3436
return(res);
3537
}
3638

39+
jvxErrorType
40+
CjvxAudioDecoder::activate_decoder()
41+
{
42+
return JVX_NO_ERROR;
43+
}
44+
45+
3746
// ============================================================================================
3847

3948
jvxErrorType
@@ -42,11 +51,19 @@ CjvxAudioDecoder::deactivate()
4251
jvxErrorType res = CjvxObject::_deactivate();
4352
if (res == JVX_NO_ERROR)
4453
{
54+
this->deactivate_decoder();
55+
4556
JVX_DEACTIVATE_DEFAULT_ONE_IN_ONE_OUT_CONNECTORS();
4657
}
4758
return(res);
4859
}
4960

61+
jvxErrorType
62+
CjvxAudioDecoder::deactivate_decoder()
63+
{
64+
return JVX_NO_ERROR;
65+
}
66+
5067
// ============================================================================================
5168

5269
jvxErrorType

sources/jvxLibraries/jvx-system-min/include/jvx_system_dataformats.h

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ typedef enum
252252
JVX_DATAFORMAT_GROUP_TRIGGER_ONLY,
253253

254254
JVX_DATAFORMAT_GROUP_FFMPEG_PACKET_FWD,
255-
JVX_DATAFORMAT_GROUP_FFMPEG_FRAME_FWD
255+
JVX_DATAFORMAT_GROUP_FFMPEG_FRAME_FWD,
256+
257+
JVX_DATAFORMAT_GROUP_EVS_PACKET_FWD
256258

257259
#ifndef JVX_NO_SYSTEM_EXTENSIONS
258260
JVX_DATAFORMAT_GROUP_DEFINES_PRODUCT
@@ -284,7 +286,9 @@ static jvxTextHelpers jvxDataFormatGroup_str[JVX_DATAFORMAT_GROUP_LIMIT + 1] =
284286
{ "trigger", "JVX_DATAFORMAT_GROUP_TRIGGER_ONLY"},
285287

286288
{ "ffmpg-pkt", "JVX_DATAFORMAT_GROUP_FFMPEG_PACKET_FWD"},
287-
{ "ffmpg-frm", "JVX_DATAFORMAT_GROUP_FFMPEG_FRAME_FWD"}
289+
{ "ffmpg-frm", "JVX_DATAFORMAT_GROUP_FFMPEG_FRAME_FWD"},
290+
291+
{ "evs-pkt", "JVX_DATAFORMAT_GROUP_EVS_PACKET_FWD" }
288292

289293
#ifndef JVX_NO_SYSTEM_EXTENSIONS
290294
JVX_DATAFORMAT_GROUP_STRINGS_PRODUCT
@@ -344,8 +348,9 @@ static jvxSize jvxDataFormatGroup_size[JVX_DATAFORMAT_GROUP_LIMIT + 1] =
344348
0, // JVX_DATAFORMAT_GROUP_TRIGGER_ONLY,
345349

346350
1, //JVX_DATAFORMAT_GROUP_FFMPEG_PACKET_FWD,
347-
1 // JVX_DATAFORMAT_GROUP_FFMPEG_FRAME_FWD
351+
1, // JVX_DATAFORMAT_GROUP_FFMPEG_FRAME_FWD
348352

353+
1 //JVX_DATAFORMAT_GROUP_EVS_PACKET_FWD
349354

350355
#ifndef JVX_NO_SYSTEM_EXTENSIONS
351356
JVX_DATAFORMAT_GROUP_SIZES_PRODUCT
@@ -377,7 +382,9 @@ static jvxSize jvxDataFormatGroup_size_div[JVX_DATAFORMAT_GROUP_LIMIT + 1] =
377382
1, // JVX_DATAFORMAT_GROUP_TRIGGER_ONLY,
378383

379384
1, //JVX_DATAFORMAT_GROUP_FFMPEG_PACKET_FWD,
380-
1 // JVX_DATAFORMAT_GROUP_FFMPEG_FRAME_FWD
385+
1, // JVX_DATAFORMAT_GROUP_FFMPEG_FRAME_FWD
386+
387+
1 //JVX_DATAFORMAT_GROUP_EVS_PACKET_FWD
381388

382389
#ifndef JVX_NO_SYSTEM_EXTENSIONS
383390
JVX_DATAFORMAT_GROUP_SIZES_DIV_PRODUCT
@@ -401,10 +408,20 @@ static inline jvxSize jvxDataFormatGroup_getsize_div(jvxSize idx)
401408

402409
typedef enum
403410
{
404-
JVX_DATAFLOW_PUSH_ACTIVE, // Devices and nodes push data forward by calling process function of subsequent linked component
405-
JVX_DATAFLOW_PUSH_ON_PULL, // Devices and nodes are triggered from subsequent element and call process function within this "pull"
406-
JVX_DATAFLOW_PUSH_ASYNC, // Devices and nodes push data forward by calling process function of subsequent linked component
407-
JVX_DATAFLOW_DONT_CARE, // All dataflows are accepted, this indicates that the value from input is used on output side in 1-to-1 connections
411+
// Devices and nodes push data forward by calling process function of subsequent linked component
412+
JVX_DATAFLOW_PUSH_ACTIVE,
413+
414+
// Devices and nodes are triggered from subsequent element and call process function within this "pull"
415+
JVX_DATAFLOW_PUSH_ON_PULL,
416+
417+
// Devices and nodes push data forward by calling process function of subsequent linked component. Compared to ACTIVE,
418+
// ASYNC means that buffers may arise without any regular time basis - even many in a fast running loop. Hence, typically,
419+
// an ASYNC stream requires a buffer at the end which then takes over data on the output side via JVX_DATAFLOW_PUSH_ON_PULL
420+
JVX_DATAFLOW_PUSH_ASYNC,
421+
422+
// All dataflows are accepted, this indicates that the value from input is used on output side in 1-to-1 connections
423+
JVX_DATAFLOW_DONT_CARE,
424+
408425
JVX_DATAFLOW_LIMIT
409426
} jvxDataflow;
410427

0 commit comments

Comments
 (0)