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.
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_
11 #include "base/memory/ref_counted.h"
12 #include "base/callback.h"
13 #include "ppapi/shared_impl/media_player/es_packet.h"
17 class ElementaryStreamListenerPrivate;
19 // Platform depended part of Elementary Stream PPAPI implementation,
20 // see ppapi/api/samsung/ppb_media_data_source_samsung.idl.
22 class PepperElementaryStreamPrivate
23 : public base::RefCountedThreadSafe<PepperElementaryStreamPrivate> {
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;
42 friend class base::RefCountedThreadSafe<PepperElementaryStreamPrivate>;
43 virtual ~PepperElementaryStreamPrivate() {}
46 } // namespace content
48 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_MEDIA_PLAYER_PEPPER_ELEMENTARY_STREAM_PRIVATE_H_