forked from Jackarain/avplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibyk.cpp
53 lines (42 loc) · 898 Bytes
/
libyk.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "libyk.h"
#include "youku_impl.h"
namespace libyk {
// youku的具体实现.
youku::youku()
: m_impl(NULL)
{
m_impl = new youku_impl();
}
youku::~youku()
{
delete m_impl;
}
bool youku::open(const std::string &url, std::string save_path /*= "."*/, video_quality quality /*= normal_quality*/)
{
return m_impl->open(url, save_path, quality);
}
void youku::stop()
{
m_impl->stop();
}
bool youku::wait_for_complete()
{
return m_impl->wait_for_complete();
}
duration_info youku::current_duration_info()
{
return m_impl->current_duration_info();
}
bool youku::change_download(int index)
{
return m_impl->change_download(index);
}
bool youku::read_data(char* data, std::size_t size, std::size_t &read_size)
{
return m_impl->read_data(data, size, read_size);
}
boost::int64_t youku::read_seek(boost::uint64_t offset, int whence)
{
return m_impl->read_seek(offset, whence);
}
}