[libbluray-devel] [Git][videolan/libbluray][master] 2 commits: Detect Dolby Vision streams in playlist
Petri Hintukainen
gitlab at videolan.org
Sun May 17 17:44:46 CEST 2020
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
fb8f2b47 by rapperskull at 2020-05-17T18:10:19+03:00
Detect Dolby Vision streams in playlist
- - - - -
245baa75 by rapperskull at 2020-05-17T18:10:19+03:00
Show Dolby Vision streams in mpls_dump
- - - - -
3 changed files:
- src/devtools/mpls_dump.c
- src/libbluray/bdnav/mpls_data.h
- src/libbluray/bdnav/mpls_parse.c
Changes:
=====================================
src/devtools/mpls_dump.c
=====================================
@@ -51,6 +51,7 @@ const VALUE_MAP subpath_type_map[] = {
{6, "Out-of-mux Asynchronous Picture-in-Picture presentation"},
{7, "In-mux Synchronous Picture-in-Picture presentation"},
{8, "SS Video"},
+ {10, "Dolby Vision Enhancement Layer"},
{0,NULL}
};
@@ -99,13 +100,13 @@ _show_stream(MPLS_STREAM *ss, int level)
break;
case 2:
- case 4:
indent_printf(level, "SubPath Id: %02x", ss->subpath_id);
indent_printf(level, "SubClip Id: %02x", ss->subclip_id);
indent_printf(level, "PID: %04x", ss->pid);
break;
case 3:
+ case 4:
indent_printf(level, "SubPath Id: %02x", ss->subpath_id);
indent_printf(level, "PID: %04x", ss->pid);
break;
@@ -194,6 +195,10 @@ _show_details(MPLS_PL *pl, int level)
indent_printf(level+1, "Video Stream %d:", jj);
_show_stream(&pi->stn.video[jj], level + 2);
}
+ for (jj = 0; jj < pi->stn.num_dv; jj++) {
+ indent_printf(level+1, "Dolby Vision Enhancement Layer Stream %d:", jj);
+ _show_stream(&pi->stn.dv[jj], level + 2);
+ }
for (jj = 0; jj < pi->stn.num_audio; jj++) {
indent_printf(level+1, "Audio Stream %d:", jj);
_show_stream(&pi->stn.audio[jj], level + 2);
=====================================
src/libbluray/bdnav/mpls_data.h
=====================================
@@ -58,12 +58,14 @@ typedef struct
uint8_t num_secondary_audio;
uint8_t num_secondary_video;
uint8_t num_pip_pg;
+ uint8_t num_dv;
MPLS_STREAM *video;
MPLS_STREAM *audio;
MPLS_STREAM *pg;
MPLS_STREAM *ig;
MPLS_STREAM *secondary_audio;
MPLS_STREAM *secondary_video;
+ MPLS_STREAM *dv;
} MPLS_STN;
typedef struct
=====================================
src/libbluray/bdnav/mpls_parse.c
=====================================
@@ -130,13 +130,13 @@ _parse_stream(BITSTREAM *bits, MPLS_STREAM *s)
break;
case 2:
- case 4:
s->subpath_id = bs_read(bits, 8);
s->subclip_id = bs_read(bits, 8);
s->pid = bs_read(bits, 16);
break;
case 3:
+ case 4:
s->subpath_id = bs_read(bits, 8);
s->pid = bs_read(bits, 16);
break;
@@ -229,9 +229,10 @@ _parse_stn(BITSTREAM *bits, MPLS_STN *stn)
stn->num_secondary_audio = bs_read(bits, 8);
stn->num_secondary_video = bs_read(bits, 8);
stn->num_pip_pg = bs_read(bits, 8);
+ stn->num_dv = bs_read(bits, 8);
- // 5 reserve bytes
- bs_skip(bits, 5 * 8);
+ // 4 reserve bytes
+ bs_skip(bits, 4 * 8);
// Primary Video Streams
ss = NULL;
@@ -377,6 +378,23 @@ _parse_stn(BITSTREAM *bits, MPLS_STN *stn)
}
}
+ // Dolby Vision Enhancement Layer Streams
+ ss = NULL;
+ if (stn->num_dv) {
+ ss = calloc(stn->num_dv, sizeof(MPLS_STREAM));
+ if (!ss) {
+ return 0;
+ }
+ for (ii = 0; ii < stn->num_dv; ii++) {
+ if (!_parse_stream(bits, &ss[ii])) {
+ X_FREE(ss);
+ BD_DEBUG(DBG_NAV | DBG_CRIT, "error parsing dv entry\n");
+ return 0;
+ }
+ }
+ }
+ stn->dv = ss;
+
if (bs_seek_byte(bits, pos + len) < 0) {
return 0;
}
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/483c5b0b2ff7b5d00144e008d8356b3bab41e584...245baa75ad907ed322a219913ed16aac5aec9fcf
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/483c5b0b2ff7b5d00144e008d8356b3bab41e584...245baa75ad907ed322a219913ed16aac5aec9fcf
You're receiving this email because of your account on code.videolan.org.
More information about the libbluray-devel
mailing list