Skip to content

Commit 6e1d281

Browse files
authored
Merge pull request #112 from ksvc/v4.1.0
update to V4.1.0
2 parents 0ecaabe + 424bf1c commit 6e1d281

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+13949
-2790
lines changed

demo/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
android:persistent="false"
3636
android:screenOrientation="portrait"
3737
android:smallScreens="true"
38-
android:theme="@style/ThemeWithTitle">
38+
android:theme="@style/AppTheme">
3939
<activity
4040
android:name="com.ksyun.media.streamer.demo.DemoActivity"
4141
android:configChanges="orientation|keyboardHidden|screenSize"

demo/assets/KSYResource/0_pink.png

158 KB
Loading

demo/assets/KSYResource/0_ruddy2.png

131 KB
Loading
78.8 KB
Loading

demo/assets/KSYResource/0_whiten.png

771 KB
Loading

demo/assets/KSYResource/1_freshy.png

196 KB
Loading

demo/assets/KSYResource/2_beauty.png

64.4 KB
Loading

demo/assets/KSYResource/3_sweety.png

50.3 KB
Loading

demo/assets/KSYResource/4_sepia.png

35.5 KB
Loading

demo/assets/KSYResource/5_blue.png

198 KB
Loading
136 KB
Loading

demo/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ apply plugin: 'com.android.application'
1111
dependencies {
1212
compile fileTree(dir: 'libs', include: '*.jar')
1313
compile fileTree(dir: 'libs/armeabi-v7a', include: '*/so')
14-
compile 'com.android.support:support-v4:24.2.1'
14+
compile 'com.android.support:appcompat-v7:24.2.1'
1515
}
1616

1717
android {
@@ -47,8 +47,4 @@ android {
4747
debug.setRoot('build-types/debug')
4848
release.setRoot('build-types/release')
4949
}
50-
compileOptions {
51-
sourceCompatibility JavaVersion.VERSION_1_7
52-
targetCompatibility JavaVersion.VERSION_1_7
53-
}
5450
}

demo/res/layout/beauty_choose.xml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical"
4+
android:layout_width="match_parent"
5+
android:layout_height="wrap_content"
6+
android:background="#C0303030">
7+
8+
<LinearLayout
9+
android:orientation="horizontal"
10+
android:layout_width="match_parent"
11+
android:layout_height="wrap_content"
12+
android:layout_marginLeft="10dp"
13+
android:layout_marginRight="10dp"
14+
android:layout_marginTop="5dp"
15+
android:layout_marginBottom="5dp"
16+
android:gravity="center">
17+
18+
<TextView
19+
android:layout_width="wrap_content"
20+
android:layout_height="wrap_content"
21+
android:layout_gravity="center"
22+
android:text="美颜类型:"
23+
android:textColor="@color/font_color_35"
24+
android:textSize="16sp"/>
25+
26+
<android.support.v7.widget.AppCompatSpinner
27+
android:id="@+id/beauty_spin"
28+
android:layout_width="wrap_content"
29+
android:layout_height="32dp"
30+
android:layout_marginLeft="28dp"
31+
android:text="none"
32+
android:textSize="14sp">
33+
</android.support.v7.widget.AppCompatSpinner>
34+
</LinearLayout>
35+
36+
<LinearLayout
37+
android:id="@+id/beauty_grind"
38+
android:orientation="horizontal"
39+
android:layout_width="match_parent"
40+
android:layout_height="wrap_content"
41+
android:layout_marginLeft="10dp"
42+
android:layout_marginRight="10dp"
43+
android:gravity="center">
44+
45+
<TextView
46+
android:id="@+id/grind_text"
47+
android:layout_width="64dp"
48+
android:layout_height="wrap_content"
49+
android:gravity="center"
50+
android:text="磨皮"
51+
android:textColor="@color/font_color_35"
52+
android:textSize="14sp"/>
53+
54+
<android.support.v7.widget.AppCompatSeekBar
55+
android:id="@+id/grind_seek_bar"
56+
android:layout_width="match_parent"
57+
android:layout_height="wrap_content"/>
58+
</LinearLayout>
59+
60+
<LinearLayout
61+
android:id="@+id/beauty_whiten"
62+
android:orientation="horizontal"
63+
android:layout_width="match_parent"
64+
android:layout_height="wrap_content"
65+
android:layout_marginLeft="10dp"
66+
android:layout_marginRight="10dp"
67+
android:gravity="center">
68+
69+
<TextView
70+
android:id="@+id/whiten_text"
71+
android:layout_width="64dp"
72+
android:layout_height="wrap_content"
73+
android:gravity="center"
74+
android:text="美白"
75+
android:textColor="@color/font_color_35"
76+
android:textSize="14sp"/>
77+
78+
<android.support.v7.widget.AppCompatSeekBar
79+
android:id="@+id/whiten_seek_bar"
80+
android:layout_width="match_parent"
81+
android:layout_height="wrap_content"/>
82+
</LinearLayout>
83+
84+
<LinearLayout
85+
android:id="@+id/beauty_ruddy"
86+
android:orientation="horizontal"
87+
android:layout_width="match_parent"
88+
android:layout_height="wrap_content"
89+
android:layout_marginLeft="10dp"
90+
android:layout_marginRight="10dp"
91+
android:layout_marginBottom="10dp"
92+
android:gravity="center">
93+
94+
<TextView
95+
android:id="@+id/ruddy_text"
96+
android:layout_width="64dp"
97+
android:layout_height="wrap_content"
98+
android:gravity="center"
99+
android:text="红润"
100+
android:textColor="@color/font_color_35"
101+
android:textSize="14sp"/>
102+
103+
<android.support.v7.widget.AppCompatSeekBar
104+
android:id="@+id/ruddy_seek_bar"
105+
android:layout_width="match_parent"
106+
android:layout_height="wrap_content"/>
107+
</LinearLayout>
108+
109+
</LinearLayout>

demo/res/layout/camera_activity.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<include
2323
android:id="@+id/actionbar"
2424
android:layout_width="match_parent"
25-
android:layout_height="@dimen/global_actionbar_height"
25+
android:layout_height="wrap_content"
2626
android:layout_gravity="top"
2727
layout="@layout/camera_titlebar" />
2828

@@ -31,9 +31,10 @@
3131
android:layout_width="match_parent"
3232
android:layout_height="wrap_content"
3333
android:layout_below="@id/actionbar"
34+
android:layout_marginTop="10dp"
3435
android:gravity="center"
3536
android:textColor="@color/font_color_35"
36-
android:textSize="@dimen/font_size_38px" />
37+
android:textSize="@dimen/font_size_36px" />
3738

3839
<TextView
3940
android:id="@+id/debuginfo"
@@ -44,6 +45,14 @@
4445
android:textColor="@color/font_color_41"
4546
android:textSize="@dimen/font_size_22px" />
4647

48+
<include
49+
android:id="@+id/beauty_choose"
50+
android:layout_width="match_parent"
51+
android:layout_height="wrap_content"
52+
android:layout_gravity="top"
53+
android:visibility="invisible"
54+
layout="@layout/beauty_choose" />
55+
4756
<include
4857
android:id="@+id/bar_bottom"
4958
android:layout_width="match_parent"

demo/res/layout/camera_bottombar.xml

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<LinearLayout
1717
android:layout_width="match_parent"
1818
android:layout_height="wrap_content"
19-
android:layout_marginBottom="10dp"
19+
android:layout_marginBottom="5dp"
2020
android:orientation="horizontal">
2121

2222
<CheckBox
@@ -80,7 +80,7 @@
8080
<LinearLayout
8181
android:layout_width="match_parent"
8282
android:layout_height="wrap_content"
83-
android:layout_marginBottom="10dp"
83+
android:layout_marginBottom="5dp"
8484
android:orientation="horizontal">
8585

8686
<CheckBox
@@ -125,32 +125,6 @@
125125
android:textSize="@dimen/font_size_28px">
126126
</CheckBox>
127127

128-
<!--<CheckBox-->
129-
<!--android:id="@+id/picture_pip"-->
130-
<!--android:layout_width="wrap_content"-->
131-
<!--android:layout_height="wrap_content"-->
132-
<!--android:layout_gravity="center"-->
133-
<!--android:layout_marginLeft="10dp"-->
134-
<!--android:layout_weight="1"-->
135-
<!--android:background="#11123456"-->
136-
<!--android:text="@string/picture_pip"-->
137-
<!--android:textColor="@color/font_color_35"-->
138-
<!--android:textSize="@dimen/font_size_28px">-->
139-
<!--</CheckBox>-->
140-
141-
<!--<CheckBox-->
142-
<!--android:id="@+id/pip"-->
143-
<!--android:layout_width="wrap_content"-->
144-
<!--android:layout_height="wrap_content"-->
145-
<!--android:layout_gravity="center"-->
146-
<!--android:layout_marginLeft="10dp"-->
147-
<!--android:layout_weight="1"-->
148-
<!--android:background="#11123456"-->
149-
<!--android:text="@string/pip"-->
150-
<!--android:textColor="@color/font_color_35"-->
151-
<!--android:textSize="@dimen/font_size_28px">-->
152-
<!--</CheckBox>-->
153-
154128
<CheckBox
155129
android:id="@+id/click_to_switch_beauty"
156130
android:layout_width="0dp"
@@ -159,7 +133,7 @@
159133
android:layout_marginLeft="10dp"
160134
android:layout_weight="1"
161135
android:background="#11123456"
162-
android:checked="true"
136+
android:checked="false"
163137
android:text="@string/beauty_switcher"
164138
android:textColor="@color/font_color_35"
165139
android:textSize="@dimen/font_size_28px">
@@ -168,27 +142,31 @@
168142

169143
<LinearLayout
170144
android:layout_width="match_parent"
171-
android:layout_height="wrap_content"
172-
android:layout_marginBottom="10dp"
145+
android:layout_height="36dp"
146+
android:layout_marginBottom="5dp"
173147
android:orientation="horizontal"
174148
android:weightSum="4">
175149

176150
<ImageView
177151
android:id="@+id/backoff"
178152
android:layout_width="0dp"
179-
android:layout_height="wrap_content"
153+
android:layout_height="match_parent"
180154
android:layout_gravity="center"
181155
android:layout_marginLeft="10dp"
182156
android:layout_weight="1"
183-
android:background="@drawable/recorder_delete_icon" />
157+
android:paddingLeft="12dp"
158+
android:paddingRight="12dp"
159+
android:scaleType="centerCrop"
160+
android:src="@drawable/recorder_delete_icon"/>
184161

185162
<TextView
186163
android:id="@+id/click_to_shoot"
187164
android:layout_width="0dp"
188-
android:layout_height="wrap_content"
165+
android:layout_height="match_parent"
189166
android:layout_gravity="center"
190167
android:layout_marginLeft="10dp"
191168
android:layout_weight="1"
169+
android:gravity="center"
192170
android:background="#11123456"
193171
android:text="@string/click_to_shoot"
194172
android:textColor="@color/font_color_35"
@@ -198,10 +176,11 @@
198176
<TextView
199177
android:id="@+id/click_to_record"
200178
android:layout_width="0dp"
201-
android:layout_height="wrap_content"
179+
android:layout_height="match_parent"
202180
android:layout_gravity="center"
203181
android:layout_marginLeft="10dp"
204182
android:layout_weight="1"
183+
android:gravity="center"
205184
android:background="#11123456"
206185
android:text="@string/start_recording"
207186
android:textColor="@color/font_color_35"
@@ -211,10 +190,11 @@
211190
<TextView
212191
android:id="@+id/click_to_capture_screenshot"
213192
android:layout_width="0dp"
214-
android:layout_height="wrap_content"
193+
android:layout_height="match_parent"
215194
android:layout_gravity="center"
216195
android:layout_marginLeft="10dp"
217196
android:layout_weight="1"
197+
android:gravity="center"
218198
android:background="#11123456"
219199
android:text="@string/capture_thumbnail"
220200
android:textColor="@color/font_color_35"

demo/res/layout/demo_activity.xml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
android:layout_width="match_parent"
5-
android:layout_height="match_parent"
6-
tools:context=".DemoActivity">
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:layout_margin="18dp"
7+
tools:context=".DemoActivity">
78

89
<RelativeLayout
910
android:id="@+id/main"
@@ -40,6 +41,7 @@
4041
android:layout_width="wrap_content"
4142
android:layout_height="wrap_content"
4243
android:layout_below="@id/connectBT"
44+
android:layout_marginTop="10dp"
4345
android:orientation="horizontal">
4446

4547
<RadioButton
@@ -76,6 +78,7 @@
7678
android:layout_width="wrap_content"
7779
android:layout_height="wrap_content"
7880
android:layout_below="@id/resolution_group"
81+
android:layout_marginTop="5dp"
7982
android:orientation="horizontal">
8083

8184
<RadioButton
@@ -94,10 +97,34 @@
9497
</RadioGroup>
9598

9699
<RadioGroup
97-
android:id="@+id/encode_group"
100+
android:id="@+id/encode_type"
98101
android:layout_width="wrap_content"
99102
android:layout_height="wrap_content"
100103
android:layout_below="@id/orientation_group"
104+
android:layout_marginTop="5dp"
105+
android:orientation="horizontal">
106+
107+
<RadioButton
108+
android:id="@+id/encode_h264"
109+
android:layout_width="wrap_content"
110+
android:layout_height="wrap_content"
111+
android:checked="true"
112+
android:text="H264" />
113+
114+
<RadioButton
115+
android:id="@+id/encode_h265"
116+
android:layout_width="wrap_content"
117+
android:layout_height="wrap_content"
118+
android:checked="false"
119+
android:text="H265" />
120+
</RadioGroup>
121+
122+
<RadioGroup
123+
android:id="@+id/encode_group"
124+
android:layout_width="wrap_content"
125+
android:layout_height="wrap_content"
126+
android:layout_below="@id/encode_type"
127+
android:layout_marginTop="5dp"
101128
android:orientation="horizontal">
102129

103130
<RadioButton
@@ -127,6 +154,7 @@
127154
android:layout_width="wrap_content"
128155
android:layout_height="wrap_content"
129156
android:layout_below="@id/encode_group"
157+
android:layout_marginTop="5dp"
130158
android:orientation="horizontal">
131159

132160
<RadioButton
@@ -149,6 +177,7 @@
149177
android:layout_width="wrap_content"
150178
android:layout_height="wrap_content"
151179
android:layout_below="@id/encode_scene"
180+
android:layout_marginTop="5dp"
152181
android:orientation="horizontal">
153182

154183
<RadioButton
@@ -184,13 +213,15 @@
184213
android:id="@+id/autoStart"
185214
android:layout_width="wrap_content"
186215
android:layout_height="wrap_content"
216+
android:layout_marginTop="5dp"
187217
android:checked="false"
188218
android:text="初始化完成后启动推流" />
189219

190220
<CheckBox
191221
android:id="@+id/print_debug_info"
192222
android:layout_width="wrap_content"
193223
android:layout_height="wrap_content"
224+
android:layout_marginTop="5dp"
194225
android:checked="false"
195226
android:text="显示调试信息" />
196227
</LinearLayout>

0 commit comments

Comments
 (0)