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
f480cd0d
Commit
f480cd0d
authored
Oct 26, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dash: major warnings cleanup
All of them should be gone, except one.
parent
55f2b5d5
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
42 additions
and
42 deletions
+42
-42
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
...filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
+3
-3
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
...m_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
+1
-1
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
..._filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
+2
-1
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
...am_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
+1
-1
modules/stream_filter/dash/http/HTTPConnection.cpp
modules/stream_filter/dash/http/HTTPConnection.cpp
+2
-3
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
+4
-4
modules/stream_filter/dash/http/HTTPConnectionManager.h
modules/stream_filter/dash/http/HTTPConnectionManager.h
+1
-1
modules/stream_filter/dash/mpd/BasicCMManager.cpp
modules/stream_filter/dash/mpd/BasicCMManager.cpp
+6
-6
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+7
-7
modules/stream_filter/dash/mpd/Group.cpp
modules/stream_filter/dash/mpd/Group.cpp
+1
-1
modules/stream_filter/dash/mpd/MPD.cpp
modules/stream_filter/dash/mpd/MPD.cpp
+2
-2
modules/stream_filter/dash/mpd/NullManager.cpp
modules/stream_filter/dash/mpd/NullManager.cpp
+4
-4
modules/stream_filter/dash/mpd/Period.cpp
modules/stream_filter/dash/mpd/Period.cpp
+1
-1
modules/stream_filter/dash/mpd/SegmentInfo.cpp
modules/stream_filter/dash/mpd/SegmentInfo.cpp
+1
-1
modules/stream_filter/dash/xml/DOMHelper.cpp
modules/stream_filter/dash/xml/DOMHelper.cpp
+3
-3
modules/stream_filter/dash/xml/DOMParser.cpp
modules/stream_filter/dash/xml/DOMParser.cpp
+2
-2
modules/stream_filter/dash/xml/Node.cpp
modules/stream_filter/dash/xml/Node.cpp
+1
-1
No files found.
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
View file @
f480cd0d
...
...
@@ -51,7 +51,7 @@ Chunk* AlwaysBestAdaptationLogic::getNextChunk () throw(EOFException)
if
(
this
->
count
==
this
->
schedule
.
size
())
throw
EOFException
();
for
(
in
t
i
=
0
;
i
<
this
->
schedule
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
this
->
schedule
.
size
();
i
++
)
{
if
(
this
->
count
==
i
)
{
...
...
@@ -69,14 +69,14 @@ void AlwaysBestAdaptationLogic::initSchedule ()
{
std
::
vector
<
Period
*>
periods
=
this
->
mpdManager
->
getPeriods
();
for
(
in
t
i
=
0
;
i
<
periods
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
periods
.
size
();
i
++
)
{
Representation
*
best
=
this
->
mpdManager
->
getBestRepresentation
(
periods
.
at
(
i
));
if
(
best
!=
NULL
)
{
std
::
vector
<
ISegment
*>
segments
=
this
->
mpdManager
->
getSegments
(
best
);
for
(
in
t
j
=
0
;
j
<
segments
.
size
();
j
++
)
for
(
size_
t
j
=
0
;
j
<
segments
.
size
();
j
++
)
{
this
->
schedule
.
push_back
(
segments
.
at
(
j
));
}
...
...
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
View file @
f480cd0d
...
...
@@ -51,7 +51,7 @@ namespace dash
private:
std
::
vector
<
dash
::
mpd
::
ISegment
*>
schedule
;
dash
::
mpd
::
IMPDManager
*
mpdManager
;
int
count
;
size_t
count
;
void
initSchedule
();
};
...
...
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
View file @
f480cd0d
...
...
@@ -67,7 +67,7 @@ Chunk* RateBasedAdaptationLogic::getNextChunk () throw(EOFException)
return
this
->
getNextChunk
();
}
for
(
in
t
i
=
0
;
i
<
segments
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
segments
.
size
();
i
++
)
{
if
(
i
==
this
->
count
)
{
...
...
@@ -77,4 +77,5 @@ Chunk* RateBasedAdaptationLogic::getNextChunk () throw(EOFException)
return
chunk
;
}
}
return
NULL
;
}
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
View file @
f480cd0d
...
...
@@ -46,7 +46,7 @@ namespace dash
private:
dash
::
mpd
::
IMPDManager
*
mpdManager
;
int
count
;
size_t
count
;
dash
::
mpd
::
Period
*
currentPeriod
;
};
}
...
...
modules/stream_filter/dash/http/HTTPConnection.cpp
View file @
f480cd0d
...
...
@@ -109,13 +109,12 @@ std::string HTTPConnection::readLine ()
}
bool
HTTPConnection
::
sendData
(
std
::
string
data
)
{
size_t
size
=
0
;
size
=
net_Write
(
this
->
stream
,
this
->
httpSocket
,
NULL
,
data
.
c_str
(),
data
.
size
());
ssize_t
size
=
net_Write
(
this
->
stream
,
this
->
httpSocket
,
NULL
,
data
.
c_str
(),
data
.
size
());
if
(
size
==
-
1
)
{
return
false
;
}
if
(
size
!=
data
.
length
())
if
(
(
size_t
)
size
!=
data
.
length
())
{
this
->
sendData
(
data
.
substr
(
size
,
data
.
size
()));
}
...
...
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
View file @
f480cd0d
...
...
@@ -75,7 +75,7 @@ bool HTTPConnectionManager::closeConnection (Chunk *chun
delete
(
chunk
);
return
ret
;
}
bool
HTTPConnectionManager
::
closeAllConnections
()
void
HTTPConnectionManager
::
closeAllConnections
()
{
for
(
std
::
vector
<
HTTPConnection
*>::
iterator
it
=
this
->
connections
.
begin
();
it
!=
this
->
connections
.
end
();
++
it
)
{
...
...
@@ -134,7 +134,7 @@ int HTTPConnectionManager::read (Chunk *chun
this
->
bytesReadChunk
=
0
;
this
->
timeSecChunk
=
0
;
HTTPConnection
*
con
=
this
->
initConnection
(
chunk
);
this
->
initConnection
(
chunk
);
return
this
->
read
(
chunk
,
p_buffer
,
len
);
}
}
...
...
@@ -143,7 +143,7 @@ int HTTPConnectionManager::peek (Chunk *chun
if
(
this
->
chunkMap
.
find
(
chunk
)
!=
this
->
chunkMap
.
end
())
return
this
->
chunkMap
[
chunk
]
->
peek
(
pp_peek
,
i_peek
);
HTTPConnection
*
con
=
this
->
initConnection
(
chunk
);
this
->
initConnection
(
chunk
);
return
this
->
peek
(
chunk
,
pp_peek
,
i_peek
);
}
HTTPConnection
*
HTTPConnectionManager
::
initConnection
(
Chunk
*
chunk
)
...
...
@@ -161,6 +161,6 @@ void HTTPConnectionManager::attach (IDownloadRa
}
void
HTTPConnectionManager
::
notify
()
{
for
(
in
t
i
=
0
;
i
<
this
->
rateObservers
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
this
->
rateObservers
.
size
();
i
++
)
this
->
rateObservers
.
at
(
i
)
->
downloadRateChanged
(
this
->
bpsAvg
,
this
->
bpsLastChunk
);
}
modules/stream_filter/dash/http/HTTPConnectionManager.h
View file @
f480cd0d
...
...
@@ -48,7 +48,7 @@ namespace dash
HTTPConnectionManager
(
stream_t
*
stream
);
virtual
~
HTTPConnectionManager
();
bool
closeAllConnections
();
void
closeAllConnections
();
bool
closeConnection
(
IHTTPConnection
*
con
);
IHTTPConnection
*
getConnection
(
std
::
string
url
);
int
read
(
Chunk
*
chunk
,
void
*
p_buffer
,
size_t
len
);
...
...
modules/stream_filter/dash/mpd/BasicCMManager.cpp
View file @
f480cd0d
...
...
@@ -50,7 +50,7 @@ std::vector<ISegment*> BasicCMManager::getSegments (Representation
std
::
vector
<
Segment
*>
segments
=
info
->
getSegments
();
for
(
in
t
i
=
0
;
i
<
segments
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
segments
.
size
();
i
++
)
retSegments
.
push_back
(
segments
.
at
(
i
));
}
catch
(
ElementNotPresentException
&
e
)
...
...
@@ -71,10 +71,10 @@ Representation* BasicCMManager::getBestRepresentation (Period *period)
long
bitrate
=
0
;
Representation
*
best
=
NULL
;
for
(
in
t
i
=
0
;
i
<
groups
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
groups
.
size
();
i
++
)
{
std
::
vector
<
Representation
*>
reps
=
groups
.
at
(
i
)
->
getRepresentations
();
for
(
in
t
j
=
0
;
j
<
reps
.
size
();
j
++
)
for
(
size_
t
j
=
0
;
j
<
reps
.
size
();
j
++
)
{
try
{
...
...
@@ -110,10 +110,10 @@ Representation* BasicCMManager::getRepresentation (Period *period,
Representation
*
best
=
NULL
;
long
bestDif
=
-
1
;
for
(
in
t
i
=
0
;
i
<
groups
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
groups
.
size
();
i
++
)
{
std
::
vector
<
Representation
*>
reps
=
groups
.
at
(
i
)
->
getRepresentations
();
for
(
in
t
j
=
0
;
j
<
reps
.
size
();
j
++
)
for
(
size_
t
j
=
0
;
j
<
reps
.
size
();
j
++
)
{
try
{
...
...
@@ -148,7 +148,7 @@ Period* BasicCMManager::getNextPeriod (Period *period)
{
std
::
vector
<
Period
*>
periods
=
this
->
mpd
->
getPeriods
();
for
(
in
t
i
=
0
;
i
<
periods
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
periods
.
size
();
i
++
)
{
if
(
periods
.
at
(
i
)
==
period
&&
(
i
+
1
)
<
periods
.
size
())
return
periods
.
at
(
i
+
1
);
...
...
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
f480cd0d
...
...
@@ -53,7 +53,7 @@ void BasicCMParser::setMPDBaseUrl (Node *root)
{
std
::
vector
<
Node
*>
baseUrls
=
DOMHelper
::
getChildElementByTagName
(
root
,
"BaseURL"
);
for
(
in
t
i
=
0
;
i
<
baseUrls
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
baseUrls
.
size
();
i
++
)
{
BaseUrl
*
url
=
new
BaseUrl
(
baseUrls
.
at
(
i
)
->
getText
());
this
->
mpd
->
addBaseUrl
(
url
);
...
...
@@ -63,7 +63,7 @@ void BasicCMParser::setPeriods (Node *root)
{
std
::
vector
<
Node
*>
periods
=
DOMHelper
::
getElementByTagName
(
root
,
"Period"
,
false
);
for
(
in
t
i
=
0
;
i
<
periods
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
periods
.
size
();
i
++
)
{
Period
*
period
=
new
Period
(
periods
.
at
(
i
)
->
getAttributes
());
this
->
setGroups
(
periods
.
at
(
i
),
period
);
...
...
@@ -74,7 +74,7 @@ void BasicCMParser::setGroups (Node *root, Period *period)
{
std
::
vector
<
Node
*>
groups
=
DOMHelper
::
getElementByTagName
(
root
,
"Group"
,
false
);
for
(
in
t
i
=
0
;
i
<
groups
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
groups
.
size
();
i
++
)
{
Group
*
group
=
new
Group
(
groups
.
at
(
i
)
->
getAttributes
());
this
->
setRepresentations
(
groups
.
at
(
i
),
group
);
...
...
@@ -85,7 +85,7 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
{
std
::
vector
<
Node
*>
representations
=
DOMHelper
::
getElementByTagName
(
root
,
"Representation"
,
false
);
for
(
in
t
i
=
0
;
i
<
representations
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
representations
.
size
();
i
++
)
{
Representation
*
rep
=
new
Representation
(
representations
.
at
(
i
)
->
getAttributes
());
this
->
setSegmentInfo
(
representations
.
at
(
i
),
rep
);
...
...
@@ -96,7 +96,7 @@ void BasicCMParser::setSegmentInfo (Node *root, Representation *rep)
{
std
::
vector
<
Node
*>
segmentInfo
=
DOMHelper
::
getChildElementByTagName
(
root
,
"SegmentInfo"
);
for
(
in
t
i
=
0
;
i
<
segmentInfo
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
segmentInfo
.
size
();
i
++
)
{
SegmentInfo
*
info
=
new
SegmentInfo
(
segmentInfo
.
at
(
i
)
->
getAttributes
());
this
->
setInitSegment
(
segmentInfo
.
at
(
i
),
info
);
...
...
@@ -109,7 +109,7 @@ void BasicCMParser::setInitSegment (Node *root, SegmentInfo *info)
{
std
::
vector
<
Node
*>
initSeg
=
DOMHelper
::
getChildElementByTagName
(
root
,
"InitialisationSegmentURL"
);
for
(
in
t
i
=
0
;
i
<
initSeg
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
initSeg
.
size
();
i
++
)
{
InitSegment
*
seg
=
new
InitSegment
(
initSeg
.
at
(
i
)
->
getAttributes
());
info
->
setInitSegment
(
seg
);
...
...
@@ -120,7 +120,7 @@ void BasicCMParser::setSegments (Node *root, SegmentInfo *info)
{
std
::
vector
<
Node
*>
segments
=
DOMHelper
::
getElementByTagName
(
root
,
"Url"
,
false
);
for
(
in
t
i
=
0
;
i
<
segments
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
segments
.
size
();
i
++
)
{
Segment
*
seg
=
new
Segment
(
segments
.
at
(
i
)
->
getAttributes
());
info
->
addSegment
(
seg
);
...
...
modules/stream_filter/dash/mpd/Group.cpp
View file @
f480cd0d
...
...
@@ -37,7 +37,7 @@ Group::Group (std::map<std::string, std::string> attributes)
}
Group
::~
Group
()
{
for
(
int
i
=
0
;
i
<
this
->
representations
.
size
();
i
++
)
for
(
size_t
i
=
1
;
i
<
this
->
representations
.
size
();
i
++
)
delete
(
this
->
representations
.
at
(
i
));
delete
(
this
->
contentProtection
);
...
...
modules/stream_filter/dash/mpd/MPD.cpp
View file @
f480cd0d
...
...
@@ -41,10 +41,10 @@ MPD::MPD ()
}
MPD
::~
MPD
()
{
for
(
in
t
i
=
0
;
i
<
this
->
periods
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
this
->
periods
.
size
();
i
++
)
delete
(
this
->
periods
.
at
(
i
));
for
(
in
t
i
=
0
;
i
<
this
->
baseUrls
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
this
->
baseUrls
.
size
();
i
++
)
delete
(
this
->
baseUrls
.
at
(
i
));
delete
(
this
->
programInfo
);
...
...
modules/stream_filter/dash/mpd/NullManager.cpp
View file @
f480cd0d
...
...
@@ -45,19 +45,19 @@ Period* NullManager::getFirstPeriod ()
{
return
NULL
;
}
Period
*
NullManager
::
getNextPeriod
(
Period
*
period
)
Period
*
NullManager
::
getNextPeriod
(
Period
*
)
{
return
NULL
;
}
Representation
*
NullManager
::
getBestRepresentation
(
Period
*
period
)
Representation
*
NullManager
::
getBestRepresentation
(
Period
*
)
{
return
NULL
;
}
std
::
vector
<
ISegment
*>
NullManager
::
getSegments
(
Representation
*
rep
)
std
::
vector
<
ISegment
*>
NullManager
::
getSegments
(
Representation
*
)
{
return
std
::
vector
<
ISegment
*>
();
}
Representation
*
NullManager
::
getRepresentation
(
Period
*
period
,
long
bitrate
)
Representation
*
NullManager
::
getRepresentation
(
Period
*
,
long
)
{
return
NULL
;
}
modules/stream_filter/dash/mpd/Period.cpp
View file @
f480cd0d
...
...
@@ -35,7 +35,7 @@ Period::Period (std::map<std::string, std::string> attributes)
}
Period
::~
Period
()
{
for
(
in
t
i
=
0
;
i
<
this
->
groups
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
this
->
groups
.
size
();
i
++
)
delete
(
this
->
groups
.
at
(
i
));
}
...
...
modules/stream_filter/dash/mpd/SegmentInfo.cpp
View file @
f480cd0d
...
...
@@ -37,7 +37,7 @@ SegmentInfo::SegmentInfo(std::map<std::string,std::string> attr)
}
SegmentInfo
::~
SegmentInfo
()
{
for
(
in
t
i
=
0
;
i
<
this
->
segments
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
this
->
segments
.
size
();
i
++
)
delete
(
this
->
segments
.
at
(
i
));
delete
(
this
->
initSeg
);
...
...
modules/stream_filter/dash/xml/DOMHelper.cpp
View file @
f480cd0d
...
...
@@ -33,7 +33,7 @@ std::vector<Node *> DOMHelper::getElementByTagName (Node *root, std::string
{
std
::
vector
<
Node
*>
elements
;
for
(
in
t
i
=
0
;
i
<
root
->
getSubNodes
().
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
root
->
getSubNodes
().
size
();
i
++
)
{
getElementsByTagName
(
root
->
getSubNodes
().
at
(
i
),
name
,
&
elements
,
selfContain
);
}
...
...
@@ -44,7 +44,7 @@ std::vector<Node *> DOMHelper::getChildElementByTagName (Node *root, std::string
{
std
::
vector
<
Node
*>
elements
;
for
(
in
t
i
=
0
;
i
<
root
->
getSubNodes
().
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
root
->
getSubNodes
().
size
();
i
++
)
{
if
(
!
root
->
getSubNodes
().
at
(
i
)
->
getName
().
compare
(
name
))
elements
.
push_back
(
root
->
getSubNodes
().
at
(
i
));
...
...
@@ -63,7 +63,7 @@ void DOMHelper::getElementsByTagName (Node *root, std::string
if
(
!
root
->
getName
().
compare
(
name
))
elements
->
push_back
(
root
);
for
(
in
t
i
=
0
;
i
<
root
->
getSubNodes
().
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
root
->
getSubNodes
().
size
();
i
++
)
{
getElementsByTagName
(
root
->
getSubNodes
().
at
(
i
),
name
,
elements
,
selfContain
);
}
...
...
modules/stream_filter/dash/xml/DOMParser.cpp
View file @
f480cd0d
...
...
@@ -109,14 +109,14 @@ void DOMParser::print (Node *node, int offset)
std
::
vector
<
std
::
string
>
keys
=
node
->
getAttributeKeys
();
for
(
in
t
i
=
0
;
i
<
keys
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
keys
.
size
();
i
++
)
msg_Dbg
(
this
->
stream
,
" %s=%s"
,
keys
.
at
(
i
).
c_str
(),
node
->
getAttributeValue
(
keys
.
at
(
i
)).
c_str
());
msg_Dbg
(
this
->
stream
,
"
\n
"
);
offset
++
;
for
(
in
t
i
=
0
;
i
<
node
->
getSubNodes
().
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
node
->
getSubNodes
().
size
();
i
++
)
{
this
->
print
(
node
->
getSubNodes
().
at
(
i
),
offset
);
}
...
...
modules/stream_filter/dash/xml/Node.cpp
View file @
f480cd0d
...
...
@@ -34,7 +34,7 @@ Node::Node ()
}
Node
::~
Node
()
{
for
(
in
t
i
=
0
;
i
<
this
->
subNodes
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
this
->
subNodes
.
size
();
i
++
)
delete
(
this
->
subNodes
.
at
(
i
));
}
...
...
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