⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 236735 in webkit


Ignore:
Timestamp:
Oct 2, 2018, 4:57:05 AM (8 years ago)
Author:
aboya@igalia.com
Message:

[MSE][GStreamer] Add h264parse to accept MP4 without stss
https://bugs.webkit.org/show_bug.cgi?id=190143

Reviewed by Xabier Rodriguez-Calvar.

The MP4 file used in this URL does not contain a stss (Sync Sample
Box). In consequence, in acordance with the ISO BMFF spec, all samples
are assumed to be sync frames... But in this case that is not true,
it's just that the file is wrong (e.g. created with a buggy muxer).

http://orange-opensource.github.io/hasplayer.js/1.2.0/player.html?url=http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest

The way it works in other browsers is because instead of trusting the
MP4 stss table, they rely on parsing the h264 frames. We can do that
too.

This patch also changes RELEASE_ASSERT() when creating the parsers
to GLib criticals.

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::createOptionalParserForFormat):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r236730 r236735  
     12018-10-02  Alicia Boya García  <aboya@igalia.com>
     2
     3        [MSE][GStreamer] Add h264parse to accept MP4 without stss
     4        https://bugs.webkit.org/show_bug.cgi?id=190143
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        The MP4 file used in this URL does not contain a stss (Sync Sample
     9        Box). In consequence, in acordance with the ISO BMFF spec, all samples
     10        are assumed to be sync frames... But in this case that is not true,
     11        it's just that the file is wrong (e.g. created with a buggy muxer).
     12
     13        http://orange-opensource.github.io/hasplayer.js/1.2.0/player.html?url=http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest
     14
     15        The way it works in other browsers is because instead of trusting the
     16        MP4 stss table, they rely on parsing the h264 frames. We can do that
     17        too.
     18
     19        This patch also changes RELEASE_ASSERT() when creating the parsers
     20        to GLib criticals.
     21
     22        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
     23        (WebCore::createOptionalParserForFormat):
     24
    1252018-10-02  Eric Carlson  <eric.carlson@apple.com>
    226
  • trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp

    r236717 r236735  
    860860    if (!g_strcmp0(mediaType, "audio/x-opus")) {
    861861        GstElement* opusparse = gst_element_factory_make("opusparse", parserName.get());
    862         RELEASE_ASSERT(opusparse);
     862        g_return_val_if_fail(opusparse, nullptr);
     863        ASSERT(opusparse);
    863864        return GRefPtr<GstElement>(opusparse);
    864865    }
    865866    if (!g_strcmp0(mediaType, "audio/x-vorbis")) {
    866867        GstElement* vorbisparse = gst_element_factory_make("vorbisparse", parserName.get());
    867         RELEASE_ASSERT(vorbisparse);
     868        g_return_val_if_fail(vorbisparse, nullptr);
     869        ASSERT(vorbisparse);
    868870        return GRefPtr<GstElement>(vorbisparse);
     871    }
     872    if (!g_strcmp0(mediaType, "video/x-h264")) {
     873        GstElement* h264parse = gst_element_factory_make("h264parse", parserName.get());
     874        g_return_val_if_fail(h264parse, nullptr);
     875        ASSERT(h264parse);
     876        return GRefPtr<GstElement>(h264parse);
    869877    }
    870878
Note: See TracChangeset for help on using the changeset viewer.