Adding an Equipment Abstraction Layer (HAL) is mandatory if you expect the underlying equipment to change over the life of the product. If done correctly, you can create unit tests for both sides of the HAL.
For example, HAL is just an API from your GUI to real display hardware. You can write a fake hardware driver that does not control the physical device but reacts differently to make sure your upper API levels process all possible response codes from the HAL. Perhaps it creates a bitmap in memory (instead of external I / O) that can be compared with the expected bitmap to see if it is displayed correctly.
Likewise, you can write unit test, which provides good HAL coverage from the upper levels, so you can check if your new hardware driver responds correctly. Using the display example, you view all possible screen modes, interface elements, scrolling methods, etc. Unfortunately, for this test you need to physically observe the display, but you can potentially work side by side with old equipment to see speed improvements or behavioral deviations.
Back to your example. How different is the switch to another video codec? You are still just pushing bytes on your upper layers. If you are implementing a well-known codec, it would be useful to have source files that act like a unit test (covering the full range of possible data formats) to ensure that your codec decodes and displays them correctly (no glitches!). Decoding to a bitmap in memory does a good unit test - you can just make memory compared to a raw compressed frame.
Hope this helps. If not, ask more questions.
source share