how to add multiple programs in mpegtsmux ..

Jesper Larsen jesper.larsen at ixonos.com
Wed Oct 9 15:20:53 CEST 2013


Programs are defined using the prog-map attribute in mpegtsmux.

First, you create a structure that will contain the pad->program mapping

GstStructure *pm;
pm = gst_structure_new_empty("program_map");
gst_structure_set(pm, "sink_200", G_TYPE_INT, 1, NULL);
gst_structure_set(pm, "sink_300", G_TYPE_INT, 1, NULL);
gst_structure_set(pm, "sink_201", G_TYPE_INT, 2, NULL);
gst_structure_set(pm, "sink_301", G_TYPE_INT, 2, NULL);

This structure will map PID 40/41 to program 1 and PID 42/43 to program 2.

You set the PID in the muxer by requesting a pad with the name sink_pid.
I.e.

pipeline = gst_parse_launch ("audio_src_1 ! mux.sink_200 \
                            video_src_1 ! mux.sink_300 \

                            audio_src_2 ! mux.sink_201 \

                            video_src_2 ! mux.sink_301 \

                            mpegtsmux name=mux ! sink");

You then apply the structure to the muxer

g_object_set (G_OBJECT( gst_bin_get_by_name (GST_BIN(pipeline), "mux")),
"prog-map", pm, NULL);


Regards,
Jesper Larsen


On Wed, Oct 9, 2013 at 1:35 PM, pradeepreddy.g95 <pradeepreddy.g95 at gmail.com
> wrote:

> Hi everybody if possible can anybody give sample code for muxing multiple
> programs in mpegts .
>
> Regards,
> Pradeep G.
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/how-to-add-multiple-programs-in-mpegtsmux-tp4662472.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131009/945500b4/attachment.html>


More information about the gstreamer-devel mailing list