emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GStreamer xwidget


From: Po Lu
Subject: Re: GStreamer xwidget
Date: Fri, 19 Nov 2021 13:49:06 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Hm...  isn't the webkit rendering done offscreen?  And that's able to
> play videos just fine?

Not on macOS, which is presumably where you tested the video playback,
where a single xwidget can be displayed by only one Emacs window at a
time.  On GNU systems, the offscreen rendering causes some video
playback to consume large amounts of CPU (as it can't utilize hardware
acceleration for video decoding).

And the more immediate problem this tries to solve is video playback not
working at all in most newer versions of WebKitGTK.

> Sounds good to me.
>
> Do you have a code snippet that will display one of these widgets?  Then
> I can test the patch here.

Try this:

  (require 'xwidget)

  (setq xw (make-xwidget 'media "foo" 100 100))
  (insert (propertize "foo" 'display (list 'xwidget :xwidget xw)))
  (xwidget-media-play xw)

> Skimming the patch, it looks good to me.  The one extremely minor nit I
> have is this superfluous {}:

>> +#ifdef HAVE_GSTREAMER
>> +          if (EQ (xw->type, Qmedia))
>> +            {
>> +              XResizeWindow (xv->dpy, xv->internal_window,
>> +                             xw->width, xw->height);
>> +            }

It would be ugly to wrap the arguments to call there, and still rely on
implicit braces.  IMO.

But if that's really a problem, I can remove it.

Thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]