~ubuntu-branches/debian/jessie/cheese/jessie

« back to all changes in this revision

Viewing changes to tests/cheese-test-monitor.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2010-05-04 17:37:18 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20100504173718-k2rx3nryi4vd0xyx
Tags: 2.30.1-1
* New upstream release.
  - HAL dependency has been dropped. Use (g)udev for v4l capability probing
    on Linux. Closes: #573774
  - Split code into separate libraries.
* debian/control.in
  - Drop Build-Depends on libhal-dev.
  - Drop Build-Depends on libebook1.2-dev.
  - Bump Build-Depends on libgtk2.0-dev to (>= 2.19.1).
  - Bump Build-Depends on libgstreamer*-dev to (>= 0.10.23).
  - Add Build-Depends on libcanberra-gtk-dev.
  - Add Build-Depends on libxtst-dev.
  - Add Build-Depends on libgudev-1.0-dev on Linux.
  - Bump Standards-Version to 3.8.4. No further changes.
* Switch to source format 3.0 (quilt)
  - Add debian/source/format.
* debian/rules
  - Drop lpia specific configure flags, lpia is dead.
* Update package layout (based on work by Ubuntu)
  - Move data files into new cheese-common package.
  - Keep binary along with its desktop and dbus service file in the cheese
    package.
  - Add libcheese-gtk18 and libcheese-gtk-dev package for the new
    libcheese-gtk library. Use a symbols file for improved shlibs
    dependencies.
  - Add Conflicts/Replaces to cheese-common to ensure proper upgrades from
    previous versions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <glib.h>
 
2
 
 
3
#include "cheese-camera-device-monitor.h"
 
4
#include "cheese-camera-device.h"
 
5
 
 
6
static void
 
7
added_cb (CheeseCameraDeviceMonitor *monitor,
 
8
          const char *id,
 
9
          const char *device_file,
 
10
          const char *product_name,
 
11
          gint api_version)
 
12
{
 
13
  g_message ("Added new device with ID '%s'", id);
 
14
}
 
15
 
 
16
static void
 
17
removed_cb (CheeseCameraDeviceMonitor *monitor,
 
18
            const char                *id)
 
19
{
 
20
  g_message ("Removed device with ID '%s'", id);
 
21
}
 
22
 
 
23
int
 
24
main (int argc, char **argv)
 
25
{
 
26
  CheeseCameraDeviceMonitor *monitor;
 
27
 
 
28
  gst_init (&argc, &argv);
 
29
 
 
30
  monitor = cheese_camera_device_monitor_new ();
 
31
  g_signal_connect (G_OBJECT (monitor), "added",
 
32
                    G_CALLBACK (added_cb), NULL);
 
33
  g_signal_connect (G_OBJECT (monitor), "removed",
 
34
                    G_CALLBACK (removed_cb), NULL);
 
35
  cheese_camera_device_monitor_coldplug (monitor);
 
36
 
 
37
  g_main_loop_run (g_main_loop_new (NULL, FALSE));
 
38
 
 
39
  return 0;
 
40
}