21a69966570783fabcea937db9f5121a9d3f3df1
[platform/framework/web/crosswalk-tizen.git] /
1 // Copyright 2016 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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_MEDIA_PLAYER_PEPPER_ELEMENTARY_STREAM_PRIVATE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_MEDIA_PLAYER_PEPPER_ELEMENTARY_STREAM_PRIVATE_H_
7
8 #include <vector>
9 #include <memory>
10
11 #include "base/memory/ref_counted.h"
12 #include "base/callback.h"
13 #include "ppapi/shared_impl/media_player/es_packet.h"
14
15 namespace content {
16
17 class ElementaryStreamListenerPrivate;
18
19 // Platform depended part of Elementary Stream PPAPI implementation,
20 // see ppapi/api/samsung/ppb_media_data_source_samsung.idl.
21
22 class PepperElementaryStreamPrivate
23     : public base::RefCountedThreadSafe<PepperElementaryStreamPrivate> {
24  public:
25   virtual void AppendPacket(std::unique_ptr<ppapi::ESPacket>,
26                             const base::Callback<void(int32_t)>&) = 0;
27   virtual void AppendEncryptedPacket(
28       std::unique_ptr<ppapi::EncryptedESPacket>,
29       const base::Callback<void(int32_t)>& callback) = 0;
30   virtual void AppendTrustZonePacket(
31       std::unique_ptr<ppapi::ESPacket>,
32       const PP_TrustZoneReference& handle,
33       const base::Callback<void(int32_t)>& callback) = 0;
34   virtual void Flush(const base::Callback<void(int32_t)>&) = 0;
35   virtual void SetDRMInitData(const std::vector<uint8_t>& type,
36                               const std::vector<uint8_t>& initData,
37                               const base::Callback<void(int32_t)>&) = 0;
38   virtual void SetListener(ElementaryStreamListenerPrivate* listener) = 0;
39   virtual void RemoveListener(ElementaryStreamListenerPrivate* listener) = 0;
40
41  protected:
42   friend class base::RefCountedThreadSafe<PepperElementaryStreamPrivate>;
43   virtual ~PepperElementaryStreamPrivate() {}
44 };
45
46 }  // namespace  content
47
48 #endif  // CONTENT_BROWSER_RENDERER_HOST_PEPPER_MEDIA_PLAYER_PEPPER_ELEMENTARY_STREAM_PRIVATE_H_