WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-162898-20161016190149.patch (text/plain), 21.55 KB, created by
Enrique Ocaña
on 2016-10-16 12:05:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Enrique Ocaña
Created:
2016-10-16 12:05:21 PDT
Size:
21.55 KB
patch
obsolete
>Subversion Revision: 207345 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 662d99111d74d65ab811b03c2eae9feaf9147d14..90d21b9bfeea4381426cb6aebb653bf2d00d40b9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,5 +1,39 @@ > 2016-10-04 Enrique Ocaña González <eocanha@igalia.com> > >+ [GStreamer][MSE] SourceBufferPrivateGStreamer refactoring >+ https://bugs.webkit.org/show_bug.cgi?id=162898 >+ >+ Reviewed by Xabier Rodriguez-Calvar. >+ >+ Moved SourceBufferPrivateGStreamer to an mse directory and added unimplemented features (abort, enqueueing and sample flow control). >+ >+ * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp: Removed. >+ * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: Added. >+ (WebCore::SourceBufferPrivateGStreamer::create): >+ (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): >+ (WebCore::SourceBufferPrivateGStreamer::~SourceBufferPrivateGStreamer): >+ (WebCore::SourceBufferPrivateGStreamer::setClient): >+ (WebCore::SourceBufferPrivateGStreamer::append): >+ (WebCore::SourceBufferPrivateGStreamer::abort): >+ (WebCore::SourceBufferPrivateGStreamer::resetParserState): >+ (WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource): >+ (WebCore::SourceBufferPrivateGStreamer::readyState): >+ (WebCore::SourceBufferPrivateGStreamer::setReadyState): >+ (WebCore::SourceBufferPrivateGStreamer::flushAndEnqueueNonDisplayingSamples): >+ (WebCore::SourceBufferPrivateGStreamer::enqueueSample): >+ (WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples): >+ (WebCore::SourceBufferPrivateGStreamer::setReadyForMoreSamples): >+ (WebCore::SourceBufferPrivateGStreamer::notifyReadyForMoreSamples): >+ (WebCore::SourceBufferPrivateGStreamer::setActive): >+ (WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): >+ (WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples): >+ (WebCore::SourceBufferPrivateGStreamer::didReceiveInitializationSegment): >+ (WebCore::SourceBufferPrivateGStreamer::didReceiveSample): >+ (WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples): >+ * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: Renamed from Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h. >+ >+2016-10-04 Enrique Ocaña González <eocanha@igalia.com> >+ > [GStreamer][MSE] MediaSourceClientGStreamerMSE > https://bugs.webkit.org/show_bug.cgi?id=162896 > >diff --git a/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp >deleted file mode 100644 >index c9dd7fd24665e05dac424376ece474e234b69ce7..0000000000000000000000000000000000000000 >--- a/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp >+++ /dev/null >@@ -1,132 +0,0 @@ >-/* >- * Copyright (C) 2013 Google Inc. All rights reserved. >- * Copyright (C) 2013 Orange >- * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com> >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions are >- * met: >- * >- * * Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * * Redistributions in binary form must reproduce the above >- * copyright notice, this list of conditions and the following disclaimer >- * in the documentation and/or other materials provided with the >- * distribution. >- * * Neither the name of Google Inc. nor the names of its >- * contributors may be used to endorse or promote products derived from >- * this software without specific prior written permission. >- * >- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "SourceBufferPrivateGStreamer.h" >- >-#if ENABLE(MEDIA_SOURCE) && USE(GSTREAMER) >- >-#include "ContentType.h" >-#include "NotImplemented.h" >- >-namespace WebCore { >- >-Ref<SourceBufferPrivateGStreamer> SourceBufferPrivateGStreamer::create(MediaSourceClientGStreamer& client, const ContentType& contentType) >-{ >- return adoptRef(*new SourceBufferPrivateGStreamer(client, contentType)); >-} >- >-SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer(MediaSourceClientGStreamer& client, const ContentType& contentType) >- : m_type(contentType) >- , m_client(&client) >- , m_readyState(MediaPlayer::HaveNothing) >-{ >-} >- >-SourceBufferPrivateGStreamer::~SourceBufferPrivateGStreamer() >-{ >-} >- >-void SourceBufferPrivateGStreamer::setClient(SourceBufferPrivateClient* client) >-{ >- m_sourceBufferPrivateClient = client; >-} >- >-void SourceBufferPrivateGStreamer::append(const unsigned char* data, unsigned length) >-{ >- ASSERT(m_client); >- ASSERT(m_sourceBufferPrivateClient); >- >- SourceBufferPrivateClient::AppendResult result = m_client->append(this, data, length); >- m_sourceBufferPrivateClient->sourceBufferPrivateAppendComplete(this, result); >-} >- >-void SourceBufferPrivateGStreamer::abort() >-{ >- notImplemented(); >-} >- >-void SourceBufferPrivateGStreamer::resetParserState() >-{ >- notImplemented(); >-} >- >-void SourceBufferPrivateGStreamer::removedFromMediaSource() >-{ >- m_client->removedFromMediaSource(this); >-} >- >-MediaPlayer::ReadyState SourceBufferPrivateGStreamer::readyState() const >-{ >- return m_readyState; >-} >- >-void SourceBufferPrivateGStreamer::setReadyState(MediaPlayer::ReadyState state) >-{ >- m_readyState = state; >-} >- >-// TODO: Implement these >-void SourceBufferPrivateGStreamer::flushAndEnqueueNonDisplayingSamples(Vector<RefPtr<MediaSample>>, AtomicString) >-{ >- notImplemented(); >-} >- >-void SourceBufferPrivateGStreamer::enqueueSample(PassRefPtr<MediaSample>, AtomicString) >-{ >- notImplemented(); >-} >- >-bool SourceBufferPrivateGStreamer::isReadyForMoreSamples(AtomicString) >-{ >- notImplemented(); >- >- return false; >-} >- >-void SourceBufferPrivateGStreamer::setActive(bool) >-{ >- notImplemented(); >-} >- >-void SourceBufferPrivateGStreamer::stopAskingForMoreSamples(AtomicString) >-{ >- notImplemented(); >-} >- >-void SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples(AtomicString) >-{ >- notImplemented(); >-} >- >-} >-#endif >diff --git a/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h >deleted file mode 100644 >index 282f86c76ec0ee937632a8065f433b864c4dbfc3..0000000000000000000000000000000000000000 >--- a/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h >+++ /dev/null >@@ -1,78 +0,0 @@ >-/* >- * Copyright (C) 2013 Google Inc. All rights reserved. >- * Copyright (C) 2013 Orange >- * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com> >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions are >- * met: >- * >- * * Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * * Redistributions in binary form must reproduce the above >- * copyright notice, this list of conditions and the following disclaimer >- * in the documentation and/or other materials provided with the >- * distribution. >- * * Neither the name of Google Inc. nor the names of its >- * contributors may be used to endorse or promote products derived from >- * this software without specific prior written permission. >- * >- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#ifndef SourceBufferPrivateGStreamer_h >-#define SourceBufferPrivateGStreamer_h >- >-#if ENABLE(MEDIA_SOURCE) && USE(GSTREAMER) >- >-#include "ContentType.h" >-#include "SourceBufferPrivate.h" >-#include "WebKitMediaSourceGStreamer.h" >- >-namespace WebCore { >- >-class SourceBufferPrivateGStreamer final : public SourceBufferPrivate { >-public: >- static Ref<SourceBufferPrivateGStreamer> create(MediaSourceClientGStreamer&, const ContentType&); >- virtual ~SourceBufferPrivateGStreamer(); >- >- virtual void setClient(SourceBufferPrivateClient*); >- >- virtual void append(const unsigned char* data, unsigned length); >- virtual void abort(); >- virtual void resetParserState(); >- virtual void removedFromMediaSource(); >- >- virtual MediaPlayer::ReadyState readyState() const; >- virtual void setReadyState(MediaPlayer::ReadyState); >- >- virtual void flushAndEnqueueNonDisplayingSamples(Vector<RefPtr<MediaSample>>, AtomicString); >- virtual void enqueueSample(PassRefPtr<MediaSample>, AtomicString); >- virtual bool isReadyForMoreSamples(AtomicString); >- virtual void setActive(bool); >- virtual void stopAskingForMoreSamples(AtomicString); >- virtual void notifyClientWhenReadyForMoreSamples(AtomicString); >- >-private: >- SourceBufferPrivateGStreamer(MediaSourceClientGStreamer&, const ContentType&); >- >- ContentType m_type; >- RefPtr<MediaSourceClientGStreamer> m_client; >- SourceBufferPrivateClient* m_sourceBufferPrivateClient; >- MediaPlayer::ReadyState m_readyState; >-}; >- >-} >- >-#endif >-#endif >diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..767f3eee637ed335d0754b97000c4820e636af68 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp >@@ -0,0 +1,191 @@ >+/* >+ * Copyright (C) 2013 Google Inc. All rights reserved. >+ * Copyright (C) 2013 Orange >+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com> >+ * Copyright (C) 2015, 2016 Metrological Group B.V. >+ * Copyright (C) 2015, 2016 Igalia, S.L >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "SourceBufferPrivateGStreamer.h" >+ >+#if ENABLE(MEDIA_SOURCE) && USE(GSTREAMER) >+ >+#include "ContentType.h" >+#include "GStreamerUtilities.h" >+#include "MediaPlayerPrivateGStreamerMSE.h" >+#include "MediaSample.h" >+#include "MediaSourceClientGStreamerMSE.h" >+#include "MediaSourceGStreamer.h" >+#include "NotImplemented.h" >+#include "WebKitMediaSourceGStreamer.h" >+ >+namespace WebCore { >+ >+Ref<SourceBufferPrivateGStreamer> SourceBufferPrivateGStreamer::create(MediaSourceGStreamer* mediaSource, PassRefPtr<MediaSourceClientGStreamerMSE> client, const ContentType& contentType) >+{ >+ return adoptRef(*new SourceBufferPrivateGStreamer(mediaSource, client, contentType)); >+} >+ >+SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer(MediaSourceGStreamer* mediaSource, PassRefPtr<MediaSourceClientGStreamerMSE> client, const ContentType& contentType) >+ : SourceBufferPrivate() >+ , m_mediaSource(mediaSource) >+ , m_type(contentType) >+ , m_client(client) >+ , m_isReadyForMoreSamples(true) >+ , m_notifyWhenReadyForMoreSamples(false) >+{ >+} >+ >+SourceBufferPrivateGStreamer::~SourceBufferPrivateGStreamer() >+{ >+} >+ >+void SourceBufferPrivateGStreamer::setClient(SourceBufferPrivateClient* client) >+{ >+ m_sourceBufferPrivateClient = client; >+} >+ >+void SourceBufferPrivateGStreamer::append(const unsigned char* data, unsigned length) >+{ >+ ASSERT(m_mediaSource); >+ >+ if (!m_sourceBufferPrivateClient) >+ return; >+ >+ if (m_client->append(this, data, length)) >+ return; >+ >+ m_sourceBufferPrivateClient->sourceBufferPrivateAppendComplete(this, SourceBufferPrivateClient::ReadStreamFailed); >+} >+ >+void SourceBufferPrivateGStreamer::abort() >+{ >+ if (m_client) >+ m_client->abort(this); >+} >+ >+void SourceBufferPrivateGStreamer::resetParserState() >+{ >+ notImplemented(); >+} >+ >+void SourceBufferPrivateGStreamer::removedFromMediaSource() >+{ >+ if (m_mediaSource) >+ m_mediaSource->removeSourceBuffer(this); >+ if (m_client) >+ m_client->removedFromMediaSource(this); >+} >+ >+MediaPlayer::ReadyState SourceBufferPrivateGStreamer::readyState() const >+{ >+ return m_mediaSource->readyState(); >+} >+ >+void SourceBufferPrivateGStreamer::setReadyState(MediaPlayer::ReadyState state) >+{ >+ m_mediaSource->setReadyState(state); >+} >+ >+void SourceBufferPrivateGStreamer::flushAndEnqueueNonDisplayingSamples(Vector<RefPtr<MediaSample>> samples, AtomicString) >+{ >+ if (m_client) >+ m_client->flushAndEnqueueNonDisplayingSamples(samples); >+} >+ >+void SourceBufferPrivateGStreamer::enqueueSample(PassRefPtr<MediaSample> prpSample, AtomicString) >+{ >+ m_notifyWhenReadyForMoreSamples = false; >+ >+ RefPtr<MediaSample> protectedPrpSample = prpSample; >+ if (m_client) >+ m_client->enqueueSample(protectedPrpSample); >+} >+ >+bool SourceBufferPrivateGStreamer::isReadyForMoreSamples(AtomicString) >+{ >+ return m_isReadyForMoreSamples; >+} >+ >+void SourceBufferPrivateGStreamer::setReadyForMoreSamples(bool isReady) >+{ >+ ASSERT(WTF::isMainThread()); >+ m_isReadyForMoreSamples = isReady; >+} >+ >+void SourceBufferPrivateGStreamer::notifyReadyForMoreSamples() >+{ >+ ASSERT(WTF::isMainThread()); >+ setReadyForMoreSamples(true); >+ if (m_notifyWhenReadyForMoreSamples) >+ m_sourceBufferPrivateClient->sourceBufferPrivateDidBecomeReadyForMoreSamples(this, m_trackId); >+} >+ >+void SourceBufferPrivateGStreamer::setActive(bool isActive) >+{ >+ if (m_mediaSource) >+ m_mediaSource->sourceBufferPrivateDidChangeActiveState(this, isActive); >+} >+ >+void SourceBufferPrivateGStreamer::stopAskingForMoreSamples(AtomicString) >+{ >+ notImplemented(); >+} >+ >+void SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples(AtomicString trackId) >+{ >+ ASSERT(WTF::isMainThread()); >+ m_notifyWhenReadyForMoreSamples = true; >+ m_trackId = trackId; >+} >+ >+#if ENABLE(VIDEO_TRACK) >+void SourceBufferPrivateGStreamer::didReceiveInitializationSegment(const SourceBufferPrivateClient::InitializationSegment& initializationSegment) >+{ >+ if (m_sourceBufferPrivateClient) >+ m_sourceBufferPrivateClient->sourceBufferPrivateDidReceiveInitializationSegment(this, initializationSegment); >+} >+ >+void SourceBufferPrivateGStreamer::didReceiveSample(PassRefPtr<MediaSample> prpSample) >+{ >+ RefPtr<MediaSample> protectedPrpSample = prpSample; >+ if (m_sourceBufferPrivateClient) >+ m_sourceBufferPrivateClient->sourceBufferPrivateDidReceiveSample(this, *protectedPrpSample); >+} >+ >+void SourceBufferPrivateGStreamer::didReceiveAllPendingSamples() >+{ >+ if (m_sourceBufferPrivateClient) >+ m_sourceBufferPrivateClient->sourceBufferPrivateAppendComplete(this, SourceBufferPrivateClient::AppendSucceeded); >+} >+#endif >+ >+} >+#endif >diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h >new file mode 100644 >index 0000000000000000000000000000000000000000..77c2bc27782571046fa75c28d824569f2abb6370 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h >@@ -0,0 +1,96 @@ >+/* >+ * Copyright (C) 2013 Google Inc. All rights reserved. >+ * Copyright (C) 2013 Orange >+ * Copyright (C) 2014 Sebastian Dröge <sebastian@centricular.com> >+ * Copyright (C) 2015, 2016 Metrological Group B.V. >+ * Copyright (C) 2015, 2016 Igalia, S.L >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(MEDIA_SOURCE) && USE(GSTREAMER) >+ >+#include "ContentType.h" >+#include "MediaPlayerPrivateGStreamerMSE.h" >+#include "SourceBufferPrivate.h" >+#include "SourceBufferPrivateClient.h" >+#include "WebKitMediaSourceGStreamer.h" >+ >+namespace WebCore { >+ >+class MediaSourceGStreamer; >+ >+class SourceBufferPrivateGStreamer final : public SourceBufferPrivate { >+ >+public: >+ static Ref<SourceBufferPrivateGStreamer> create(MediaSourceGStreamer*, PassRefPtr<MediaSourceClientGStreamerMSE>, const ContentType&); >+ virtual ~SourceBufferPrivateGStreamer(); >+ >+ void clearMediaSource() { m_mediaSource = nullptr; } >+ >+ void setClient(SourceBufferPrivateClient*) override; >+ void append(const unsigned char*, unsigned) override; >+ void abort() override; >+ void resetParserState() override; >+ void removedFromMediaSource() override; >+ MediaPlayer::ReadyState readyState() const override; >+ void setReadyState(MediaPlayer::ReadyState) override; >+ >+ void flushAndEnqueueNonDisplayingSamples(Vector<RefPtr<MediaSample>>, AtomicString) override; >+ void enqueueSample(PassRefPtr<MediaSample>, AtomicString) override; >+ bool isReadyForMoreSamples(AtomicString) override; >+ void setActive(bool) override; >+ void stopAskingForMoreSamples(AtomicString) override; >+ void notifyClientWhenReadyForMoreSamples(AtomicString) override; >+ >+ void setReadyForMoreSamples(bool); >+ void notifyReadyForMoreSamples(); >+ >+#if ENABLE(VIDEO_TRACK) >+ void didReceiveInitializationSegment(const SourceBufferPrivateClient::InitializationSegment&); >+ void didReceiveSample(PassRefPtr<MediaSample>); >+ void didReceiveAllPendingSamples(); >+#endif >+ >+private: >+ SourceBufferPrivateGStreamer(MediaSourceGStreamer*, PassRefPtr<MediaSourceClientGStreamerMSE>, const ContentType&); >+ friend class MediaSourceClientGStreamerMSE; >+ >+ MediaSourceGStreamer* m_mediaSource; >+ ContentType m_type; >+ RefPtr<MediaSourceClientGStreamerMSE> m_client; >+ SourceBufferPrivateClient* m_sourceBufferPrivateClient; >+ bool m_isReadyForMoreSamples; >+ bool m_notifyWhenReadyForMoreSamples; >+ AtomicString m_trackId; >+}; >+ >+} >+ >+#endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 162898
:
290590
|
291761
|
292407
|
292780
|
292892