Download Fonts Ttf Unicode S60v3. X11 Video Output Xcb Google. Free Gps Software For Sd Card. Latest Minilyrics For Android. Cabac Ups 1700dv2 Software. Kassandra Serial Acasa Tv. Sophocles The Theban Plays Penguin Classics Pdf Editor. Free Game Download Music Videos Mp4. Railway Model Question Paper Pdf In Hindi. Feb 16, 2018 - Jul 25, 2017 - Set the Output drop-down menu to X11 video output (XCB). 2)In case of downloading video files from torrent, at some points they. Sep 6, 2016 - Tools Preferences Video change the output field from Default to x11 video output (XCB). Found it in a similar thread here. School Days Iso Psp English.
(Transcript of the podcast)
xcb, X11, wayland
What’s happening here!
What’s happening here!
This isn’t a podcast about window managers and the ways to make one.(Though we might record one in the future)It’s about the architectural differences between the different ways ofinteracting with the system to display graphics.Be it by interacting with other layers such as X11 or higher or by directlydrawing them on the screen.
It’s really not about how to use the functions, and the technicalities andintricacies of every one of the softwares we’re going to mention.We might do that, but again, it will be the subject of another episode.
This one will only be an introduction.In this podcast you’ll get a general overview of x11, xlib, xcb, and wayland.
What are they?What are the differences between them and what is there to know?Why this matters?
Let’s go over what is what, and what they do.
Unlike many other operating systems, in the free Unix realm, there issomething called a display server that is separate from the graphicalenvironment the user usually interact with. This is something thatsurprises many of the newcomers to Unix, that there’s a layer thatcommunicates with the display and that it doesn’t draw the widgets on thescreen at the same time. It only defines protocol and graphics primitive,it has no specification for application user-interface design.
This premise implies that the graphical environment isn’t enforced onthe user it’s malleable and customizable.
So what’s this display server thing. What’s its purpose? Let’s go throughthe boring wiki definition:
A display server or window server is a program whose primary task isto coordinate the input and output of its clients to and from the restof the operating system, the hardware, and each other. The displayserver communicates with its clients over the display server protocol,a communication protocol, which can be network-transparent or simplynetwork-capable.
The display server is a key component in any graphical user interface,specifically the windowing system.
As a simple definition the display server is the layer that sitsbetween the kernel (or any display output) and the graphical interface.The kernel communicate with the hardware through the drivers for thespecific graphic cards. The window manager communicates with the displayserver and tells it how and what to draw on the screen and let the userinteract with them.
NB: The display output doesn’t have to be the limited to the kernel,it is in most cases though, a display server could output to almostanything. For example, it can output in a window, as with the softwareXephyr (https://freedesktop.org/wiki/Software/Xephyr/).
With that in mind we can define what each software is.
The X server, Wayland compositors, and Mir are implementations of displayservers. Xlib and XCB are libraries implementing the client-side ofthe Xserver/X Windowing system display server protocol (speaking theX11 protocol).
At the bottom level of the X client library stack are Xlib and XCB, twohelper libraries (really sets of libraries) that provide API for talkingto the X server. Xlib and XCB have different design goals, and weredeveloped in different periods in the evolution of the X Window System.
Because we’re talking about a server we need clients that interface with itand that’s what those are. Xlib and XCB.
There is even a higher abstraction layer, which we won’t discuss here, thatspecializes in the widgets: They give a bunch of building blocks such asbuttons and text inputs in a cohesive and coherent manner.
Let’s name a few of those as reference: GTK+, FLTK, Tk, SDL, Qt.
Now you know what is what but what’s the difference between them.Why so many?
Now what are the big differences, why are there many of those?What are the advantages of one against the other.
X11 or X or also called X window system
The X server is a display server or “graphical server”, as we’ve said.So what’s particular about it.
- It’s the oldest display manager that is still alive today.
- All its predecessors are deprecated.
- The first versions were made in 1984 at MIT.
NB: This is what we call X server implementation.
X provides a framework for drawing and moving windows on the screen andalso, and it’s important to note, interact with the mouse, touchscreens,and keyboard.
X provides no native support for audio; several projects exist to fillthis niche, some also providing transparent network support.
The big idea behind X11 is the following:
X is an architecture-independent system for remote graphical userinterfaces and input device capabilities. Each person using a networkedterminal has the ability to interact with the display with any type ofuser input device.
So sorta’ like the Unix system is multiuser and can be accessed throughoutthe network, just like terminals connecting to the mainframe, the X11is a server that clients connect to be able to display graphics ontheir screen. It doesn’t matter if the program is local or not. And itmade sense at a time when computing power was scarce, and it mostlystill does.
X was made with that in mind, it has network transparency, and it’s madeto be used over the network. What are thin clients anyway.
However, by default the connection between the client and the X server is notencrypted, but fortunately if you run it through an ssh session it becomeswrapped inside encrypted packets.
With that you obviously have the network overhead.To counter that X uses Unix domain sockets for efficient connections that areon the same host.
Now let’s go into a bit more details about the architecture.
NB: This is what we call the X Window System, the networked displaysystem.
- Clients connect to the X server using the X11 protocol.
- The X server communicated and interface with the OS kernel to get events fromthe hardware, the keyboards, mouse, etc. (evdev) and to tell the screen whatto display.
- The window manager communicate with the X server to manipulate windows, it’salways the X server that moves the windows.
Now this is pretty much straight forward but the big thing to remember hereis that the communication between X and the hardware isn’t direct, it goesthrough the kernel to be able to act on the hardware.
You can get both 2D and through extensions like GLX 3D operations on theclient applications. The X server has to handle those with the kernelin the middle. It obviously knows how to accelerate operations if thekernel has a driver for the GPU and can accelere it.
Now what’s the deal with Wayland?
Wayland:
Wayland: Wayland is a protocol. It essentially is a standardized way inwhich a compositor (the thing that draws the windows, handles the input,etc) can speak to individual programs, and vice-versa.
NB: You can think about it like another architecture, similar to theX Window System.
There are many implementations of that protocol, and they are called Waylandcompositor. The most popular, or reference implementation of this protocolis the weston compositor. When you hear someone say that they switchedto wayland, it probably means that they switched to a wayland compositor.
The protocol is a decription of “asynchronous object-oriented” actions.There are objects living inside the compositor and the client interactwith them by doing requests. Each client is assigned a different IDand cannot interact with other clients.
Let’s note that the protocol doesn’t specify, at all, the rendering API.It does something called “direct rendering”, in which the client must renderthe window contents to a buffer shareable with the compositor.The client chooses how to render itself with the help of high level librariessuch as GTK, Qt, Cairo for font, and all the freetype for font rendering.
So basically, you need to understand here that there’s a delegation of role.It’s the role of the widget library to adhere to the wayland protocol andfor the applications to use those widgets libraries.
Isolation
One reason is that Wayland is designed from the ground up to isolate clients from each other. There is no shared coordinate space. Wayland clients cannot snoop on each others input or inject fake input events. They can’t draw on each others windows or cover up windows with fake replicas.
All of these things and many other exploits are possible for malicious X clients, because the X protocol wasn’t designed for untrusted clients.
This makes Wayland a much better choice of display protocol when sandboxing untrusted applications, like xdg-app does.
So why the need to move to something other than the X server?What’s the difference and the critics.
The motivation for building Wayland:
A lot of infrastructure has moved from the X server into the kernel (memory management, command scheduling, mode setting) or libraries (cairo, pixman, freetype, fontconfig, pango, etc.), and there is very little left that has to happen in a central server process. … [An X server has] a tremendous amount of functionality that you must support to claim to speak the X protocol, yet nobody will ever use this. … This includes code tables, glyph rasterization and caching, XLFDs (seriously, XLFDs!), and the entire core rendering API that lets you draw stippled lines, polygons, wide arcs and many more state-of-the-1980s style graphics primitives. For many things we’ve been able to keep the X.org server modern by adding extension such as XRandR, XRender and COMPOSITE … With Wayland, we can move the X server and all its legacy technology to an optional code path. Getting to a point where the X server is a compatibility option instead of the core rendering system will take a while, but we’ll never get there if [we] don’t plan for it.
Most Linux and Unix-based systems rely on the X Window System (or simply X ) as the low-level protocol for building bitmap graphics interfaces. On these systems, the X stack has grown to encompass functionality arguably belonging in client libraries, helper libraries, or the host operating system kernel. Support for things like PCI resource management, display configuration management, direct rendering, and memory management has been integrated into the X stack, imposing limitations like limited support for standalone applications, duplication in other projects (e.g. the Linux fb layer or the DirectFB project), and high levels of complexity for systems combining multiple elements (for example radeon memory map handling between the fb driver and X driver, or VT switching). Moreover, X has grown to incorporate modern features like offscreen rendering and scene composition, but subject to the limitations of the X architecture. For example, the X implementation of composition adds additional context switches and makes things like input redirection difficult.
The focus on graphic device drivers, EGL, OpenGL, OpenVG, etc. Mesa3D,it’s all about composition. In X it’s done by an extension.
Removing all the baggage that X took over the years and let the clients handlethe rest.
Unlike X, Wayland is not built with network transparency in mind, it’snot made for the network. It’s more towards segregation and security.Clients cannot snoop each other, they all have a separate processspace, ID.
X implements the ICCCMP for interprocess communication, Wayland doesn’t.Unlike X, wayland compositors are at the same time the display server andthe compositor, and the role of window manager. In X, if you rememberthey all are separate. However, the compositor implementation can havethis feature if the devs decide to implement it.
Another thing to keep in mind is that wayland doesn’t handle inputs.It’s the role of the compositor to do so.X does handle the inputs.The compositors can use libraries such as libinput to provide generic inputdriver.
Let’s note that there’s something called XWayland, it’s an X11 server runningright inside a wayland compositor. It lets application that aren’t able tobe rendered on wayland to work.
Mir:
The canonical thing…
Mir is a computer display server for the Linux operating system currently in development by Canonical Ltd. It is planned to replace the currently used X Window System for Ubuntu.
They always want to do their own stuff Also built with EGLlayer/composition in mind. Uses Xwayland for the X11 compatibilitylayer. Uses Jolla’s libhybris too for the EGL implementionat. Other partsof the architecture are based on Android input stack.
Let’s say it again, the only desktop environment with native support for Miris Canonical’s Unity 8.
First in 2010 Canonical announced that it would use Wayland insteadof X.org. However, they stated it could not meet their “needs” becausethere was a lot of objections and clarifications by the developers leadingprojects around wayland. Because people didn’t agree with their views ofwayland, they made their own. The main argument was about inputs. Canonicalwanted to include input event hadling inside the display server protocol.
They are now using the Android input stack, as I mentioned.
Mir was criticized a lot for its licensing. Unlike Wayland and X11which are under the MIT license, Mir is licensed under GPLv3.
Contributors are required to sign an agreement that “grants Canonical the right to relicense your contribution under their choice of license. This means that, despite not being the sole copyright holder, Canonical are free to relicense your code under a proprietary license.”
“You end up with a situation that looks awfully like Canonical wantingto squash competition by making it impossible for anyone else to sellmodified versions of Canonical’s software in the same market”.
Client side
Let’s get over with the client side of the wayland stuffs. The clientswindows don’t interact with the compositor directly, the widget librarythey use do. That’s it, you’re pretty much forced to use the widgetsor to have to reimplement the protocol for yourself, rendering of fontand everything. However, remember that wayland is a protocol, all thecompositors implement so once a widget library supports the protocolit’ll work with all wayland compositors.
Xlib and xcb are both libraries to write code that interfaces withthe x11 server. They are the helper layer that clients use insteadof implementing all the specifications and communication of the X11server. They just include the library and call the functions. It wouldbe awkward for applications to spit raw X protocol.
Most graphical applications don’t use those libraries directly, they use awidget library such as TK, Qt, FLTK, and GTK, and those have the job orhandling the lower layer of communication and rendering.
Let’s dig a bit into those libraries.
Xlib is the classical client library that comes with X11. As we’ve said,those libraries help interface with X without having to know the protocol.Xlib first appeared in 1985, and let’s remember here that X was createdsomewhere around 1984. So it’s about the same time.
It has a lot of helper features so as complex internationalized input andoutput, accessibility, and integration with desktop environment.
Xlib contains an abstraction object or structure called the Display.It’s a sort of virtual display where graphical operations are done.
Xlib doesn’t send all the requests the client does directly to the server butstores them in a request buffer instead.They are flushed/requested when the one in the queue before them has receivedthe response. We say they are blocking.
Xlib is mostly synchronous but the Xserver replies to the requestsasynchronously.
This has caused some issues with certain people, especially in the case oferror handling.
And this is where we are going to introduce XCB because this is themajor point that the creators focused on.
XCB is pretty recent, it was released in 2001. It stands for X protocolC-language Binding. The library aims to replace Xlib by modernizing,simplifying and optimizing it. The main goal of this project is to:Reduce the library size and complexity and provide direct access to theX11 protocol.
They achieved that by doing multiple things. One of them wasto restrict how xcb handles the X protocol omitting some extrafunctionality of Xlib.
They also made xcb asynchronous, just like the X server is, so why notmake the library too. Following that, it goes without saying that thismakes it better at handling multithreaded applications.
Also, they minized the complexity of the X extension libraries.In Xlib those were moved appart from the main code into their own library,a library for every extentsion, for example libXrender and libXcomposite.The same was done with XCB, creating libxcb-prefix type of library. However,the extension protocols are not hardcoded, they are instead specified withan XML description.
XCB is not only lighter, it’s also faster.
XCB has a slightly lower-level API than Xlib, its function are generateddirectly from the X protocol descriptions, it maps directly. There areseparate functions to put the requests into the outgoing buffer and oneto read the result back from the buffer asynchronously. This means thatthere’s no queue, and thus allow more flexibility, you are not forcedto wait for a response anymore, no overhead. That also means that thereare less system calls being made when using XCB instead of Xlib, andfewer packets being sent when running over the network.
I’ve linked an example in the show notes about the conversion of the xdpyinfotool from Xlib to xcb.
There was a total of 237 system calls with Xlib and only 62 with XCB.11554 Bytes being sent over the network with Xlib and 7726 withXCB. That’s quite the difference.
Now how would you make your application faster knowing this fact. Thetruth is, you might just need to update your Xlib because:
Xlib appeared around 1985[citation needed], and is currently used inGUIs for many Unix-like operating systems. The XCB library is an attemptto replace Xlib. While Xlib is still used in some environments, modernversions of the X.org server implement Xlib on top of XCB
Xlib and XCB compatibility was achieved by rebuilding libX11 as a layer ontop of libxcb. Xlib and XCB share the same X server connection and passcontrol of it back and forth. That option was introduced in libX11 1.2,and is now always present (no longer optional) since the 2010 releaseof libX11 1.4.
That means that Xlib is compatible with xcb because Xlib is written usingxcb.
Calls to Xlib and XCB can be mixed, so Xlib applications can beconverted partially or incrementally if desired.
If you want to optimize a slow asynchronous section of your graphicalapplication that was using Xlib you can find the hotspot and switch toxcb without much hassle. With this you’ll have the perfomance benefitwhile having the easiness of Xlib.
So, all the new window managers using XCB are indeed faster, but intheory you could make the others just as light and fast if you pinpointthe slow parts and convert them to XCB.
I’m rather interested in doing a benchmark of system calls for all thewindow managers.
Both libraries are under the same license, namely MIT license, sothey’re also compatible on that level. However, the only caveat is thatXCB documentation is sparse, there aren’t many docs and tutorials. Theexplanation behind this is that it assumes that every XCB function isself-explanatory and reflext the X protocol.
Let’s add a note here. All the projects mentioned here are supportedby the X.Org foundation and the freedesktop.org. They are all in the sameboat: They want to make the Unix desktop better. They aren’t fightingeach other. Most of the people working on Wayland are also working onX, and same for the Xlib and XCB people. The only exception in the listis with Mir which is a canonical only thing.
Why should this matter?
It’s confusing for newcomers to understand the flexibility of the free Unixgraphical environment.
By listening to this podcast you’ve got the general overview of what fillswhat purpose and all the possible ways to do the same thing.
Now you can make your mind about whether you like something or not andyou know what to use in what situation.
–(Show Notes)–
Writing WM
Xplain
Display Server
X Window System
Xlib
XCB
Xlib and xcb
Wayland
why wayland anyway
pdf on graphics
pdf on wayland
Tuto on learning libxcb
Mir
Mixing calls
Nice tools
Music: bensound.com - Happiness
If you want to have a more in depth discussion I'm always available by email or irc.We can discuss and argue about what you like and dislike, about new ideas to consider, opinions, etc..
If you don't feel like 'having a discussion' or are intimidated by emailsthen you can simply say something small in the comment sections belowand/or share it with your friends.
VideoLAN comes with a selection of Video Output modules. These can display output on almost any computer.
If you don't want any video, you can use the --no-video option.
- 1Output Modules
- 3Changing video output
Output Modules
To select one of these modules, use the -V (--vout) command line option, eg:
image
Save all the frames of a video as a sequence of images. You can select the output format using --image-out-format (currently you can only choose png), and the start of the file name with --image-out-prefix. Finally, to create an image once out of a number of frames, give that number to --image-out-ratio. For example,
will create a series of images named
aa, caca
ASCII Art modules. aa displays output in black and white, caca in colour.
x11
Use Linux's X11 video output
xvideo
XVideo extension video output, a more advanced form of X11.
glx, opengl
Use OpenGL video output
dummy
Don't show output
Cloning
To display output in more than one window, video cloning can be used. To use this, specify
on the command line: this tells vlc to use cloning. You also need to tell vlc what output modules you want with, for example,
Changing video output
If you wish to change your video output module without using the command line, here's how to proceed:
Qt Interface
- Go to tools -> preferences (or press Ctrl+P)
- Select the Video tab
- Select another video output module by changing the 'Output' combo-box
- Stop any playback
- Launch the playback again
Macosx Interface
TODO
Help VideoLAN by adding to this page! Create an account to start editing, and then click here to add to this article. |