Bonjour,

Je suis actuellement en train de développer une application de contrôle d'un robot avec une tablette et cela inclut l'affichage de l'image de la webcam du robot.
Sur le robot est installé un Windows XP Embarqué (Embedded) ainsi qu'un serveur WIA Webcam Server.
La webcam raccordé en USB est une logitech Quickcam Sphere.
Sur la tablette je me connecte (création d'une socket) en wifi (partage de connexion de la tablette).
Pas de problème pour contrôler le robot cependant je n'arrive pas à afficher le flux vidéo.

J'ai essayé d'afficher le flux vidéo dans VLC. J'y arrive seulement sur le robot, impossible sur un PC distant.

voila le code de mon affichage vidéo:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
       /* Initialisation de la vidéo */
        videoView = (VideoView) findViewById(R.id.videoView);
        videoView.setOnErrorListener(this);
        videoView.setOnPreparedListener(this);
 
        final MediaController mediaController = new MediaController(this);
        mediaController.setAnchorView(videoView);
[...]
 
        url = "http://" + IP + ":8080/cameras/1";
[...]
     		        Log.i("* WIFIBOT *", "Tentative de lecture de la vidéo");
		        Uri video = Uri.parse(url);
		        videoView.setMediaController(mediaController);
		        videoView.setVideoURI(video);
		        videoView.start();
Et voici le logcat lorsque mon application est démarrer et que je me connecte:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
01-11 15:06:51.990: I/ActivityManager(144): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.formation.interf/.InterfaceActivity bnds=[220,277][292,349] } from pid 192
01-11 15:06:52.050: D/TabletStatusBar(195): lights on
01-11 15:06:52.060: I/* WIFIBOT *(831): Démarrage de l'application
01-11 15:06:52.070: W/* WIFIBOT *(831): onResume
01-11 15:06:52.170: W/InputMethodManager(144): getInstance
01-11 15:06:52.170: D/TabletStatusBar(195): lights on
01-11 15:06:52.560: I/ActivityManager(144): Displayed com.formation.interf/.InterfaceActivity: +542ms
01-11 15:06:54.340: I/* WIFIBOT *(831): Appuie sur le bouton connexion
01-11 15:06:54.340: I/* WIFIBOT *(831): adresse du robot - 192.168.43.132:15020
01-11 15:06:54.340: I/* WIFIBOT *(831): URL de la webcam - http://192.168.43.132:8080/cameras/1
01-11 15:06:54.340: W/* WIFIBOT *(831): Socket créée
01-11 15:06:54.380: D/dalvikvm(831): GC_CONCURRENT freed 548K, 15% free 7869K/9223K, paused 2ms+3ms
01-11 15:06:54.380: I/* WIFIBOT *(831): Tentative de lecture de la vidéo
01-11 15:06:54.380: D/MediaPlayer(831): Couldn't open file on client side, trying server side
01-11 15:06:54.380: I/AwesomePlayer(97): reset
01-11 15:06:54.380: I/AwesomePlayer(97): cancel player events
01-11 15:06:54.380: I/AwesomePlayer(97): cancel player events
01-11 15:06:54.380: I/AwesomePlayer(97): setDataSource_l('http://192.168.43.132:8080/cameras/1')
01-11 15:06:54.390: I/NuHTTPDataSource(97): connect to 192.168.43.132:8080/cameras/1 @0
01-11 15:06:56.350: W/InputMethodManager(831): getInstance
01-11 15:06:57.320: W/NuHTTPDataSource(97): Server did not give us the content length!
01-11 15:06:57.610: D/dalvikvm(192): GC_EXPLICIT freed 167K, 24% free 10422K/13703K, paused 2ms+2ms
01-11 15:06:58.530: E/MediaPlayer(831): error (1, -2147483648)
01-11 15:06:58.530: E/MediaPlayer(831): Error (1,-2147483648)
01-11 15:06:58.530: D/VideoView(831): Error: 1,-2147483648
01-11 15:06:58.610: D/dalvikvm(831): GC_FOR_ALLOC freed 423K, 14% free 8006K/9223K, paused 35ms
01-11 15:06:58.610: I/dalvikvm-heap(831): Grow heap (frag case) to 8.479MB for 513744-byte allocation
01-11 15:06:58.650: D/dalvikvm(831): GC_FOR_ALLOC freed 26K, 13% free 8481K/9735K, paused 32ms
01-11 15:06:58.690: D/dalvikvm(831): GC_FOR_ALLOC freed 0K, 13% free 8482K/9735K, paused 24ms
01-11 15:06:58.690: I/dalvikvm-heap(831): Grow heap (frag case) to 8.729MB for 289264-byte allocation
01-11 15:06:58.730: D/dalvikvm(831): GC_FOR_ALLOC freed 0K, 13% free 8764K/10055K, paused 30ms
01-11 15:06:58.800: D/TabletStatusBar(195): lights on
01-11 15:07:00.520: D/Tethering(144): TetherModeAliveState.processMessage what=5
01-11 15:07:00.520: D/Tethering(144): chooseUpstreamType(false),  dunRequired =false, iface=null
01-11 15:07:00.520: D/Tethering(144): notifying tethered with iface =null
01-11 15:07:00.520: D/Tethering(144): TetheredState.processMessage what=12
01-11 15:07:00.520: D/Tethering(144): Connection changed noop - dropping
01-11 15:07:00.520: D/NetworkManagmentService(144): rsp <213 00:17:ca:b4:a7:16 0.0.0.0 0 [up broadcast running multicast]>
01-11 15:07:00.520: D/NetworkManagmentService(144): flags <[up broadcast running multicast]>
01-11 15:07:00.820: W/InputMethodManager(831): getInstance
01-11 15:07:00.820: D/TabletStatusBar(195): lights on
01-11 15:07:00.830: W/InputManagerService(144): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@411b4d30
Pour résumer:
1 Robot -> PC sous Windows Embedded
1 tablette -> Android 4
1 PC -> juste pour le test

IP du robot 192.168.43.132
Image de la webcam accessible via un serveur Web Wia à l'adresse 192.168.43.132 sur n'importe quel équipement du réseau.
Image inaccessible depuis VLC ou mon application...



Quelqu'un aurait une idée de ce qui ne va pas?
Le problème est il dans mon code?

Merci d'avance de votre aide !

Nicolas