You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/CPP-Batch-Component-API.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ The Component Executable:
23
23
2. Invokes functions on the component library to obtain detection results
24
24
3. Populates and sends the respective responses to the WFM
25
25
26
-
The basic psuedocode for the Component Executable is as follows:
26
+
The basic pseudocode for the Component Executable is as follows:
27
27
28
28
```c++
29
29
component->SetRunDirectory(...)
@@ -1003,10 +1003,10 @@ the `MPFDetectionException` constructor. A component is not required to support
1003
1003
| MPF_UNRECOGNIZED_DATA_TYPE | The media data type received by a component is not one of the values contained in the MPFDetectionDataType enum. Note that this failure is normally caught by the Component Executable, before a job is passed to the component logic. |
1004
1004
| MPF_UNSUPPORTED_DATA_TYPE | The job passed to a component requests processing of a job of an unsupported type. For instance, a component that is only capable of processing audio files should return this error code if a video or image job request is received. |
1005
1005
| MPF_INVALID_DATAFILE_URI | The string containing the URI location of the input data file is invalid or empty. |
1006
-
| MPF_COULD_NOT_OPEN_DATAFILE | The data file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI. |
1007
-
| MPF_COULD_NOT_READ_DATAFILE | There is a failure reading data from a successfully opened input data file. |
1006
+
| MPF_COULD_NOT_OPEN_DATAFILE | The data file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI. <br><br>Use MPF_COULD_NOT_OPEN_MEDIA for media files. |
1007
+
| MPF_COULD_NOT_READ_DATAFILE | There is a failure reading data from a successfully opened input data file. <br><br>Use MPF_COULD_NOT_READ_MEDIA for media files. |
1008
1008
| MPF_FILE_WRITE_ERROR | The component received a failure for any reason when attempting to write to a file. |
1009
-
| MPF_IMAGE_READ_ERROR | The component failed to read the image provided by the URI. For example, it might indicate the failure of a call to `MPFImageReader::GetImage()`, or `cv::imread()`. |
1009
+
| MPF_IMAGE_READ_ERROR | Use MPF_COULD_NOT_READ_MEDIA instead. This error is only kept for backwards compatibility and may be removed in a future release. <br><br>*The component failed to read the image provided by the URI. For example, it might indicate the failure of a call to `MPFImageReader::GetImage()`, or `cv::imread()`.* |
1010
1010
| MPF_BAD_FRAME_SIZE | The frame data retrieved has an incorrect or invalid frame size. For example, if a call to `cv::imread()` returns a frame of data with either the number of rows or columns less than or equal to 0. |
1011
1011
| MPF_BOUNDING_BOX_SIZE_ERROR | The calculation of a detection location bounding box has failed. For example, a component may be using an external library to detect objects, but the bounding box returned by that library lies partially outside the frame boundaries. |
1012
1012
| MPF_INVALID_FRAME_INTERVAL | An invalid or unsupported frame interval was received. |
@@ -1020,6 +1020,9 @@ the `MPFDetectionException` constructor. A component is not required to support
1020
1020
| MPF_JOB_PROPERTY_IS_NOT_FLOAT | A job property is supposed to be a floating point type, but it is of some other type, such as a boolean value. |
1021
1021
| MPF_MEMORY_ALLOCATION_FAILED | The component failed to allocate memory for any reason. |
1022
1022
| MPF_GPU_ERROR | The job was configured to execute on a GPU, but there was an issue with the GPU or no GPU was detected. |
1023
+
| MPF_NETWORK_ERROR | The component failed to communicate with an external system over the network. The system may not be available or there may have been a timeout. |
1024
+
| MPF_COULD_NOT_OPEN_MEDIA | The media file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI. |
1025
+
| MPF_COULD_NOT_READ_MEDIA | There is a failure reading data from a successfully opened media file. |
Copy file name to clipboardExpand all lines: docs/docs/Java-Batch-Component-API.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ The Component Executor:
23
23
2. Invokes methods on the component library to obtain detection results
24
24
3. Populates and sends the respective responses to the WFM
25
25
26
-
The basic psuedocode for the Component Executor is as follows:
26
+
The basic pseudocode for the Component Executor is as follows:
27
27
```java
28
28
component.setRunDirectory(...)
29
29
component.init()
@@ -917,10 +917,10 @@ Enum used to indicate the status of `getDetections` in a [`MPFComponentDetection
917
917
|MPF_UNRECOGNIZED_DATA_TYPE|The media data type received by a component is not one of the values contained in the `MPFDataType` enum. Note that this failure is normally caught by the ComponentExecutor before a job is passed to the component logic. |
918
918
|MPF_UNSUPPORTED_DATA_TYPE|The job passed to a component requests processing of a job of an unsupported type. For instance, a component that is only capable of processing audio files should returnthis error code if a video or image job request is received. |
919
919
|MPF_INVALID_DATAFILE_URI|The string containing the URI location of the input data file is invalid or empty. |
920
-
|MPF_COULD_NOT_OPEN_DATAFILE|The data file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI. |
921
-
|MPF_COULD_NOT_READ_DATAFILE|There is a failure reading data from a successfully opened input data file. |
920
+
|MPF_COULD_NOT_OPEN_DATAFILE|The data file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI. <br><br>UseMPF_COULD_NOT_OPEN_MEDIAfor media files. |
921
+
|MPF_COULD_NOT_READ_DATAFILE|There is a failure reading data from a successfully opened input data file. <br><br>UseMPF_COULD_NOT_READ_MEDIAfor media files. |
922
922
|MPF_FILE_WRITE_ERROR|The component received a failure for any reason when attempting to write to a file. |
923
-
|MPF_IMAGE_READ_ERROR|The component failed to read the image provided by the URI. |
923
+
|MPF_IMAGE_READ_ERROR|UseMPF_COULD_NOT_READ_MEDIA instead. This error is only kept for backwards compatibility and may be removed in a future release. <br><br>*The component failed to read the image provided by the URI.*|
924
924
|MPF_BAD_FRAME_SIZE|The frame data retrieved has an incorrect or invalid frame size. |
925
925
|MPF_BOUNDING_BOX_SIZE_ERROR|The calculation of a detection location bounding box has failed. For example, a component may be using an external library to detect objects, but the bounding box returned by that library lies partially outside the frame boundaries. |
926
926
|MPF_INVALID_FRAME_INTERVAL|An invalid or unsupported frame interval was received. |
@@ -935,6 +935,9 @@ Enum used to indicate the status of `getDetections` in a [`MPFComponentDetection
935
935
|MPF_INVALID_ROTATION|The component received a job that requests rotation of the media, but the rotation value given is not in the set of acceptable values. The set of acceptable values is {0, 90, 180, 270}.|
936
936
|MPF_MEMORY_ALLOCATION_FAILED|The component failed to allocate memory for any reason. |
937
937
|MPF_GPU_ERROR|The job was configured to execute on a GPU, but there was an issue with the GPU or no GPU was detected. |
938
+
|MPF_NETWORK_ERROR|The component failed to communicate with an external system over the network. The system may not be available or there may have been a timeout. |
939
+
|MPF_COULD_NOT_OPEN_MEDIA|The media file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI. |
940
+
|MPF_COULD_NOT_READ_MEDIA|There is a failure reading data from a successfully opened media file. |
| detection_properties |`dict[str, str]`| A dict with keys and values of type `str` containing optional additional information about the detected object. For best practice, keys should be in all CAPS. |
1073
1073
1074
1074
1075
+
# How to Report Errors
1076
+
The following is an example of how to throw an exception:
<td>The data file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI.</td>
1492
+
<td>The data file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI.<br><br>Use MPF_COULD_NOT_OPEN_MEDIA for media files.</td>
1493
1493
</tr>
1494
1494
<tr>
1495
1495
<td>MPF_COULD_NOT_READ_DATAFILE</td>
1496
-
<td>There is a failure reading data from a successfully opened input data file.</td>
1496
+
<td>There is a failure reading data from a successfully opened input data file.<br><br>Use MPF_COULD_NOT_READ_MEDIA for media files.</td>
1497
1497
</tr>
1498
1498
<tr>
1499
1499
<td>MPF_FILE_WRITE_ERROR</td>
1500
1500
<td>The component received a failure for any reason when attempting to write to a file.</td>
1501
1501
</tr>
1502
1502
<tr>
1503
1503
<td>MPF_IMAGE_READ_ERROR</td>
1504
-
<td>The component failed to read the image provided by the URI. For example, it might indicate the failure of a call to <code>MPFImageReader::GetImage()</code>, or <code>cv::imread()</code>.</td>
1504
+
<td>Use MPF_COULD_NOT_READ_MEDIA instead. This error is only kept for backwards compatibility and may be removed in a future release. <br><br><em>The component failed to read the image provided by the URI. For example, it might indicate the failure of a call to <code>MPFImageReader::GetImage()</code>, or <code>cv::imread()</code>.</em></td>
<td>The job was configured to execute on a GPU, but there was an issue with the GPU or no GPU was detected.</td>
1557
1557
</tr>
1558
+
<tr>
1559
+
<td>MPF_NETWORK_ERROR</td>
1560
+
<td>The component failed to communicate with an external system over the network. The system may not be available or there may have been a timeout.</td>
1561
+
</tr>
1562
+
<tr>
1563
+
<td>MPF_COULD_NOT_OPEN_MEDIA</td>
1564
+
<td>The media file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI.</td>
1565
+
</tr>
1566
+
<tr>
1567
+
<td>MPF_COULD_NOT_READ_MEDIA</td>
1568
+
<td>There is a failure reading data from a successfully opened media file.</td>
<td>The data file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI.</td>
1452
+
<td>The data file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI.<br><br>Use MPF_COULD_NOT_OPEN_MEDIA for media files.</td>
1453
1453
</tr>
1454
1454
<tr>
1455
1455
<td>MPF_COULD_NOT_READ_DATAFILE</td>
1456
-
<td>There is a failure reading data from a successfully opened input data file.</td>
1456
+
<td>There is a failure reading data from a successfully opened input data file.<br><br>Use MPF_COULD_NOT_READ_MEDIA for media files.</td>
1457
1457
</tr>
1458
1458
<tr>
1459
1459
<td>MPF_FILE_WRITE_ERROR</td>
1460
1460
<td>The component received a failure for any reason when attempting to write to a file.</td>
1461
1461
</tr>
1462
1462
<tr>
1463
1463
<td>MPF_IMAGE_READ_ERROR</td>
1464
-
<td>The component failed to read the image provided by the URI.</td>
1464
+
<td>Use MPF_COULD_NOT_READ_MEDIA instead. This error is only kept for backwards compatibility and may be removed in a future release. <br><br><em>The component failed to read the image provided by the URI.</em></td>
<td>The job was configured to execute on a GPU, but there was an issue with the GPU or no GPU was detected.</td>
1521
1521
</tr>
1522
+
<tr>
1523
+
<td>MPF_NETWORK_ERROR</td>
1524
+
<td>The component failed to communicate with an external system over the network. The system may not be available or there may have been a timeout.</td>
1525
+
</tr>
1526
+
<tr>
1527
+
<td>MPF_COULD_NOT_OPEN_MEDIA</td>
1528
+
<td>The media file to be processed could not be opened for any reason, such as a permissions failure, or an unreachable URI.</td>
1529
+
</tr>
1530
+
<tr>
1531
+
<td>MPF_COULD_NOT_READ_MEDIA</td>
1532
+
<td>There is a failure reading data from a successfully opened media file.</td>
0 commit comments