forked from alibaba/CicadaPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer_types.cpp
73 lines (63 loc) · 1.86 KB
/
player_types.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// Created by moqi on 2018/9/21.
//
#include "player_types.h"
#if __APPLE__
#include <TargetConditionals.h>
#endif
#include <utils/globalSettings.h>
namespace Cicada {
#define START_BUFFER_DURATION_DEFAULT (1000*1000)
#define HIGH_BUFFERING_LEVEL_DEFAULT (5000*1000)
#define MAX_BUFFER_DURATION_DEFAULT (40*1000*1000)
player_type_set::player_type_set()
{
reset();
}
player_type_set::~player_type_set() = default;
void player_type_set::reset()
{
startBufferDuration = START_BUFFER_DURATION_DEFAULT;
highLevelBufferDuration = HIGH_BUFFERING_LEVEL_DEFAULT;
maxBufferDuration = MAX_BUFFER_DURATION_DEFAULT;
url = "";
refer = "";
timeout_ms = 15000;
mIpType = static_cast<IpResolveType>(globalSettings::getSetting().getIpResolveType());
RTMaxDelayTime = 0;
bLooping = false;
bDisableAudio = false;
bDisableVideo = false;
bMute = false;
bLowLatency = false;
mView = nullptr;
mAutoSwitchTime = INT64_MIN;
mVolume = 1.0;
mPlayerListener = {nullptr,};
rate = 1.0;
http_proxy = "";
userAgent = "";
clearShowWhenStop = false;
bEnableTunnelRender = false;
bEnableHwVideoDecode = true;
// don't need reset for each playback
// bEnableVRC = false;
#if TARGET_OS_IPHONE
lowMemSize = 50 * 1024 * 1024;// 50M
#else
lowMemSize = 100 * 1024 * 1024; //100M
#endif
mDefaultBandWidth = 0;
mVideoBackgroundColor = 0xFF000000;
// Don't reset AnalyticsID
mOptions.reset();
maxASeekDelta = 21 * 1000 * 1000;
maxVideoRecoverSize = 300;
mFastStart = true;
pixelBufferOutputFormat = 0;
drmMagicKey = "";
sessionId = "";
netWorkRetryCount = 0;
preferAudio = false;
}
}