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
048525a4
Commit
048525a4
authored
Dec 04, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport 13518
parent
e8367901
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+14
-0
No files found.
modules/services_discovery/sap.c
View file @
048525a4
...
@@ -106,6 +106,10 @@ static const char ipv6_scopes[] = "1456789ABCDE";
...
@@ -106,6 +106,10 @@ static const char ipv6_scopes[] = "1456789ABCDE";
"If this option is selected, a SAP caching mechanism will be used. " \
"If this option is selected, a SAP caching mechanism will be used. " \
"This will result in lower SAP startup time, but you could end up " \
"This will result in lower SAP startup time, but you could end up " \
"with items corresponding to legacy streams." )
"with items corresponding to legacy streams." )
#define SAP_TIMESHIFT_TEXT N_("Allow timeshifting")
#define SAP_TIMESHIFT_LONGTEXT N_( \
"Enable timeshifting automatically for streams " \
"discovered through SAP announcements." )
/* Callbacks */
/* Callbacks */
static
int
Open
(
vlc_object_t
*
);
static
int
Open
(
vlc_object_t
*
);
...
@@ -133,6 +137,8 @@ vlc_module_begin();
...
@@ -133,6 +137,8 @@ vlc_module_begin();
SAP_STRICT_TEXT
,
SAP_STRICT_LONGTEXT
,
VLC_TRUE
);
SAP_STRICT_TEXT
,
SAP_STRICT_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"sap-cache"
,
0
,
NULL
,
add_bool
(
"sap-cache"
,
0
,
NULL
,
SAP_CACHE_TEXT
,
SAP_CACHE_LONGTEXT
,
VLC_TRUE
);
SAP_CACHE_TEXT
,
SAP_CACHE_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"sap-timeshift"
,
0
,
NULL
,
SAP_TIMESHIFT_TEXT
,
SAP_TIMESHIFT_LONGTEXT
,
VLC_TRUE
);
set_capability
(
"services_discovery"
,
0
);
set_capability
(
"services_discovery"
,
0
);
set_callbacks
(
Open
,
Close
);
set_callbacks
(
Open
,
Close
);
...
@@ -221,6 +227,7 @@ struct services_discovery_sys_t
...
@@ -221,6 +227,7 @@ struct services_discovery_sys_t
/* Modes */
/* Modes */
vlc_bool_t
b_strict
;
vlc_bool_t
b_strict
;
vlc_bool_t
b_parse
;
vlc_bool_t
b_parse
;
vlc_bool_t
b_timeshift
;
int
i_timeout
;
int
i_timeout
;
};
};
...
@@ -322,6 +329,10 @@ static int Open( vlc_object_t *p_this )
...
@@ -322,6 +329,10 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
/* Cache sap_timeshift value */
p_sys
->
b_timeshift
=
var_CreateGetInteger
(
p_sd
,
"sap-timeshift"
)
?
VLC_TRUE
:
VLC_FALSE
;
/* Create our playlist node */
/* Create our playlist node */
p_sys
->
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_sd
,
p_sys
->
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_sd
,
VLC_OBJECT_PLAYLIST
,
VLC_OBJECT_PLAYLIST
,
...
@@ -784,6 +795,9 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
...
@@ -784,6 +795,9 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
return
NULL
;
return
NULL
;
}
}
if
(
p_sd
->
p_sys
->
b_timeshift
)
playlist_ItemAddOption
(
p_item
,
":access-filter=timeshift"
);
psz_value
=
GetAttribute
(
p_sap
->
p_sdp
,
"tool"
);
psz_value
=
GetAttribute
(
p_sap
->
p_sdp
,
"tool"
);
if
(
psz_value
!=
NULL
)
if
(
psz_value
!=
NULL
)
{
{
...
...
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