<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>165394</bug_id>
          
          <creation_ts>2016-12-05 11:46:32 -0800</creation_ts>
          <short_desc>[GStreamer][MSE] Support multiple streams per SourceBuffer and dynamic audio/video/text type changes</short_desc>
          <delta_ts>2022-08-05 14:43:05 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=167108</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=167109</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>229072</dependson>
          <blocked>167107</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Enrique Ocaña">eocanha</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aboya</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>clopez</cc>
    
    <cc>eocanha</cc>
    
    <cc>hoboprimate</cc>
    
    <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1256411</commentid>
    <comment_count>0</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2016-12-05 11:46:32 -0800</bug_when>
    <thetext>The current GStreamer MSE platform implementation doesn&apos;t support more than one stream per SourceBuffer.

Caps changes are managed as stream quality changes in order to support adaptive streaming, but that&apos;s all. An audio/video/text stream can&apos;t be reconverted to other type. This feature is required for LayoutTests/media/media-source/media-source-seek-detach-crash.html to work properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1358932</commentid>
    <comment_count>1</comment_count>
    <who name="Alicia Boya García">aboya</who>
    <bug_when>2017-10-10 15:12:25 -0700</bug_when>
    <thetext>&gt; An audio/video/text stream can&apos;t be reconverted to other type. This feature
&gt; is required for
&gt; LayoutTests/media/media-source/media-source-seek-detach-crash.html to work
&gt; properly.

Note that MSE not only does not require support for converting streams to other
formats, but even forbids it per spec:

https://www.w3.org/TR/media-source/#sourcebuffer-init-segment-received

3. If the first initialization segment received flag is true, then run the
following steps:

  1. Verify the following properties. If any of the checks fail then run the
append error algorithm and abort these steps.

     * The number of audio, video, and text tracks match what was in the first
       initialization segment.

     * The codecs for each track, match what was specified in the first
       initialization segment.

     * If more than one track for a single type are present (e.g., 2 audio
       tracks), then the Track IDs match the ones in the first initialization
       segment.


What the test is checking is that if that any of these conditions is met the
error is handled gracefully, which is not currently the case.

The test expectation should be changed from [ Skip ] to [ Crash ] and the bug
eventually fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1698075</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2020-10-15 05:10:50 -0700</bug_when>
    <thetext>At least one stream in the wild hitting this issue: https://peer.tube/videos/watch/5a370009-1868-46de-a5c2-2b34405fc5c7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1698095</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2020-10-15 07:23:24 -0700</bug_when>
    <thetext>*** Bug 217580 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1815607</commentid>
    <comment_count>4</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2021-11-16 12:37:22 -0800</bug_when>
    <thetext>The multiple streams per SourceBuffer has been implemented in r281440. Peertube videos work now, and I ensured that they have multiple streams per SourceBuffer. Resolving this bug as fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1815609</commentid>
    <comment_count>5</comment_count>
    <who name="Enrique Ocaña">eocanha</who>
    <bug_when>2021-11-16 12:42:03 -0800</bug_when>
    <thetext>...but the stream type reconversion (MSE changeType()[1]) is still missing.

[1] https://w3c.github.io/media-source/#dom-sourcebuffer-changetype</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889231</commentid>
    <comment_count>6</comment_count>
    <who name="Alicia Boya García">aboya</who>
    <bug_when>2022-08-05 14:43:05 -0700</bug_when>
    <thetext>There is no reason to have this bug set as REOPENED.

(In reply to Enrique Ocaña from comment #5)
&gt; ...but the stream type reconversion (MSE changeType()[1]) is still missing.
&gt; 
&gt; [1] https://w3c.github.io/media-source/#dom-sourcebuffer-changetype

A changeType implementation is a completely different effort. Note it wasn&apos;t even in the spec when this original bug was open.

Also, as I explained &quot;An audio/video/text stream can&apos;t be reconverted to other type&quot; is a requirement of the spec. Even with changeType, SourceBuffers can&apos;t change from video into audio. The number and type of tracks must much, but container and codecs can differ. https://w3c.github.io/media-source/#ref-for-dfn-first-initialization-segment-received-flag-2

Feel free to open a separate bug for a changeType implementation in MSE GStreamer. That is a feature that is in the cooking pot, but to which it&apos;s hard to get to while being overwhelmed with bug fixing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>