Skip to content

Commit

Permalink
remove v4l1 support. remove bundled rtpmanager and audioresample elem…
Browse files Browse the repository at this point in the history
…ents.
  • Loading branch information
Justin Karneges committed Apr 6, 2012
1 parent 1d18563 commit d6bd9f0
Show file tree
Hide file tree
Showing 51 changed files with 13 additions and 17,496 deletions.
2 changes: 1 addition & 1 deletion gstprovider/bins.cpp
Expand Up @@ -329,7 +329,7 @@ GstElement *bins_audioenc_create(const QString &codec, int id, int rate, int siz
g_object_set(G_OBJECT(audiortppay), "pt", id, NULL);

GstElement *audioconvert = gst_element_factory_make("audioconvert", NULL);
GstElement *audioresample = gst_element_factory_make("legacyresample", NULL);
GstElement *audioresample = gst_element_factory_make("audioresample", NULL);

GstStructure *cs;
GstCaps *caps = gst_caps_new_empty();
Expand Down
75 changes: 1 addition & 74 deletions gstprovider/deviceenum/deviceenum_unix.cpp
Expand Up @@ -35,7 +35,7 @@
# include <sys/stat.h>
# include <dirent.h>
# include <sys/ioctl.h>
# include <linux/videodev.h>
# include <linux/videodev2.h>
#endif

namespace DeviceEnum {
Expand Down Expand Up @@ -475,77 +475,6 @@ static QList<V4LName> get_v4l_names(const QString &path, bool sys)
return out;
}

// v4l detection scheme adapted from PWLib (used by Ekiga/Gnomemeeting)
static QList<Item> get_v4l_items()
{
#ifdef Q_OS_LINUX
QList<Item> out;

QList<V4LName> list = get_v4l_names("/sys/class/video4linux", true);
if(list.isEmpty())
list = get_v4l_names("/proc/video/dev", false);

// if we can't find anything, then do a raw scan for possibilities
if(list.isEmpty())
{
QStringList possible = scan_for_videodevs("/dev");
foreach(QString str, possible)
{
V4LName v;
v.dev = str;
list += v;
}
}

for(int n = 0; n < list.count(); ++n)
{
V4LName &v = list[n];

// if we already have a friendly name then we'll skip the confirm
// in order to save resources. the only real drawback here that
// I can think of is if the device isn't a capture type. but
// what does it mean to have a V4L device that isn't capture??
if(v.friendlyName.isEmpty())
{
int fd = open(QFile::encodeName(v.dev).data(), O_RDONLY | O_NONBLOCK);
if(fd == -1)
continue;

// get video capabilities and close
struct video_capability caps;
memset(&caps, 0, sizeof(caps));
int ret = ioctl(fd, VIDIOCGCAP, &caps);
close(fd);
if(ret == -1)
continue;

if(!(caps.type & VID_TYPE_CAPTURE))
continue;

v.friendlyName = caps.name;
}

Item i;
i.type = Item::Video;
i.dir = Item::Input;
i.name = v.friendlyName;
i.driver = "v4l";
i.id = v.dev;

// HACK
if(v.friendlyName == "Labtec Webcam Notebook")
i.explicitCaptureSize = QSize(640, 480);

out += i;
}

return out;
#else
// return empty list if non-linux
return QList<Item>();
#endif
}

static QList<Item> get_v4l2_items()
{
#ifdef Q_OS_LINUX
Expand Down Expand Up @@ -636,8 +565,6 @@ QList<Item> videoInputItems(const QString &driver)
QList<Item> out;
if(driver.isEmpty() || driver == "v4l2")
out += get_v4l2_items();
if(driver.isEmpty() || driver == "v4l")
out += get_v4l_items();
return out;
}

Expand Down
22 changes: 0 additions & 22 deletions gstprovider/gstelements/audioresample.pri

This file was deleted.

23 changes: 0 additions & 23 deletions gstprovider/gstelements/audioresample/Makefile.am

This file was deleted.

0 comments on commit d6bd9f0

Please sign in to comment.