Re: [Spice-devel] Usb redirection

2013-01-01 Thread Jackson
P.S In libusb int usbi_handle_transfer_completion(...) { ... if (transfer->callback) transfer->callback(transfer); ... } this transfer->callback always jump to usbredirhost.c static void usbredirhost_control_packet_complete() ___ Spic

Re: [Spice-devel] Usb redirection

2012-12-28 Thread Jackson
ok, thanks! I observe spice gtk static int usbredir_write_callback(void *user_data, uint8_t *data, int count) { ... printf("data %d\n", *data); ... } when I redirect webcam, and using *amcap*. The data display data 100 data 100 data 100 ... data 4 data 5 data 11 data 100 data 100 ... data 14 data

Re: [Spice-devel] Usb redirection

2012-12-26 Thread Jackson
OK! in my situation, my webcam can redirect to VM, then, I open amcap and check the code. I find that there are two ways running into the same for loop, and I'm not sure it is normal or not? first route the client receive message through usbredir channel, then 1. usbredir_handle_msg 2. usbredirpa

Re: [Spice-devel] Usb redirection

2012-12-23 Thread Jackson
Thanks, now I can use libusb_handle_events(). What kind of situation the code will run into int usbredirparser_do_write(struct usbredirparser *parser_pub) { ... if ((parser->flags & usbredirparser_fl_write_cb_owns_buffer) && w != wbuf->len) abort(); ... } _

Re: [Spice-devel] Usb redirection

2012-12-23 Thread Jackson
Thanks, now I can use libusb_handle_events(). What kind of situation the code will run into int usbredirparser_do_write(struct usbredirparser *parser_pub) { ... if ((parser->flags & usbredirparser_fl_write_cb_owns_buffer) && w != wbuf->len) abort(); ... } __

[Spice-devel] USB redirection structure??

2012-12-20 Thread Jackson
what is the USB structure, flow in QEMU and spice client? (Including host controller, peripheral bus driver...) ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] Usb redirection

2012-12-18 Thread Jackson
> > 2) The usbredirhost_read_guest_data() call from usbredir_handle_msg > has a complete packet, and one which requires it to make some libusb > call which takes one of libusb's internal locks, and for some reason > the libusb_handle_events() call holds that lock while it is sleeping? The usbred

Re: [Spice-devel] Usb redirection

2012-12-17 Thread Jackson
And there is anther question. In the function "static gpointer spice_usb_device_manager_usb_ev_thread()", I use libusb_handle_events(context) to handle events, but I only receive data from server through the function "usbredir_read_callback()". After 60 secs, the client send data to server thr

Re: [Spice-devel] Usb redirection

2012-12-17 Thread Jackson
> > And I print the data in usbredir_write_callback() & usbredir_free_write_cb_data() > > ... > > write_data = 100 > > free_data = 100 > > write_data = 17 > > write_data = 17 > > write_data = 4 > > write_data = 5 > > write_data = 11 > > free_data = 17 > > free_data = 238(error) > > > What are the

Re: [Spice-devel] Usb redirection

2012-12-17 Thread Jackson
OK! I use spice-gtk with usb redirection 0.4.3 and trying to redirect webcam to VM. There are some problems causing the client crashed when usbredir_free_write_cb_data()->usbredirhost_free_write_buffer()->...try to free data. And I print the data in usbredir_write_callback() & usbredir_free_wr

[Spice-devel] Usb redirection

2012-12-11 Thread Jackson
whether the usb 2.0 is supported in usbredirection or not? and what is usb transmission speed depended on? ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] spice-gtk usb-redirection

2012-08-16 Thread Jackson
ctrl [data] And what's the main action and purpose of this cmd? thanks ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] spice-gtk usb-redirection

2012-08-16 Thread Jackson
Hello~ I run the two sample codes usbredirserver and usbredirtestclient. After the client connects to the server and tpyes help, it displays a hint: ctrl [data] what does each tag mean? thanks a lot! ___ Spice-devel mailing list Spice-devel

Re: [Spice-devel] spice-gtk usb-redirection

2012-08-08 Thread Jackson
> Yes, in the second case qemu is the tcp client, and the ip and port number > are that of the usbredirserver process which is acting as the usbredir-host. that means I have to know the IP address to describe the qemu cmdline before a spice-client connects to spice-server. So, if I can't get IP a

Re: [Spice-devel] spice-gtk usb-redirection

2012-08-07 Thread Jackson
> examples of the 2 > on the qemu cmdline are: > > -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb- >redir,chardev=usbredirchardev1 > > -chardev socket,host=192.168.1.9,port=4000,id=usbredirchardev2 -device usb- >redir,chardev=usbredirchardev2 Excuse me, the second qemu cmdline,

Re: [Spice-devel] spice-gtk usb-redirection

2012-08-04 Thread Jackson
> Erm, no qemu implements a usbredir-guest in the form of the usb-redir > qemu device. This qemu device uses a chardev to talk to the usbredir-host, > one way to do this is through a spice channel to a spice-gtk using client, > the other way is using a tcp-client-socket to usbredirserver, so > usb

Re: [Spice-devel] spice-gtk usb-redirection

2012-08-03 Thread Jackson
And are there any usb redirections on windows? ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] spice-gtk usb-redirection

2012-08-02 Thread Jackson
> Not that comlicated, there is just a wrapper of usbredir flow > constructed by the spice channel:num 9. > You can view spicy-gtk as the usbredir client and the qemu/spice-server > as the usbredirsever. But in usb-redirection-protocol.txt and readme.txt, the definitions define virtual machine as

[Spice-devel] spice-gtk usb-redirection

2012-08-01 Thread Jackson
In usbredir-0.4.3, there are two simple programs usbredirserver and usbredirtestclient. Usbredirserver creates a port and enters a usb vid:pid waiting for the connection of testclient. Usbredirtestclient enters the matching port and server to connect to the server. In spice-gtk, how does the s

[Spice-devel] SPICY with usb redirection webcam

2012-06-28 Thread Jackson
I use spicy to connect to a VM supporting usb redirection, but there are some problems with usb webcam. Plug in the webcam with usb redirection and then, I open the webcam application (ex: skype or amcap); however, the VM only shows the first view and stop running. The client and the VM are alm