The general player structure diagram shown in Figure 1, to be able to port a full-featured open source playback, combined with my successful porting GStreamer and VLC to Novatek 667 platform experience, must consider all the modules in Figure 1 migration. The figure of vendor represents the equipment manufacturers, SOC represents the chip manufacturers.
Figure 1 general structure of the player
The following is a combination of Linux and Android platform Vlc,gstreamer porting experience, introduce the Linux and Android platform under the porting scheme. 1. Porting under the Linux platform
The porting of Linux platforms is shown in Figure 2: 1.1 support for soft decoding
If you need to support the software decoding scheme, as shown in Figure 2, the video render module needs to focus on, for VLC, can be used SDL+DIRECTFB, can also be directly used DIRECTFB. I am in the Novatek platform, the use is DIRECTFB to show the video, for GStreamer, the use of Directfbvideosink can be. Audio render uses the ALSA module for the output of the sound, the general chip platform can be supported. 1.2 Hardware decoding support
As shown in Figure 1, if you support hardware decoding on a Linux platform, either porting VLC or gstreamer, you need to write the decoder plugin, where the VLC decoder plugin is relatively straightforward. VLC, GStreamer and other open-source players do not consider the video layer and the OSD layer problem, all the video and subtitles, graphics and text after decoding, after the overlay (overlay), the OSD layer is displayed. However, for set-top boxes and smart TVs, for efficiency, video is generally displayed in the video layer, and graphics and subtitles are generally displayed in the OSD layer. Therefore, if you consider the efficiency issue, you also need to modify the render plug-in
Figure 2 vlc&gst Linux Migration
2. Porting under the Android platform
2.1 Scenario One: Decoder interface privatization customization, the decoder interface is consistent with the Linux platform
Figure 3 Vlc&gst Android transplant scenario One
Advantages:
Linux Android platform can unify a set of code, high efficiency, can support high bitrate video playback.
Disadvantages:
Relatively strong platform correlation, poor cross-platform 2.2 scenario two:: Decoder based on OMX Development (ACODEC)
Advantages:
Decoder interface is relatively standard, the development speed is fast, the cross-platform is good.
Disadvantages:
Low efficiency for zooming, converting, and displaying video images on surface view
Figure 4 Vlc&gst Android Migration Scenario II
2.3 Scenario Three: Decoder is developed based on OMX, but the decoded data is output directly from the bottom to the scale and render module (refer to the STG code of the Novatek platform Novatek)
Advantages:
Decoder interface is relatively standard, high efficiency, cross-platform generally.
Disadvantages:
The decoded data output is non-standard and needs to be customized for the scale and display interface.
Figure 5 Vlc&gst Android Transplant Scenario III
3. Conclusion
Because the current x86 Linux and Android platform does not have the concept of video layer, whether it is video or pictures are displayed in the OSD layer, and through the OSD layer to achieve video and image scaling. Both Android and Linux platform open source players are developed on this basis, many device manufacturers do not implement OMX's hardware render interface. As a result, there is currently no perfect player implementation in TV and STB: the interface with the platform is standardized and highly efficient. Therefore, based on the above realities, in the choice of options, must have a choice.