1 |
ssuominen 11/03/31 07:46:45 |
2 |
|
3 |
Added: psimedia-1.0.3-linux-headers-2.6.38.patch |
4 |
Log: |
5 |
Remove support for V4L v1 because linux-headers-2.6.38 stopped shipping linux/videodev.h. |
6 |
|
7 |
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-im/psimedia/files/psimedia-1.0.3-linux-headers-2.6.38.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/psimedia/files/psimedia-1.0.3-linux-headers-2.6.38.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/psimedia/files/psimedia-1.0.3-linux-headers-2.6.38.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: psimedia-1.0.3-linux-headers-2.6.38.patch |
16 |
=================================================================== |
17 |
http://pkgs.fedoraproject.org/gitweb/?p=psimedia.git;a=blob_plain;f=psimedia-remove-v4l.patch;hb=HEAD |
18 |
|
19 |
--- gstprovider/deviceenum/deviceenum_unix.cpp |
20 |
+++ gstprovider/deviceenum/deviceenum_unix.cpp |
21 |
@@ -35,7 +35,7 @@ |
22 |
# include <sys/stat.h> |
23 |
# include <dirent.h> |
24 |
# include <sys/ioctl.h> |
25 |
-# include <linux/videodev.h> |
26 |
+# include <linux/videodev2.h> |
27 |
#endif |
28 |
|
29 |
namespace DeviceEnum { |
30 |
@@ -478,72 +478,7 @@ |
31 |
// v4l detection scheme adapted from PWLib (used by Ekiga/Gnomemeeting) |
32 |
static QList<Item> get_v4l_items() |
33 |
{ |
34 |
-#ifdef Q_OS_LINUX |
35 |
- QList<Item> out; |
36 |
- |
37 |
- QList<V4LName> list = get_v4l_names("/sys/class/video4linux", true); |
38 |
- if(list.isEmpty()) |
39 |
- list = get_v4l_names("/proc/video/dev", false); |
40 |
- |
41 |
- // if we can't find anything, then do a raw scan for possibilities |
42 |
- if(list.isEmpty()) |
43 |
- { |
44 |
- QStringList possible = scan_for_videodevs("/dev"); |
45 |
- foreach(QString str, possible) |
46 |
- { |
47 |
- V4LName v; |
48 |
- v.dev = str; |
49 |
- list += v; |
50 |
- } |
51 |
- } |
52 |
- |
53 |
- for(int n = 0; n < list.count(); ++n) |
54 |
- { |
55 |
- V4LName &v = list[n]; |
56 |
- |
57 |
- // if we already have a friendly name then we'll skip the confirm |
58 |
- // in order to save resources. the only real drawback here that |
59 |
- // I can think of is if the device isn't a capture type. but |
60 |
- // what does it mean to have a V4L device that isn't capture?? |
61 |
- if(v.friendlyName.isEmpty()) |
62 |
- { |
63 |
- int fd = open(QFile::encodeName(v.dev).data(), O_RDONLY | O_NONBLOCK); |
64 |
- if(fd == -1) |
65 |
- continue; |
66 |
- |
67 |
- // get video capabilities and close |
68 |
- struct video_capability caps; |
69 |
- memset(&caps, 0, sizeof(caps)); |
70 |
- int ret = ioctl(fd, VIDIOCGCAP, &caps); |
71 |
- close(fd); |
72 |
- if(ret == -1) |
73 |
- continue; |
74 |
- |
75 |
- if(!(caps.type & VID_TYPE_CAPTURE)) |
76 |
- continue; |
77 |
- |
78 |
- v.friendlyName = caps.name; |
79 |
- } |
80 |
- |
81 |
- Item i; |
82 |
- i.type = Item::Video; |
83 |
- i.dir = Item::Input; |
84 |
- i.name = v.friendlyName; |
85 |
- i.driver = "v4l"; |
86 |
- i.id = v.dev; |
87 |
- |
88 |
- // HACK |
89 |
- if(v.friendlyName == "Labtec Webcam Notebook") |
90 |
- i.explicitCaptureSize = QSize(640, 480); |
91 |
- |
92 |
- out += i; |
93 |
- } |
94 |
- |
95 |
- return out; |
96 |
-#else |
97 |
- // return empty list if non-linux |
98 |
return QList<Item>(); |
99 |
-#endif |
100 |
} |
101 |
|
102 |
static QList<Item> get_v4l2_items() |