diff options
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index dd0b0259de..6416ba6db3 100644 --- a/player/command.c +++ b/player/command.c @@ -1959,6 +1959,7 @@ static int get_track_entry(int item, int action, void *arg, void *ctx) } } + bool has_crop = mp_rect_w(p.crop) > 0 && mp_rect_h(p.crop) > 0; struct m_sub_property props[] = { {"id", SUB_PROP_INT(track->user_tid)}, {"type", SUB_PROP_STR(stream_type_name(track->type)), @@ -1994,6 +1995,10 @@ static int get_track_entry(int item, int action, void *arg, void *ctx) .unavailable = !p.codec}, {"demux-w", SUB_PROP_INT(p.disp_w), .unavailable = !p.disp_w}, {"demux-h", SUB_PROP_INT(p.disp_h), .unavailable = !p.disp_h}, + {"demux-crop-x",SUB_PROP_INT(p.crop.x0), .unavailable = !has_crop}, + {"demux-crop-y",SUB_PROP_INT(p.crop.y0), .unavailable = !has_crop}, + {"demux-crop-w",SUB_PROP_INT(mp_rect_w(p.crop)), .unavailable = !has_crop}, + {"demux-crop-h",SUB_PROP_INT(mp_rect_h(p.crop)), .unavailable = !has_crop}, {"demux-channel-count", SUB_PROP_INT(p.channels.num), .unavailable = !p.channels.num}, {"demux-channels", SUB_PROP_STR(mp_chmap_to_str(&p.channels)), |