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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21159</bug_id>
          
          <creation_ts>2013-02-28 21:50:07 +0000</creation_ts>
          <short_desc>SourceBuffer appendArrayBuffer should take ArrayBufferView</short_desc>
          <delta_ts>2013-03-05 17:27:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>Media Source Extensions</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Watson">watsonm</reporter>
          <assigned_to name="Aaron Colwell (c)">acolwell</assigned_to>
          <cc>acolwell</cc>
    
    <cc>adrianba</cc>
    
    <cc>mhakobyan</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>83842</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2013-02-28 21:50:07 +0000</bug_when>
    <thetext>Presently the SourceBuffer appendArrayBuffer method takes an ArrayBuffer argument, meaning that there is an additional copy whenever the data to be appended is not already in a single ArrayBuffer object (for example if only part of an ArrayBuffer received from XmlHttpRequest is to be appended).

Consider changing this to ArrayBufferView, so that view objects like Uint8Arrays can be appended (as in the original webkitSourceAppend).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83947</commentid>
    <comment_count>1</comment_count>
    <who name="Aaron Colwell (c)">acolwell</who>
    <bug_when>2013-03-04 17:38:14 +0000</bug_when>
    <thetext>Any preference on the method name?
1. Keep as appendArrayBuffer()
2. Change to appendArrayBufferView()
3. Change to appendBuffer()
4. Other suggestions welcome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83955</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Bateman [MSFT]">adrianba</who>
    <bug_when>2013-03-04 19:37:20 +0000</bug_when>
    <thetext>I think the method can be overloaded to accept either an ArrayBuffer or ArrayBufferView. This is what we&apos;ve done elsewhere in the platform.

I&apos;m not precious about the naming but prefer to settle on something sooner rather than later if we&apos;re going to make a change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83960</commentid>
    <comment_count>3</comment_count>
    <who name="Aaron Colwell (c)">acolwell</who>
    <bug_when>2013-03-04 20:04:54 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; I think the method can be overloaded to accept either an ArrayBuffer or
&gt; ArrayBufferView. This is what we&apos;ve done elsewhere in the platform.
&gt; 
&gt; I&apos;m not precious about the naming but prefer to settle on something sooner
&gt; rather than later if we&apos;re going to make a change.

Ok. How about we just call it appendBuffer() and I&apos;ll add the 2 overloads.

void appendBuffer(ArrayBuffer)
void appendBuffer(ArrayBufferView)

That way if we come across some other buffer type we need to add, we can just add the extra overload w/o changing the method name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84000</commentid>
    <comment_count>4</comment_count>
    <who name="Aaron Colwell (c)">acolwell</who>
    <bug_when>2013-03-05 17:27:52 +0000</bug_when>
    <thetext>Changes committed.
https://dvcs.w3.org/hg/html-media/rev/dcd406812201</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>