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

Encapsulate video support with compilation variable EXV_ENABLE_VIDEO #2448

Merged
merged 8 commits into from
Jan 4, 2023

Conversation

mohamedchebbii
Copy link
Contributor

@mohamedchebbii mohamedchebbii commented Jan 1, 2023

Hello @everybody ,
I added a compilation variable to encapsulate the video support EXV_ENABLE_VIDEO.
Please advise If we should add It or not , otherwise If you judge that is not necessary, don't hesitate to reject this pull request.
Regards

@benmccann
Copy link
Contributor

What's the motivation for the flag? Why wouldn't we have video support always enabled?

@mohamedchebbii
Copy link
Contributor Author

What's the motivation for the flag? Why wouldn't we have video support always enabled?

just like support for png (EXV_HAVE_LIBZ) or BMF support (EXV_ENABLE_BMFF) ... It seems that every major functionality is encapsulated with a compilation variable. I believe that goal is to let the user choose which functionality should be included in his compiled binary...

@neheb neheb mentioned this pull request Jan 1, 2023
@sridharb1
Copy link
Collaborator

What's the motivation for the flag? Why wouldn't we have video support always enabled?

just like support for png (EXV_HAVE_LIBZ) or BMF support (EXV_ENABLE_BMFF) ... It seems that every major functionality is encapsulated with a compilation variable. I believe that goal is to let the user choose which functionality should be included in his compiled binary...

Wasn't video support taken out in 0.27 because it was not "substantial" and/or not being used? I like what has been done here, but the original motivation in removing video support must be revisited to understand why it was done.

Copy link
Collaborator

@piponazo piponazo left a comment

Choose a reason for hiding this comment

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

There is some missing place where you should also deactivate some tests. Right now we have some CI jobs failing with this:

======================================================================
ERROR: small_video.mp4_test (test_regression_allfiles.TestAllFiles)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/exiv2/exiv2/tests/regression_tests/test_regression_allfiles.py", line 186, in test_func
    BT.reportTest(os.path.basename(filename), out)
  File "/home/runner/work/exiv2/exiv2/tests/bash_tests/utils.py", line 567, in reportTest
    raise RuntimeError('\n' + log.to_str())
RuntimeError: 
Error:  The output of the testcase mismatch the reference
[INFO] The output has been saved to file /home/runner/work/exiv2/exiv2/test/tmp/small_video.mp4.out

I think it is a good idea to add this option to the CMake code, since we could consider the video support experimental and only useful to a handful of users. Since we merged back to main the video support, the fuzzers are now reporting some issues with the code. Therefore, I think we should disable it by default in our release jobs.

unitTests/test_asfvideo.cpp Outdated Show resolved Hide resolved
@postscript-dev
Copy link
Collaborator

@sridharb1

I like what has been done here, but the original motivation in removing video support must be revisited to understand why it was done.

The main reason was Robin planning to retire and a lack of contributors to the project. I think I also remember reading that the video code was not being updated to support new video formats and standards.

Since then, more contributors have come forward which has improved the situation. However, as the project has no employees, the work is still completed in volunteer's free time. More contributors would be appreciated.

See the discussion in #1748.

@codecov
Copy link

codecov bot commented Jan 2, 2023

Codecov Report

Merging #2448 (fb05d7a) into main (f981c51) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2448   +/-   ##
=======================================
  Coverage   62.10%   62.10%           
=======================================
  Files         122      122           
  Lines       22937    22940    +3     
  Branches    11244    11245    +1     
=======================================
+ Hits        14245    14248    +3     
  Misses       6475     6475           
  Partials     2217     2217           
Impacted Files Coverage Δ
src/asfvideo.cpp 4.01% <ø> (ø)
src/image.cpp 71.51% <ø> (ø)
src/matroskavideo.cpp 4.08% <ø> (ø)
src/quicktimevideo.cpp 59.11% <ø> (ø)
src/riffvideo.cpp 2.83% <ø> (ø)
src/version.cpp 88.50% <100.00%> (+0.20%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

CMakePresets.json Outdated Show resolved Hide resolved
@neheb
Copy link
Collaborator

neheb commented Jan 3, 2023

@sridharb1 gerbera (a upnp server) has support for exiv2 (disabled by default) and it would be great to add support for reading tags from matroska files. libmatroska is not ideal for this purpose.

@sridharb1
Copy link
Collaborator

@sridharb1 gerbera (a upnp server) has support for exiv2 (disabled by default) and it would be great to add support for reading tags from matroska files. libmatroska is not ideal for this purpose.

I am all for adding video support because it is high time that exiv2 supports video. I realize that video support will have to be coded and that requires volunteers. If gerbera or other such projects would like to contribute video support, that should be welcome. In another thread, it was proposed that these additional support be done in the main/trunk so as to not destabilize current releases until it is deemed stable for production purposes. Agreed.

@mohamedchebbii
Copy link
Contributor Author

Hello @piponazo ,
I have two Ci test failing :
Win10 Arch: x64 BuildType:Debug - SHARED:ON
MSYS2 UCRT64 - BuildType:Debug - SHARED:ON
It seems there an issue to connect to a http server : Error: raise RuntimeError('Failed to run the HTTP server')
I'm not sure It is linked to my dev.
Could you advise please ?

@piponazo
Copy link
Collaborator

piponazo commented Jan 3, 2023

It seems there an issue to connect to a http server : Error: raise RuntimeError('Failed to run the HTTP server')

Those are flaky tests (tests that fail from time to time in CI due to a dependency of the tests on time). I just re-triggered them and hopefully they should pass :)

@piponazo piponazo self-requested a review January 3, 2023 17:27
Copy link
Collaborator

@piponazo piponazo left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

I am happy with the current way in which we are handling that new variable, but there is one important workflow in which you forgot to enable the VIDEO option:

.github/workflows/on_PR_linux_fuzz.yml

This is one of the most important ones, because we would like to analyze with the fuzzers defects on that area of the code.

@1div0
Copy link
Collaborator

1div0 commented Jan 3, 2023

Video metadata support is very hard. Just look at the FFmpeg evolution. Anyway thank you so much for the contribution. And HNY++

@piponazo piponazo self-requested a review January 4, 2023 11:47
@piponazo piponazo merged commit 1c76435 into Exiv2:main Jan 4, 2023
@mohamedchebbii mohamedchebbii deleted the EXV_ENABLE_VIDEO branch January 6, 2023 21:08
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.

7 participants