Unified · Split
| @@ -0,0 +1 @@ | ||
| 1 | +add `track-list/N/dolby-vision-profile` and `track-list/N/dolby-vision-level` | |
| @@ -3185,6 +3185,10 @@ Property list · 3184 unmodified lines | ||
| 3185 | 3185 | values currently. It's possible that future mpv versions will make |
| 3186 | 3186 | these properties unavailable instead in this case. |
| 3187 | 3187 | |
| 3188 | + ``track-list/N/dolby-vision-profile``, ``track-list/N/dolby-vision-level`` | |
| 3189 | + Dolby Vision profile and level. May not be available if the container | |
| 3190 | + does not provide this information. | |
| 3191 | + | |
| 3188 | 3192 | When querying the property with the client API using ``MPV_FORMAT_NODE``, |
| 3189 | 3193 | or with Lua ``mp.get_property_native``, this will return a mpv_node with |
| 3190 | 3194 | the following contents: |
| @@ -3229,6 +3233,8 @@ Property list · 38 unmodified lines | ||
| 3229 | 3233 | "replaygain-track-gain" MPV_FORMAT_DOUBLE |
| 3230 | 3234 | "replaygain-album-peak" MPV_FORMAT_DOUBLE |
| 3231 | 3235 | "replaygain-album-gain" MPV_FORMAT_DOUBLE |
| 3236 | + "dolby-vision-profile" MPV_FORMAT_INT64 | |
| 3237 | + "dolby-vision-level" MPV_FORMAT_INT64 | |
| 3232 | 3238 | |
| 3233 | 3239 | ``current-tracks/...`` |
| 3234 | 3240 | This gives access to currently selected tracks. It redirects to the correct |
| @@ -796,6 +796,9 @@ static void handle_new_stream(demuxer_t *demuxer, int i) · 795 unmodified lines | ||
| 796 | 796 | MP_VERBOSE(demuxer, "Found Dolby Vision config record: profile " |
| 797 | 797 | "%d level %d\n", cfg->dv_profile, cfg->dv_level); |
| 798 | 798 | av_format_inject_global_side_data(avfc); |
| 799 | + sh->codec->dovi = true; | |
| 800 | + sh->codec->dv_profile = cfg->dv_profile; | |
| 801 | + sh->codec->dv_level = cfg->dv_level; | |
| 799 | 802 | } |
| 800 | 803 | |
| 801 | 804 | // This also applies to vfw-muxed mkv, but we can't detect these easily. |
| @@ -1687,6 +1687,12 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track) · 1686 unmodified lines | ||
| 1687 | 1687 | sh_v->rotate = rotate; |
| 1688 | 1688 | } |
| 1689 | 1689 | |
| 1690 | + if (track->dovi_config) { | |
| 1691 | + sh_v->dovi = true; | |
| 1692 | + sh_v->dv_level = track->dovi_config->dv_level; | |
| 1693 | + sh_v->dv_profile = track->dovi_config->dv_profile; | |
| 1694 | + } | |
| 1695 | + | |
| 1690 | 1696 | done: |
| 1691 | 1697 | demux_add_sh_stream(demuxer, sh); |
| 1692 | 1698 | |
| @@ -121,6 +121,10 @@ struct mp_codec_params { · 120 unmodified lines | ||
| 121 | 121 | struct pl_color_repr repr; // color representaion info where available |
| 122 | 122 | struct mp_rect crop; // crop to be applied |
| 123 | 123 | |
| 124 | + bool dovi; | |
| 125 | + uint8_t dv_profile; | |
| 126 | + uint8_t dv_level; | |
| 127 | + | |
| 124 | 128 | // STREAM_VIDEO + STREAM_AUDIO |
| 125 | 129 | int bits_per_coded_sample; |
| 126 | 130 | char *format_name; // pixel format (video) or sample format (audio) |
| @@ -2079,6 +2079,10 @@ static int get_track_entry(int item, int action, void *arg, void *ctx) · 2078 unmodified lines | ||
| 2079 | 2079 | .unavailable = !has_rg}, |
| 2080 | 2080 | {"replaygain-album-gain", SUB_PROP_FLOAT(rg.album_gain), |
| 2081 | 2081 | .unavailable = !has_rg}, |
| 2082 | + {"dolby-vision-profile", SUB_PROP_INT(p.dv_profile), | |
| 2083 | + .unavailable = !p.dovi}, | |
| 2084 | + {"dolby-vision-level", SUB_PROP_INT(p.dv_level), | |
| 2085 | + .unavailable = !p.dovi}, | |
| 2082 | 2086 | {0} |
| 2083 | 2087 | }; |
| 2084 | 2088 | |