~noskcaj/ubuntu/trusty/ekiga/ftbfs

« back to all changes in this revision

Viewing changes to lib/engine/components/hal-dbus/hal-v4l-helper.c

  • Committer: Package Import Robot
  • Author(s): Eugen Dedu, Eugen Dedu, Kilian Krause, Jordi Mallach
  • Date: 2012-10-16 14:47:35 UTC
  • mfrom: (5.1.6)
  • Revision ID: package-import@ubuntu.com-20121016144735-qb93utz05m94nfqp
Tags: 3.9.90-1
[ Eugen Dedu ]
* New upstream release (Closes: #679255, #520830, #670405, #551844,
  #617528, #684999, #538738, #530254, #378846, #582157, #545693,
  #689413, #545693)
* Enable support for experimental Jabber/XMPP protocol
* Remove libx264-dev, libavcodec-dev from Build-Deps as they are for
  OPAL library
* Remove fix-linux-gnueabihf-build.patch, unneeded anymore
* Remove unnecessary libsigc++ Build-Dep

[ Kilian Krause ]
* Bump debhelper compat to 9 to use multiarch for dh_auto_configure. Adjust
  build-depends on debhelper to >= 8.1.3
* debian/rules: make clean target somewhat more ignorant on missing
  build-deps
* Add libx264-dev, libavcodec-dev and libloudmouth1-dev to Build-Deps as
  OPAL has now support for H.263+ and H.264

[ Jordi Mallach ]
* Watch for .xz tarballs, and don't uupdate.
* Merge and acknowledge Héctor Orón's 3.2.7-4.1 NMU in unstable, thanks!
* Refresh fix-linux-gnueabihf-build.patch.
* Update Vcs-Svn URL.
* Drop debian/patches/configure.ac_languages_fix.patch, fixed upstream.
* Drop support for dh-autoreconf, as it's not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 *                         ------------------------------------------
32
32
 *   begin                : written in 2008 by Matthias Schneider
33
33
 *   copyright            : (c) 2008 by Matthias Schneider
34
 
 *   description          : Used to detect the names and supported V4L 
35
 
 *                          interfaces of a new video4linux device (this 
 
34
 *   description          : Used to detect the names and supported V4L
 
35
 *                          interfaces of a new video4linux device (this
36
36
 *                          should really be in HALd itself.
37
37
 *
38
38
 */
39
39
 
40
 
#include <fcntl.h>      // for open() 
41
 
#include <unistd.h>     // for read(), write(), close() 
 
40
#include <fcntl.h>      // for open()
 
41
#include <unistd.h>     // for read(), write(), close()
42
42
#include <sys/ioctl.h>  // for ioctl()
43
43
#include <stdlib.h>     // for free(), malloc()
44
44
#include <string.h>     // for strlen()
45
45
#include <stdio.h>
 
46
 
 
47
#ifdef HAVE_OLD_V4L
46
48
#include <linux/videodev.h>
 
49
#else
 
50
#include <linux/videodev2.h>
 
51
#include <libv4l1-videodev.h>
 
52
#endif
47
53
 
48
54
int v4l_get_device_names (const char* device, char** v4l1_name, char** v4l2_name) {
49
55
  int fp;
50
56
  unsigned ret = 0; // Device not valid
51
 
  
 
57
 
52
58
  *v4l1_name = NULL;
53
59
  *v4l2_name = NULL;
54
60
 
55
61
  if((fp = open(device, O_RDONLY)) == 0) {
56
62
    return -1;  // Unable to open device
57
63
  }
58
 
 
 
64
 
59
65
  struct video_capability  v4l1_caps;
60
66
  if (ioctl(fp, VIDIOCGCAP, &v4l1_caps) >= 0 && (v4l1_caps.type & VID_TYPE_CAPTURE) != 0) {
61
67
    ret |= 1;
84
90
 
85
91
  *name = NULL;
86
92
}
87