Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
9a706d60
Commit
9a706d60
authored
Jan 18, 2010
by
Steven Sheehy
Committed by
Jean-Baptiste Kempf
Jan 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving the accuracy of the A to B looping in the qt4 interface.
parent
cc2b055b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
19 deletions
+20
-19
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+2
-2
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+4
-3
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+1
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+9
-9
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+2
-2
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+1
-1
modules/gui/qt4/util/input_slider.hpp
modules/gui/qt4/util/input_slider.hpp
+1
-1
No files found.
modules/gui/qt4/components/controller.cpp
View file @
9a706d60
...
...
@@ -289,8 +289,8 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
InputSlider
*
slider
=
new
InputSlider
(
Qt
::
Horizontal
,
NULL
);
/* Update the position when the IM has changed */
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int
,
int
),
slider
,
setPosition
(
float
,
int
,
int
)
);
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int
64_t
,
int
),
slider
,
setPosition
(
float
,
int
64_t
,
int
)
);
/* And update the IM, when the position has changed */
CONNECT
(
slider
,
sliderDragged
(
float
),
THEMIM
->
getIM
(),
sliderUpdate
(
float
)
);
...
...
modules/gui/qt4/components/interface_widgets.cpp
View file @
9a706d60
...
...
@@ -601,11 +601,11 @@ TimeLabel::TimeLabel( intf_thread_t *_p_intf ) :QLabel(), p_intf( _p_intf )
CONNECT
(
THEMIM
->
getIM
(),
cachingChanged
(
float
),
this
,
setCaching
(
float
)
);
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int
,
int
),
this
,
setDisplayPosition
(
float
,
int
,
int
)
);
CONNECT
(
THEMIM
->
getIM
(),
positionUpdated
(
float
,
int
64_t
,
int
),
this
,
setDisplayPosition
(
float
,
int
64_t
,
int
)
);
}
void
TimeLabel
::
setDisplayPosition
(
float
pos
,
int
time
,
int
length
)
void
TimeLabel
::
setDisplayPosition
(
float
pos
,
int
64_t
t
,
int
length
)
{
if
(
pos
==
-
1.
f
)
{
...
...
@@ -613,6 +613,7 @@ void TimeLabel::setDisplayPosition( float pos, int time, int length )
return
;
}
int
time
=
t
/
1000000
;
char
psz_length
[
MSTRTIME_MAX_SIZE
],
psz_time
[
MSTRTIME_MAX_SIZE
];
secstotimestr
(
psz_length
,
length
);
secstotimestr
(
psz_time
,
(
b_remainingTime
&&
length
)
?
length
-
time
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
9a706d60
...
...
@@ -144,7 +144,7 @@ private:
signals:
void
timeLabelDoubleClicked
();
private
slots
:
void
setDisplayPosition
(
float
pos
,
int
time
,
int
length
);
void
setDisplayPosition
(
float
pos
,
int
64_t
time
,
int
length
);
void
setCaching
(
float
);
};
...
...
modules/gui/qt4/input_manager.cpp
View file @
9a706d60
...
...
@@ -373,10 +373,11 @@ static int VbiEvent( vlc_object_t *, const char *,
void
InputManager
::
UpdatePosition
()
{
/* Update position */
int
i_length
,
i_time
;
/* Int is enough, since we store seconds */
int
i_length
;
int64_t
i_time
;
float
f_pos
;
i_length
=
var_GetTime
(
p_input
,
"length"
)
/
1000000
;
i_time
=
var_GetTime
(
p_input
,
"time"
)
/
1000000
;
i_time
=
var_GetTime
(
p_input
,
"time"
);
f_pos
=
var_GetFloat
(
p_input
,
"position"
);
emit
positionUpdated
(
f_pos
,
i_time
,
i_length
);
}
...
...
@@ -861,26 +862,25 @@ void InputManager::setAtoB()
{
timeB
=
var_GetTime
(
THEMIM
->
getInput
(),
"time"
);
var_SetTime
(
THEMIM
->
getInput
(),
"time"
,
timeA
);
CONNECT
(
this
,
positionUpdated
(
float
,
int
,
int
),
this
,
AtoBLoop
(
float
,
int
,
int
)
);
CONNECT
(
this
,
positionUpdated
(
float
,
int
64_t
,
int
),
this
,
AtoBLoop
(
float
,
int
64_t
,
int
)
);
}
else
{
timeA
=
0
;
timeB
=
0
;
disconnect
(
this
,
SIGNAL
(
positionUpdated
(
float
,
int
,
int
)
),
this
,
SLOT
(
AtoBLoop
(
float
,
int
,
int
)
)
);
disconnect
(
this
,
SIGNAL
(
positionUpdated
(
float
,
int
64_t
,
int
)
),
this
,
SLOT
(
AtoBLoop
(
float
,
int
64_t
,
int
)
)
);
}
emit
AtoBchanged
(
(
timeA
!=
0
),
(
timeB
!=
0
)
);
}
/* Function called regularly when in an AtoB loop */
void
InputManager
::
AtoBLoop
(
float
,
int
i_time
,
int
)
void
InputManager
::
AtoBLoop
(
float
,
int
64_t
i_time
,
int
)
{
if
(
timeB
)
{
if
(
(
i_time
>=
(
int
)(
timeB
/
1000000
)
)
||
(
i_time
<
(
int
)(
timeA
/
1000000
)
)
)
if
(
i_time
>=
timeB
||
i_time
<
timeA
)
var_SetTime
(
THEMIM
->
getInput
(),
"time"
,
timeA
);
}
}
...
...
modules/gui/qt4/input_manager.hpp
View file @
9a706d60
...
...
@@ -194,11 +194,11 @@ public slots:
private
slots
:
void
togglePlayPause
();
void
AtoBLoop
(
float
,
int
,
int
);
void
AtoBLoop
(
float
,
int
64_t
,
int
);
signals:
/// Send new position, new time and new length
void
positionUpdated
(
float
,
int
,
int
);
void
positionUpdated
(
float
,
int
64_t
,
int
);
void
rateChanged
(
int
);
void
nameChanged
(
const
QString
&
);
/// Used to signal whether we should show navigation buttons
...
...
modules/gui/qt4/util/input_slider.cpp
View file @
9a706d60
...
...
@@ -62,7 +62,7 @@ InputSlider::InputSlider( Qt::Orientation q, QWidget *_parent ) :
CONNECT
(
timer
,
timeout
(),
this
,
seekTick
()
);
}
void
InputSlider
::
setPosition
(
float
pos
,
int
a
,
int
b
)
void
InputSlider
::
setPosition
(
float
pos
,
int
64_t
a
,
int
b
)
{
if
(
pos
==
-
1.0
)
{
...
...
modules/gui/qt4/util/input_slider.hpp
View file @
9a706d60
...
...
@@ -54,7 +54,7 @@ private:
QTimer
*
timer
;
public
slots
:
void
setPosition
(
float
,
int
,
int
);
void
setPosition
(
float
,
int
64_t
,
int
);
private
slots
:
void
userDrag
(
int
);
void
seekTick
();
...
...
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