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
0dbf312b
Commit
0dbf312b
authored
Nov 12, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数处理
parent
8d83f8e9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
24 deletions
+24
-24
YzgFileVideoImageInfoVo.java
...om/yanzuoguang/cloud/file/vo/YzgFileVideoImageInfoVo.java
+10
-10
YzgFileVideoImageItemReqVo.java
...yanzuoguang/cloud/file/vo/YzgFileVideoImageItemReqVo.java
+8
-8
YzgFileServiceImpl.java
...n/java/com/yanzuoguang/cloud/file/YzgFileServiceImpl.java
+6
-6
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/file/vo/YzgFileVideoImageInfoVo.java
View file @
0dbf312b
...
...
@@ -13,51 +13,51 @@ public class YzgFileVideoImageInfoVo extends YzgFileBaseVo {
* 分辨率x,如: 1920*1080中的1920.
*/
@ApiModelProperty
(
notes
=
"分辨率x,如: 1920*1080中的1920."
)
private
Double
width
;
private
Long
width
;
/**
* 分辨率y,如: 1920*1080中的1080.
*/
@ApiModelProperty
(
notes
=
"分辨率y,如: 1920*1080中的1080."
)
private
Double
height
;
private
Long
height
;
/**
* 质量
*/
@ApiModelProperty
(
notes
=
"质量"
,
position
=
1040
)
private
Double
bitrate
;
private
Long
bitrate
;
public
YzgFileVideoImageInfoVo
()
{
}
public
YzgFileVideoImageInfoVo
(
String
server
,
String
display
,
long
size
,
String
mime
,
int
type
,
double
width
,
double
height
,
double
bitrate
)
{
public
YzgFileVideoImageInfoVo
(
String
server
,
String
display
,
long
size
,
String
mime
,
int
type
,
Long
width
,
Long
height
,
Long
bitrate
)
{
super
(
server
,
display
,
size
,
mime
,
type
);
this
.
width
=
width
;
this
.
height
=
height
;
this
.
bitrate
=
bitrate
;
}
public
Double
getWidth
()
{
public
Long
getWidth
()
{
return
width
;
}
public
void
setWidth
(
Double
width
)
{
public
void
setWidth
(
Long
width
)
{
this
.
width
=
width
;
}
public
Double
getHeight
()
{
public
Long
getHeight
()
{
return
height
;
}
public
void
setHeight
(
Double
height
)
{
public
void
setHeight
(
Long
height
)
{
this
.
height
=
height
;
}
public
Double
getBitrate
()
{
public
Long
getBitrate
()
{
return
bitrate
;
}
public
void
setBitrate
(
Double
bitrate
)
{
public
void
setBitrate
(
Long
bitrate
)
{
this
.
bitrate
=
bitrate
;
}
}
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/file/vo/YzgFileVideoImageItemReqVo.java
View file @
0dbf312b
...
...
@@ -35,15 +35,15 @@ public class YzgFileVideoImageItemReqVo extends BaseVo {
private
double
quote
=
1
D
;
@ApiModelProperty
(
notes
=
"分辨率x,如: 1920*1080中的1920."
)
private
double
width
=
0
;
private
long
width
=
0
;
@ApiModelProperty
(
notes
=
"分辨率x,如: 1920*1080中的1080."
)
private
double
height
=
0
;
private
long
height
=
0
;
public
YzgFileVideoImageItemReqVo
()
{
}
private
YzgFileVideoImageItemReqVo
(
double
size
,
double
quote
,
double
width
,
double
height
)
{
private
YzgFileVideoImageItemReqVo
(
double
size
,
double
quote
,
long
width
,
long
height
)
{
this
.
size
=
size
;
this
.
quote
=
quote
;
this
.
width
=
width
;
...
...
@@ -55,7 +55,7 @@ public class YzgFileVideoImageItemReqVo extends BaseVo {
this
.
toFile
=
toFile
;
}
public
YzgFileVideoImageItemReqVo
(
String
toFile
,
double
size
,
double
quote
,
double
width
,
double
height
)
{
public
YzgFileVideoImageItemReqVo
(
String
toFile
,
double
size
,
double
quote
,
long
width
,
long
height
)
{
this
(
size
,
quote
,
width
,
height
);
this
.
toFile
=
toFile
;
}
...
...
@@ -84,19 +84,19 @@ public class YzgFileVideoImageItemReqVo extends BaseVo {
this
.
quote
=
quote
;
}
public
double
getWidth
()
{
public
long
getWidth
()
{
return
width
;
}
public
void
setWidth
(
double
width
)
{
public
void
setWidth
(
long
width
)
{
this
.
width
=
width
;
}
public
double
getHeight
()
{
public
long
getHeight
()
{
return
height
;
}
public
void
setHeight
(
double
height
)
{
public
void
setHeight
(
long
height
)
{
this
.
height
=
height
;
}
}
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/YzgFileServiceImpl.java
View file @
0dbf312b
...
...
@@ -195,20 +195,20 @@ public class YzgFileServiceImpl implements YzgFileService {
switch
(
info
.
getType
())
{
case
FileHelper
.
FILE_TYPE_AUDIO
:
{
MediaParameter
parameter
=
MediaHelper
.
getGrabberParameter
(
serverFullPath
);
info
.
setBitrate
(
Double
.
valueOf
(
parameter
.
getAudioBitRate
()));
info
.
setBitrate
(
Long
.
valueOf
(
parameter
.
getAudioBitRate
()));
break
;
}
case
FileHelper
.
FILE_TYPE_VIDEO
:
{
MediaParameter
parameter
=
MediaHelper
.
getGrabberParameter
(
serverFullPath
);
info
.
setBitrate
(
Double
.
valueOf
(
parameter
.
getVideoBitRate
()));
info
.
setWidth
(
Double
.
valueOf
(
parameter
.
getVideoWidth
()));
info
.
setHeight
(
Double
.
valueOf
(
parameter
.
getVideoHeight
()));
info
.
setBitrate
(
Long
.
valueOf
(
parameter
.
getVideoBitRate
()));
info
.
setWidth
(
Long
.
valueOf
(
parameter
.
getVideoWidth
()));
info
.
setHeight
(
Long
.
valueOf
(
parameter
.
getVideoHeight
()));
break
;
}
case
FileHelper
.
FILE_TYPE_IMAGE
:
{
BufferedImage
sourceImg
=
ImageIO
.
read
(
new
FileInputStream
(
serverFullPath
));
info
.
setWidth
(
Double
.
valueOf
(
sourceImg
.
getWidth
()));
info
.
setHeight
(
Double
.
valueOf
(
sourceImg
.
getHeight
()));
info
.
setWidth
(
Long
.
valueOf
(
sourceImg
.
getWidth
()));
info
.
setHeight
(
Long
.
valueOf
(
sourceImg
.
getHeight
()));
break
;
}
case
FileHelper
.
FILE_TYPE_NONE
:
...
...
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