mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2025-01-09 16:35:35 +00:00
commit
fc3d259a39
5 changed files with 20 additions and 18 deletions
|
@ -27,7 +27,7 @@ void
|
|||
ElementProperties::addParamEnum (GParamSpec *param, GstElement *element,
|
||||
QGridLayout *play)
|
||||
{
|
||||
GValue value = { 0 };
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
g_value_init (&value, param->value_type);
|
||||
if (param->flags & G_PARAM_READABLE)
|
||||
|
@ -69,7 +69,7 @@ void
|
|||
ElementProperties::addParamFlags (GParamSpec *param, GstElement *element,
|
||||
QGridLayout *play)
|
||||
{
|
||||
GValue value = { 0 };
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
g_value_init (&value, param->value_type);
|
||||
if (param->flags & G_PARAM_READABLE)
|
||||
|
@ -80,7 +80,7 @@ ElementProperties::addParamFlags (GParamSpec *param, GstElement *element,
|
|||
}
|
||||
|
||||
QString propertyName = g_param_spec_get_name (param);
|
||||
int propertyValue;
|
||||
size_t propertyValue;
|
||||
|
||||
propertyValue = g_value_get_flags (&value);
|
||||
|
||||
|
@ -119,7 +119,7 @@ ElementProperties::addParamSimple (GParamSpec *param, GstElement *element,
|
|||
if (param->flags & G_PARAM_WRITABLE)
|
||||
readOnly = false;
|
||||
|
||||
GValue value = { 0 };
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
g_value_init (&value, param->value_type);
|
||||
if (param->flags & G_PARAM_READABLE)
|
||||
|
@ -178,7 +178,7 @@ ElementProperties::addParamSimple (GParamSpec *param, GstElement *element,
|
|||
break;
|
||||
}
|
||||
case G_TYPE_CHAR: {
|
||||
propertyValue = QString::number (g_value_get_char (&value));
|
||||
propertyValue = QString::number (g_value_get_schar (&value));
|
||||
break;
|
||||
}
|
||||
case G_TYPE_UCHAR: {
|
||||
|
|
|
@ -119,6 +119,7 @@ GraphDisplay::update (const std::vector<ElementInfo> &info)
|
|||
void
|
||||
GraphDisplay::paintEvent (QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
QPainter painter (this);
|
||||
QPen defaultPen = painter.pen ();
|
||||
for (std::size_t i = 0; i < m_displayInfo.size (); i++) {
|
||||
|
@ -848,6 +849,7 @@ GraphDisplay::requestPad (std::size_t elementId)
|
|||
void
|
||||
GraphDisplay::addRequestPad (int row, int collumn)
|
||||
{
|
||||
Q_UNUSED(collumn);
|
||||
QTableWidget *ptwgt = dynamic_cast<QTableWidget *> (QObject::sender ());
|
||||
|
||||
qulonglong v = ptwgt->property ("element").toULongLong ();
|
||||
|
|
|
@ -16,7 +16,7 @@ get_str_caps_limited (gchar* str)
|
|||
gchar* result;
|
||||
if (strlen (str) > MAX_STR_CAPS_SIZE) {
|
||||
result = g_strndup (str, MAX_STR_CAPS_SIZE);
|
||||
for (int i = strlen (result) - 1; i > strlen (result) - 4; i--)
|
||||
for (size_t i = strlen (result) - 1; i > strlen (result) - 4; i--)
|
||||
result[i] = '.';
|
||||
}
|
||||
else
|
||||
|
@ -28,6 +28,7 @@ static void
|
|||
typefind_have_type_callback (GstElement * typefind, guint probability,
|
||||
GstCaps * caps, GraphManager * thiz)
|
||||
{
|
||||
Q_UNUSED(typefind);
|
||||
gchar *caps_description = gst_caps_to_string (caps);
|
||||
qDebug () << "Found caps " << caps_description << " with probability "
|
||||
<< probability;
|
||||
|
@ -226,7 +227,7 @@ GraphManager::Connect (const char *srcElement, const char *srcPad,
|
|||
|
||||
gboolean seekRes = gst_element_seek_simple (m_pGraph, GST_FORMAT_TIME,
|
||||
GST_SEEK_FLAG_FLUSH, 0);
|
||||
|
||||
Q_UNUSED(seekRes);
|
||||
gst_object_unref (src);
|
||||
gst_object_unref (dst);
|
||||
|
||||
|
@ -236,6 +237,7 @@ GraphManager::Connect (const char *srcElement, const char *srcPad,
|
|||
bool
|
||||
GraphManager::Connect (const char *srcElement, const char *dstElement)
|
||||
{
|
||||
|
||||
GstElement *src = gst_bin_get_by_name (GST_BIN (m_pGraph), srcElement);
|
||||
GstElement *dst = gst_bin_get_by_name (GST_BIN (m_pGraph), dstElement);
|
||||
|
||||
|
@ -243,7 +245,7 @@ GraphManager::Connect (const char *srcElement, const char *dstElement)
|
|||
|
||||
gboolean seekRes = gst_element_seek_simple (m_pGraph, GST_FORMAT_TIME,
|
||||
GST_SEEK_FLAG_FLUSH, 0);
|
||||
|
||||
Q_UNUSED(seekRes);
|
||||
/* add a callback to handle have-type signal */
|
||||
if (g_str_has_prefix (dstElement, "typefindelement")) {
|
||||
g_signal_connect (dst, "have-type",
|
||||
|
@ -284,8 +286,7 @@ GraphManager::GetInfo ()
|
|||
size_t id = 0;
|
||||
while (!done) {
|
||||
#if GST_VERSION_MAJOR >= 1
|
||||
GValue value =
|
||||
{ 0};
|
||||
GValue value = G_VALUE_INIT;
|
||||
switch (gst_iterator_next (iter, &value))
|
||||
{
|
||||
case GST_ITERATOR_OK:
|
||||
|
@ -314,8 +315,7 @@ GraphManager::GetInfo ()
|
|||
GstPad *pad;
|
||||
while (!padDone) {
|
||||
#if GST_VERSION_MAJOR >= 1
|
||||
GValue padVal =
|
||||
{ 0};
|
||||
GValue padVal = G_VALUE_INIT;
|
||||
switch (gst_iterator_next (padItr, &padVal))
|
||||
{
|
||||
case GST_ITERATOR_OK:
|
||||
|
|
|
@ -21,8 +21,7 @@ clearPipeline (GstElement *pipeline)
|
|||
bool done = false;
|
||||
while (!done) {
|
||||
#if GST_VERSION_MAJOR >= 1
|
||||
GValue value =
|
||||
{ 0};
|
||||
GValue value = G_VALUE_INIT;
|
||||
switch (gst_iterator_next (iter, &value))
|
||||
{
|
||||
case GST_ITERATOR_OK:
|
||||
|
@ -84,7 +83,7 @@ writeProperties (QXmlStreamWriter &xmlWriter, const GstElement *element)
|
|||
|
||||
if ((param->flags & G_PARAM_READABLE)
|
||||
&& (param->flags & G_PARAM_WRITABLE)) {
|
||||
GValue value = { 0 };
|
||||
GValue value = G_VALUE_INIT;
|
||||
g_value_init (&value, param->value_type);
|
||||
|
||||
g_object_get_property (G_OBJECT (element), param->name, &value);
|
||||
|
|
|
@ -172,6 +172,7 @@ PluginsListDialog::~PluginsListDialog ()
|
|||
void
|
||||
PluginsListDialog::showInfo (QListWidgetItem *pitem, QListWidgetItem *previous)
|
||||
{
|
||||
Q_UNUSED(previous);
|
||||
qDebug () << "Show Info: " << pitem->text ();
|
||||
m_plblInfo->clear ();
|
||||
QString descr;
|
||||
|
@ -278,8 +279,8 @@ PluginsListDialog::eventFilter (QObject *obj, QEvent *event)
|
|||
if (event->type () == QEvent::KeyPress) {
|
||||
QKeyEvent *key = static_cast<QKeyEvent*> (event);
|
||||
|
||||
if ((key->key () == Qt::Key_Enter)
|
||||
|| (key->key () == Qt::Key_Return) && m_pPlugins->currentItem ()) {
|
||||
if (((key->key () == Qt::Key_Enter)
|
||||
|| (key->key () == Qt::Key_Return)) && m_pPlugins->currentItem ()) {
|
||||
insert (m_pPlugins->currentItem ());
|
||||
return true;
|
||||
}
|
||||
|
@ -291,7 +292,7 @@ PluginsListDialog::eventFilter (QObject *obj, QEvent *event)
|
|||
void
|
||||
PluginsListDialog::filterPlagins (const QString &text)
|
||||
{
|
||||
for (std::size_t i = 0; i < m_pPlugins->count (); i++) {
|
||||
for (int i = 0; i < m_pPlugins->count (); i++) {
|
||||
QListWidgetItem *pitem = m_pPlugins->item (i);
|
||||
|
||||
if (pitem->text ().contains (text))
|
||||
|
|
Loading…
Reference in a new issue