Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Unified Diff: media/base/demuxer_factory.h

Issue 2643743002: Mojify demuxers and allow running {Chunk/FFmpeg}Demuxer in a Utility Process (Closed)
Patch Set: Rebase and make sure to unbind mojom::DemuxerPtr on the bound thread during termination Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/demuxer.h ('k') | media/base/demuxer_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/demuxer_factory.h
diff --git a/media/base/demuxer_factory.h b/media/base/demuxer_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..e2a68f83283a803c5680f59406ab2c0ba45c99b9
--- /dev/null
+++ b/media/base/demuxer_factory.h
@@ -0,0 +1,49 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_DEMUXER_FACTORY_H_
+#define MEDIA_BASE_DEMUXER_FACTORY_H_
+
+#include <memory>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "media/base/demuxer.h"
+#include "media/base/media_export.h"
+#include "media/base/source_buffer.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+}
+
+namespace media {
+
+// A factory class for creating media::Demuxer to be used by media pipeline.
+class MEDIA_EXPORT DemuxerFactory {
+ public:
+ DemuxerFactory();
+ virtual ~DemuxerFactory();
+
+ virtual std::unique_ptr<Demuxer> CreateDemuxer(
+ const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner,
+ const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
+ DataSource* data_source,
+ const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb,
+ const Demuxer::MediaTracksUpdatedCB& media_tracks_updated_cb) = 0;
+
+ virtual std::unique_ptr<Demuxer> CreateDemuxerSourceBuffer(
+ const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner,
+ const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
+ const base::Closure& open_cb,
+ const Demuxer::EncryptedMediaInitDataCB& encrypted_media_init_data_cb,
+ media::SourceBuffer** source_buffer_out) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DemuxerFactory);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_DEMUXER_FACTORY_H_
« no previous file with comments | « media/base/demuxer.h ('k') | media/base/demuxer_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698