Ok, so I made some progress although I don't know if it's in the good direction 
First of all, I have tested gstreamer alone, with gst-launch, and it works great to capture, record and stream the webcam both on linux and windows. If anyone is interested this is the command I use for the server part in linux (it also works in windows with some changes):
gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv,width=640,height=480,framerate=30/1 ! tee name=t_vid ! queue ! videorate ! video/x-raw-yuv,framerate=30/1 ! theoraenc ! queue ! oggmux ! filesink location=test.ogg t_vid. ! queue ! xvimagesink sync=false t_vid. ! queue ! ffmpegcolorspace ! smokeenc keyframe=8 qmax=40 ! udpsink host=192.168.2.70 port=5000
gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv,width=640,height=480,framerate=30/1 ! tee name=t_vid ! queue ! videorate ! video/x-raw-yuv,framerate=30/1 ! theoraenc ! queue ! oggmux ! filesink location=test.ogg t_vid. ! queue ! xvimagesink sync=false t_vid. ! queue ! ffmpegcolorspace ! smokeenc keyframe=8 qmax=40 ! udpsink host=192.168.2.70 port=5000
To copy to clipboard, switch view to plain text mode
I also have been able to play a video recorded with the command above with this code:
Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(this);
Phonon::createPath(mediaObject, videoWidget);
mediaObject->setCurrentSource(url);
mediaObject->play();
QCoreApplication::setApplicationName("PhononTest");
Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(this);
Phonon::createPath(mediaObject, videoWidget);
QString url("./test.ogg");
mediaObject->setCurrentSource(url);
mediaObject->play();
To copy to clipboard, switch view to plain text mode
But I still don't know how to show the live stream in the VideoWidget, I think setCurrentSource doesn't support that, but I'm not sure...
It also would be great to be able to know how to launch gstreamer from my program, but I think first I have to be able to show the stream... any ideas?
Is it possible with phonon or do I have to make it with plain gstreamer libraries? any examples?
Thanks!
Bookmarks