Bug 220087

Summary: [GStreamer] Add support to build with native audio and video
Product: WebKit Reporter: Xabier Rodríguez Calvar <calvaris>
Component: New BugsAssignee: Xabier Rodríguez Calvar <calvaris>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, cgarcia, eric.carlson, ews-watchlist, glenn, gustavo, gyuyoung.kim, jer.noble, menard, philipj, pnormand, ryuan.choi, sergio, vjaquez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Xabier Rodríguez Calvar 2020-12-22 08:28:10 PST
[GStreamer] Add support to build with native audio and video
Comment 1 Xabier Rodríguez Calvar 2020-12-22 08:29:38 PST
Created attachment 416666 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2020-12-22 08:50:09 PST
Comment on attachment 416666 [details]
Patch

I should polish this by adding more checks on GStreamer and tweaking defaults.
Comment 3 Xabier Rodríguez Calvar 2021-01-08 04:41:48 PST
Created attachment 417262 [details]
Patch
Comment 4 Philippe Normand 2021-01-08 05:20:27 PST
Comment on attachment 417262 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=417262&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2698
> +#if ENABLE(TEXT_SINK)
> +    unsigned hasText = getGstPlayFlag("text");
> +#else
> +    unsigned hasText = 0x0;
> +#endif

What's the implication of disabling this in playbin? In the player we set a custom text-sink to collect in-band text cues, should that code be ifdeffed now?
Comment 5 Xabier Rodríguez Calvar 2021-01-08 07:25:35 PST
(In reply to Philippe Normand from comment #4)
> Comment on attachment 417262 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=417262&action=review
> 
> > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2698
> > +#if ENABLE(TEXT_SINK)
> > +    unsigned hasText = getGstPlayFlag("text");
> > +#else
> > +    unsigned hasText = 0x0;
> > +#endif
> 
> What's the implication of disabling this in playbin? In the player we set a
> custom text-sink to collect in-band text cues, should that code be ifdeffed
> now?

Text sink pads get not connected to anything in playsink so text dies there.
Comment 6 Philippe Normand 2021-01-08 07:52:38 PST
Comment on attachment 417262 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=417262&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2714
> +    g_object_set(pipeline, "flags", hasText | hasAudio | hasVideo | hasNativeVideo | hasNativeAudio, nullptr);

So this unsets the default flags too, which is not a great idea, the default is "soft-colorbalance+deinterlace+soft-volume+text+audio+video". Can you get the previous flags before and preserve them please?
Comment 7 Xabier Rodríguez Calvar 2021-01-08 08:45:59 PST
Created attachment 417269 [details]
Patch
Comment 8 EWS 2021-01-11 02:31:06 PST
Committed r271355: <https://trac.webkit.org/changeset/271355>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417269 [details].
Comment 9 Radar WebKit Bug Importer 2021-01-11 02:32:14 PST
<rdar://problem/72990488>