NaCl Player API
NaCl Player API Documentation
url_data_source.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 NACL_PLAYER_URL_DATA_SOURCE_H_
6 #define NACL_PLAYER_URL_DATA_SOURCE_H_
7 
8 #include <functional>
9 #include <memory>
10 #include <string>
11 
12 #include "nacl_player/media_common.h"
13 #include "nacl_player/media_data_source.h"
14 
33 namespace Samsung {
34 namespace NaClPlayer {
35 
41  public:
44  explicit URLDataSource(const std::string& url);
45  URLDataSource(const URLDataSource& other);
46  URLDataSource& operator=(const URLDataSource& other);
47 
48  virtual ~URLDataSource();
49 
58  int32_t GetStreamingProperty(
59  StreamingProperty type,
60  const std::function<void(int32_t, const std::string&)>& callback);
61 
68  int32_t GetStreamingProperty(
69  StreamingProperty type,
70  std::string& value);
71 
86  int32_t SetStreamingProperty(
87  StreamingProperty type,
88  const std::string& value,
89  const std::function<void(int32_t)>& callback);
90 
97  int32_t SetStreamingProperty(
98  StreamingProperty type,
99  const std::string& value);
100 
101  protected:
102  MediaDataSource::Impl* impl() const;
103 
104  private:
105  class Impl;
106  std::unique_ptr<Impl> pimpl_;
107 };
108 
109 } // namespace NaClPlayer
110 } // namespace Samsung
111 
112 #endif // NACL_PLAYER_URL_DATA_SOURCE_H_
int32_t GetStreamingProperty(StreamingProperty type, const std::function< void(int32_t, const std::string &)> &callback)
URLDataSource(const std::string &url)
int32_t SetStreamingProperty(StreamingProperty type, const std::string &value, const std::function< void(int32_t)> &callback)