<?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>30002</bug_id>
          
          <creation_ts>2009-10-02 01:41:45 -0700</creation_ts>
          <short_desc>[GStreamer] MediaPlayerPrivate::cancelLoad() can be implemented by setting state to NULL</short_desc>
          <delta_ts>2009-10-15 07:32:03 -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>Media</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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>0</everconfirmed>
          <reporter name="Sebastian Dröge (slomo)">slomo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>151792</commentid>
    <comment_count>0</comment_count>
    <who name="Sebastian Dröge (slomo)">slomo</who>
    <bug_when>2009-10-02 01:41:45 -0700</bug_when>
    <thetext>Hi,
MediaPlayerPrivate::cancelLoad() can be implemented by setting the state of playbin2 to NULL. This can be called at any time and will stop everything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>154570</commentid>
    <comment_count>1</comment_count>
      <attachid>41160</attachid>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2009-10-14 07:22:10 -0700</bug_when>
    <thetext>Created attachment 41160
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>154778</commentid>
    <comment_count>2</comment_count>
      <attachid>41160</attachid>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2009-10-15 06:14:09 -0700</bug_when>
    <thetext>Comment on attachment 41160
proposed patch

&gt;  void MediaPlayerPrivate::cancelLoad()
&gt;  {
&gt; -    notImplemented();
&gt; +    if (m_networkState &lt; MediaPlayer::Loading || m_networkState == MediaPlayer::Loaded)
&gt; +        return;
&gt; +
&gt; +    if (m_playBin)
&gt; +        gst_element_set_state(m_playBin, GST_STATE_NULL);
&gt;  }

Both Mac and Win call updateStates() here after doing their media library magics; do you know if there is a reason why we don&apos;t need it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>154782</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2009-10-15 06:42:19 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 41160 [details])
&gt; &gt;  void MediaPlayerPrivate::cancelLoad()
&gt; &gt;  {
&gt; &gt; -    notImplemented();
&gt; &gt; +    if (m_networkState &lt; MediaPlayer::Loading || m_networkState == MediaPlayer::Loaded)
&gt; &gt; +        return;
&gt; &gt; +
&gt; &gt; +    if (m_playBin)
&gt; &gt; +        gst_element_set_state(m_playBin, GST_STATE_NULL);
&gt; &gt;  }
&gt; 
&gt; Both Mac and Win call updateStates() here after doing their media library
&gt; magics; do you know if there is a reason why we don&apos;t need it?

Hmm right. updateStates() is called when we receive the STATE_CHANGE message but we don&apos;t handle STATE_NULL there. Will send a new patch, thanks for spotting that ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>154789</commentid>
    <comment_count>4</comment_count>
      <attachid>41160</attachid>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2009-10-15 07:15:12 -0700</bug_when>
    <thetext>Comment on attachment 41160
proposed patch

&gt;  void MediaPlayerPrivate::cancelLoad()
&gt;  {
&gt; -    notImplemented();
&gt; +    if (m_networkState &lt; MediaPlayer::Loading || m_networkState == MediaPlayer::Loaded)
&gt; +        return;
&gt; +
&gt; +    if (m_playBin)
&gt; +        gst_element_set_state(m_playBin, GST_STATE_NULL);
&gt;  }

According to further investigation by Philippe, updateStates is always called on element state transitions, so it is being done here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>154792</commentid>
    <comment_count>5</comment_count>
      <attachid>41160</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-10-15 07:32:00 -0700</bug_when>
    <thetext>Comment on attachment 41160
proposed patch

Clearing flags on attachment: 41160

Committed r49624: &lt;http://trac.webkit.org/changeset/49624&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>154793</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-10-15 07:32:03 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>41160</attachid>
            <date>2009-10-14 07:22:10 -0700</date>
            <delta_ts>2009-10-15 07:32:00 -0700</delta_ts>
            <desc>proposed patch</desc>
            <filename>0001-implement-cancelLoad.patch</filename>
            <type>text/plain</type>
            <size>1612</size>
            <attacher name="Philippe Normand">pnormand</attacher>
            
              <data encoding="base64">RnJvbSA5NWI3MDFjNWNkZGYzMDQ5MmQyOTZhZDA0NGQ3ZDUyZGI0ZTJmNWQ3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaGlsaXBwZSBOb3JtYW5kIDxwbm9ybWFuZEBpZ2FsaWEuY29t
PgpEYXRlOiBXZWQsIDE0IE9jdCAyMDA5IDE1OjQ1OjM2ICswMjAwClN1YmplY3Q6IFtQQVRDSF0g
aW1wbGVtZW50IGNhbmNlbExvYWQKCi0tLQogV2ViQ29yZS9DaGFuZ2VMb2cgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICA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