tcpclientsrc and mpegtsdemux

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

tcpclientsrc and mpegtsdemux

BGraaf

Hi,

 

I need help to generate my own ‚C’-Program from a running pipe:

 

gst-launch-0.10 tcpclientsrc host='192.168.1.3' port=8080 ! mpegtsdemux name=demux ! queue ! mpeg2dec ! xvimagesink force-aspect-ratio=TRUE demux. ! queue ! mad ! alsasink

With this pipe, I have no problem. It’s running very well.

 

But if I try to compile this pipe in my own program, I’ll get no results.

 

-----------------------------

#include <stdio.h>

#include <unistd.h>

#include <gst/gst.h>

#include <glib.h>

 

 

GstElement *tv_pipe, *tv_source, *tv_mux, *tv_queue, *tv_v_dec, *tv_v_sink, *tv_a_dec, *tv_a_sink;

GstBus *tv_bus;

GMainLoop *loop;

 

static gboolean

tv_bus_call (GstBus     *tmp_bus,

          GstMessage *msg,

          gpointer    data)

{

  GMainLoop *loop = (GMainLoop *) data;

 

  switch (GST_MESSAGE_TYPE (msg)) {

 

    case GST_MESSAGE_EOS:

      g_print ("End of stream\n");

      break;

 

    case GST_MESSAGE_ERROR: {

      gchar  *debug;

      GError *error;

 

      gst_message_parse_error (msg, &error, &debug);

      g_free (debug);

 

      g_printerr ("Error: %s\n", error->message);

      g_error_free (error);

 

      break;

    }

    default:

      break;

  }

 

  return TRUE;

}

 

 

int init_gst()

{

  gst_init (0, NULL);

 

  loop = g_main_loop_new (NULL, FALSE);

 

  tv_pipe = gst_pipeline_new ("TV-Stream");

    if(!tv_pipe) g_printerr("TV-Stream-Pipeline not created\n");

 

  tv_source   = gst_element_factory_make ("tcpclientsrc", "tv-source");

    if(!tv_source) g_printerr("TV-Source not created\n");

 

  tv_mux     = gst_element_factory_make ("mpegtsdemux", "tv-mux");

    if(!tv_mux) g_printerr("TV-Mux not created\n");

 

  tv_queue     = gst_element_factory_make ("queue", "tv-queue");

    if(!tv_queue) g_printerr("TV-Queue not created\n");

 

  tv_v_dec     = gst_element_factory_make ("mpeg2dec", "tv-v-dec");

    if(!tv_v_dec) g_printerr("TV-Video-Dec not created\n");

 

  tv_v_sink     = gst_element_factory_make ("xvimagesink", "tv-v-sink");

    if(!tv_v_sink) g_printerr("TV-Video-Sink not created\n");

 

  tv_a_dec     = gst_element_factory_make ("mad", "tv-a-dec");

    if(!tv_a_dec) g_printerr("TV-Audio-Dec not created\n");

 

  tv_a_sink     = gst_element_factory_make ("alsasink", "tv-a-sink");

    if(!tv_a_sink) g_printerr("TV-Audio-Sink not created\n");

 

 

  tv_bus = gst_pipeline_get_bus (GST_PIPELINE (tv_pipe));

  gst_bus_add_watch (tv_bus, tv_bus_call, loop);

  gst_object_unref (tv_bus);

 

  gst_bin_add_many (GST_BIN (tv_pipe), tv_source, tv_mux, tv_queue, tv_v_dec, tv_v_sink, tv_a_dec, tv_a_sink, NULL);

 

  gst_element_link (tv_source, tv_mux);

  gst_element_link (tv_mux, tv_queue);

  gst_element_link (tv_queue, tv_v_dec);

  gst_element_link (tv_v_dec, tv_v_sink);

  gst_element_link (tv_queue, tv_a_dec);

  gst_element_link (tv_a_dec, tv_a_sink);

 

  return 1;

}

 

int send_tv()

{

  gst_element_set_state (tv_pipe, GST_STATE_NULL);

 

  g_object_set (G_OBJECT (tv_source), "host", "192.168.1.3", NULL);

  g_object_set (G_OBJECT (tv_source), "port", 8080, NULL);

 

  g_print ("Now playing: TV\n");

  gst_element_set_state (tv_pipe, GST_STATE_PLAYING);

 

  g_print ("Running...\n");

  return 0;

}

 

int main()

{

 

  if(!tv_pipe) init_gst();

  send_tv();

  g_main_loop_run (loop);

  return(1);

}

 

-------------------------

I there anybody how can tell me what’s wrong with this program?

 

 

Thank’s a lot for helping!!!!

Bernhard


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

Pipeline implementation question

Florian Lier
Hello all,

I have a problem which is similar to Bernhards (I guess, due to my limited GS knowledge) ...
The best approach to describe my problem maybe is to create a very simple example pipeline
like this one:

"gst-launch-0.10 v4l2src ! queue ! xvimagesink pulsesrc ! queue ! pulsesink"

 
AFAIK one would implement this like the following (pseudo-code)

bin = gst_pipeline_new("Pipeline");
v4l2src = gst_element_factory_make ("v4l2src", "videosrc");
queue = gst_element_factory_make ("queue", "queue");
xvimagesink = gst_element_factory_make ("xvimagesink", "xvimagesink");
pulsesrc = gst_element_factory_make ("pulsesrc", "audiosrc");
queue2 = gst_element_factory_make ("queue", "queue2");
pulsesink = gst_element_factory_make ("pulsesink", "audiosink");

Now:

gst_bin_add_many(GST_BIN(bin), v4l2src, queue, xvimagesink, pulsesrc,  queue2, pulsesink, NULL);

In the next step one would link the elements and that's when I get confused - You don't actually "link" the
imagesink to the pulsesrc - How do you implement this pipeline?

gst_element_link_many(v4l2src, queue, xvimagesink, pulsesrc,  queue2, pulsesink, NULL);

Doesn't work and produces a SegFault...
  

Thanks in advance, cheers - Florian


On 06/03/2011 12:20 PM, Bernhard Graaf wrote:

Hi,

 

I need help to generate my own ‚C’-Program from a running pipe:

 

gst-launch-0.10 tcpclientsrc host='192.168.1.3' port=8080 ! mpegtsdemux name=demux ! queue ! mpeg2dec ! xvimagesink force-aspect-ratio=TRUE demux. ! queue ! mad ! alsasink

With this pipe, I have no problem. It’s running very well.

 

But if I try to compile this pipe in my own program, I’ll get no results.

 

-----------------------------

#include <stdio.h>

#include <unistd.h>

#include <gst/gst.h>

#include <glib.h>

 

 

GstElement *tv_pipe, *tv_source, *tv_mux, *tv_queue, *tv_v_dec, *tv_v_sink, *tv_a_dec, *tv_a_sink;

GstBus *tv_bus;

GMainLoop *loop;

 

static gboolean

tv_bus_call (GstBus     *tmp_bus,

          GstMessage *msg,

          gpointer    data)

{

  GMainLoop *loop = (GMainLoop *) data;

 

  switch (GST_MESSAGE_TYPE (msg)) {

 

    case GST_MESSAGE_EOS:

      g_print ("End of stream\n");

      break;

 

    case GST_MESSAGE_ERROR: {

      gchar  *debug;

      GError *error;

 

      gst_message_parse_error (msg, &error, &debug);

      g_free (debug);

 

      g_printerr ("Error: %s\n", error->message);

      g_error_free (error);

 

      break;

    }

    default:

      break;

  }

 

  return TRUE;

}

 

 

int init_gst()

{

  gst_init (0, NULL);

 

  loop = g_main_loop_new (NULL, FALSE);

 

  tv_pipe = gst_pipeline_new ("TV-Stream");

    if(!tv_pipe) g_printerr("TV-Stream-Pipeline not created\n");

 

  tv_source   = gst_element_factory_make ("tcpclientsrc", "tv-source");

    if(!tv_source) g_printerr("TV-Source not created\n");

 

  tv_mux     = gst_element_factory_make ("mpegtsdemux", "tv-mux");

    if(!tv_mux) g_printerr("TV-Mux not created\n");

 

  tv_queue     = gst_element_factory_make ("queue", "tv-queue");

    if(!tv_queue) g_printerr("TV-Queue not created\n");

 

  tv_v_dec     = gst_element_factory_make ("mpeg2dec", "tv-v-dec");

    if(!tv_v_dec) g_printerr("TV-Video-Dec not created\n");

 

  tv_v_sink     = gst_element_factory_make ("xvimagesink", "tv-v-sink");

    if(!tv_v_sink) g_printerr("TV-Video-Sink not created\n");

 

  tv_a_dec     = gst_element_factory_make ("mad", "tv-a-dec");

    if(!tv_a_dec) g_printerr("TV-Audio-Dec not created\n");

 

  tv_a_sink     = gst_element_factory_make ("alsasink", "tv-a-sink");

    if(!tv_a_sink) g_printerr("TV-Audio-Sink not created\n");

 

 

  tv_bus = gst_pipeline_get_bus (GST_PIPELINE (tv_pipe));

  gst_bus_add_watch (tv_bus, tv_bus_call, loop);

  gst_object_unref (tv_bus);

 

  gst_bin_add_many (GST_BIN (tv_pipe), tv_source, tv_mux, tv_queue, tv_v_dec, tv_v_sink, tv_a_dec, tv_a_sink, NULL);

 

  gst_element_link (tv_source, tv_mux);

  gst_element_link (tv_mux, tv_queue);

  gst_element_link (tv_queue, tv_v_dec);

  gst_element_link (tv_v_dec, tv_v_sink);

  gst_element_link (tv_queue, tv_a_dec);

  gst_element_link (tv_a_dec, tv_a_sink);

 

  return 1;

}

 

int send_tv()

{

  gst_element_set_state (tv_pipe, GST_STATE_NULL);

 

  g_object_set (G_OBJECT (tv_source), "host", "192.168.1.3", NULL);

  g_object_set (G_OBJECT (tv_source), "port", 8080, NULL);

 

  g_print ("Now playing: TV\n");

  gst_element_set_state (tv_pipe, GST_STATE_PLAYING);

 

  g_print ("Running...\n");

  return 0;

}

 

int main()

{

 

  if(!tv_pipe) init_gst();

  send_tv();

  g_main_loop_run (loop);

  return(1);

}

 

-------------------------

I there anybody how can tell me what’s wrong with this program?

 

 

Thank’s a lot for helping!!!!

Bernhard

_______________________________________________ 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: tcpclientsrc and mpegtsdemux

Nathanael D. Noblet
In reply to this post by BGraaf
On 06/03/2011 04:20 AM, Bernhard Graaf wrote:

> Hi,
>
> I need help to generate my own ‚C’-Program from a running pipe:
>
> gst-launch-0.10 tcpclientsrc host='192.168.1.3' port=8080 ! mpegtsdemux
> name=demux ! queue ! mpeg2dec ! xvimagesink force-aspect-ratio=TRUE
> demux. ! queue ! mad ! alsasink
>
> With this pipe, I have no problem. It’s running very well.
>
> But if I try to compile this pipe in my own program, I’ll get no results.

Some elements have 'special' sinks. Such as a demuxer. A file could
conceivably have multiple video/audio streams but you don't know that
until it starts getting processed. So gst-launch does some magic that
you need to do the same.

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html

gives an example of handling this with the on_pad_added signal handler.


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

Re: Pipeline implementation question

Nathanael D. Noblet
In reply to this post by Florian Lier
On 06/03/2011 05:23 AM, Florian Lier wrote:

> Hello all,
>
> I have a problem which is similar to Bernhards (I guess, due to my
> limited GS knowledge) ...
> The best approach to describe my problem maybe is to create a very
> simple example pipeline
> like this one:
>
> "gst-launch-0.10 v4l2src ! queue ! xvimagesink pulsesrc ! queue ! pulsesink"
>
>
> AFAIK one would implement this like the following (*pseudo-code*)
>
> bin = gst_pipeline_new("Pipeline");
> v4l2src = gst_element_factory_make ("v4l2src", "videosrc");
> queue = gst_element_factory_make ("queue", "queue");
> xvimagesink = gst_element_factory_make ("xvimagesink", "xvimagesink");
> pulsesrc = gst_element_factory_make ("pulsesrc", "audiosrc");
> queue2 = gst_element_factory_make ("queue", "queue2");
> pulsesink = gst_element_factory_make ("pulsesink", "audiosink");
>
> Now:
>
> gst_bin_add_many(GST_BIN(bin), v4l2src, queue, xvimagesink, pulsesrc,
> queue2, pulsesink, NULL);
>
> In the next step one would link the elements and that's when I get
> confused - You don't actually "link" the
> imagesink to the pulsesrc - How do you implement this pipeline?
>
> gst_element_link_many(v4l2src, queue, xvimagesink, pulsesrc, queue2,
> pulsesink, NULL);
>
> Doesn't work and produces a SegFault...

Think about what is happening. You have one pipeline with two 'streams'
you could say, one is audio, one is video. Even though there are two
streams it is one pipe because you want some synchronization between
them (audio synced to video etc).

So you are building one pipe, but the audio is one stream that links
source to output, and video is another that links from source to output.

Also in your particular pipe, I don't think you need queue's. so you
would do

gst_element_link_many(v4l2src,queue,xvimagesink)
gst_element_link_many(pulsesrc,queue2,pulsesink)

A few things you need to know about the above, it still may not work
since the output from a v4l2src may not be compatible with your screens
etc... Same for audio, So you may have to use ffmpegcolourspace, or
caps, or audioconvert/resample etc modules in there.
--
Nathanael d. Noblet
t 403.875.4613
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: tcpclientsrc and mpegtsdemux

BGraaf
In reply to this post by Nathanael D. Noblet
Hi,

thanks' a lot for helping. I've change the code with handle the dynamic-pads
between muxer/audio-dec and audio-dec/audio-sink and it work great with only
audio data.
If I try to use the queue-pad, I have a problem to understand this.
Should I define two queues? One for video and one for audio? Or is there
only one queue and I link this to both? But then, how could I handle the
dynamic-pads? Do you have an example for using the queue-element to split a
stream (e.g Mpeg2) to video/audio-data in a C-program?

I know: there are a lot of questions about using the queue-element.
But I'm sure that there is a person, who can help me to fix this problem!

Thanks a lot!!
Bernhard

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email]
[mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]]
Im Auftrag von Nathanael D. Noblet
Gesendet: Freitag, 3. Juni 2011 17:20
An: [hidden email]
Betreff: Re: tcpclientsrc and mpegtsdemux

On 06/03/2011 04:20 AM, Bernhard Graaf wrote:

> Hi,
>
> I need help to generate my own ‚C’-Program from a running pipe:
>
> gst-launch-0.10 tcpclientsrc host='192.168.1.3' port=8080 ! mpegtsdemux
> name=demux ! queue ! mpeg2dec ! xvimagesink force-aspect-ratio=TRUE
> demux. ! queue ! mad ! alsasink
>
> With this pipe, I have no problem. It’s running very well.
>
> But if I try to compile this pipe in my own program, I’ll get no results.

Some elements have 'special' sinks. Such as a demuxer. A file could
conceivably have multiple video/audio streams but you don't know that
until it starts getting processed. So gst-launch does some magic that
you need to do the same.

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter
-helloworld.html

gives an example of handling this with the on_pad_added signal handler.


--
Nathanael d. Noblet
t 403.875.4613
_______________________________________________
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: AW: tcpclientsrc and mpegtsdemux

Nathanael D. Noblet
On 06/04/2011 03:04 AM, Bernhard Graaf wrote:

> Hi,
>
> thanks' a lot for helping. I've change the code with handle the dynamic-pads
> between muxer/audio-dec and audio-dec/audio-sink and it work great with only
> audio data.
> If I try to use the queue-pad, I have a problem to understand this.
> Should I define two queues? One for video and one for audio? Or is there
> only one queue and I link this to both? But then, how could I handle the
> dynamic-pads? Do you have an example for using the queue-element to split a
> stream (e.g Mpeg2) to video/audio-data in a C-program?
>
> I know: there are a lot of questions about using the queue-element.
> But I'm sure that there is a person, who can help me to fix this problem!

queue's don't split data. Their main purpose (from my understanding) is
as a thread/syncronization point. Most often used when splitting a
stream like video into multiple streams, so for example

                    tee- queue - xv
                   /   \ queue - filesink
              /video
src -> demux -
              \audio
                   \tee - queue - pulsesink
                       \  queue - filesink


So for your situation you want an on_pad_added call that figures out
whether you're getting an audio or video pad/stream. Here's one I have
for a very specific use case (not expecting to get different types of
streams/pads etc).. You can see that since I find the other matching
side of the pipeline with a very specific name.


void on_recording_pad_added (GstElement *decoder, GstPad *pad, gpointer
data)
{
     GstCaps      *caps      = gst_pad_get_caps(pad);
     GstBin       *bin       = (GstBin *)data;
     GstStructure *structure = gst_caps_get_structure(caps,0);
     int ret                 = 0;

     GstElement *element;
     GstPad     *targetsink;

     gchar       *structure_g = gst_structure_to_string(structure);
     g_free(structure_g);
     if(g_strrstr(gst_structure_get_string(structure,"media"), "video"))
     {
         element    = gst_bin_get_by_name (bin,"recording-rtspvdepay");
         targetsink = gst_element_get_pad(element,"sink");

         ret = gst_pad_link(pad,targetsink);
         if(ret != GST_PAD_LINK_OK)
             log_pad_added(ret,pad,targetsink,"Unable to link video");

         gst_object_unref(targetsink);
         gst_object_unref(element);
     }

     if(g_strrstr(gst_structure_get_string(structure,"media"), "audio"))
     {
         element    = gst_bin_get_by_name (bin,"recording-rtpmp4gdepay");
         targetsink = gst_element_get_pad(element,"sink");

         ret     = gst_pad_link(pad,targetsink);
         if(ret != GST_PAD_LINK_OK)
             log_pad_added(ret,pad,targetsink,"Unable to link audio");

         gst_object_unref(targetsink);//MW#11 unrefed here
         gst_object_unref(element);
     }

     gst_caps_unref (caps);

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

AW: tcpclientsrc and mpegtsdemux

BGraaf
In reply to this post by BGraaf
Hi Nathanael,

I've solved this problem!!!!

The trick is, to check the dynamic-pads 'name' with using the
gst_pad_get_name - function. If I use this in my pipe, I get two names back
from the mpegtsdemux: one for the video- and one for the audio-stream.
I compare and link this to the associated queue (I use one for video and one
for audio in my pipe).
So it's works very well and I'm a little bit proud for solving this.

Thanks a lot for your help. Without your tip, I never try this way.
It's a lot of fun, to work with you!

Bernhard

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email]
[mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]]
Im Auftrag von Bernhard Graaf
Gesendet: Samstag, 4. Juni 2011 11:04
An: 'Discussion of the development of and with GStreamer'
Betreff: AW: tcpclientsrc and mpegtsdemux

Hi,

thanks' a lot for helping. I've change the code with handle the dynamic-pads
between muxer/audio-dec and audio-dec/audio-sink and it work great with only
audio data.
If I try to use the queue-pad, I have a problem to understand this.
Should I define two queues? One for video and one for audio? Or is there
only one queue and I link this to both? But then, how could I handle the
dynamic-pads? Do you have an example for using the queue-element to split a
stream (e.g Mpeg2) to video/audio-data in a C-program?

I know: there are a lot of questions about using the queue-element.
But I'm sure that there is a person, who can help me to fix this problem!

Thanks a lot!!
Bernhard

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email]
[mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]]
Im Auftrag von Nathanael D. Noblet
Gesendet: Freitag, 3. Juni 2011 17:20
An: [hidden email]
Betreff: Re: tcpclientsrc and mpegtsdemux

On 06/03/2011 04:20 AM, Bernhard Graaf wrote:

> Hi,
>
> I need help to generate my own ‚C’-Program from a running pipe:
>
> gst-launch-0.10 tcpclientsrc host='192.168.1.3' port=8080 ! mpegtsdemux
> name=demux ! queue ! mpeg2dec ! xvimagesink force-aspect-ratio=TRUE
> demux. ! queue ! mad ! alsasink
>
> With this pipe, I have no problem. It’s running very well.
>
> But if I try to compile this pipe in my own program, I’ll get no results.

Some elements have 'special' sinks. Such as a demuxer. A file could
conceivably have multiple video/audio streams but you don't know that
until it starts getting processed. So gst-launch does some magic that
you need to do the same.

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter
-helloworld.html

gives an example of handling this with the on_pad_added signal handler.


--
Nathanael d. Noblet
t 403.875.4613
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline implementation question

Florian Lier
In reply to this post by Nathanael D. Noblet

On 06/03/2011 05:24 PM, Nathanael D. Noblet wrote:

> On 06/03/2011 05:23 AM, Florian Lier wrote:
>> Hello all,
>>
>> I have a problem which is similar to Bernhards (I guess, due to my
>> limited GS knowledge) ...
>> The best approach to describe my problem maybe is to create a very
>> simple example pipeline
>> like this one:
>>
>> "gst-launch-0.10 v4l2src ! queue ! xvimagesink pulsesrc ! queue !
>> pulsesink"
>>
>>
>> AFAIK one would implement this like the following (*pseudo-code*)
>>
>> bin = gst_pipeline_new("Pipeline");
>> v4l2src = gst_element_factory_make ("v4l2src", "videosrc");
>> queue = gst_element_factory_make ("queue", "queue");
>> xvimagesink = gst_element_factory_make ("xvimagesink", "xvimagesink");
>> pulsesrc = gst_element_factory_make ("pulsesrc", "audiosrc");
>> queue2 = gst_element_factory_make ("queue", "queue2");
>> pulsesink = gst_element_factory_make ("pulsesink", "audiosink");
>>
>> Now:
>>
>> gst_bin_add_many(GST_BIN(bin), v4l2src, queue, xvimagesink, pulsesrc,
>> queue2, pulsesink, NULL);
>>
>> In the next step one would link the elements and that's when I get
>> confused - You don't actually "link" the
>> imagesink to the pulsesrc - How do you implement this pipeline?
>>
>> gst_element_link_many(v4l2src, queue, xvimagesink, pulsesrc, queue2,
>> pulsesink, NULL);
>>
>> Doesn't work and produces a SegFault...
>
> Think about what is happening. You have one pipeline with two
> 'streams' you could say, one is audio, one is video. Even though there
> are two streams it is one pipe because you want some synchronization
> between them (audio synced to video etc).
>
> So you are building one pipe, but the audio is one stream that links
> source to output, and video is another that links from source to output.
>
> Also in your particular pipe, I don't think you need queue's. so you
> would do
>
> gst_element_link_many(v4l2src,queue,xvimagesink)
> gst_element_link_many(pulsesrc,queue2,pulsesink)
>
> A few things you need to know about the above, it still may not work
> since the output from a v4l2src may not be compatible with your
> screens etc... Same for audio, So you may have to use
> ffmpegcolourspace, or caps, or audioconvert/resample etc modules in
> there.
Thank you I will try that! BTW: Do you guys have any HowTos or "best
practices" on Audio-Video sync? Like xvimagesink sync="true" / queues
and so on?

Cheers,
Florian

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