Skip to content

Commit c166a1c

Browse files
authored
Remove unused and redundant component error codes (#109)
1 parent e6523d7 commit c166a1c

3 files changed

Lines changed: 1 addition & 26 deletions

File tree

detection/api/include/MPFDetectionObjects.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,14 @@ namespace MPF { namespace COMPONENT {
4444
MPF_DETECTION_SUCCESS = 0,
4545
MPF_OTHER_DETECTION_ERROR_TYPE,
4646
MPF_DETECTION_NOT_INITIALIZED,
47-
MPF_UNRECOGNIZED_DATA_TYPE,
4847
MPF_UNSUPPORTED_DATA_TYPE,
49-
MPF_INVALID_DATAFILE_URI,
5048
MPF_COULD_NOT_OPEN_DATAFILE,
5149
MPF_COULD_NOT_READ_DATAFILE,
5250
MPF_FILE_WRITE_ERROR,
53-
MPF_IMAGE_READ_ERROR,
5451
MPF_BAD_FRAME_SIZE,
55-
MPF_BOUNDING_BOX_SIZE_ERROR,
56-
MPF_INVALID_FRAME_INTERVAL,
57-
MPF_INVALID_START_FRAME,
58-
MPF_INVALID_STOP_FRAME,
5952
MPF_DETECTION_FAILED,
60-
MPF_DETECTION_TRACKING_FAILED,
6153
MPF_INVALID_PROPERTY,
6254
MPF_MISSING_PROPERTY,
63-
MPF_PROPERTY_IS_NOT_INT,
64-
MPF_PROPERTY_IS_NOT_FLOAT,
65-
MPF_INVALID_ROTATION,
6655
MPF_MEMORY_ALLOCATION_FAILED,
6756
MPF_GPU_ERROR,
6857
MPF_NETWORK_ERROR,

detection/examples/VideoCaptureComponent/VideoCaptureComponent.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,6 @@ std::vector<MPFVideoTrack> VideoCaptureComponent::GetDetections(const MPFVideoJo
9595
int total_frames = cap.GetFrameCount();
9696
std::cout << "Total video frames: " << total_frames << std::endl;
9797

98-
// Make sure the start and stop frames defined for this segment is
99-
// not beyond the end of the video.
100-
if (job.start_frame >= total_frames) {
101-
std::cout << "Requested start_frame is greater than the number of frames in the video" << std::endl;
102-
throw MPFDetectionException(MPF_INVALID_START_FRAME,
103-
"Requested start_frame is greater than the number of frames in the video");
104-
}
105-
106-
if (job.stop_frame >= total_frames) {
107-
std::cout << "Requested stop_frame is greater than the number of frames in the video" << std::endl;
108-
throw MPFDetectionException(MPF_INVALID_STOP_FRAME,
109-
"Requested stop_frame is greater than the number of frames in the video");
110-
}
111-
11298
double fps = cap.GetFrameRate();
11399
std::cout << "Video frame rate: " << fps << std::endl;
114100

detection/examples/VideoCaptureComponent/sample_video_capture_component.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc, char* argv[]) {
5656

5757
if ((start_frame < 0) || (stop_frame <= start_frame)) {
5858
std::cerr << "Start frame must be greater than or equal 0, and stop_frame must be greater than start_frame" << std::endl;
59-
return MPF_INVALID_STOP_FRAME;
59+
return EXIT_FAILURE;
6060
}
6161

6262
// Requests for frame transformations are passed to the component

0 commit comments

Comments
 (0)