Video Converter :

In this example , the facade design pattern is used to separate the file according to .mpeg or .ogg extension using Facade class and processed the separated file using related Subsystem classes.

In the main method of Demo class, VideoConversionFacade class is instantiated and its connectVideo method of VideoConversionFacade object is called. In the connectVideo method, OggCompressionCodec or MPEG4CompressionCodec class is instantiated according to the passing format parameter value. In addition to that, other auxiliary Subsystem classes such as BitrateReader, AudioMixer, VideoFile, and CodecFactory are initiated and their necessary methods are called.

The generated java code of the video converter case study is below.

Facade-2.pdf