7#include <QtMultimedia/qaudioformat.h>
17#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
60 if (
s.name() !=
"audio/x-raw")
63 auto rate =
s[
"rate"].toInt();
64 auto channels =
s[
"channels"].toInt();
70 format.setChannelCount(*channels);
88 auto sampleFormat =
format.sampleFormat();
89 auto caps = gst_caps_new_simple(
91 "format" , G_TYPE_STRING, audioSampleFormatNames[sampleFormat],
92 "rate" , G_TYPE_INT ,
format.sampleRate(),
93 "channels", G_TYPE_INT ,
format.channelCount(),
94 "layout" , G_TYPE_STRING,
"interleaved",
102 if (!GST_VALUE_HOLDS_LIST(
value))
105 QList<QAudioFormat::SampleFormat>
formats;
106 guint nFormats = gst_value_list_get_size(
value);
107 for (guint
f = 0;
f < nFormats; ++
f) {
120 using namespace std::chrono;
121 using namespace std::chrono_literals;
128 nanoseconds duration{ GST_BUFFER_DURATION(
buffer) };
136 return gst_element_factory_list_get_elements(GST_ELEMENT_FACTORY_TYPE_SINK
137 | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO,
QList< QAudioFormat::SampleFormat > getSampleFormats() const
const char * toString() const
QGstStructure at(int index) const
The QVideoFrame class represents a frame of video data.
QGstCaps capsForAudioFormat(const QAudioFormat &format)
QAudioFormat audioFormatForCaps(const QGstCaps &caps)
void setFrameTimeStampsFromBuffer(QVideoFrame *frame, GstBuffer *buffer)
QAudioFormat audioFormatForSample(GstSample *sample)
Combined button and popup list for selecting options.
const char * audioSampleFormatNames[QAudioFormat::NSampleFormats]
QAudioFormat::SampleFormat gstSampleFormatToSampleFormat(const char *fmt)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GList * qt_gst_video_sinks()
GLsizei const GLfloat * v
[13]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum format
QVideoFrameFormat::PixelFormat fmt
char * toString(const MyType &t)
[31]