Microsoft/Windows2009. 12. 3. 15:50

어제 구매한 웹캠을 꼽고 리부팅을 안했더니, 저런 장치가 생겨있다. 뭥미?
그래서 검색을 했더니, MS의 당당한 대답

이것은 의도적으로 설계된 동작입니다.

[링크 : ttp://support.microsoft.com/kb/303302/ko]

너네.. 이렇게 다분히 의도적으로 요따구로 대답하는거.. 의도적이지? ㄱ-



음.. 아무튼 이녀석으로 스트리밍을 하도록 쓸수 있을려나?
그게 아니라면 굳이 만들어 놓을 필요는 없어 보이는데 -ㅁ-?
Posted by 구차니
# cat log.smbd
[2009/08/15 00:00:07,  0] lib/pidfile.c:121(pidfile_create)
  ERROR: smbd is already running. File /usr/local/samba/var/locks/smbd.pid exists and process id 687 is running.

삼바가 구동중에 제대로 종료되지 않고 재가동 될경우
$PIDDIR/smbd.pid
$PIDDIR/nmbd.pid

파일이 남아 있다 보면, 위와 같이 이미 구동중으로 착각을 하고
smbd나 nmbd를 구동하는데 실패를 한다.

fork() / execl() 로 구동시에는
waitpid() 에서 벗어 나지 못하고 멈추는 현상이 발생했다.





결론 : 혹시 모르니 종료가 불확실한 시스템(임베디드?)에서는 삼바 구동 이전에 pid 파일을 지워주도록 하는게 좋을듯 하다.
Posted by 구차니
개소리 왈왈2009. 12. 3. 00:47

[  390.900022] usb 1-2: new high speed USB device using ehci_hcd and address 3
[  391.034412] usb 1-2: configuration #1 chosen from 1 choice
[  391.036408] uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:3299)
[  391.038963] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[  391.049412] input: USB2.0 PC CAMERA as /devices/pci0000:00/0000:00:10.4/usb1/1-2/1-2:1.0/input/input5

이녀석은.. UVC로 인식은 하는데 제대로 쓰지는 못한다.
물론 /dev/video0 로 생성은 된다. (내가 쓸줄 몰라서 그런걸지도 ㄱ-)
(윈도우에서는 드라이버 설치 없이 되지만, Ubuntu 9.10에서는 UVC로 인식하려다 실패한다.)





[더불정보기술 X-LUK DBC-UP : http://blog.danawa.com/prod/?prod_c=911980&]

[  566.940028] usb 2-2: new full speed USB device using uhci_hcd and address 2
[  567.064034] usb 2-2: device descriptor read/64, error -71
[  567.288030] usb 2-2: device descriptor read/64, error -71
[  567.504030] usb 2-2: new full speed USB device using uhci_hcd and address 3
[  567.697288] usb 2-2: configuration #1 chosen from 1 choice
[  567.904955] gspca: main v2.6.0 registered
[  567.914840] gspca: probing 0ac8:301b
[  568.235158] zc3xx: probe sensor -> 000a
[  568.235166] zc3xx: Find Sensor PB0330. Chip revision 0
[  568.239289] gspca: probe ok
[  568.239326] usbcore: registered new interface driver zc3xx
[  568.239332] zc3xx: registered

(2009/12/06 수정)
이녀석은 video0 대신에
/dev/audio1
/dev/dsp1
두개가 생기는데, 여전히 안된다 ㅠ.ㅠ
(윈도우에서도 별도로 제공하는 드라이버를 설치해야 한다.)



결론 : ffmpeg 에서 쓰는법은 다음 기회에 -ㅁ-!

'개소리 왈왈' 카테고리의 다른 글

토익일정  (0) 2009.12.06
super battery  (2) 2009.12.04
잠이 많아진다  (2) 2009.12.02
리눅스 마스터 2급 2차 시험  (2) 2009.11.30
아 세상이란 ㅋㅋ  (6) 2009.11.26
Posted by 구차니
프로그램 사용/busybox2009. 12. 2. 19:00
static / dhcp 로 변경하는 일련의 함수들을 만들었는데,

static -> interface 파일변경 -> ifdown -> ifup -> dhcp
dhcp -> interface 파일변경 -> ifdown -> ifup -> static

순서로 작동되도록 했는데,
static에서 dhcp로는 udhcp 프로세스가 이상없이 작동하는데
dhcp에서 static으로는 udhcp 프로세스가 죽지 않는다.

그래서 계속 순환하면 udhcp 프로세스가 쌓여간다(좀비는 아니고 Sleep 상태)


아무튼,

dhcp -> ifdown -> interface 파일변경 -> ifup -> static
으로 하니 제대로 작동한다.

아마 interface 파일 내용에
ifdown에 관련한 내용이 제대로 들어 있지않아 그랬던 것으로 보인다.


상관이 있을지 없을지 모르는 링크
[링크 : http://lists.busybox.net/pipermail/busybox/2007-July/062158.html]
Posted by 구차니
프로그램 사용/VLC2009. 12. 2. 15:50
VLC에서 웹캠 영상을 받기 위해서는 DirectShow로 하면된다.
위에서 "목록 새로고침"을 눌러 뒤의 콤보박스에서 선택후
"영상 크기" 에서 직접 입력을 해주면된다.

만약 영상 크기가 지원하지 않는다면 위와 같은 에러가 발생한다.
(0.8.6은 에러도 안보여준다.)


단점으로는, 윈도우 자체 비디오 뷰어보다 응답이 느리다.
Posted by 구차니
파일방2009. 12. 2. 14:20
웹캠사면 주는 프로그램인데,
누가 만든건지 궁금해서 검색을 하는데 딱히 답이 안나온다.
그냥 freeware이긴 한데 흐음..


DirectSHOW 예제 코드인거 같기도 하고
[링크 : http://msdn.microsoft.com/en-us/library/dd373424%28VS.85%29.aspx]

그 소스를 수정해서 누군가가 올려놓은거 같기도 하고
[링크 : http://noeld.com/programs.asp?cat=video#AMCap]
Posted by 구차니
개소리 왈왈2009. 12. 2. 10:26
아 겨울이지!

어쩐지 먹고 싶고 자고 싶더라













(응?)





12월 한달도 열심히!!!

'개소리 왈왈' 카테고리의 다른 글

super battery  (2) 2009.12.04
오우 젠장! 내돈!!! (UVC for linux failed)  (0) 2009.12.03
리눅스 마스터 2급 2차 시험  (2) 2009.11.30
아 세상이란 ㅋㅋ  (6) 2009.11.26
문득 든 생각 - 난 참 거만한거 같아  (2) 2009.11.24
Posted by 구차니
파일방2009. 12. 1. 10:29

맥 스타일의 어플리케이션 런쳐
[로켓닥 : http://rocketdock.com/]



데스크탑을 3D로 만들어주는 프로그램
[리얼데스크탑 : http://www.real-desktop.de/]
Posted by 구차니
Linux API/network2009. 11. 30. 17:35
ioctl은

#include <sys/ioctl.h>
int ioctl(int d, int request, ...);

이런 모양인데, int d는 descriptor로 socket을 통해 받아와야 한다.
그리고 request는 /usr/include/bits/ioctls.h 파일에 정의된 내용을 사용하면 된다.


잠시 socket을 소개하자면

#include <sys/socket.h>
int socket(int domain, int type, int protocol);

domain
    Name                Purpose                          Man page
    PF_UNIX, PF_LOCAL   Local communication              unix(7)
    PF_INET             IPv4 Internet protocols          ip(7)
    PF_INET6            IPv6 Internet protocols
    PF_IPX              IPX - Novell protocols
    PF_NETLINK          Kernel user interface device     netlink(7)
    PF_X25              ITU-T X.25 / ISO-8208 protocol   x25(7)
    PF_AX25             Amateur radio AX.25 protocol
    PF_ATMPVC           Access to raw ATM PVCs
    PF_APPLETALK        Appletalk                        ddp(7)
    PF_PACKET           Low level packet interface       packet(7)

type
   SOCK_STREAM
          Provides sequenced, reliable, two-way, connection-based byte streams.  An  out-of-band  data  transmission
          mechanism may be supported.

   SOCK_DGRAM
          Supports datagrams (connectionless, unreliable messages of a fixed maximum length).

   SOCK_SEQPACKET(is not implemented for AF_INET)
          Provides  a  sequenced,  reliable,  two-way connection-based data transmission path for datagrams of fixed
          maximum length; a consumer is required to read an entire packet with each read system call.

   SOCK_RAW
          Provides raw network protocol access.

   SOCK_RDM
          Provides a reliable datagram layer that does not guarantee ordering.

   SOCK_PACKET
          Obsolete and should not be used in new programs; see packet(7).


protocol
    Normally only a single protocol exists to support a particular socket type within a given protocol family, in which case protocol can be specified as 0.

값들을 필요로 한다.

[링크 : http://www.joinc.co.kr/modules/moniwiki/wiki.php/article/network_information#s-2.2]

'Linux API > network' 카테고리의 다른 글

hton(), ntoh()  (0) 2011.09.26
netstat 에서 0.0.0.0의 의미  (2) 2009.12.07
termios 구조체를 이용한 자국반향(echo) 제어  (0) 2009.08.27
canonical / non-canonical  (0) 2009.08.27
struct in_addr  (0) 2009.08.18
Posted by 구차니
Linux2009. 11. 30. 16:53
본것중에 가장 간단하게 /proc/net/route를 파싱하는 소스인 듯하다.

# cat /proc/net/route
Iface   Destination     Gateway         Flags   RefCnt  Use     Metric  Mask            MTU     Window  IRTT
eth0    000AA8C0        00000000        0001    0       0       0       00FFFFFF        0       0       0
eth0    00000000        010AA8C0        0003    0       0       0       00000000        0       0       0

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.10.0    *               255.255.255.0   U     0      0        0 eth0
default         192.168.10.1    0.0.0.0         UG    0      0        0 eth0

아무튼 route로 출력하는 default가 UG 플래그로 default gateway이며,
파일에서는 Destination과 Mask가 0x00000000 인 녀석이 default gateway이다.

#include "stdio.h"
#include "stdlib.h"
#include "unistd.h"

#define IP_PRINT(a) \
    *((unsigned char *)(&a)), \
    *(((unsigned char *)(&a)) + 1), \
    *(((unsigned char *)(&a)) + 2), \
    *(((unsigned char *)(&a)) + 3)

int main()
{
    FILE* fp = fopen("/proc/net/route", "r");
    char buf[256];
    static char iface[256];
    unsigned int destination, gateway, flags, refcnt, use, metric, mask;
    int ret;

    if (fp == NULL)
        exit(-1);

    while (fgets(buf, 255, fp)) {
        if (!strncmp(buf, "Iface", 5))
            continue;

        ret = sscanf(buf, "%s\t%x\t%x\t%d\t%d\t%d\t%d\t%x",
                    iface, &destination, &gateway, &flags,
                    &refcnt, &use, &metric, &mask);

        if (ret < 8) {
            fprintf(stderr, "ERROR: line read error\n");
            continue;
        }

        if (destination != 0) {
            fprintf(stderr, "%s: gateway %u.%u.%u.%u, "
                    "destination %u.%u.%u.%u netmask %u.%u.%u.%u\n",
                    iface,
                    IP_PRINT(gateway),
                    IP_PRINT(destination),
                    IP_PRINT(mask));
            continue;
        }

        if (mask != 0) {
            fprintf(stderr, "%s: gateway %u.%u.%u.%u, default, "
                    "but have netmask %u.%u.%u.%u???\n",
                    iface,
                    IP_PRINT(gateway),
                    IP_PRINT(mask));
            continue;
        }

        fprintf(stderr, "%s: gateway %u.%u.%u.%u, default\n",
                iface,
                IP_PRINT(gateway));
    }
    fclose(fp);
}


[링크 : http://elenoa.tistory.com/72]

'Linux' 카테고리의 다른 글

lsof - list Open File  (0) 2009.12.07
filesystem - msdos, vfat, umsdos  (0) 2009.12.06
좀비 프로세스 생성하기(!)  (0) 2009.11.20
ps에서 [프로세스] 의 의미 - bracket process name in ps  (0) 2009.11.20
ps - Process Status  (2) 2009.11.20
Posted by 구차니