[vlc-devel] commit: udev: item type depends on the subsystem, not always "card" ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Oct 18 13:47:36 CEST 2009
vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 17 17:51:28 2009 +0300| [ef4e8a614a6a7f0850d2356e6b4ff6a043d76fd5] | committer: Rémi Denis-Courmont
udev: item type depends on the subsystem, not always "card"
(cherry picked from commit 83785c78d0ccdd5c351b9264d5c1a0011ea90164)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ef4e8a614a6a7f0850d2356e6b4ff6a043d76fd5
---
modules/services_discovery/udev.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index 1bde9c9..b443a83 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -71,6 +71,7 @@ struct subsys
char * (*get_mrl) (struct udev_device *dev);
char * (*get_name) (struct udev_device *dev);
char * (*get_cat) (struct udev_device *dev);
+ int item_type;
};
struct services_discovery_sys_t
@@ -117,7 +118,8 @@ static int AddDevice (services_discovery_t *sd, struct udev_device *dev)
char *name = p_sys->subsys->get_name (dev);
input_item_t *item = input_item_NewWithType (VLC_OBJECT (sd), mrl,
name ? name : mrl,
- 0, NULL, 0, -1, ITEM_TYPE_CARD);
+ 0, NULL, 0, -1,
+ p_sys->subsys->item_type);
msg_Dbg (sd, "adding %s (%s)", mrl, name);
free (name);
free (mrl);
@@ -390,7 +392,7 @@ static char *v4l_get_cat (struct udev_device *dev)
int OpenV4L (vlc_object_t *obj)
{
static const struct subsys subsys = {
- "video4linux", v4l_get_mrl, v4l_get_name, v4l_get_cat,
+ "video4linux", v4l_get_mrl, v4l_get_name, v4l_get_cat, ITEM_TYPE_CARD,
};
return Open (obj, &subsys);
@@ -465,7 +467,7 @@ static char *disc_get_cat (struct udev_device *dev)
int OpenDisc (vlc_object_t *obj)
{
static const struct subsys subsys = {
- "block", disc_get_mrl, disc_get_name, disc_get_cat,
+ "block", disc_get_mrl, disc_get_name, disc_get_cat, ITEM_TYPE_DISC,
};
return Open (obj, &subsys);
More information about the vlc-devel
mailing list