RTMP support

Riccardo Arena banane.more at gmail.com
Thu Oct 4 09:09:50 PDT 2012


Hi and thanks for the response.
Unfortunatly i still can't reproduce the video stream.
This is the code i use

Phonon::MediaSource * tst = new
Phonon::MediaSource("rtmp://localhost/oflaDemo/prometheus.mp4");
ui->videoPlayer->load(*tst);

 GstElement* sink;
    sink = gst_element_factory_make("xvimagesink", "sink");
    gst_element_set_state(sink, GST_STATE_READY);
    gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(sink), ui->videoPlayer->winId());
    gst_element_set_state(sink, GST_STATE_PLAYING);
    ui->videoPlayer->play();

This is what i see when i put the window in background and get back in
foreground:
http://i45.tinypic.com/9i7a7m.png

I'm on gentoo linux 3.3.8 with gstreamer-0.10,
phonon-gstreamer-4.6.2-r1, gst-plugins-rtmp-0.10.22

Thanks for the help.

2012/10/4 Angel Martin <amartin at vicomtech.org>:
> Hi,
>
> just with the following tips you should get it working
>
> #include <QtGui>
> #include <QApplication>
> #include <QCoreApplication>
>
> int main(int argc, char *argv[])
> {
>     QApplication a(argc, argv);
>     QCoreApplication::setAttribute(Qt::AA_NativeWindows,true);
> .
> .
> .
>
> and
>
> QApplication::syncX();
> gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(sink), widget->winId());
>
> and
>
> gst_element_set_state(v_pipeline, GST_STATE_PLAYING);
>
> Ref:
> http://stackoverflow.com/questions/2250169/to-connect-gstreamer-with-qt-in-order-to-play-a-gstreamer-video-in-the-qt-widget
>
> Best
>
>
> 2012/10/3 Riccardo Arena <banane.more at gmail.com>
>>
>> Hi everybody,
>> i started today developing a QT4 application, using gstreamer as
>> backend for Phonon.
>> The application will play a rtmp stream from a red5 server.
>> I installed the rtmp plugin from the bad repository (gst-plugins-rtmp).
>> In qt, i created a simple Phonon::VideoPlayer, set it's source to
>> rtmp://localhost/oflaDemo/prometheus.mp4.
>>
>> The VideoPlayer then starts playing only the audio channel. How can i
>> make it play the video too?
>>
>> Thanks and sorry for the dumb question.
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


More information about the gstreamer-devel mailing list