Questions tagged [cobalt]

Cobalt is a lightweight HTML5/CSS/JS application container that is designed to provide a rich application development environment with minimal resource consumption (deployment size, RAM, CPU, GPU). At the same time, Cobalt enables a rich, low-latency user experience across a wide variety of platforms and devices.

Target audiences

Cobalt's documentation is written with two audiences in mind:

Porters enable Cobalt to work on other platforms by using Starboard, Cobalt's porting layer and OS abstraction, to implement the platform-specific functionality that Cobalt uses. Each Starboard module (memory, socket, thread, etc.) defines functions that must be implemented for the porter's platform.

Developers want to build applications in familiar environments with advanced debugging tools without having to worry about compatibility with a highly fragmented set of browsers. At the same time, they want to have full control over their codebase so that they can ship features for constrained platforms, like TVs, on time and without technical risk.

Benefits of Cobalt

Cobalt significantly reduces the cost of supporting a browser on non-standard and resource-constrained platforms. In addition, since Cobalt operates at a consolidated, versioned platform abstraction layer, its porting effort is man-weeks, and subsequent rebases are near-free.

These are some other benefits that Cobalt provides:

More platforms

Cobalt does not require platforms to support JIT compilation and can run on platforms that disallow execution of dynamically generated code. Cobalt is a single-process application and does not rely on the ability to spawn multiple processes. Cobalt precompiles a set of shaders that are sufficient to express all graphical effects, thereby accommodating platforms that cannot compile shaders at runtime. Cobalt requires a compliant C++03 compiler, allowing it to reach platforms with legacy toolchains. Small footprint

Cobalt is optimized for memory. Its surface cache never exceeds a predefined budget, and it never creates duplicate layers, reducing the likelihood of out-of-memory crashes. Cobalt's small binary is designed to take up as little space as possible. By supporting a subset of HTML5/CSS/JS, Cobalt's reduced package size even allows bundling of CJK fonts on low-end devices. Reduced input latency

Cobalt produces consistent 60FPS animations by only supporting animation of properties that don't affect layout, like transform, and always running animations on a separate thread. Cobalt is optimized to run on single-core CPUs, resulting in better input latency since the renderer and resource loader do not compete with layout operations. On platforms that support GLES2, Cobalt avoids CPU painting by performing almost all rendering operations on the GPU.

References:

1.1 Overview & Source http://youtube.github.io/cobalt/overview.html

1.2 Porting http://youtube.github.io/cobalt/starboard/porting.html

1.3 Develop http://youtube.github.io/cobalt/development/setup-linux.html

1.4 Supporting Features http://youtube.github.io/cobalt/development/reference/supported-features.html

1.5 Testing http://youtube.github.io/cobalt/starboard/testing.html

1.6 Source Code https://cobalt.googlesource.com/cobalt/

1.7 h5vcc https://github.com/youtube/h5vcc

1.8 Build in linux https://cobalt.googlesource.com/cobalt/+/e9b4b99dab6e774b8b6e63add74c352cc5dd395a/src/README.md#Building-and-Running-the-Code

215 questions
0
votes
1 answer

The key value expired during drm development

The key value expired during drm development, so I called back using SbDrmSessionUpdateRequestFunc, 'LOG (ERROR) << "Unknown session update request ticket:" << ticket << "." A log will appear. Why is this log coming out? Is the session_id value…
0
votes
1 answer

About DRM flow, how to pass message to provisioning server?

In starboard DRM API (src/starboard/drm.h), there seems no flow to handle Widevine device certificate request with provisioning server? In my starboard DRM module, should I perform "HTTP POST" directly to provisioning server? Thanks for your reply
Jeunder
  • 33
  • 4
0
votes
2 answers

No 'seek_preroll' and 'codec_delay' in audio header

When SB_API_VERSION is not less than SB_AUDIO_SPECIFIC_CONFIG_AS_POINTER, 'codec private' for Opus has been passed to starboard. But I am not very sure whether the audio sample was preprocessed with 'codec delay' and 'seek preroll', is it…
Ceri Ruan
  • 13
  • 3
0
votes
1 answer

cobalt can't render "awebp.html" properly

as previous question, you tell us we can test the pre-certification by https://qual-e.appspot.com/awebp.html. currently we can see the scrolling issue you had specified. we also see another issue that focused GIF item will render nothing,white…
0
votes
1 answer

The renderer thread don't call SbDecodeTargetGetInfo() while playing 360 video

While testing 360 video on our device with cobalt, the application renderer thread will call function SbPlayerGetCurrentFrame() frequently, but there is no SbDecodeTargetGetInfo() and SbDecodeTargetRelease() even we returned SbDecodeTarget object by…
Kai Wang
  • 25
  • 5
0
votes
1 answer

pre-certification, cobalt can't render webp page

For YouTube pre-certification, cobalt needs to render some pages that YouTube assigned. We test the three commands below: ./cobalt --url=http://www.gstatic.com/webp/gallery/1.webp --allow_http --csp_mode=disable ./cobalt…
0
votes
1 answer

Does Cobalt support webm progressive playback

It seems that MediaSource and Progressive playback use the different demuxer. ChunkDemuxer is used for MediaSource, ShellDemuxer is used for Progressive playback. In ShellParser.cpp implementation: PipelineStatus ShellParser::Construct( …
0
votes
2 answers

The javascript "ended" event can not be triggered in Cobalt

On our platform, the test case "18. MediaElementEvents" in "http://qual-e.appspot.com/ " fail due to "ended" can not be triggered in Cobalt The following js code in conformanceTest-20170531180007.js: media.addEventListener('ended', function()…
0
votes
1 answer

Does Cobalt renderer thread support a fix resolution video frame when playing 360 Video in seamless

We are going to implement 360 Video(Spherical Video) on our device, our video output resolution should be set while creating the player. As I know, 360 Video will only display part of the video. Is it OK for Cobalt renderer thread that the video…
Kai Wang
  • 25
  • 5
0
votes
1 answer

Cobalt may pass a mismatched key from SbDrmUpdateSession()

We call SbDrmSessionUpdateRequestFunc() to request license, then CDM tries to parse keys from the string in SbDrmUpdateSession(const void* key), but an error occurs in CDM. And we check the code in CDM, it is dued to unmatched format when parsing…
Ceri Ruan
  • 13
  • 3
0
votes
1 answer

Key expiration while playing purchased video

I had ported Widevine CDM to cobalt RELEASE_9 branch. Playback of purchased video very well in beginning of 5 minutes. After 5 minutes, decrypt failed, the reason is key expiration. After review DRM related API in starboard, I have two…
Jeunder
  • 33
  • 4
0
votes
1 answer

cobalt(RELEASE 9,gold) render Conformance of qual-e page only, other not

We build cobalt that is official release and branch is RELEASE 9 with gold. Cobalt can render qual-e page and we can enter Conformance item. But other items can not render. After a mouse click, nothing happens. So we built a cobalt RELEASE 9 with…
0
votes
1 answer

Media source vs. progressive media in Cobalt port

My port of cobalt is currently not able to play live streams on Youtube. I always receive the "Playback Error" page. After some investigation, it seems that in the HTMLMediaElement::LoadResource, we always try to call LoadProgressive whereas the…
deji202
  • 5
  • 2
0
votes
1 answer

During the development of widevine in cobalt

current state During the development of widevine in cobalt, I put the libwidevine_cdm_shared.so file into cobalt and the following problem occurred. libprotobuf FATAL ../../third_party/protobuf/src/google/protobuf/stubs/common.cc:89] This…
joshua787
  • 11
  • 6
0
votes
1 answer

how to link to unit-tests/2017.html?

we test Youtube qual-e with cobalt RELEASE_9. we see the default MSE testing is 2018.html but desktop version is 2017.html. we found Youtube qual-e JS (navigation.js) will check application(navigator.userAgent) to redirect target address. do you…