Need help for reading pmt-info & pat-info using flutsdemux plugin

Sidharth Yedal sidharthyedal at tataelxsi.co.in
Tue Mar 17 02:23:41 PDT 2015


Hi All,


I am trying to read pmt-info (program map table) and pat-info (program assosiation table) from flutsdemux plugin on x86  ubuntu 3.2.0-23-generic.


I have created a a dummy pipeline :  filesrc location= /home/xyz.ts ! flutsdemux ! filesink location=/home/dump

I am trying to read the property using   g_object_get (G_OBJECT (demux), "pmt-info", &pmt_info[0], NULL);

I am always getting wrong pid values in pmt_info array.


Following is the code sample. Please guide me how to read pmt-info and pat-info from pipeline.




struct FluTsPatInfo {
    GObject parent;
    guint16 pid;
    guint16 program_no;
    } pmt_info[10];


/*creating elements*/
    pipeline = gst_pipeline_new("my_pipeline");
    source = gst_element_factory_make("filesrc", "file-source");
    demux = gst_element_factory_make ("flutsdemux", "ts-demux");
        sink = gst_element_factory_make("filesink", "file-sink");

    if(!source || !demux || !sink || !pipeline){
        printf("\nelements are not created properly\n");
        return -1;
    }

    /*set the stream file location*/
    g_object_set (G_OBJECT (source), "location", argv[1], NULL);
    g_object_set (G_OBJECT (sink), "location", argv[2], NULL);



        /*adding in pipeline*/
        gst_bin_add_many(GST_BIN(pipeline), source, demux, sink);


    /*link the elements*/
        if(!gst_element_link_many (source, demux, sink, NULL)){

            g_warning ("Failed to link elements!");
    }

    /*set the status to the pipeline*/
    gst_element_set_state (pipeline, GST_STATE_PLAYING);

    /*get program number*/
    g_object_get (G_OBJECT (demux), "pmt-info", &pmt_info[0], NULL);

    printf("\nprogram info 1 = %d  %d\n program info 2 =%d  %d  program info 3 = %d %d\n program info 4 =%d  %d \n",pmt_info[0].pid,pmt_info[0].program_no,pmt_info[1].pid,pmt_info[1].program_no,pmt_info[2].pid,pmt_info[2].program_no,pmt_info[3].pid,pmt_info[3].program_no);



Regards,
Sidharth Yedal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150317/7dab3b49/attachment.html>


More information about the gstreamer-devel mailing list