Updating trunk VERSION from 935.0 to 936.0
[chromium-blink-merge.git] / media / filters / chunk_demuxer_factory.h
blobbeab47947d5e6f5d571c16ee647219e025624bd4
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_FACTORY_H_
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_FACTORY_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
11 #include "media/base/filter_factories.h"
13 namespace media {
15 class ChunkDemuxer;
16 class ChunkDemuxerClient;
18 // Factory for building ChunkDemuxers. The factory will only build a
19 // ChunkDemuxer for build URLs that match the one passed into the constructor.
20 // All other URLs are delegated to |delegate_factory_|. The url passed to
21 // the constructor represents the "special" URL that indicates that the
22 // ChunkDemuxer should be used for playback.
23 class MEDIA_EXPORT ChunkDemuxerFactory : public DemuxerFactory {
24 public:
25 // Takes ownership of |delegate_factory|.
26 ChunkDemuxerFactory(const std::string& url, DemuxerFactory* delegate_factory,
27 ChunkDemuxerClient* client);
28 virtual ~ChunkDemuxerFactory();
30 // DemuxerFactory methods.
31 virtual void Build(const std::string& url, const BuildCallback& cb);
32 virtual DemuxerFactory* Clone() const;
34 private:
35 std::string url_;
36 scoped_ptr<DemuxerFactory> delegate_factory_;
37 ChunkDemuxerClient* client_;
39 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerFactory);
42 } // namespace media
44 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_FACTORY_H_