The Tizen WASM Video Decoder sample application shows how to use Tizen WASM Video Decoder to play media on a Samsung device using a WebAssembly module.
This application is an extension to the Tizen WASM Player Sample Application. It illustrates how to extend an existing WASM Player application to achieve decoding video frames to GL texture functionality.
The emss_sdf_sample.h and emss_sdf_sample.cc files have been copied from the wasm_player_sample application and are used only to manage playback in media player.
Video Decoder logic is located in the video_decoder_sdf_sample.h and video_decoder_sdf_sample.cc files.
The sample application's features are:
Elementary media stream playback using HTMLMediaElement with an ElementaryMediaStreamSource data source and kVideoTexture rendering mode
NoteThis step is required, because code loading for modularized and non-modularized WebAssembly modules differs slightly. The EMSS Sample application is prepared to load modules that do not use the MODULARIZE option.
click "Apply and Close".
Build the project:
Right-click the VideoDecoderSampleModule project in "Project Explorer".
Click "Build Project" in the context menu.
Create an application package:
Right-click the VideoDecoderSampleModule project in "Project Explorer".
Click "Build Signed Package" in the context menu.
The application is ready to use!
Required Samsung Emscripten SDK Flags
The table below explains Emscripten-specific build flags required to build this sample:
Flag
Description
-s ENVIRONMENT_MAY_BE_TIZEN
Enables usage of Samsung Emscripten SDK extensions available on Tizen devices. This flag is required to use Elementary Media Stream Source.
-pthread -s USE_PTHREADS=1
Enables usage of threads in WebAssembly module.
-s PTHREAD_POOL_SIZE=1
Prepares the WebAssembly module to start the indicated number of threads. It is important to set this parameter to the maximum number of threads that an application uses; otherwise starting new threads can fail. For more information, see pthreads in the Emscripten documentation.
Table 1. Required Samsung Emscripten SDK Flags
Manage Your Cookies
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.