1387fb6f1debe13fec582f10c9e60bf6c7c09a61
[platform/framework/web/chromium-efl.git] /
1 // Copyright (c) 2020 Samsung Electronics. 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.
4
5 #ifndef TIZEN_SRC_CHROMIUM_IMPL_CONTENT_RENDERER_MEDIA_TIZEN_ELEMENTARY_MEDIA_STREAM_SOURCE_WORKER_THREAD_DEMUXER_H_
6 #define TIZEN_SRC_CHROMIUM_IMPL_CONTENT_RENDERER_MEDIA_TIZEN_ELEMENTARY_MEDIA_STREAM_SOURCE_WORKER_THREAD_DEMUXER_H_
7
8 #include <memory>
9
10 #include "base/time/time.h"
11 #include "content/renderer/media/tizen/elementary_media_stream_source/any_thread/common_types.h"
12 #include "media/base/ranges.h"
13
14 namespace media {
15 class DecoderFactory;
16 }
17
18 namespace content {
19
20 namespace elementary_media_stream_source {
21
22 namespace worker_thread {
23 class AppendClient;
24 class AppendHost;
25 class VideoTextureClient;
26
27 // Interface used for communication from SourceImpl to DemuxerImpl.
28 class Demuxer {
29  public:
30   virtual ~Demuxer() = default;
31   virtual std::shared_ptr<AppendHost> GetAppendHost(TrackType) = 0;
32   virtual void OnBufferedTimeRangesChanged(
33       media::Ranges<base::TimeDelta>&&) = 0;
34   virtual void OnInitialConfigReady(const MaybeAudioConfig&,
35                                     const MaybeVideoConfig&) = 0;
36   virtual void SetAppendClient(TrackType, std::shared_ptr<AppendClient>) = 0;
37   virtual void SetVideoTextureClient(std::shared_ptr<VideoTextureClient>) = 0;
38   virtual void SetMediaStreamDecoderFactory(
39       base::WeakPtr<media::DecoderFactory>);
40
41  protected:
42   Demuxer() = default;
43 };
44
45 }  // namespace worker_thread
46
47 }  // namespace elementary_media_stream_source
48
49 }  // namespace content
50
51 #endif  // TIZEN_SRC_CHROMIUM_IMPL_CONTENT_RENDERER_MEDIA_TIZEN_ELEMENTARY_MEDIA_STREAM_SOURCE_WORKER_THREAD_DEMUXER_H_