Second part of refactoring changes
This set of changes is about two things:
- First, obvious follow-up to a first batch of changes, like removal of old transcode() function implementation, removing code that is no longer needed because only old transcode() used it, and so on and so forth
- Second, I was focusing on input/output sanitisation. The idea was to take bits and pieces of code that was scattered here and there, and slowly push it towards single open_input/close_input and open_output/close_output functions. It was surprisingly hard to achieve, and there were a lot of edge cases but it is done now. Justification for this approach was not only generic "make code better" angle of approach, but also a need to create groundwork for LL changes. Basically, if we are to plug into FFmpeg I/O internals it is so much easier to do if there is reasonable, single I/O flow to begin with.
LGTM overall, great work @MikeIndiaAlpha!
Thanks! I hope it will be downhill from now on.
someone could do it on Darwin as well (just in case, there shouldn't be any platform-related issues).
You mean macOS, right? My primary development machine is MBP with Monterey and so I am testing on it. Unfortunately it is positively ancient, 2015 model so Intel not Apple silicon. But as you say, there shouldn't be platform related issues wrt my changes. Also tested on WSL2 on my other machine with Nvidia card.
Minor nitpick, please reword or remove TODOs and pronounces from comments, since it's open source and visible for anyone. Maybe move some of longer and more useful explanations elsewhere. Options, which we used to store additional > code-related details before, are:
This is just the way I work, but you're right, it doesn't look pretty. Not that spaghetti code looks pretty :P
Hey, what is the status of this?
@chrishobcroft it's an important piece of work addressing some of the tech debt in lpms. It's ready to be merged, but has no owner. One would need to make sure the tests are still passing with current version of go-livepeer, and then follow up in case of any unforeseen issues.
Hey, @MikeIndiaAlpha is there some way I can work with you to get this merged?
@chrishobcroft Sorry, I did this when I was employed by Livepeer and working on LPMS refactoring was my duty. I left the Livepeer around August last year, so you have to work with Livepeer team and not me. Good luck!
Closing due to https://github.com/livepeer/lpms/pull/410