Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-ui-redesign
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Gautam Chitnis
web-ui-redesign
Commits
feafd961
Commit
feafd961
authored
Mar 31, 2017
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
Apr 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: add a vlc_rational_t type for unsigned rational numbers
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
43fee490
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
40 deletions
+16
-40
include/vlc_common.h
include/vlc_common.h
+4
-0
include/vlc_fourcc.h
include/vlc_fourcc.h
+2
-8
include/vlc_vout_display.h
include/vlc_vout_display.h
+1
-4
include/vlc_vout_wrapper.h
include/vlc_vout_wrapper.h
+1
-4
modules/video_output/opengl/internal.h
modules/video_output/opengl/internal.h
+2
-8
src/misc/fourcc_gen.c
src/misc/fourcc_gen.c
+1
-0
src/video_output/display.c
src/video_output/display.c
+5
-16
No files found.
include/vlc_common.h
View file @
feafd961
...
...
@@ -836,6 +836,10 @@ static inline void SetQWLE (void *p, uint64_t qw)
# include <tchar.h>
#endif
/* _WIN32 */
typedef
struct
{
unsigned
num
,
den
;
}
vlc_rational_t
;
VLC_API
bool
vlc_ureduce
(
unsigned
*
,
unsigned
*
,
uint64_t
,
uint64_t
,
uint64_t
);
/* Aligned memory allocator */
...
...
include/vlc_fourcc.h
View file @
feafd961
...
...
@@ -662,14 +662,8 @@ VLC_API bool vlc_fourcc_AreUVPlanesSwapped(vlc_fourcc_t , vlc_fourcc_t );
typedef
struct
{
unsigned
plane_count
;
struct
{
struct
{
unsigned
num
;
unsigned
den
;
}
w
;
struct
{
unsigned
num
;
unsigned
den
;
}
h
;
vlc_rational_t
w
;
vlc_rational_t
h
;
}
p
[
4
];
unsigned
pixel_size
;
/* Number of bytes per pixel for a plane */
unsigned
pixel_bits
;
/* Number of bits actually used bits per pixel for a plane */
...
...
include/vlc_vout_display.h
View file @
feafd961
...
...
@@ -92,10 +92,7 @@ typedef struct {
unsigned
height
;
/* Display SAR */
struct
{
unsigned
num
;
unsigned
den
;
}
sar
;
vlc_rational_t
sar
;
}
display
;
/* Alignment of the picture inside the display */
...
...
include/vlc_vout_wrapper.h
View file @
feafd961
...
...
@@ -65,10 +65,7 @@ typedef struct {
#if defined(_WIN32) || defined(__OS2__)
unsigned
wm_state
;
#endif
struct
{
unsigned
num
;
unsigned
den
;
}
sar
;
vlc_rational_t
sar
;
}
vout_display_state_t
;
/**
...
...
modules/video_output/opengl/internal.h
View file @
feafd961
...
...
@@ -194,14 +194,8 @@ struct opengl_tex_converter_t
struct
opengl_tex_cfg
{
/* Texture scale factor, cannot be 0 */
struct
{
unsigned
num
;
unsigned
den
;
}
w
;
struct
{
unsigned
num
;
unsigned
den
;
}
h
;
vlc_rational_t
w
;
vlc_rational_t
h
;
/* The following is used and filled by the opengl_fragment_shader_init
* function. */
...
...
src/misc/fourcc_gen.c
View file @
feafd961
...
...
@@ -31,6 +31,7 @@
#define VLC_API
#define VLC_USED
typedef
uint32_t
vlc_fourcc_t
;
typedef
struct
{
unsigned
num
,
den
;
}
vlc_rational_t
;
#include "../include/vlc_fourcc.h"
#define VLC_FOURCC(a,b,c,d) { a, b, c, d }
...
...
src/video_output/display.c
View file @
feafd961
...
...
@@ -337,10 +337,7 @@ typedef struct {
/* */
vout_display_cfg_t
cfg
;
struct
{
unsigned
num
;
unsigned
den
;
}
sar_initial
;
vlc_rational_t
sar_initial
;
/* */
unsigned
width_saved
;
...
...
@@ -351,20 +348,14 @@ typedef struct {
bool
is_display_filled
;
bool
ch_zoom
;
struct
{
unsigned
num
;
unsigned
den
;
}
zoom
;
vlc_rational_t
zoom
;
#if defined(_WIN32) || defined(__OS2__)
bool
ch_wm_state
;
unsigned
wm_state
;
unsigned
wm_state_initial
;
#endif
bool
ch_sar
;
struct
{
unsigned
num
;
unsigned
den
;
}
sar
;
vlc_rational_t
sar
;
bool
ch_crop
;
struct
{
...
...
@@ -1229,8 +1220,7 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
vout_display_cfg_t
*
cfg
=
&
osys
->
cfg
;
*
cfg
=
state
->
cfg
;
osys
->
sar_initial
.
num
=
state
->
sar
.
num
;
osys
->
sar_initial
.
den
=
state
->
sar
.
den
;
osys
->
sar_initial
=
state
->
sar
;
vout_display_GetDefaultDisplaySize
(
&
cfg
->
display
.
width
,
&
cfg
->
display
.
height
,
source
,
cfg
);
...
...
@@ -1327,8 +1317,7 @@ void vout_DeleteDisplay(vout_display_t *vd, vout_display_state_t *state)
#if defined(_WIN32) || defined(__OS2__)
state
->
wm_state
=
osys
->
wm_state
;
#endif
state
->
sar
.
num
=
osys
->
sar_initial
.
num
;
state
->
sar
.
den
=
osys
->
sar_initial
.
den
;
state
->
sar
=
osys
->
sar_initial
;
}
VoutDisplayDestroyRender
(
vd
);
...
...
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