unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: Richard Stallman <rms@gnu.org>
Cc: Po Lu <luangruo@yahoo.com>,
	Lars Magne Ingebrigtsen <larsi@gnus.org>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: GStreamer xwidget
Date: Mon, 29 Nov 2021 14:31:20 +0700	[thread overview]
Message-ID: <CAP_d_8WDnXHJV=vz9U9VmWpWiXJwMAECZarBFRb8FUyCWCtJ+w@mail.gmail.com> (raw)
In-Reply-To: <E1mrWvg-0002C6-GO@fencepost.gnu.org>

On Mon, 29 Nov 2021 at 10:02, Richard Stallman <rms@gnu.org> wrote:

>   > > +         && gst_registry_find_feature (registry, "videotestsrc",
>   > > +                                       GST_TYPE_ELEMENT_FACTORY)
>
>   > > +      xw->gst_source = gst_element_factory_make ("videotestsrc", NULL);
>   ...
>
> You seem to know something about this code.

Disclaimer: I have not worked specifically with GStreamer, but I come
from a Windows background where I used to work with DirectShow. They
are technically similar.

> Can you explain the
> meaning of it?  What the dats structures are, and what these
> operations actually do?

I think the easiest way to explain media processing frameworks is to
make an analogy with UNIX pipes.

A typical UNIX process has a single input descriptor and two outputs
(stdout and stderr). You combine them in pipelines by connecting an
output of one program to the input of another.

Shell pipelines are typically linear or tree-like.

Media processing frameworks generalize this. Each “filter” or
“element” can have an arbitrary number of inputs and outputs, and they
are typed so the framework can check if the connection you are trying
to make is nonsensical. For example, you cannot meaningfully connect
an audio source to a video sink.

Filters and connections form a directed acyclic graph.

The videotestsrc element is a source. That is, it has no inputs, and
has one video output. For this particular filter, the output is a
fixed test image.

There is a sink filter that can display video. By connecting a
videotestsrc to a sink, you get a minimal complete graph that does
something.

A full graph for playing a video or audio clip will typically contain:

* A file or URL source. This knows the URL of the input file and
outputs a byte stream.

* A splitter or demultiplexer. This takes the byte stream and outputs
separate streams for any video, audio or subtitle tracks included.
Different container formats (e.g. AVI, MP4, Matroska, Ogg) require
different demux filters. (Closest UNIX analogy: zip and tar are
different containers, and use different programs.)
The user may not want all streams rendered — e.g. when watching a film
that contains audio tracks in English and Spanish, they will want just
one.

* Decoders for a subset of streams in the clip. (The user may not want
all streams rendered — e.g. when watching a film that contains audio
tracks in English and Spanish, they will want just one.) Each specific
video or audio compression format requires a different decoder filter.
(Analogy: deflate, xz, and bzip are different compression formats.) A
decoder takes a compressed stream from the demultiplexer and outputs
raw RGB or YCbCr video or PCM audio.

* “Renderers” or “sinks” for the decoded video and audio. These differ
by target video or audio subsystem (e.g. pulseaudio), hardware
acceleration capabilities, etc.


> I'm trying to find out how Emacs determines which plug-ins to use
> for any given argument supplied by the ueer.  And what do they depend on?
> Does a given file format fully determine the plug-ins to use?

A given file format (which is a combination of the container format
and compression formats of individual streams within) constrains the
set of possible rendering graphs.

A system may have multiple filters capable of filling each of the
roles listed above. In that case, the application (e.g. Emacs) can
choose between possibilities.

Frameworks have a way to try to automatically complete a rendering
graph for a source; I do not know all the details on how they resolve
ambiguities.



  reply	other threads:[~2021-11-29  7:31 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ee7cq2mu.fsf.ref@yahoo.com>
2021-11-19  2:51 ` GStreamer xwidget Po Lu
2021-11-19  4:01   ` T.V Raman
2021-11-19  4:21     ` Po Lu
2021-11-19  5:38   ` Lars Ingebrigtsen
2021-11-19  5:49     ` Po Lu
2021-11-19  6:19       ` Lars Ingebrigtsen
2021-11-19  6:37         ` Po Lu
2021-11-19  6:53           ` Lars Ingebrigtsen
2021-11-19 13:03           ` Eli Zaretskii
2021-11-19 13:07             ` Po Lu
2021-11-19 13:22               ` Eli Zaretskii
2021-11-19 13:33                 ` Po Lu
2021-11-19 13:45                   ` Eli Zaretskii
2021-11-20  5:07   ` Po Lu
2021-11-20  7:23     ` Eli Zaretskii
2021-11-20  7:27       ` Po Lu
2021-11-21  5:19     ` Richard Stallman
2021-11-21  6:53       ` Lars Ingebrigtsen
2021-11-22  4:31         ` Richard Stallman
2021-11-20  7:42   ` Richard Stallman
2021-11-20  8:05     ` Po Lu
2021-11-20  8:16       ` Lars Ingebrigtsen
2021-11-21  5:18         ` Richard Stallman
2021-11-21  5:27           ` Po Lu
2021-11-22  4:31             ` Richard Stallman
2021-11-22  4:41               ` Po Lu
2021-11-23  6:11                 ` Richard Stallman
2021-11-23  7:07                   ` Po Lu
2021-11-23 20:54                     ` Richard Stallman
2021-11-24  0:32                       ` Po Lu
2021-11-25  5:32                         ` Richard Stallman
2021-11-25  8:13                           ` Po Lu
2021-11-25 11:34                             ` Alexandre Garreau
2021-11-27  4:09                               ` Richard Stallman
2021-12-01 12:30                                 ` Dmitry Gutov
2021-12-01 17:53                                   ` Arthur Miller
2021-12-02  0:51                                     ` Po Lu
2021-12-02  2:47                                     ` chad
2021-11-27  4:08                             ` Richard Stallman
2021-11-27  4:38                               ` Po Lu
2021-11-28  4:24                                 ` Richard Stallman
2021-11-28  4:42                                   ` Po Lu
2021-11-28  8:04                                     ` Yuri Khan
2021-11-28  8:16                                       ` Po Lu
2021-11-29  3:02                                       ` Richard Stallman
2021-11-29  7:31                                         ` Yuri Khan [this message]
2021-11-29  7:44                                           ` Po Lu
2021-11-29 21:12                                             ` Richard Stallman
2021-11-30  1:38                                               ` Po Lu
2021-11-30  8:30                                                 ` Yasushi SHOJI
2021-11-30  9:29                                                   ` Po Lu
2021-11-30 10:30                                                     ` Yasushi SHOJI
2021-12-01  7:04                                                 ` Richard Stallman
2021-12-01  7:09                                                   ` Po Lu
2021-11-30  4:09                                           ` Richard Stallman
2021-11-29  3:01                                     ` Richard Stallman
2021-11-29  3:12                                       ` Po Lu
2021-11-30  4:09                                         ` Richard Stallman
2021-11-30  4:36                                           ` Po Lu
2021-12-01  7:04                                             ` Richard Stallman
2021-11-23  6:11                 ` Richard Stallman
2021-11-23  6:55                   ` Po Lu
2021-11-24  4:28                     ` Richard Stallman
2021-11-21  6:52           ` Lars Ingebrigtsen
2021-11-21 14:45             ` Arthur Miller
2021-11-23  6:09               ` Richard Stallman
2021-11-22  4:31             ` Richard Stallman
2021-12-01  7:07       ` Richard Stallman
2021-12-01  7:31         ` Po Lu
2021-12-01  8:30         ` Alexandre Garreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP_d_8WDnXHJV=vz9U9VmWpWiXJwMAECZarBFRb8FUyCWCtJ+w@mail.gmail.com' \
    --to=yuri.v.khan@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).