summaryrefslogtreecommitdiffstats
path: root/src/multimedia/doc/src/videooverview.qdoc
blob: 1856fe2ac832f92d58f74c1d914072553244e572 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!

\page videooverview.html
\title Video Overview
\brief Video playback

\section1 Video Features

Qt Multimedia offers both high and low level C++ classes for playing and
manipulating video data, and QML types for playback and control. Some
of these classes also overlap with both \l {Camera Overview}{camera} and
\l {Audio Overview}{audio} classes, which can be useful.

\section1 Video Implementation Details

\target multimedia-playing-video
\section2 Playing Video in C++

You can use the \l QMediaPlayer class to decode a video file, and display
it using \l QVideoWidget, \l QGraphicsVideoItem, or a custom class.

Here's an example of using QVideoWidget:
    \snippet multimedia-snippets/video.cpp Video widget

And an example with QGraphicsVideoItem:
    \snippet multimedia-snippets/video.cpp Video graphics item

\section2 Playing Video in QML

You can use \l VideoOutput to render content that is provided by
either a \l MediaPlayer or a \l Camera. The VideoOutput is a visual
component that can be embedded into a QQuickScene or \l Window, while
all media decoding and playback control is handled by the \l MediaPlayer
or \l CaptureSession. \l Video has also been provided for convenience.

\section2 Working with Low Level Video Frames

Qt Multimedia offers a number of low level classes to make handling
video frames a bit easier. These classes are primarily used when
writing code that processes video or camera frames (for example,
detecting barcodes, or applying a fancy vignette effect), or needs
to display video in a special way that is otherwise unsupported.

The \l QVideoFrame class encapsulates a video frame and allows the
contents to be mapped into system memory for manipulation or
processing. Using your own QVideoSink
allows you to receive these frames from \l QMediaPlayer and
\l QCamera.

\section2 Recording Video
You can use the \l QMediaRecorder class as a simple way to record video to disk.
For more advances use cases \l QMediaCaptureSession provides a more flexible API.

\section1 Examples

There are both C++ and QML examples available.

\section2 C++ Examples

\annotatedlist video_examples

\section2 QML Examples

\annotatedlist video_examples_qml

\section1 Reference Documentation

\section2 C++ Classes

\annotatedlist multimedia_video

\section2 QML Types

\annotatedlist multimedia_video_qml

*/