Fixed multibitrate codec-based track selection in dynamic, progressive FLV, RTMP and TCP MPEG2-TS.
This commit is contained in:
parent
af0ae568c4
commit
986561ffce
4 changed files with 8 additions and 8 deletions
|
@ -32,10 +32,10 @@ namespace Connector_HTTP {
|
||||||
void getTracks(DTSC::Meta & metadata){
|
void getTracks(DTSC::Meta & metadata){
|
||||||
videoTracks.clear();
|
videoTracks.clear();
|
||||||
for (std::map<int,DTSC::Track>::iterator it = metadata.tracks.begin(); it != metadata.tracks.end(); it++){
|
for (std::map<int,DTSC::Track>::iterator it = metadata.tracks.begin(); it != metadata.tracks.end(); it++){
|
||||||
if (it->second.type == "video"){
|
if (it->second.codec == "H264" || it->second.codec == "H263" || it->second.codec == "VP6"){
|
||||||
videoTracks.insert(it->first);
|
videoTracks.insert(it->first);
|
||||||
}
|
}
|
||||||
if (it->second.type == "audio"){
|
if (it->second.codec == "AAC" || it->second.codec == "MP3"){
|
||||||
audioTrack = it->first;
|
audioTrack = it->first;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,10 +102,10 @@ namespace Connector_HTTP {
|
||||||
Strm.waitForMeta(ss);
|
Strm.waitForMeta(ss);
|
||||||
int byterate = 0;
|
int byterate = 0;
|
||||||
for (std::map<int,DTSC::Track>::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){
|
for (std::map<int,DTSC::Track>::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){
|
||||||
if (videoID == -1 && it->second.type == "video"){
|
if (videoID == -1 && (it->second.codec == "H264" || it->second.codec == "H263" || it->second.codec == "VP6")){
|
||||||
videoID = it->second.trackID;
|
videoID = it->second.trackID;
|
||||||
}
|
}
|
||||||
if (audioID == -1 && it->second.type == "audio"){
|
if (audioID == -1 && (it->second.codec == "AAC" || it->second.codec == "MP3")){
|
||||||
audioID = it->second.trackID;
|
audioID = it->second.trackID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -567,10 +567,10 @@ namespace Connector_RTMP {
|
||||||
Strm.waitForMeta(ss);
|
Strm.waitForMeta(ss);
|
||||||
//find first audio and video tracks
|
//find first audio and video tracks
|
||||||
for (std::map<int,DTSC::Track>::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){
|
for (std::map<int,DTSC::Track>::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){
|
||||||
if (videoID == -1 && it->second.type == "video"){
|
if (videoID == -1 && (it->second.codec == "H264" || it->second.codec == "H263" || it->second.codec == "VP6")){
|
||||||
videoID = it->second.trackID;
|
videoID = it->second.trackID;
|
||||||
}
|
}
|
||||||
if (audioID == -1 && it->second.type == "audio"){
|
if (audioID == -1 && (it->second.codec == "AAC" || it->second.codec == "MP3")){
|
||||||
audioID = it->second.trackID;
|
audioID = it->second.trackID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,12 +68,12 @@ namespace Connector_TS {
|
||||||
|
|
||||||
Strm.waitForMeta(ss);
|
Strm.waitForMeta(ss);
|
||||||
for (std::map<int,DTSC::Track>::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){
|
for (std::map<int,DTSC::Track>::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){
|
||||||
if (audioID == -1 && it->second.type == "audio"){
|
if (audioID == -1 && it->second.codec == "AAC"){
|
||||||
audioID = it->first;
|
audioID = it->first;
|
||||||
tmpTracks << " " << it->first;
|
tmpTracks << " " << it->first;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (videoID == -1 && it->second.type == "video"){
|
if (videoID == -1 && it->second.codec == "H264"){
|
||||||
videoID = it->first;
|
videoID = it->first;
|
||||||
tmpTracks << " " << it->first;
|
tmpTracks << " " << it->first;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue