Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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#include <QUrl>
20
22
23class SourceResolver: public QObject, public IMFAsyncCallback
24{
26public:
28
30
31 STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvObject) override;
32 STDMETHODIMP_(ULONG) AddRef(void) override;
33 STDMETHODIMP_(ULONG) Release(void) override;
34
35 HRESULT STDMETHODCALLTYPE Invoke(IMFAsyncResult *pAsyncResult) override;
36
37 HRESULT STDMETHODCALLTYPE GetParameters(DWORD*, DWORD*) override;
38
39 void load(const QUrl &url, QIODevice* stream);
40
41 void cancel();
42
43 void shutdown();
44
45 IMFMediaSource* mediaSource() const;
46
48 void error(long hr);
50
51private:
52 class State : public IUnknown
53 {
54 public:
55 State(IMFSourceResolver *sourceResolver, bool fromStream);
56 virtual ~State();
57
58 STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvObject) override;
59
60 STDMETHODIMP_(ULONG) AddRef(void) override;
61
62 STDMETHODIMP_(ULONG) Release(void) override;
63
64 IMFSourceResolver* sourceResolver() const;
65 bool fromStream() const;
66
67 private:
68 long m_cRef;
69 IMFSourceResolver *m_sourceResolver;
70 bool m_fromStream;
71 };
72
73 long m_cRef;
74 IUnknown *m_cancelCookie;
75 IMFSourceResolver *m_sourceResolver;
76 IMFMediaSource *m_mediaSource;
77 MFStream *m_stream;
78 QMutex m_mutex;
79};
80
82
83#endif
\inmodule QtCore \reentrant
Definition qiodevice.h:34
\inmodule QtCore
Definition qmutex.h:281
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
Definition qurl.h:94
HRESULT STDMETHODCALLTYPE GetParameters(DWORD *, DWORD *) override
STDMETHODIMP_(ULONG) AddRef(void) override
HRESULT STDMETHODCALLTYPE Invoke(IMFAsyncResult *pAsyncResult) override
void mediaSourceReady()
IMFMediaSource * mediaSource() const
STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvObject) override
void error(long hr)
void load(const QUrl &url, QIODevice *stream)
STDMETHODIMP_(ULONG) Release(void) override
Combined button and popup list for selecting options.
EGLStreamKHR stream
#define Q_OBJECT
#define Q_SIGNALS
IUIViewSettingsInterop __RPC__in REFIID riid
long HRESULT
QUrl url("example.com")
[constructor-url-reference]