6#include <QtMultimedia/qmediametadata.h>
7#include <QtCore/qdatetime.h>
8#include <QtCore/qtimezone.h>
10#include <gst/gstversion.h>
65 if (!strcmp(
map->tag,
tag))
99 switch( G_VALUE_TYPE(&
val) ) {
102 const gchar *str_value = g_value_get_string(&
val);
130 if (G_VALUE_TYPE(&
val) == G_TYPE_DATE) {
131 const GDate *
date = (
const GDate *)g_value_get_boxed(&
val);
132 if (g_date_valid(
date)) {
133 int year = g_date_get_year(
date);
134 int month = g_date_get_month(
date);
135 int day = g_date_get_day(
date);
140 }
else if (G_VALUE_TYPE(&
val) == GST_TYPE_DATE_TIME) {
141 const GstDateTime *
dateTime = (
const GstDateTime *)g_value_get_boxed(&
val);
142 int year = gst_date_time_has_year(
dateTime) ? gst_date_time_get_year(
dateTime) : 0;
143 int month = gst_date_time_has_month(
dateTime) ? gst_date_time_get_month(
dateTime) : 0;
144 int day = gst_date_time_has_day(
dateTime) ? gst_date_time_get_day(
dateTime) : 0;
149 if (gst_date_time_has_time(
dateTime)) {
150 hour = gst_date_time_get_hour(
dateTime);
151 minute = gst_date_time_get_minute(
dateTime);
152 second = gst_date_time_get_second(
dateTime);
153 tz = gst_date_time_get_time_zone_offset(
dateTime);
158 }
else if (G_VALUE_TYPE(&
val) == GST_TYPE_SAMPLE) {
159 GstSample *sample = (GstSample *)g_value_get_boxed(&
val);
160 GstCaps* caps = gst_sample_get_caps(sample);
161 if (caps && !gst_caps_is_empty(caps)) {
162 GstStructure *structure = gst_caps_get_structure(caps, 0);
163 const gchar *
name = gst_structure_get_name(structure);
165 GstBuffer *
buffer = gst_sample_get_buffer(sample);
174 }
else if (G_VALUE_TYPE(&
val) == GST_TYPE_FRACTION) {
175 int nom = gst_value_get_fraction_numerator(&
val);
176 int denom = gst_value_get_fraction_denominator(&
val);
199 if (!GST_IS_TAG_SETTER(element))
202 gst_tag_setter_reset_tags(GST_TAG_SETTER(element));
210 switch (tagValue.
typeId()) {
211 case QMetaType::QString:
212 gst_tag_setter_add_tags(GST_TAG_SETTER(element),
213 GST_TAG_MERGE_REPLACE,
219 case QMetaType::LongLong:
220 gst_tag_setter_add_tags(GST_TAG_SETTER(element),
221 GST_TAG_MERGE_REPLACE,
226 case QMetaType::Double:
227 gst_tag_setter_add_tags(GST_TAG_SETTER(element),
228 GST_TAG_MERGE_REPLACE,
233 case QMetaType::QDate:
234 case QMetaType::QDateTime: {
236 gst_tag_setter_add_tags(GST_TAG_SETTER(element),
237 GST_TAG_MERGE_REPLACE,
239 gst_date_time_new(
date.offsetFromUtc() / 60. / 60.,
241 date.time().hour(),
date.time().minute(),
date.time().second()),
246 if (tagValue.
typeId() == qMetaTypeId<QLocale::Language>()) {
248 gst_tag_setter_add_tags(GST_TAG_SETTER(element),
249 GST_TAG_MERGE_REPLACE,
263 GstIterator *
elements = gst_bin_iterate_all_by_interface(bin, GST_TYPE_TAG_SETTER);
264 GValue
item = G_VALUE_INIT;
265 while (gst_iterator_next(
elements, &
item) == GST_ITERATOR_OK) {
266 GstElement *
const element = GST_ELEMENT(g_value_get_object(&
item));
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
int month() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int day() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int year() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
qint64 size() const
Returns the file size in bytes.
static QImage fromData(QByteArrayView data, const char *format=nullptr)
static QString languageToCode(Language language, LanguageCodeTypes codeTypes=AnyLanguageCode)
Returns the two- or three-letter language code for language, as defined in the ISO 639 standards.
static Language codeToLanguage(QStringView languageCode, LanguageCodeTypes codeTypes=AnyLanguageCode) noexcept
Returns the QLocale::Language enum corresponding to the two- or three-letter languageCode,...
iterator insert(const Key &key, const T &value)
bool contains(const Key &key) const
Key key(const T &value, const Key &defaultKey=Key()) const
const_iterator cbegin() const noexcept
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QByteArray toUtf8() const &
\inmodule QtCore \reentrant
QDateTime toDateTime() const
Returns the variant as a QDateTime if the variant has userType() \l QMetaType::QDateTime,...
double toDouble(bool *ok=nullptr) const
Returns the variant as a double if the variant has userType() \l QMetaType::Double,...
int toInt(bool *ok=nullptr) const
Returns the variant as an int if the variant has userType() \l QMetaType::Int, \l QMetaType::Bool,...
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
int typeId() const
Returns the storage type of the value stored in the variant.
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
QMap< QString, QString > map
[6]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void * user_data
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
static const QTextHtmlElement elements[Html_NumElements]
QFileInfo info(fileName)
[8]