Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
sourceresolver_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef SOURCERESOLVER_H
5#define SOURCERESOLVER_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <mfstream_p.h>
19
20#include <QtCore/qurl.h>
21#include <QtCore/private/qcomobject_p.h>
22#include <QtCore/private/qcomptr_p.h>
23
25
26class SourceResolver : public QObject,
28{
30public:
33
34 HRESULT STDMETHODCALLTYPE Invoke(IMFAsyncResult *pAsyncResult) override;
35
37
38 void load(const QUrl &url, QIODevice* stream);
39
40 void cancel();
41
42 void shutdown();
43
45
47 void error(long hr);
49
50private:
51 class State : public QComObject<IUnknown>
52 {
53 public:
54 State(ComPtr<IMFSourceResolver> sourceResolver, bool fromStream);
55 virtual ~State();
56
57 ComPtr<IMFSourceResolver> sourceResolver() const;
58 bool fromStream() const;
59
60 private:
61 ComPtr<IMFSourceResolver> m_sourceResolver;
62 bool m_fromStream;
63 };
64
65 ComPtr<IUnknown> m_cancelCookie;
66 ComPtr<IMFSourceResolver> m_sourceResolver;
67 ComPtr<IMFMediaSource> m_mediaSource;
68 ComPtr<MFStream> m_stream;
69 mutable QMutex m_mutex;
70};
71
72QT_END_NAMESPACE
73
74#endif
bool canReadQrc() const override
void setAudioFormat(const QAudioFormat &format) override
bool bufferAvailable() const override
QUrl source() const override
void setSourceDevice(QIODevice *device) override
QAudioFormat audioFormat() const override
QAudioBuffer read() override
void setSource(const QUrl &fileName) override
QIODevice * sourceDevice() const override
q23::expected< QPlatformVideoSink *, QString > createVideoSink(QVideoSink *sink) override
QPlatformMediaFormatInfo * createFormatInfo() override
q23::expected< QPlatformAudioDecoder *, QString > createAudioDecoder(QAudioDecoder *decoder) override
q23::expected< QPlatformCamera *, QString > createCamera(QCamera *camera) override
q23::expected< QPlatformImageCapture *, QString > createImageCapture(QImageCapture *imageCapture) override
QPlatformVideoDevices * createVideoDevices() override
q23::expected< QPlatformMediaRecorder *, QString > createRecorder(QMediaRecorder *recorder) override
q23::expected< QPlatformMediaPlayer *, QString > createPlayer(QMediaPlayer *parent) override
q23::expected< QPlatformMediaCaptureSession *, QString > createCaptureSession() override
ComPtr< IMFMediaSource > mediaSource() const
void mediaSourceReady()
void load(const QUrl &url, QIODevice *stream)
Combined button and popup list for selecting options.