Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
438
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
6d7d4a2d
Commit
6d7d4a2d
authored
2 years ago
by
hexchain
Committed by
Jean-Baptiste Kempf
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
demux: adaptive: use VLC plugin API to compose URIs
parent
d7693339
No related branches found
No related tags found
1 merge request
!2949
demux: adaptive: use VLC plugin API to compose URIs
Pipeline
#292046
passed with stage
Stage:
in 16 minutes and 40 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/demux/adaptive/http/ConnectionParams.cpp
+18
-13
18 additions, 13 deletions
modules/demux/adaptive/http/ConnectionParams.cpp
with
18 additions
and
13 deletions
modules/demux/adaptive/http/ConnectionParams.cpp
+
18
−
13
View file @
6d7d4a2d
...
...
@@ -26,7 +26,6 @@
#include
<vlc_url.h>
#include
<ctype.h>
#include
<algorithm>
#include
<sstream>
using
namespace
adaptive
::
http
;
...
...
@@ -62,20 +61,26 @@ const std::string & ConnectionParams::getPath() const
void
ConnectionParams
::
setPath
(
const
std
::
string
&
path_
)
{
path
=
path_
;
vlc_url_t
url_components
{};
char
*
uri_str
;
url_components
.
psz_protocol
=
const_cast
<
char
*>
(
scheme
.
c_str
());
url_components
.
psz_path
=
const_cast
<
char
*>
(
path_
.
c_str
());
url_components
.
i_port
=
0
;
if
(
!
hostname
.
empty
())
{
url_components
.
psz_host
=
const_cast
<
char
*>
(
hostname
.
c_str
());
if
((
port
!=
80
&&
scheme
!=
"http"
)
||
(
port
!=
443
&&
scheme
!=
"https"
))
url_components
.
i_port
=
port
;
}
std
::
ostringstream
os
;
os
.
imbue
(
std
::
locale
(
"C"
));
os
<<
scheme
<<
"://"
;
if
(
!
hostname
.
empty
())
{
os
<<
hostname
;
if
(
(
port
!=
80
&&
scheme
!=
"http"
)
||
(
port
!=
443
&&
scheme
!=
"https"
)
)
os
<<
":"
<<
port
;
uri_str
=
vlc_uri_compose
(
&
url_components
);
if
(
uri_str
!=
nullptr
)
{
path
=
path_
;
uri
.
assign
(
uri_str
);
}
os
<<
path
;
uri
=
os
.
str
();
free
(
uri_str
);
}
uint16_t
ConnectionParams
::
getPort
()
const
...
...
This diff is collapsed.
Click to expand it.
François Cartegnie
@fcartegnie
mentioned in issue
#27754
·
2 years ago
mentioned in issue
#27754
mentioned in issue #27754
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment