Changeset 7d8c4743aa74a3d5eb574a454f2abc43765b7170
- Timestamp:
- 04/26/06 23:04:47
(2 years ago)
- Author:
- Antoine Cellerier <dionoea@videolan.org>
- git-committer:
- Antoine Cellerier <dionoea@videolan.org> 1146085487 +0000
- git-parent:
[1f09d331a4c5def92b66b3d36a3288929bc71b76]
- git-author:
- Antoine Cellerier <dionoea@videolan.org> 1146085487 +0000
- Message:
Add option to force timeshift filter even if access can control pace or pause.
The goal is to be able to timeshift on live rtsp streams. The true fix would be to fix the rtsp access ...
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2fc1756 |
r7d8c474 |
|
| 49 | 49 | #define DIR_LONGTEXT N_( "Directory used to store the timeshift temporary " \ |
|---|
| 50 | 50 | "files." ) |
|---|
| | 51 | #define FORCE_TEXT N_("Force use of the timeshift module") |
|---|
| | 52 | #define FORCE_LONGTEXT N_("Force use of the timeshift module even if the " \ |
|---|
| | 53 | "access declares that it can control pace or pause." ) |
|---|
| 51 | 54 | |
|---|
| 52 | 55 | vlc_module_begin(); |
|---|
| … | … | |
| 62 | 65 | GRANULARITY_LONGTEXT, VLC_TRUE ); |
|---|
| 63 | 66 | add_directory( "timeshift-dir", 0, 0, DIR_TEXT, DIR_LONGTEXT, VLC_FALSE ); |
|---|
| | 67 | add_bool( "timeshift-force", VLC_FALSE, NULL, FORCE_TEXT, FORCE_LONGTEXT, |
|---|
| | 68 | VLC_FALSE ); |
|---|
| 64 | 69 | vlc_module_end(); |
|---|
| 65 | 70 | |
|---|
| … | … | |
| 114 | 119 | vlc_bool_t b_bool; |
|---|
| 115 | 120 | |
|---|
| 116 | | /* Only work with not pace controled access */ |
|---|
| 117 | | if( access2_Control( p_src, ACCESS_CAN_CONTROL_PACE, &b_bool ) || b_bool ) |
|---|
| 118 | | { |
|---|
| 119 | | msg_Dbg( p_src, "ACCESS_CAN_CONTROL_PACE" ); |
|---|
| 120 | | return VLC_EGENERIC; |
|---|
| 121 | | } |
|---|
| 122 | | /* Refuse access that can be paused */ |
|---|
| 123 | | if( access2_Control( p_src, ACCESS_CAN_PAUSE, &b_bool ) || b_bool ) |
|---|
| 124 | | { |
|---|
| 125 | | msg_Dbg( p_src, "ACCESS_CAN_PAUSE: timeshift useless" ); |
|---|
| 126 | | return VLC_EGENERIC; |
|---|
| | 121 | var_Create( p_access, "timeshift-force", |
|---|
| | 122 | VLC_VAR_BOOL | VLC_VAR_DOINHERIT ); |
|---|
| | 123 | if( var_GetBool( p_access, "timeshift-force" ) == VLC_TRUE ) |
|---|
| | 124 | { |
|---|
| | 125 | msg_Dbg( p_access, "Forcing use of timeshift even if access can control pace or pause" ); |
|---|
| | 126 | } |
|---|
| | 127 | else |
|---|
| | 128 | { |
|---|
| | 129 | /* Only work with not pace controled access */ |
|---|
| | 130 | if( access2_Control( p_src, ACCESS_CAN_CONTROL_PACE, &b_bool ) |
|---|
| | 131 | || b_bool ) |
|---|
| | 132 | { |
|---|
| | 133 | msg_Dbg( p_src, "ACCESS_CAN_CONTROL_PACE: timeshift useless" ); |
|---|
| | 134 | return VLC_EGENERIC; |
|---|
| | 135 | } |
|---|
| | 136 | /* Refuse access that can be paused */ |
|---|
| | 137 | if( access2_Control( p_src, ACCESS_CAN_PAUSE, &b_bool ) || b_bool ) |
|---|
| | 138 | { |
|---|
| | 139 | msg_Dbg( p_src, "ACCESS_CAN_PAUSE: timeshift useless" ); |
|---|
| | 140 | return VLC_EGENERIC; |
|---|
| | 141 | } |
|---|
| 127 | 142 | } |
|---|
| 128 | 143 | |
|---|