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

Optimize the entire program #7

Merged
merged 11 commits into from
Mar 25, 2024
Merged

Optimize the entire program #7

merged 11 commits into from
Mar 25, 2024

Conversation

cloudcloudskies
Copy link
Contributor

I tried to compile but got a bit long error, as I don't know how to fix..

@bemxio bemxio added the enhancement New feature or request label Mar 22, 2024
@bemxio bemxio assigned bemxio and cloudcloudskies and unassigned bemxio Mar 22, 2024
@bemxio
Copy link
Owner

bemxio commented Mar 22, 2024

thank you for your contribution! although, could you please explain the optimizations in your code? i am certainly not a C++ expert but i'd like to know what i can use that you utilized to write better code!

from what i can see though, you implemented error handling, however could you please make it trigger the BSOD instead of exiting out? if the code can't get and play the video, it would be nice for it to at least do the bare minimum by crashing Windows
also please try to write comments, or at least adapt my previous ones to your new code

also, what does that | do in the Makefile? does it make a difference in how it handles stuff? i never saw that being used

@cloudcloudskies
Copy link
Contributor Author

the | stands for and

@cloudcloudskies
Copy link
Contributor Author

i did those:
proper resource management to avoid memory leaks
smart pointers (std::unique_ptr) for DirectShow interfaces to ensure automatic resource cleanup
simplified exception handling using try-catch block to catch and display any exceptions that might occur during DirectShow initialization or video playback.

@cloudcloudskies
Copy link
Contributor Author

now bsod triggers when load failed

src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Show resolved Hide resolved
@bemxio
Copy link
Owner

bemxio commented Mar 23, 2024

i've made some comments, i tried to compile the current code and test it on Windows XP but gcc complained about TriggerBSOD being out-of-scope

@cloudcloudskies
Copy link
Contributor Author

oh
can you fix it btw? im a lil busy

@bemxio
Copy link
Owner

bemxio commented Mar 23, 2024

sure, once i have some free time i can fix and clean up some stuff

@cloudcloudskies
Copy link
Contributor Author

sure ty

@bemxio
Copy link
Owner

bemxio commented Mar 24, 2024

alright, i cleaned up the code, i had to remove the try-catch block because it actually caused issues, at least on Windows XP
check out stuff and tell me if it's ready to merge, i'll do that then and later on will create a new release

@cloudcloudskies
Copy link
Contributor Author

i think its ready to merge

@bemxio bemxio merged commit a61d134 into bemxio:main Mar 25, 2024
@bemxio
Copy link
Owner

bemxio commented Mar 25, 2024

alright then, thank you really much for your contribution! <3 it makes me happy to see someone get interested in my projects
have a nice day :)))

@cloudcloudskies
Copy link
Contributor Author

no problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants