Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
b91de5ff
Commit
b91de5ff
authored
Oct 21, 2003
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beos/VlcWrapper.cpp: started to use object variables
parent
fa3d8b41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
26 deletions
+35
-26
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.cpp
+35
-26
No files found.
modules/gui/beos/VlcWrapper.cpp
View file @
b91de5ff
...
...
@@ -2,7 +2,7 @@
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.cpp,v 1.3
7 2003/09/07 22:53:09 fenri
r Exp $
* $Id: VlcWrapper.cpp,v 1.3
8 2003/10/21 01:48:02 tite
r Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
...
@@ -96,15 +96,21 @@ bool VlcWrapper::HasInput()
int
VlcWrapper
::
InputStatus
()
{
if
(
!
p_input
)
{
return
UNDEF_S
;
}
return
p_input
->
stream
.
control
.
i_status
;
vlc_value_t
state
;
var_Get
(
p_input
,
"state"
,
&
state
);
return
state
.
i_int
;
}
int
VlcWrapper
::
InputRate
()
{
if
(
!
p_input
)
{
return
DEFAULT_RATE
;
}
return
p_input
->
stream
.
control
.
i_rate
;
}
...
...
@@ -112,7 +118,9 @@ int VlcWrapper::InputRate()
void
VlcWrapper
::
InputSetRate
(
int
rate
)
{
if
(
!
p_input
)
{
return
;
}
input_SetRate
(
p_input
,
rate
);
}
...
...
@@ -262,54 +270,55 @@ void VlcWrapper::ToggleSubtitle( int i_subtitle )
const
char
*
VlcWrapper
::
GetTimeAsString
()
{
static
char
psz_
current
time
[
OFFSETTOTIME_MAX_SIZE
];
static
char
psz_time
[
OFFSETTOTIME_MAX_SIZE
];
if
(
p_input
==
NULL
)
if
(
!
p_input
)
{
return
(
"-:--:--"
);
}
input_OffsetToTime
(
p_input
,
psz_currenttime
,
p_input
->
stream
.
p_selected_area
->
i_tell
);
vlc_value_t
time
;
var_Get
(
p_input
,
"time"
,
&
time
);
mtime_t
seconds
=
time
.
i_time
/
1000000
;
sprintf
(
psz_time
,
"%d:%02d:%02d"
,
(
int
)
(
seconds
/
(
60
*
60
)
),
(
int
)
(
(
seconds
/
60
)
%
60
),
(
int
)
(
seconds
%
60
)
);
return
(
psz_currenttime
)
;
return
psz_time
;
}
float
VlcWrapper
::
GetTimeAsFloat
()
{
float
f_time
=
0.0
;
if
(
p_input
!=
NULL
)
{
f_time
=
(
float
)
p_input
->
stream
.
p_selected_area
->
i_tell
/
(
float
)
p_input
->
stream
.
p_selected_area
->
i_size
;
}
else
if
(
!
p_input
)
{
f_time
=
0.0
;
return
0.0
;
}
return
(
f_time
);
vlc_value_t
pos
;
var_Get
(
p_input
,
"position"
,
&
pos
);
return
pos
.
f_float
;
}
void
VlcWrapper
::
SetTimeAsFloat
(
float
f_position
)
{
if
(
p_input
!=
NULL
)
if
(
!
p_input
)
{
input_Seek
(
p_input
,
(
long
long
)(
p_input
->
stream
.
p_selected_area
->
i_size
*
f_position
/
SEEKSLIDER_RANGE
),
INPUT_SEEK_SET
);
return
;
}
vlc_value_t
pos
;
pos
.
f_float
=
f_position
/
SEEKSLIDER_RANGE
;
var_Set
(
p_input
,
"position"
,
pos
);
}
bool
VlcWrapper
::
IsPlaying
()
{
bool
playing
=
false
;
if
(
p_input
)
if
(
p_input
)
{
switch
(
p_input
->
stream
.
control
.
i_status
)
switch
(
p_input
->
stream
.
control
.
i_status
)
{
case
PLAYING_S
:
case
FORWARD_S
:
...
...
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