Video window is not visible

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

Video window is not visible

Ayan
Hi,

I've tried the following gstreamer code but no video is there after running. I'm using this command: gcc -Wall test.c -o test `pkg-config --cflags --libs gstreamer-1.5` -lm and to run: ./test.

code:

#include <gst/gst.h>

int main(int argc, char *argv[]) {
  GstElement *pipeline;
  GstBus *bus;
  GstMessage *msg;

  /* Initialize GStreamer */
  gst_init (&argc, &argv);

  /* Build the pipeline */
  pipeline = gst_parse_launch ("playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm", NULL);

  /* Start playing */
  gst_element_set_state (pipeline, GST_STATE_PLAYING);

  /* Wait until error or EOS */
  bus = gst_element_get_bus (pipeline);
  msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);

  /* Free resources */
  if (msg != NULL)
    gst_message_unref (msg);
  gst_object_unref (bus);
  gst_element_set_state (pipeline, GST_STATE_NULL);
  gst_object_unref (pipeline);
  return 0;
}

Reply | Threaded
Open this post in threaded view
|

Re: Video window is not visible

Yasushi SHOJI-2
Hi,

On Thu, Jun 29, 2017 at 6:45 PM, Ayan <[hidden email]> wrote:
>
> I've tried the following gstreamer code but no video is there after running.
> I'm using this command: gcc -Wall test.c -o test `pkg-config --cflags --libs
> gstreamer-1.5` -lm and to run: ./test.

The code seems to work here.

Here is the command I used to build.

gcc -Wall -Wextra -g $(pkg-config --cflags --libs gstreamer-1.0) a.c

I don't think there is `gstreamer-1.5` package config, does it?
-- 
               yashi


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

Re: Video window is not visible

Ayan
Hi.

Thanks for your response. I've tried to build using your command but getting errors:
/tmp/ccT3kyVs.o: In function `gst_message_unref':
/usr/include/gstreamer-1.0/gst/gstmessage.h:336: undefined reference to `gst_mini_object_unref'
/tmp/ccT3kyVs.o: In function `main':
/home/ayankarmakar/Desktop/test.c:9: undefined reference to `gst_init'
/home/ayankarmakar/Desktop/test.c:12: undefined reference to `gst_parse_launch'
/home/ayankarmakar/Desktop/test.c:15: undefined reference to `gst_element_set_state'
/home/ayankarmakar/Desktop/test.c:18: undefined reference to `gst_element_get_bus'
/home/ayankarmakar/Desktop/test.c:19: undefined reference to `gst_bus_timed_pop_filtered'
/home/ayankarmakar/Desktop/test.c:24: undefined reference to `gst_object_unref'
/home/ayankarmakar/Desktop/test.c:25: undefined reference to `gst_element_set_state'
/home/ayankarmakar/Desktop/test.c:26: undefined reference to `gst_object_unref'
collect2: error: ld returned 1 exit status
Reply | Threaded
Open this post in threaded view
|

Re: Video window is not visible

Yasushi SHOJI-2
Hi,

On Mon, Jul 3, 2017 at 6:05 PM, Ayan <[hidden email]> wrote:
>
> Thanks for your response. I've tried to build using your command but getting
> errors:
> /tmp/ccT3kyVs.o: In function `gst_message_unref':
> /usr/include/gstreamer-1.0/gst/gstmessage.h:336: undefined reference to
> `gst_mini_object_unref'

first of all, what is your dev env?

second of all, do you really have gstreamer-1.5 package config file?
try:

$ pkg-config --list-all | grep gstreamer-1.

third, print what pkg-config says with the following command:

$ pkg-config --cflags --libs gstreamer-1.5  (if you really have 1.5)

fourth, you are telling playbin to pick video sink.  I don't know which one the playbin
is using.

does the following command work for you?


if it works, it should print the video sink it's using.  (or at least it should
print what it tries to use?)

best,
-- 
             yashi


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

Re: Video window is not visible

Ayan
Hi,
Thanks for your response, following are some info which you wanted to know:
1) Ubuntu 14.04 Terminal
2) yes, I have.

3) -pthread -I/usr/include/gstreamer-1.5 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.5/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -lgstreamer-1.5 -lgobject-2.0 -lglib-2.0

4) yes , it is working, video is playing.
 
But don't understand what's wrong with my command/your command? 

Ayan.


On 4 July 2017 at 14:09, Yasushi SHOJI-2 [via GStreamer-devel] <[hidden email]> wrote:
Hi,

On Mon, Jul 3, 2017 at 6:05 PM, Ayan <[hidden email]> wrote:
>
> Thanks for your response. I've tried to build using your command but getting
> errors:
> /tmp/ccT3kyVs.o: In function `gst_message_unref':
> /usr/include/gstreamer-1.0/gst/gstmessage.h:336: undefined reference to
> `gst_mini_object_unref'

first of all, what is your dev env?

second of all, do you really have gstreamer-1.5 package config file?
try:

$ pkg-config --list-all | grep gstreamer-1.

third, print what pkg-config says with the following command:

$ pkg-config --cflags --libs gstreamer-1.5  (if you really have 1.5)

fourth, you are telling playbin to pick video sink.  I don't know which one the playbin
is using.

does the following command work for you?


if it works, it should print the video sink it's using.  (or at least it should
print what it tries to use?)

best,
-- 
             yashi


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/Video-window-is-not-visible-tp4683594p4683672.html
To unsubscribe from Video window is not visible, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Video window is not visible

Yasushi SHOJI-2
Hi,

On Tue, Jul 4, 2017 at 5:55 PM, Ayan <[hidden email]> wrote:
>
> 1) Ubuntu 14.04 Terminal

Trusty doesn't seem to have gstreamer 1.5.
I don't know how you created your dev env.

> 4) yes , it is working, video is playing.

I assume that Ubuntu version of gstreamer is working.  but your 1.5 is not.

I'm sorry I can't help.
-- 
                yashi


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

Re: Video window is not visible

Ayan
Hi,

I've installed gstreamer 1.5 for kurento-media-server. It's okay, I'll look around. Can you help me on this: Is there any other way to have bus without the help of pipeline ?
Reply | Threaded
Open this post in threaded view
|

Re: Video window is not visible

Nicolas Dufresne-5
Le mercredi 05 juillet 2017 à 01:34 -0700, Ayan a écrit :
> Hi,
>
> I've installed gstreamer 1.5 for kurento-media-server. It's okay, I'll look
> around. Can you help me on this: Is there any other way to have bus without
> the help of pipeline ? 

It is quite bad to depend on a development (unstable) release of
GStreamer. Is Kurento dead and that's why it's stuck in development ?

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Video window is not visible

Ayan
I'm stuck at this, can anyone help, please.
Reply | Threaded
Open this post in threaded view
|

Re: Video window is not visible

filnet
On Linux you might have to call XInitThreads() or something along those lines.


Le Jeudi 6 juillet 2017 9h50, Ayan <[hidden email]> a écrit :


I'm stuck at this, can anyone help, please.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Video-window-is-not-visible-tp4683594p4683704.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



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

Re: Video window is not visible

Ayan
I don't understand what you are saying.
I know that one way to get bus is:
  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));

My question is , Is there any other way to get bus without involving  pipeline?
Reply | Threaded
Open this post in threaded view
|

Re: Video window is not visible

Ayan
I think, we can get bus from gst element by gst_element_get_bus (), but I don't know whether this bus will produce element specific messages or application messages?