RTMP support

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RTMP support

Riccardo Arena
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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RTMP support

amartin
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:

Best


2012/10/3 Riccardo Arena <[hidden email]>
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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RTMP support

Riccardo Arena
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 <[hidden email]>:

> 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 <[hidden email]>
>>
>> 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
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel