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
21d4c7c7
Commit
21d4c7c7
authored
Dec 05, 2003
by
Rocky Bernstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A little cleanup on wait timing. No bug fixes yet, though.
parent
39a7f7e6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
64 deletions
+37
-64
modules/access/vcdx/access.c
modules/access/vcdx/access.c
+4
-4
modules/access/vcdx/intf.c
modules/access/vcdx/intf.c
+10
-9
modules/access/vcdx/intf.h
modules/access/vcdx/intf.h
+12
-11
modules/access/vcdx/vcdplayer.c
modules/access/vcdx/vcdplayer.c
+9
-33
modules/access/vcdx/vcdplayer.h
modules/access/vcdx/vcdplayer.h
+2
-7
No files found.
modules/access/vcdx/access.c
View file @
21d4c7c7
...
...
@@ -4,7 +4,7 @@
* to go here.
*****************************************************************************
* Copyright (C) 2000,2003 VideoLAN
* $Id: access.c,v 1.
8 2003/12/05 04:24:4
7 rocky Exp $
* $Id: access.c,v 1.
9 2003/12/05 05:01:1
7 rocky Exp $
*
* Authors: Rocky Bernstein <rocky@panix.com>
* Johan Bilien <jobi@via.ecp.fr>
...
...
@@ -410,7 +410,7 @@ VCDPlay( input_thread_t *p_input, vcdinfo_itemid_t itemid )
thread_vcd_data_t
*
p_vcd
=
(
thread_vcd_data_t
*
)
p_input
->
p_access_data
;
input_area_t
*
p_area
;
p_vcd
->
in_still
=
0
;
p_vcd
->
in_still
=
false
;
dbg_print
(
INPUT_DBG_CALL
,
"itemid.num: %d, itemid.type: %d
\n
"
,
itemid
.
num
,
itemid
.
type
);
...
...
@@ -454,11 +454,11 @@ VCDPlay( input_thread_t *p_input, vcdinfo_itemid_t itemid )
case
VCDINFO_FILES_VIDEO_PAL_STILL
:
case
VCDINFO_FILES_VIDEO_PAL_STILL2
:
p_input
->
stream
.
b_seekable
=
0
;
p_vcd
->
in_still
=
-
5
;
p_vcd
->
in_still
=
true
;
break
;
default:
p_input
->
stream
.
b_seekable
=
1
;
p_vcd
->
in_still
=
0
;
p_vcd
->
in_still
=
false
;
}
}
break
;
...
...
modules/access/vcdx/intf.c
View file @
21d4c7c7
...
...
@@ -2,7 +2,7 @@
* intf.c: Video CD interface to handle user interaction and still time
*****************************************************************************
* Copyright (C) 2002,2003 VideoLAN
* $Id: intf.c,v 1.1
0 2003/12/05 04:24:4
7 rocky Exp $
* $Id: intf.c,v 1.1
1 2003/12/05 05:01:1
7 rocky Exp $
*
* Authors: Rocky Bernstein <rocky@panix.com>
* from DVD code by Stphane Borel <stef@via.ecp.fr>
...
...
@@ -119,13 +119,13 @@ static void RunIntf( intf_thread_t *p_intf )
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
/*
*
still images
*
Have we timed-out in showing a still frame?
*/
if
(
p_intf
->
p_sys
->
b_still
&&
!
p_intf
->
p_sys
->
b_inf_still
)
{
if
(
p_intf
->
p_sys
->
m_still_time
>
0
)
{
/*
u
pdate remaining still time */
/*
U
pdate remaining still time */
dbg_print
(
INPUT_DBG_STILL
,
"updating still time"
);
mtime
=
mdate
();
if
(
mlast
)
...
...
@@ -137,7 +137,7 @@ static void RunIntf( intf_thread_t *p_intf )
}
else
{
/*
still time elasped
*/
/*
Still time has elasped; set to continue playing.
*/
dbg_print
(
INPUT_DBG_STILL
,
"wait time done - setting play"
);
input_SetStatus
(
p_intf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
...
...
@@ -148,7 +148,7 @@ static void RunIntf( intf_thread_t *p_intf )
}
/*
*
keyboard event
*
Do we have a keyboard event?
*/
if
(
p_vout
&&
p_intf
->
p_sys
->
b_key_pressed
)
{
...
...
@@ -227,8 +227,9 @@ static void RunIntf( intf_thread_t *p_intf )
}
number_addend
=
0
;
/* we can safely interact with the VCD player
* with the stream lock */
/* Any keypress gets rid of still frame waiting.
FIXME - should handle just the ones that cause an action.
*/
if
(
p_intf
->
p_sys
->
b_still
)
{
dbg_print
(
INPUT_DBG_STILL
,
"Playing still after activate"
);
...
...
@@ -360,9 +361,9 @@ int vcdIntfStillTime( intf_thread_t *p_intf, int i_sec )
{
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
if
(
i_sec
==
0xff
)
if
(
i_sec
==
-
1
)
{
p_intf
->
p_sys
->
b_still
=
1
;
p_intf
->
p_sys
->
b_still
=
1
;
p_intf
->
p_sys
->
b_inf_still
=
1
;
}
else
if
(
i_sec
>
0
)
...
...
modules/access/vcdx/intf.h
View file @
21d4c7c7
...
...
@@ -2,7 +2,7 @@
* intf.h: send info to intf.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf.h,v 1.
2 2003/12/05 04:24:4
7 rocky Exp $
* $Id: intf.h,v 1.
3 2003/12/05 05:01:1
7 rocky Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
...
...
@@ -26,19 +26,20 @@
*****************************************************************************/
struct
intf_sys_t
{
input_thread_t
*
p_input
;
thread_vcd_data_t
*
p_vcd
;
vlc_bool_t
b_still
;
vlc_bool_t
b_inf_still
;
mtime_t
m_still_time
;
input_thread_t
*
p_input
;
thread_vcd_data_t
*
p_vcd
;
vlc_bool_t
b_still
;
/* True if we are in a still frame */
vlc_bool_t
b_inf_still
;
/* True if still wait time is infinite */
mtime_t
m_still_time
;
/* Time in microseconds remaining
to wait in still frame.
*/
#if FINISHED
vcdplay_ctrl_t
control
;
vcdplay_ctrl_t
control
;
#else
int
control
;
int
control
;
#endif
vlc_bool_t
b_click
,
b_move
,
b_key_pressed
;
vlc_bool_t
b_click
,
b_move
,
b_key_pressed
;
};
int
vcdIntfStillTime
(
struct
intf_thread_t
*
,
int
);
...
...
modules/access/vcdx/vcdplayer.c
View file @
21d4c7c7
...
...
@@ -3,7 +3,7 @@
* using libcdio, libvcd and libvcdinfo
*****************************************************************************
* Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
* $Id: vcdplayer.c,v 1.
6 2003/12/05 04:24:4
7 rocky Exp $
* $Id: vcdplayer.c,v 1.
7 2003/12/05 05:01:1
7 rocky Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -136,9 +136,6 @@ vcdplayer_non_pbc_nav ( input_thread_t * p_input )
return
READ_BLOCK
;
}
/* FIXME: Will do whatever the right thing is later. */
#define SLEEP_1_SEC_AND_HANDLE_EVENTS sleep(1)
/* Handles PBC navigation when reaching the end of a play item. */
vcdplayer_read_status_t
vcdplayer_pbc_nav
(
input_thread_t
*
p_input
)
...
...
@@ -148,12 +145,6 @@ vcdplayer_pbc_nav ( input_thread_t * p_input )
/* We are in playback control. */
vcdinfo_itemid_t
itemid
;
if
(
0
!=
p_vcd
->
in_still
&&
p_vcd
->
in_still
!=
-
5
)
{
SLEEP_1_SEC_AND_HANDLE_EVENTS
;
if
(
p_vcd
->
in_still
>
0
)
p_vcd
->
in_still
--
;
return
READ_STILL_FRAME
;
}
/* The end of an entry is really the end of the associated
sequence (or track). */
...
...
@@ -181,18 +172,11 @@ vcdplayer_pbc_nav ( input_thread_t * p_input )
return
READ_BLOCK
;
/* Handle any wait time given. */
if
(
-
5
==
p_vcd
->
in_still
)
{
if
(
wait_time
!=
0
)
{
/* FIXME */
p_vcd
->
in_still
=
wait_time
-
1
;
p_vcd
->
p_intf
->
p_sys
->
m_still_time
=
(
wait_time
-
1
)
*
1000000
;
return
READ_STILL_FRAME
;
}
else
{
p_vcd
->
p_intf
->
p_sys
->
m_still_time
=
0
;
p_vcd
->
p_intf
->
p_sys
->
b_inf_still
=
1
;
}
if
(
p_vcd
->
in_still
)
{
vcdIntfStillTime
(
p_vcd
->
p_intf
,
wait_time
);
return
READ_STILL_FRAME
;
}
vcdplayer_update_entry
(
p_input
,
vcdinf_pld_get_next_offset
(
p_vcd
->
pxd
.
pld
),
&
itemid
.
num
,
"next"
);
...
...
@@ -213,18 +197,10 @@ vcdplayer_pbc_nav ( input_thread_t * p_input )
wait_time
,
p_vcd
->
loop_count
,
max_loop
);
/* Handle any wait time given */
if
(
-
5
==
p_vcd
->
in_still
)
{
if
(
wait_time
!=
0
)
{
/* FIXME */
p_vcd
->
in_still
=
wait_time
-
1
;
p_vcd
->
p_intf
->
p_sys
->
m_still_time
=
(
wait_time
-
1
)
*
1000000
;
return
READ_STILL_FRAME
;
}
else
{
p_vcd
->
p_intf
->
p_sys
->
m_still_time
=
0
;
p_vcd
->
p_intf
->
p_sys
->
b_inf_still
=
1
;
}
if
(
p_vcd
->
in_still
)
{
vcdIntfStillTime
(
p_vcd
->
p_intf
,
wait_time
);
return
READ_STILL_FRAME
;
}
}
/* Handle any looping given. */
if
(
max_loop
==
0
||
p_vcd
->
loop_count
<
max_loop
)
{
...
...
@@ -263,7 +239,7 @@ vcdplayer_pbc_nav ( input_thread_t * p_input )
return
READ_BLOCK
;
}
else
if
(
p_vcd
->
in_still
)
{
/* Hack: Just go back and do still again */
SLEEP_1_SEC_AND_HANDLE_EVENTS
;
sleep
(
1
)
;
return
READ_STILL_FRAME
;
}
}
...
...
modules/access/vcdx/vcdplayer.h
View file @
21d4c7c7
/*****************************************************************************
* Copyright (C) 2003 Rocky Bernstein (for VideoLAN)
* $Id: vcdplayer.h,v 1.
3 2003/12/04 05:14:39
rocky Exp $
* $Id: vcdplayer.h,v 1.
4 2003/12/05 05:01:17
rocky Exp $
*
* Authors: Rocky Bernstein <rocky@panix.com>
*
...
...
@@ -65,12 +65,7 @@ typedef enum {
typedef
struct
thread_vcd_data_s
{
vcdinfo_obj_t
*
vcd
;
/* CD device descriptor */
int
in_still
;
/* 0 if not in still,
-2 if in infinite loop
-5 if a still but haven't
read wait time yet
>0 number of seconds yet to
wait */
bool
in_still
;
/* true if in still */
unsigned
int
num_tracks
;
/* Nb of tracks (titles) */
unsigned
int
num_segments
;
/* Nb of segments */
unsigned
int
num_entries
;
/* Nb of entries */
...
...
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