Skip to content

Commit

Permalink
Minor textual changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
eunoia-cl committed Sep 16, 2021
1 parent d5da57e commit 0e7134a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/ch11-multimedia/multimedia.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Multimedia

The multimedia elements in the QtMultimedia makes it possible to playback and record media such as sound, video or pictures. Decoding and encoding are handled through platform-specific backends. For instance, the popular GStreamer framework is used on Linux, while WMF is used on Windows, AVFramework on OS X and iOS, while the Android multimedia APIs are used on Android.
The multimedia elements in the QtMultimedia makes it possible to playback and record media such as sound, video or pictures. Decoding and encoding are handled through platform-specific backends. For instance, the popular GStreamer framework is used on Linux, WMF is used on Windows, AVFramework on OS X and iOS and the Android multimedia APIs are used on Android.

The multimedia elements are not a part of the Qt Quick core API. Instead, they are provided through a separate API made available by importing QtMultimedia as shown below:

Expand Down
4 changes: 2 additions & 2 deletions docs/ch11-multimedia/playing-media.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Playing Media

The most basic case of multimedia integration in a QML application is for it to playback media. This is done using the `MediaPlayer` element, optionally in combination with a `VideoOutput` element if the source is an image or video. The `MediaPlayer` element has a `source` property pointing at the media to play. When a media source has been bound, it is simply a matter of calling the `play` function to start playing.
The most basic case of multimedia integration in a QML application is for it to playback media. This can be achieved using the `MediaPlayer` element. This QML component has a `source` property pointing at the media to play. When a media source has been bound, it is simply a matter of calling the `play` function to start playing it.

If you want to play visual media, i.e. pictures or video, you must also set up a `VideoOutput` element to place the resulting image in the user interface. The `MediaPlayer` running the playback is bound to the video output through the `source` property.
If you want to play visual media such as pictures or videos, you must also set up a `VideoOutput` element to place the resulting image in the user interface. The `MediaPlayer` running the playback is bound to the video output through the `source` property.

In the example shown below, the `MediaPlayer` is given a file with video contents as `source`. A `VideoOutput` is created and bound to the media player. As soon as the main component has been fully initialized, i.e. at `Component.onCompleted`, the player’s `play` function is called.

Expand Down

0 comments on commit 0e7134a

Please sign in to comment.