gst-devices.c:161:32: error: unknown type name ‘GstDevice’

Bug #1380043 reported by FM33 on 2014-10-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Audio Recorder
Undecided
Unassigned

Bug Description

Hello,

I can't build AR 1.5-4 on Ubuntu 14.04 amd64.

make return this :

...
gst-devices.c: At top level:
gst-devices.c:161:32: error: unknown type name ‘GstDevice’
 static void gstdev_read_fields(GstDevice *dev, gchar **dev_id, gchar **dev_descr, gchar **dev_class, gchar **dev_caps_str) {
                                ^
gst-devices.c:212:37: error: unknown type name ‘GstDevice’
 static void gstdev_remove_from_list(GstDevice *dev) {
                                     ^
gst-devices.c:251:32: error: unknown type name ‘GstDevice’
 static void gstdev_add_to_list(GstDevice *dev) {
                                ^
gst-devices.c: In function ‘gstdev_get_devices’:
gst-devices.c:343:5: warning: implicit declaration of function ‘gst_device_monitor_get_devices’ [-Wimplicit-function-declaration]
     GList *list = gst_device_monitor_get_devices(g_dev_monitor);
     ^
gst-devices.c:343:19: warning: initialization makes pointer from integer without a cast [enabled by default]
     GList *list = gst_device_monitor_get_devices(g_dev_monitor);
                   ^
gst-devices.c:349:9: error: unknown type name ‘GstDevice’
         GstDevice *dev = (GstDevice*)item->data;
         ^
gst-devices.c:349:27: error: ‘GstDevice’ undeclared (first use in this function)
         GstDevice *dev = (GstDevice*)item->data;
                           ^
gst-devices.c:349:37: error: expected expression before ‘)’ token
         GstDevice *dev = (GstDevice*)item->data;
                                     ^
make[1]: *** [gst-devices.o] Erreur 1
make[1]: quittant le répertoire « /home/fabien/Programmes/audio-recorder/src »
make: *** [all-recursive] Erreur 1

moma (osmoma) wrote :

Hello,
Yes, I can see the same bug here.

It cannot find GstDevice functions. Those functions were added to Gstreamer in version v1.4. I will investigate this issue (after I have a proper 14.04 running i VM).

The program could fall back to src/pulseaudio.[ch] modules when GstDevice is not available. I removed these and and libpulse-dev from the project when I started to use GstDevice in a.r 1.5-x.

moma (osmoma) wrote :

Re-hello,
GstDevice and GstDeviceMonitor came first in Gstreamer 1.4.
Ubuntu 14.04 has Gstreamer 1.2 and it does not has support for GstDevice and GstDeviceMonitor modules.

This is my advice .
0) Retrieve the old src/pulseaudio.[ch] module from audio-recorder 1.4.

1) Check in the code if GST_TYPE_DEVICE_MONITOR (or GST_DEVICE) macro has been defined. Something like this.

#ifdef GST_TYPE_DEVICE_MONITOR
// Gstreamer 1.4
#include "gstdevice.h"

#else
// Gstreamer 1.2
#include "pulseaudio.h"

#endif

2) gstdevice.c and pulseaudio.c modules must have similar call-interfaces (similar functions). This needs to be done.

Kindly
  moma

moma (osmoma) wrote :

EDIT:

My intension was to write (but it does not matter really)
#ifdef GST_DEVICE_MONITOR

#else

#endif

Check:
  /usr/include/gstreamer-1.0/gst/gst.h
  /usr/include/gstreamer-1.0/gst/gstdevice*.h

Check the version of Gstreamer:
$ gst-launch-1.0 --version

gst-launch-1.0 version 1.4.3
GStreamer 1.4.3

Changed in audio-recorder:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers