diff --git a/src/third_party/starboard/rdk/arm/gyp_configuration.py b/src/third_party/starboard/rdk/arm/gyp_configuration.py
index c189893..5cc850a 100644
--- a/src/third_party/starboard/rdk/arm/gyp_configuration.py
+++ b/src/third_party/starboard/rdk/arm/gyp_configuration.py
@@ -47,6 +47,7 @@ class RDKPlatformConfig(platform_configuration.PlatformConfiguration):
super(RDKPlatformConfig, self).__init__(platform)
self.has_ocdm = os.environ.get('COBALT_HAS_OCDM', '0')
+ self.ocdm_library_name = os.environ.get('COBALT_OCDM_LIBRARY_NAME', 'ocdm')
self.sabi_json_path = 'starboard/sabi/arm/%s/sabi-v13.json' % (os.environ.get('COBALT_ARM_CALLCONVENTION', 'hardfp'))
self.enable_evergreen_lite = os.environ.get('COBALT_EVERGREEN_LITE', '0')
self.sysroot = os.path.realpath(os.environ.get('PKG_CONFIG_SYSROOT_DIR', '/'))
@@ -66,6 +67,7 @@ class RDKPlatformConfig(platform_configuration.PlatformConfiguration):
'clang': 0,
'sysroot': self.sysroot,
'has_ocdm': self.has_ocdm,
+ 'ocdm_library_name': self.ocdm_library_name'sb_evergreen_compatible': self.enable_evergreen_lite,
'sb_evergreen_compatible_lite':self.enable_evergreen_lite,
'sb_evergreen_compatible_libunwind': self.enable_evergreen_lite,
diff --git a/src/third_party/starboard/rdk/brcm/arm/gyp_configuration.py b/src/third_party/starboard/rdk/brcm/arm/gyp_configuration.py
index 0d99905..8525232 100644
--- a/src/third_party/starboard/rdk/brcm/arm/gyp_configuration.py
+++ b/src/third_party/starboard/rdk/brcm/arm/gyp_configuration.py
@@ -47,6 +47,7 @@ class RDKPlatformConfig(platform_configuration.PlatformConfiguration):
super(RDKPlatformConfig, self).__init__(platform)
self.has_ocdm = os.environ.get('COBALT_HAS_OCDM', '0')
+ self.ocdm_library_name = os.environ.get('COBALT_OCDM_LIBRARY_NAME', 'ocdm')
self.sabi_json_path = 'starboard/sabi/arm/%s/sabi-v13.json' % (os.environ.get('COBALT_ARM_CALLCONVENTION', 'hardfp'))
self.sysroot = os.path.realpath(os.environ.get('PKG_CONFIG_SYSROOT_DIR', '/'))
self.AppendApplicationConfigurationPath(os.path.dirname(__file__))
@@ -65,6 +66,7 @@ class RDKPlatformConfig(platform_configuration.PlatformConfiguration):
'clang': 0,
PlayerImpl* self) {
- if (GST_IS_BASE_SINK(element)) {
- static bool disable_wait_video = !!getenv("COBALT_AML_DISABLE_WAIT_VIDEO");
- bool has_video = (self->video_codec_ != kSbMediaVideoCodecNone);
- if (has_video && g_str_has_prefix(GST_ELEMENT_NAME(element), "amlhalasink") && !disable_wait_
video) {
- g_object_set(element, "wait-video", TRUE, "a-wait-timeout", 4000, nullptr);
+ if (!self->max_video_capabilities_.empty() && g_str_has_prefix(GST_ELEMENT_NAME(element), "rial
tomsevideosink")) {
+ uint32_t width = 0;
+ uint32_t height = 0;
+ ParseMaxVideoCapabilities(self->max_video_capabilities_.c_str(), &width, &height, nullptr);
+ if (0 != width){
+ if (g_object_class_find_property(G_OBJECT_GET_CLASS(element), "maxVideoWidth")) {
+ GST_INFO("Setting rialtomsevideosink maxVideoWidth to %u", width);
+ | 'sysroot': self.sysroot,
g_object_set(element, "maxVideoWidth", width, nullptr);
+ }
| 'has_ocdm': self.has_ocdm,
+ 'ocdm_library_name': self.ocdm_library_name,
})
variables.update({
&& g_str_has_prefix(GST_ELEMENT_NAME(element), "westerossink")) {
- | 'cobalt_font_package': 'limited',
diff --git a/src/third_party/starboard/rdk/rpi/gyp_configuration.py b/src/third_party/starboard/rdk/rpi/gyp_configuration.py
index b0081b6..918ecd7 100644
--- a/src/third_party/starboard/rdk/rpi/gyp_configuration.py
+++ b/src/third_party/starboard/rdk/rpi/gyp_configuration.py
@@ -47,6 +47,7 @@ class RDKPlatformConfig(platform_configuration.PlatformConfiguration):
super(RDKPlatformConfig, self).__init__(platform)
self.has_ocdm = os.environ.get('COBALT_HAS_OCDM', '0')
+ self.ocdm_library_name = os.environ.get('COBALT_OCDM_LIBRARY_NAME', 'ocdm')
self.sabi_json_path = 'starboard/sabi/arm/%s/sabi-v13.json' % (os.environ.get('COBALT_ARM_CALLCONVENTION', 'hardfp'))
self.sysroot = os.path.realpath(os.environ.get('PKG_CONFIG_SYSROOT_DIR', '/'))
self.AppendApplicationConfigurationPath(os.path.dirname(__file__))
@@ -65,6 +66,7 @@ class RDKPlatformConfig(platform_configuration.PlatformConfiguration):
'clang': 0,
'sysroot': self.sysroot,
'has_ocdm': self.has_ocdm,
+ 'ocdm_library_name': self.ocdm_library_name,
})
variables.update({
'cobalt_font_package': 'limited',
diff --git a/src/third_party/starboard/rdk/shared/media/gst_media_utils.cc b/src/third_party/starboard/rdk/shared/media/gst_media_utils.cc
index 934c5c8..5182351 100644
--- a/src/third_party/starboard/rdk/shared/media/gst_media_utils.cc
+++ b/src/third_party/starboard/rdk/shared/media/gst_media_utils.cc
@@ -203,8 +203,17 @@ std::vector<std::string> CodecToGstCaps(SbMediaAudioCodec codec,
}
case kSbMediaAudioCodecAc3:
- case kSbMediaAudioCodecEac3:
- return {{"audio/x-eac3"}};
+ case kSbMediaAudioCodecEac3:{
+ std::string primary_caps = "audio/x-eac3";
+ if (info) {
+ primary_caps +=if (g_object_class_find_property(G_OBJECT_GET_CLASS(element), "zoom-mode")) {
- GST_INFO("Setting westerossink zoom-mode to 0");
- g_object_set(element, "zoom-mode", 0, nullptr);
+ if (0 != height){
+ if (g_object_class_find_property(G_OBJECT_GET_CLASS(element), "maxVideoHeight")) {
+ GST_INFO("Setting rialtomsevideosink maxVideoHeight to %u", height);
+ g_object_set(element, "maxVideoHeight", height, nullptr);
}
- g_signal_connect_swapped(
- G_OBJECT(element), "buffer-underflow-callback",
- G_CALLBACK(OnVideoBufferUnderflow), self);
}
- else
- if (g_str_has_prefix(GST_ELEMENT_NAME(element), "brcmaudiosink")) {
- g_object_set(G_OBJECT(element), "async", TRUE, nullptr);
+ }
+ else {
+ if (GST_IS_BASE_SINK(element)) {
+ static bool disable_wait_video = !!getenv("COBALT_AML_DISABLE_WAIT_VIDEO");
+ bool has_video = (self->video_codec_ != kSbMediaVideoCodecNone);
+ if (has_video && g_str_has_prefix(GST_ELEMENT_NAME(element), "amlhalasink") && !disable_wai
t_video) {
+ g_object_set(element, "wait-video", TRUE, "a-wait-timeout", 4000, nullptr);
+ }
+ else
+ if (has_video && g_str_has_prefix(GST_ELEMENT_NAME(element), "westerossink")) {
+ if (g_object_class_find_property(G_OBJECT_GET_CLASS(element), "zoom-mode")) {
+ GST_INFO("Setting westerossink zoom-mode to 0");
+ | g_object_set(element, "zoom-mode", | channels=" + std::to_string(info->number_of_channelsprimary_caps += ", rate=" + std::to_string(info->samples_per_second);}
+ g_signal_connect_swapped(
+ | }
+ SBLOGINFO<< "Adding audio caps data: " << primary_caps;
+ "buffer-underflow-callback",
+ | return{{primary_caps}};
+}
G_CALLBACK(OnVideoBufferUnderflow), self);
+ | casekSbMediaAudioCodecOpus: { std::string primary_caps = "audio/x-opus, channel-mapping-family=0";
diff --git a/src/third_party/starboard/rdk/shared/system.gyp b/src/third_party/starboard/rdk/shared/system.gyp
index 0e8eb74..f48aec8 100644
--- a/src/third_party/starboard/rdk/shared/system.gyp
+++ b/src/third_party/starboard/rdk/shared/system.gyp
@@ -115,15 +115,15 @@
else
+ if (g_str_has_prefix(GST_ELEMENT_NAME(element), "brcmaudiosink")) {
+ g_object_set(G_OBJECT(element), "async", TRUE, nullptr);
+ }
| 'type': 'none',}
}
}
+// static
+void PlayerImpl::ConfigureLimitedVideoWesterossink(GstElement* element) {
+ | 'direct_dependent_settings':if (g_object_class_find_property(G_OBJECT_GET_CLASS(element), "res-usage")) {
+ g_object_set(element, "res-usage", 0x0u, nullptr);
+ }
+ | 'cflags': [
-else {
+ GST_WARNING("'westerossink' | '<!@(<(pkg-config) --cflags ocdm)',
+ '<!@(<(pkg-config) --cflags <(ocdm_library_name))',
],
},
'link_settings': {
'ldflags': [has no 'res-usage' property, secondary video may steal decoder");
+ }
+}
+
void PlayerImpl::MarkEOS(SbMediaType stream_type) {
GstElement* src = nullptr;
if (stream_type == kSbMediaTypeVideo) {
@@ -2788,29 +2818,6 @@ void PlayerImpl::HandleApplicationMessage(GstBus* bus, GstMessage* message)
{
}
}
-void PlayerImpl::ConfigureLimitedVideo() {
- GstElementFactory* factory = gst_element_factory_find("westerossink");
- if (factory) {
- GstElement* video_sink = gst_element_factory_create(factory, nullptr);
- if (video_sink) {
- | '<!@(<(pkg-config) --libs-only-L --libs-only-other ocdm)',
+if (g_object_class_find_property(G_OBJECT_GET_CLASS(video_sink), "res-usage")) {
- g_object_set(video_sink, "res-usage", 0x0u, nullptr);
- | '<!@(<(pkg-config)--libs-only-L--libs-only-other <(ocdm_library_name))',
],
GST_WARNING("'westerossink' has no 'res-usage' property, secondary video may | 'libraries': [steal decode
r");
- }
- g_object_set(pipeline_, "video-sink", | '<!@(<(pkg-config) --libs-only-l ocdm)',
+video_sink, nullptr);
- }
- else {
- GST_DEBUG("Failed to create | '<!@(<(pkg-config) --libs-only-l <(ocdm_library_name))',
'-ldl',
],'westerossink'");
- }
- gst_object_unref(GST_OBJECT(factory));
- }
-
- // enforce no audio
- audio_codec_ = kSbMediaAudioCodecNone;
-}
-
void PlayerImpl::AddBufferingProbe(GstClockTime target, int ticket) {
struct BufferingProbeData {
| },GstClockTime target_time; |
Rebuild libcobalt: | Code Block |
|---|
| language | bash |
|---|
| title | Rebild libcobalt |
|---|
| bitbake libcobalt -C configure |
|