LinuxÉãÏñÍ·±à³ÌС½á
ת×Ô£ºhttp://blog.chinaunix.net/u/7547/showart_122619.html
1.open device:
video_dev = open("\dev\video0",O_RDWR));
2.get the information of the video device
struct video_capability video_cap;
memset(&video_cap,0,sizeof(video_cap));
if(ioctl(video_dev,VIDIOCGCAP,&video_cap) == -1)
{
perror("Cann't get the information of the video device");
close(video_dev);
exit(1);
}
3.get the information of the channels
struct video_channel video_chan;
memset(&video_chan,0,sizeof(video_chan));
for(channel = 0;channel < video_cap.channels;channel++)
{
video_chan.channel = channel;
if(ioctl(video_dev,VIDIOCGCHAN,&video_chan) == -1)
{
perror("Cann't get the information of the channels");
close(video_dev);
exit(3);
}
if(video_chan.type == VIDEO_TYPE_TV)
{
#ifdef DEBUG
printf("NO.%d channel is %s,type is tv!\n",channel,video_chan.name);
#endif
}
if(video_chan.type == VIDEO_TYPE_CAMERA)
Ïà¹ØÎĵµ£º
http://news.csdn.net/a/20091229/216149.html
Techradar£ºLinuxÑݱäµÄ15¸öÖØ´óÀï³Ì±®
2009-12-29 15:50 | 273´ÎÔĶÁ | À´Ô´£º»ª¾ü×ÊѶ ¡¾ÒÑÓÐ0ÌõÆÀÂÛ¡¿·¢±íÆÀÂÛ
¹Ø¼ü´Ê£ºLinux | ¸ÐлcarlkxiafhwfhwµÄÌṩ | ÊÕ²ØÕâÆªÐÂÎÅ
¾Ý¹úÍâýÌ屨µÀ£¬½üÈÕ£¬×ÊÑ¶ÍøÕ¾TechradarÁоÙÁ˽üÊ®ÄêÀ´LinuxÏ ......
¹¦ÄÜ˵Ã÷£ºÁгöĿǰÓë¹ýÈ¥µÇÈëϵͳµÄÓû§Ïà¹ØÐÅÏ¢¡£
¡¡¡¡Óï¡¡¡¡·¨£ºlast [-adRx][-f <¼Ç¼Îļþ>][-n <ÏÔʾÁÐÊý>][ÕʺÅÃû³Æ...][ÖÕ¶Ë»ú±àºÅ...]
¡¡¡¡²¹³ä˵Ã÷£ºµ¥¶ÀÖ´ÐÐlastÖ¸ÁËü»á¶ÁȡλÓÚ/var/logĿ¼Ï£¬Ãû³ÆÎªwtmpµÄÎļþ£¬²¢°Ñ¸Ã¸øÎļþµÄÄÚÈݼǼµÄµÇÈëϵͳµÄÓû§Ãûµ¥È«²¿ÏÔʾ³öÀ´¡£
¡¡¡¡²Î¡¡¡¡Êý£º
......
javaµÄ°²×°
·½·¨Ò»
´ò¿ªÖÕ¶Ë£¬Ö´ÐÐÒÔÏÂÃüÁ»òʹÓÃAdept/ÐÂÁ¢µÃÈí¼þ¹ÜÀíÆ÷£¬ÔÚÆäÖзֱðËÑË÷"sun-java6-jre"ºÍ"sun-java6-jdk"²¢±ê¼Ç°²×°¡£
sudo apt-get install sun-java6-jre
Èç¹û¿Õ¼ä¸»Ô££¬½¨Òé°²×°Ò»¸öJDK¡£
sudo apt-get install sun-java6-jdk
Ìáʾ£º°²×°¹ý³ÌÖÐÐèÒªÄã»Ø´ðÊÇ·ñͬÒâʹÓÃÐÒ飨ÖÕ¶ËÖкìÀ ......
ÔÚÔĶÁNginxµÄ´úÂë.ÏÈÅöµ½µÄÊÇÏ̲߳¿·ÖµÄ
ÒòΪ´Ómain¿ªÊ¼×îÔçÊÇ×öÏ̲߳¿·ÖµÄ¹¤×÷
ʵϰһÏÂpthread·½ÃæµÄÄÚÈÝ
#include "pthread.h"
#include "stdio.h"
void* thread_test(void* ptr)
{
while(1)
printf("i am child pthread\n");
}
int ma ......
1. ´ò¿ª´®¿Ú
¡¡¡¡ÓëÆäËûµÄ¹ØÓÚÉ豸±à³ÌµÄ·½·¨Ò»Ñù£¬ÔÚLinuxÏ£¬²Ù×÷¡¢¿ØÖÆ´®¿ÚÒ²ÊÇͨ¹ý²Ù×÷ÆðÉ豸Îļþ½øÐеġ£ÔÚLinuxÏ£¬´®¿ÚµÄÉ豸ÎļþÊÇ/dev/ttyS0»ò/dev/ttyS1µÈ¡£Òò´ËÒª¶Áд´®¿Ú£¬ÎÒÃÇÊ×ÏÈÒª´ò¿ª´®¿Ú£º
¡¡
¡¡¡¡char *dev = "/dev/ttyS0"£» //´®¿Ú1
¡¡
¡¡¡¡int fd = open£¨ dev£¬ O_RDWR £©£»
¡¡
¡¡¡¡//| O_NOCT ......