Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
07f99ec5
Commit
07f99ec5
authored
Nov 15, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载视频
parent
89cdde35
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
208 additions
and
185 deletions
+208
-185
HlsDownloader.java
...ge/src/main/java/com/yanzuoguang/media/HlsDownloader.java
+189
-185
MediaFirstTest.java
yzg-util-image/src/test/java/helper/MediaFirstTest.java
+19
-0
No files found.
yzg-util-image/src/main/java/com/yanzuoguang/media/HlsDownloader.java
View file @
07f99ec5
This diff is collapsed.
Click to expand it.
yzg-util-image/src/test/java/helper/MediaFirstTest.java
View file @
07f99ec5
package
helper
;
package
helper
;
import
com.yanzuoguang.media.HlsDownloader
;
import
com.yanzuoguang.media.MediaFirst
;
import
com.yanzuoguang.media.MediaFirst
;
import
com.yanzuoguang.media.MediaReqVo
;
import
com.yanzuoguang.media.MediaReqVo
;
import
com.yanzuoguang.media.MediaResVo
;
import
com.yanzuoguang.media.MediaResVo
;
...
@@ -11,6 +12,12 @@ import java.io.File;
...
@@ -11,6 +12,12 @@ import java.io.File;
public
class
MediaFirstTest
{
public
class
MediaFirstTest
{
private
String
getFile
(
String
file
)
{
// 注意,路径应为文件在工程中的相对路径
File
f
=
new
File
(
"src/test/java/helper/"
+
file
);
return
f
.
getAbsolutePath
();
}
@Test
@Test
public
void
test
()
{
public
void
test
()
{
MediaFirst
first
=
new
MediaFirst
();
MediaFirst
first
=
new
MediaFirst
();
...
@@ -26,4 +33,16 @@ public class MediaFirstTest {
...
@@ -26,4 +33,16 @@ public class MediaFirstTest {
}
}
}
}
@Test
public
void
testHlsDown
()
throws
Exception
{
HlsDownloader
downloader
=
new
HlsDownloader
(
"http://rtmp.tourbida.com/hls/0bfbec86-7a75-4b70-9318-dd32a3d59633.m3u8"
,
getFile
(
"downHls.mp4"
),
3
,
100
);
downloader
.
download
(
true
,
true
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment