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

Some growing file improvements #90

Merged
merged 4 commits into from
Sep 10, 2024
Merged

Conversation

philipnbbc
Copy link
Collaborator

Following issue reported in #87

A growing file may change the num samples when making the same request
for a frame. E.g. the previous request may have returned 0 samples.
@donkon
Copy link

donkon commented Sep 9, 2024

First test looks good

Minor issue:

ERROR: 'num_read == len' check failed048KiB time=00:00:03.76 bitrate=4462.1kbits/s speed=0.0325x    
ERROR:     near bmx/src/mxf_reader/EssenceReader.cpp:641

is still printed out (even with --single-pass), is there a way to get rid of this kind of error logs?

Set the the MXF reader's mReadErrorMessage when less essence data is
read from a file than was requested, but don't log the error.
This avoids it being logged when reading a growing file where a later
attempt succeeds.

Note that this doesn't prevent non-essence read errors, e.g other KLVs.
@philipnbbc
Copy link
Collaborator Author

Minor issue:

ERROR: 'num_read == len' check failed048KiB time=00:00:03.76 bitrate=4462.1kbits/s speed=0.0325x    
ERROR:     near bmx/src/mxf_reader/EssenceReader.cpp:641

is still printed out (even with --single-pass), is there a way to get rid of this kind of error logs?

I've added 7f27a4e that should avoid that error being printed. This only covers errors when reading essence data, which is the most likely error to happen if essence is large compared to the other KLV.

There are other lower-level KLV errors that could occur that will still be logged because that's a limitation of libMXF/libMXF++. libMXF functions log errors and return a 0. Ideally libMXF would've had something similar to ferror/errno to propagate I/O errors up to clients which can decide to log it or not.

Copy link

@donkon donkon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything fine

@philipnbbc philipnbbc merged commit 16fdf39 into main Sep 10, 2024
10 checks passed
@philipnbbc philipnbbc deleted the philipn-growing-file-improvements branch September 10, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants