OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3470 } | 3470 } |
3471 | 3471 |
3472 void* HTMLMediaElement::preDispatchEventHandler(Event* event) | 3472 void* HTMLMediaElement::preDispatchEventHandler(Event* event) |
3473 { | 3473 { |
3474 if (event && event->type() == EventTypeNames::webkitfullscreenchange) | 3474 if (event && event->type() == EventTypeNames::webkitfullscreenchange) |
3475 configureMediaControls(); | 3475 configureMediaControls(); |
3476 | 3476 |
3477 return nullptr; | 3477 return nullptr; |
3478 } | 3478 } |
3479 | 3479 |
3480 // TODO(srirama.m): Refactor this and other relevant methods and have a | 3480 // TODO(srirama.m): Refactor this and clearMediaPlayer to the extent possible. |
3481 // single method for clearing the mediaplayer and its stuff. | |
3482 void HTMLMediaElement::resetMediaPlayerAndMediaSource() | 3481 void HTMLMediaElement::resetMediaPlayerAndMediaSource() |
3483 { | 3482 { |
3484 AudioSourceProviderClientLockScope scope(*this); | |
3485 | |
3486 closeMediaSource(); | 3483 closeMediaSource(); |
3487 | 3484 |
3488 if (m_webMediaPlayer) { | 3485 AudioSourceProviderClientLockScope scope(*this); |
philipj_slow
2015/08/18 07:53:50
Maybe wrap this in a scope like in HTMLMediaElemen
Srirama
2015/08/18 08:38:33
That will be an extra call but there shouldn't be
philipj_slow
2015/08/18 09:00:49
Oh, I didn't see that in the diff.
| |
3489 #if ENABLE(WEB_AUDIO) | 3486 clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); |
3490 m_audioSourceProvider.wrap(nullptr); | |
3491 #endif | |
3492 m_webMediaPlayer.clear(); | |
3493 } | |
3494 | 3487 |
3495 // We haven't yet found out if any remote routes are available. | 3488 // We haven't yet found out if any remote routes are available. |
3496 m_remoteRoutesAvailable = false; | 3489 m_remoteRoutesAvailable = false; |
3497 m_playingRemotely = false; | 3490 m_playingRemotely = false; |
3498 | 3491 |
3499 #if ENABLE(WEB_AUDIO) | 3492 #if ENABLE(WEB_AUDIO) |
3500 if (m_audioSourceNode) | 3493 if (m_audioSourceNode) |
3501 audioSourceProvider().setClient(m_audioSourceNode); | 3494 audioSourceProvider().setClient(m_audioSourceNode); |
3502 #endif | 3495 #endif |
3503 } | 3496 } |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3782 visitor->trace(m_client); | 3775 visitor->trace(m_client); |
3783 } | 3776 } |
3784 | 3777 |
3785 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3778 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
3786 { | 3779 { |
3787 visitor->trace(m_client); | 3780 visitor->trace(m_client); |
3788 } | 3781 } |
3789 #endif | 3782 #endif |
3790 | 3783 |
3791 } | 3784 } |
OLD | NEW |