How to show mp4 file with deepstream?

I try to use deepstream decode sample mp4 like this:

pipeline = gst_pipeline_new ("dstest1-pipeline");

    /* Source element for reading from the file */
    source = gst_element_factory_make ("filesrc", "file-source");

   //source = gst_element_factory_make ("uridecodebin", "file-source");

    /* Since the data format in the input file is elementary h264 stream,
     * we need a h264parser */
    h264parser = gst_element_factory_make ("h264parse", "h264-parser");

    /* Use nvdec_h264 for hardware accelerated decode on GPU */
    decoder = gst_element_factory_make ("nvdec_h264", "nvh264-decoder");

    /* Finally render the osd output */
    sink = gst_element_factory_make ("nveglglessink", "nvvideo-renderer");

    if (!pipeline || !source || !h264parser || !decoder
        || !sink) {
        g_printerr ("One element could not be created. Exiting.\n");
        return -1;

    //g_object_set (G_OBJECT (source), "uri", "",NULL);

    /* we set the input filename to the source element */
    g_object_set (G_OBJECT (source), "location","file:///home/tms/software/DeepStream_Release/samples/streams/sample_720p.h264", NULL);

    /* Set up the pipeline */
    /* we add all elements into the pipeline */
    gst_bin_add_many (GST_BIN (pipeline),
                      source, h264parser, decoder, sink, NULL);

 if (!gst_element_link_many (source, h264parser, decoder, sink, NULL)) {
        g_printerr ("Elements could not be linked. Exiting.\n");
        return -1;

it will be show “Elements could not be linked”,but it’s ok for .h264 file. so how to product mp4 file ?I try to read test1 but I couldn’t found difficult like me .so anybody can show me the right way?

I think you need to add uridecodebin in your pipeline to handle the mp4 files, you can refer to the deepstream-test3 sample.
BTW, you can use gst-inspect-1.0 tool to check the Capabilities of special element.