Pepper_47_C++_interfaces
url_data_source_samsung.h
Go to the documentation of this file.
1 // Copyright (c) 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 PPAPI_CPP_SAMSUNG_URL_DATA_SOURCE_SAMSUNG_H_
6 #define PPAPI_CPP_SAMSUNG_URL_DATA_SOURCE_SAMSUNG_H_
7 
8 #include <string>
9 
10 #include "ppapi/c/samsung/ppb_media_data_source_samsung.h"
12 #include "ppapi/cpp/resource.h"
14 #include "ppapi/cpp/var.h"
15 
16 /// @file
17 /// This file defines the <code>URLDataSource_Samsung<code> type,
18 /// which represents data source which can feed media clip data from
19 /// URL provided.
20 ///
21 /// Part of Pepper Media Player interfaces (Samsung's extension).
22 namespace pp {
23 
24 class InstanceHandle;
25 
26 /// Class representing Data Source handling media passed as URLs.
27 ///
28 /// After creation data source can be attached to the
29 /// <code>MediaPlayer_Samsung</code>. When attaching to the player passed URL
30 /// is validated and buffering starts.
32  public:
33  /// Creates Data Source which is able to download data form media clip
34  /// from |url| provided.
35  URLDataSource_Samsung(const InstanceHandle& instance,
36  const std::string& url);
37 
39 
40  explicit URLDataSource_Samsung(PP_Resource resource);
42 
44 
45  virtual ~URLDataSource_Samsung();
46 
47  /// Gets the value for specific Feature in the HTTP, MMS & Streaming Engine
48  /// (Smooth Streaming, HLS, DASH, DivX Plus Streaming, Widevine).
49  ///
50  /// @param[in] type A <code>PP_StreamingProperty</code> to gett
51  /// @param[in] callback A <code>CompletionCallbackWithOutput</code>
52  /// to be called upon completion.
53  ///
54  /// @return PP_OK on success, otherwise an error code from
55  /// <code>pp_errors.h</code>.
57  PP_StreamingProperty type,
59 
60  /// Sets the value for specific Feature in the HTTP, MMS & Streaming Engine
61  /// (Smooth Streaming, HLS, DASH, DivX Plus Streaming, Widevine).
62  ///
63  /// When special setting is required in Streaming Engine for the
64  /// Start Bitrate setting or specific Content Protection (CP),
65  /// the CUSTOM_MESSAGE Property can be set.
66  ///
67  /// @param[in] type A <code>PP_StreamingProperty</code> to set
68  /// @param[in] value New value of the property, see desciprion of
69  /// <code>PP_StreamingProperty</code> what is requested format.
70  /// @param[in] callback A <code>CompletionCallback</code> to be called upon
71  /// completion.
72  ///
73  /// @return PP_OK on success, otherwise an error code from
74  /// <code>pp_errors.h</code>.
76  PP_StreamingProperty type,
77  const Var& value,
78  const CompletionCallback& callback);
79 };
80 
81 } // namespace pp
82 
83 #endif // PPAPI_CPP_SAMSUNG_URL_DATA_SOURCE_SAMSUNG_H_
URLDataSource_Samsung & operator=(const URLDataSource_Samsung &other)
int32_t GetStreamingProperty(PP_StreamingProperty type, const CompletionCallbackWithOutput< pp::Var > &callback)
PassRef
Definition: pass_ref.h:17
A generic type used for passing data types between the module and the page.
Definition: var.h:21
int32_t SetStreamingProperty(PP_StreamingProperty type, const Var &value, const CompletionCallback &callback)
URLDataSource_Samsung(const InstanceHandle &instance, const std::string &url)