From d373817edbf6adbcdef30907ecc16bef710261e2 Mon Sep 17 00:00:00 2001 From: Timothyxxx <384084775@qq.com> Date: Thu, 6 Mar 2025 22:11:42 +0800 Subject: [PATCH] Modify VLC launch command and fullscreen detection - Add VLC_VERBOSE=-1 to suppress verbose logging in VLC launch commands across multiple example files - Update is_vlc_fullscreen function to handle cases where screen size or window size is None - Improve robustness of VLC-related metrics and example configurations --- desktop_env/evaluators/metrics/vlc.py | 4 ++++ .../examples/vlc/215dfd39-f493-4bc3-a027-8a97d72c61bf.json | 2 +- .../examples/vlc/386dbd0e-0241-4a0a-b6a2-6704fba26b1c.json | 1 + .../examples/vlc/59f21cfb-0120-4326-b255-a5b827b38967.json | 2 +- .../examples/vlc/7882ed6e-bece-4bf0-bada-c32dc1ddae72.json | 2 +- .../examples/vlc/8ba5ae7a-5ae5-4eab-9fcc-5dd4fe3abf89.json | 2 +- .../examples/vlc/8d9fd4e2-6fdb-46b0-b9b9-02f06495c62f.json | 1 + .../examples/vlc/8f080098-ddb1-424c-b438-4e96e5e4786e.json | 1 + .../examples/vlc/9195653c-f4aa-453d-aa95-787f6ccfaae9.json | 2 +- .../examples/vlc/a5bbbcd5-b398-4c91-83d4-55e1e31bbb81.json | 2 +- .../examples/vlc/aa4b5023-aef6-4ed9-bdc9-705f59ab9ad6.json | 6 +++--- .../examples/vlc/bba3381f-b5eb-4439-bd9e-80c22218d5a7.json | 2 +- .../examples/vlc/cb130f0d-d36f-4302-9838-b3baf46139b6.json | 2 +- .../examples/vlc/d06f0d4d-2cd5-4ede-8de9-598629438c6e.json | 2 +- .../examples/vlc/efcf0d81-0835-4880-b2fd-d866e8bc2294.json | 1 + .../examples/vlc/f3977615-2b45-4ac5-8bba-80c17dbe2a37.json | 2 +- .../examples/vlc/fba2c100-79e8-42df-ae74-b592418d54f4.json | 1 + 17 files changed, 22 insertions(+), 13 deletions(-) diff --git a/desktop_env/evaluators/metrics/vlc.py b/desktop_env/evaluators/metrics/vlc.py index a4f6abc..94892bd 100644 --- a/desktop_env/evaluators/metrics/vlc.py +++ b/desktop_env/evaluators/metrics/vlc.py @@ -77,6 +77,10 @@ def is_vlc_recordings_folder(actual_config_path: str, rule: Dict[str, str]) -> f def is_vlc_fullscreen(actual_window_size, screen_size): + if screen_size is None or actual_window_size is None: + # if the screen size is not available, means that the window is not fullscreen + return 0 + if actual_window_size['width'] == screen_size['width'] and actual_window_size['height'] == screen_size['height']: return 1 else: diff --git a/evaluation_examples/examples/vlc/215dfd39-f493-4bc3-a027-8a97d72c61bf.json b/evaluation_examples/examples/vlc/215dfd39-f493-4bc3-a027-8a97d72c61bf.json index afaa063..abc0342 100644 --- a/evaluation_examples/examples/vlc/215dfd39-f493-4bc3-a027-8a97d72c61bf.json +++ b/evaluation_examples/examples/vlc/215dfd39-f493-4bc3-a027-8a97d72c61bf.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } }, { diff --git a/evaluation_examples/examples/vlc/386dbd0e-0241-4a0a-b6a2-6704fba26b1c.json b/evaluation_examples/examples/vlc/386dbd0e-0241-4a0a-b6a2-6704fba26b1c.json index 7522c55..ee5422a 100644 --- a/evaluation_examples/examples/vlc/386dbd0e-0241-4a0a-b6a2-6704fba26b1c.json +++ b/evaluation_examples/examples/vlc/386dbd0e-0241-4a0a-b6a2-6704fba26b1c.json @@ -30,6 +30,7 @@ "type": "launch", "parameters": { "command": [ + "VLC_VERBOSE=-1", "vlc", "--start-time=10", "/home/user/Desktop/Colorful-Flowers.mp3" diff --git a/evaluation_examples/examples/vlc/59f21cfb-0120-4326-b255-a5b827b38967.json b/evaluation_examples/examples/vlc/59f21cfb-0120-4326-b255-a5b827b38967.json index 6e64d7b..eca2b1f 100644 --- a/evaluation_examples/examples/vlc/59f21cfb-0120-4326-b255-a5b827b38967.json +++ b/evaluation_examples/examples/vlc/59f21cfb-0120-4326-b255-a5b827b38967.json @@ -18,7 +18,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } }, { diff --git a/evaluation_examples/examples/vlc/7882ed6e-bece-4bf0-bada-c32dc1ddae72.json b/evaluation_examples/examples/vlc/7882ed6e-bece-4bf0-bada-c32dc1ddae72.json index ba7df32..5f8b6aa 100644 --- a/evaluation_examples/examples/vlc/7882ed6e-bece-4bf0-bada-c32dc1ddae72.json +++ b/evaluation_examples/examples/vlc/7882ed6e-bece-4bf0-bada-c32dc1ddae72.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } } ], diff --git a/evaluation_examples/examples/vlc/8ba5ae7a-5ae5-4eab-9fcc-5dd4fe3abf89.json b/evaluation_examples/examples/vlc/8ba5ae7a-5ae5-4eab-9fcc-5dd4fe3abf89.json index 66b23fd..5dc98f8 100644 --- a/evaluation_examples/examples/vlc/8ba5ae7a-5ae5-4eab-9fcc-5dd4fe3abf89.json +++ b/evaluation_examples/examples/vlc/8ba5ae7a-5ae5-4eab-9fcc-5dd4fe3abf89.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } }, { diff --git a/evaluation_examples/examples/vlc/8d9fd4e2-6fdb-46b0-b9b9-02f06495c62f.json b/evaluation_examples/examples/vlc/8d9fd4e2-6fdb-46b0-b9b9-02f06495c62f.json index 5d2ecb7..ab912e7 100644 --- a/evaluation_examples/examples/vlc/8d9fd4e2-6fdb-46b0-b9b9-02f06495c62f.json +++ b/evaluation_examples/examples/vlc/8d9fd4e2-6fdb-46b0-b9b9-02f06495c62f.json @@ -19,6 +19,7 @@ "type": "launch", "parameters": { "command": [ + "VLC_VERBOSE=-1", "vlc", "--start-time=15", "/home/user/Desktop/Gen 2.mp4" diff --git a/evaluation_examples/examples/vlc/8f080098-ddb1-424c-b438-4e96e5e4786e.json b/evaluation_examples/examples/vlc/8f080098-ddb1-424c-b438-4e96e5e4786e.json index cac8d45..714a4cb 100644 --- a/evaluation_examples/examples/vlc/8f080098-ddb1-424c-b438-4e96e5e4786e.json +++ b/evaluation_examples/examples/vlc/8f080098-ddb1-424c-b438-4e96e5e4786e.json @@ -19,6 +19,7 @@ "type": "launch", "parameters": { "command": [ + "VLC_VERBOSE=-1", "vlc", "--start-time=73", "/home/user/Desktop/Baby Justin Bieber.mp4" diff --git a/evaluation_examples/examples/vlc/9195653c-f4aa-453d-aa95-787f6ccfaae9.json b/evaluation_examples/examples/vlc/9195653c-f4aa-453d-aa95-787f6ccfaae9.json index 3345bf0..d0bb6b1 100644 --- a/evaluation_examples/examples/vlc/9195653c-f4aa-453d-aa95-787f6ccfaae9.json +++ b/evaluation_examples/examples/vlc/9195653c-f4aa-453d-aa95-787f6ccfaae9.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } }, { diff --git a/evaluation_examples/examples/vlc/a5bbbcd5-b398-4c91-83d4-55e1e31bbb81.json b/evaluation_examples/examples/vlc/a5bbbcd5-b398-4c91-83d4-55e1e31bbb81.json index 5b67718..2a364e8 100644 --- a/evaluation_examples/examples/vlc/a5bbbcd5-b398-4c91-83d4-55e1e31bbb81.json +++ b/evaluation_examples/examples/vlc/a5bbbcd5-b398-4c91-83d4-55e1e31bbb81.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } }, { diff --git a/evaluation_examples/examples/vlc/aa4b5023-aef6-4ed9-bdc9-705f59ab9ad6.json b/evaluation_examples/examples/vlc/aa4b5023-aef6-4ed9-bdc9-705f59ab9ad6.json index 2b7e893..abbf80c 100644 --- a/evaluation_examples/examples/vlc/aa4b5023-aef6-4ed9-bdc9-705f59ab9ad6.json +++ b/evaluation_examples/examples/vlc/aa4b5023-aef6-4ed9-bdc9-705f59ab9ad6.json @@ -17,9 +17,9 @@ }, { "type": "launch", - "parameters": { - "command": ["vlc", "/home/user/Desktop/flipped_1984_Apple_Macintosh_Commercial.mp4"] - } + "parameters": { + "command": ["VLC_VERBOSE=-1", "vlc", "/home/user/Desktop/flipped_1984_Apple_Macintosh_Commercial.mp4"] + } }, { "type": "execute", diff --git a/evaluation_examples/examples/vlc/bba3381f-b5eb-4439-bd9e-80c22218d5a7.json b/evaluation_examples/examples/vlc/bba3381f-b5eb-4439-bd9e-80c22218d5a7.json index b6c397c..84ac66d 100644 --- a/evaluation_examples/examples/vlc/bba3381f-b5eb-4439-bd9e-80c22218d5a7.json +++ b/evaluation_examples/examples/vlc/bba3381f-b5eb-4439-bd9e-80c22218d5a7.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } }, { diff --git a/evaluation_examples/examples/vlc/cb130f0d-d36f-4302-9838-b3baf46139b6.json b/evaluation_examples/examples/vlc/cb130f0d-d36f-4302-9838-b3baf46139b6.json index 7937817..f27606c 100644 --- a/evaluation_examples/examples/vlc/cb130f0d-d36f-4302-9838-b3baf46139b6.json +++ b/evaluation_examples/examples/vlc/cb130f0d-d36f-4302-9838-b3baf46139b6.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } } ], diff --git a/evaluation_examples/examples/vlc/d06f0d4d-2cd5-4ede-8de9-598629438c6e.json b/evaluation_examples/examples/vlc/d06f0d4d-2cd5-4ede-8de9-598629438c6e.json index a6bcc8f..fccec9d 100644 --- a/evaluation_examples/examples/vlc/d06f0d4d-2cd5-4ede-8de9-598629438c6e.json +++ b/evaluation_examples/examples/vlc/d06f0d4d-2cd5-4ede-8de9-598629438c6e.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } }, { diff --git a/evaluation_examples/examples/vlc/efcf0d81-0835-4880-b2fd-d866e8bc2294.json b/evaluation_examples/examples/vlc/efcf0d81-0835-4880-b2fd-d866e8bc2294.json index ed40c37..f0b0241 100644 --- a/evaluation_examples/examples/vlc/efcf0d81-0835-4880-b2fd-d866e8bc2294.json +++ b/evaluation_examples/examples/vlc/efcf0d81-0835-4880-b2fd-d866e8bc2294.json @@ -19,6 +19,7 @@ "type": "launch", "parameters": { "command": [ + "VLC_VERBOSE=-1", "vlc", "--start-time=120.5", "--stop-time=121", diff --git a/evaluation_examples/examples/vlc/f3977615-2b45-4ac5-8bba-80c17dbe2a37.json b/evaluation_examples/examples/vlc/f3977615-2b45-4ac5-8bba-80c17dbe2a37.json index 8f49282..252abba 100644 --- a/evaluation_examples/examples/vlc/f3977615-2b45-4ac5-8bba-80c17dbe2a37.json +++ b/evaluation_examples/examples/vlc/f3977615-2b45-4ac5-8bba-80c17dbe2a37.json @@ -7,7 +7,7 @@ { "type": "launch", "parameters": { - "command": "vlc" + "command": "VLC_VERBOSE=-1 vlc" } }, { diff --git a/evaluation_examples/examples/vlc/fba2c100-79e8-42df-ae74-b592418d54f4.json b/evaluation_examples/examples/vlc/fba2c100-79e8-42df-ae74-b592418d54f4.json index aaa498f..595a7f6 100644 --- a/evaluation_examples/examples/vlc/fba2c100-79e8-42df-ae74-b592418d54f4.json +++ b/evaluation_examples/examples/vlc/fba2c100-79e8-42df-ae74-b592418d54f4.json @@ -19,6 +19,7 @@ "type": "launch", "parameters": { "command": [ + "VLC_VERBOSE=-1", "vlc", "--start-time=120.5", "--stop-time=121",