Re: [ANNOUNCE] experimental alsa stream support at xawtv3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em 28-05-2011 10:01, RÃmi Denis-Courmont escreveu:
> Le samedi 28 mai 2011 15:44:52 Mauro Carvalho Chehab, vous avez Ãcrit :
>>> int libv4l2_get_associated_devive(int fd, enum
>>> libv4l2_associated_device_types type, ...); Where fd is the fd of an
>>> open /dev/video node, and ... is a param through which the device gets
>>> returned (I guess a char * to a buffer of MAX_PATH length where the
>>> device name gets stored, this could
>>> be an also identifier like hw:0.0 or in case of vbi a /dev/vbi# path,
>>> etc.
>>
>> Using the fd will be more complex, as we'll loose the device node (is there
>> a glibc way to get the device path from the fd?). Well, we may associate
>> the fd descriptor with the device node internally at libv4l.
> 
> Not really. fstat() can tell you fd is a character device, and provide the 
> major and minor though.

Yeah, major/minor should be enough to associate it with the device info. The
library will need to read the uevent information also, to get the device major/minor,
but this should work properly.

I'll write a method for the library to allow using the file descriptor instead
of the file name.

Cheers,
Mauro.

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux