Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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)
   


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

linux ³õѧÃüÁî

1.ϵͳÐÅÏ¢ÏÔʾÃüÁî # uname -a               # ²é¿´ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n 1 /etc/issue   # ²é¿´²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo      # ²é¿´CPUÐÅÏ¢
# hostname   ......

Éó¼Æ¸ú×ÙLinuxµÄÒì³£»î¶¯


Éó¼Æ¸ú×ÙLinuxµÄÒì³£»î¶¯
Zhaoke, 2007-01-29
һЩÒì³£Óû§ÊÔͼÒÆȥϵͳÉϵÄËùÓл¼Ç¼(±ÈÈç ~/.bash_history), ²»¹ýÎÒÃÇ¿ÉÒÔʹÓÃרÃŵŤ¾ßÀ´¼àÊÓËùÓÐÓû§Ö´ÐеÄÃüÁî. ÍƼöÄãʹÓýø³Ì¼ÇÕÊÀ´¼Ç¼Óû§µÄ»î¶¯, Äã¿ÉÒÔͨ¹ý½ø³Ì¼ÇÕʲ鿴ÿһ¸öÓû§Ö´ÐеÄÃüÁî, °üÀ¨CPUʱ¼äºÍÄÚ´æÕ¼ÓÃ.
psacct³ÌÐòÌṩÁ˼¸¸ö½ø³Ì»î¶¯¼àÊ ......

LinuxÏß³Ìpthread±Ê¼Ç


ÔÚÔĶÁNginxµÄ´úÂë.ÏÈÅöµ½µÄÊÇÏ̲߳¿·ÖµÄ
ÒòΪ´Ómain¿ªÊ¼×îÔçÊÇ×öÏ̲߳¿·ÖµÄ¹¤×÷
ʵϰһÏÂpthread·½ÃæµÄÄÚÈÝ
#include "pthread.h"
#include "stdio.h"
void* thread_test(void* ptr)
{
        while(1)
        printf("i am child pthread\n");
}
int ma ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ