AST-Based Media Plugin Compilation for Cross-Platform Deployment

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Developing a media player or plugin that can be deployed across multiple hardware/software platforms without the need for manual development, porting, or compilation for each platform, due to the diversity of screen sizes, audio formats, video formats, and streaming protocols in personal/mobile electronic devices.

Innovation Solution

Writing plugin or player code in a high-level language and converting it into an intermediate format representation, such as an abstract syntax tree (AST), which is then streamed to devices for platform-specific compilation, allowing for just-in-time compilation into native code that matches the platform's 'look and feel', without relying on virtual machines or interpreters.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If plugin code is written in a high-level language and converted to intermediate format representation, then deployment across multiple platforms is enabled without manual porting, but compilation and translation overhead is introduced

Engineering Contradiction:
Improveplatform compatibilityVSAvoidcompilation time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The source code is pre-compiled into an intermediate format representation (such as bytecode or assembly) during the build process, so that when the plugin is deployed to different platforms, the intermediate code is already prepared and only requires minimal platform-specific translation rather than full compilation from source. This preliminary action reduces the compilation time experienced by end users across different platforms.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

An intermediate format representation serves as a mediator between the high-level source code and platform-specific native code. This intermediate representation can be universally generated from source code once, then translated to various platform-specific formats as needed, eliminating the need to manually port code to each platform while avoiding the need to recompile from source on each platform.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If virtual machines or interpreters are used to execute plugin code, then platform independence is achieved, but performance degradation occurs due to layer of indirection

Engineering Contradiction:
Improveplatform independenceVSAvoidexecution performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

Instead of using a virtual machine or interpreter that adds a layer of indirection, the system generates platform-specific copies of the plugin code tailored to each target platform's native architecture. These copies are optimized for their respective platforms and execute directly without interpretation overhead, achieving both platform independence and native performance.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent replaces the mechanical system of virtual machine interpretation or bytecode execution with direct native code execution. By substituting the interpretation layer with platform-specific compiled code, the system eliminates the performance penalty associated with virtual machines while maintaining the ability to deploy across multiple platforms.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Manufacturing precision

If manual development and porting is performed for each platform, then platform-specific optimization is achieved, but development complexity and time increase significantly

Engineering Contradiction:
Improveplatform-specific optimizationVSAvoiddevelopment process complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The build system is designed to be universal, capable of generating platform-specific optimized code from a single source codebase. The same build infrastructure can target multiple platforms (Windows, Linux, macOS, mobile devices) by automatically applying the appropriate compilation flags and configuration settings, eliminating the need for separate manual development processes for each platform.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system achieves platform-specific optimization by changing compilation parameters such as optimization flags, target architecture settings, and platform-specific libraries during the build process, rather than requiring different source code for each platform. This allows a single source codebase to generate optimized binaries for multiple platforms with different performance requirements.

Inventive Principle:
Principle #35Parameter changes

4Ease of manufacture

If plugin updates are deployed by requiring users to download new player versions, then version control is simplified, but user convenience and update speed decrease

Engineering Contradiction:
Improveversion managementVSAvoidupdate convenience
Core Design Contradiction:
Ease of manufactureVSEase of operation

Solution Approach 1:

The plugin is segmented as a separate, independently updatable component from the main player application. This allows the plugin to be updated and distributed separately without requiring users to download and install new versions of the entire player application. The segmented architecture enables granular updates that are faster and more convenient for users while maintaining version control.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Plugin updates are prepared in advance as pre-compiled intermediate format representations or platform-specific binaries, allowing for rapid deployment. When an update is needed, the updated plugin can be distributed quickly without requiring a full player re-release, and the update process is streamlined through preliminary preparation of the update package.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10305956B2Systems and methods of communicating platform-independent representation of source code
Publication Date: 2019.05.28 WOWZA MEDIA SYSTEMS LLC
  • US10305956B2 patent drawing
  • US10305956B2 patent drawing
  • US10305956B2 patent drawing

AI summary

A computing device includes a processor and a memory storing a media player. The media player is executable to cause the processor to, during playback of a media stream, receive an abstract syntax tree (AST) in the media stream, invoke a compiler to compile the AST to generate a platform-specific component, and execute the platform-specific component.