[vlc-commits] Revert "Implement libvlc_video_get_size(), close #3679"

Rémi Denis-Courmont git at videolan.org
Tue Jan 17 17:15:17 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 17 18:15:05 2012 +0200| [47cf242f9af4a55ba9d1c77325d100d73e30a325] | committer: Rémi Denis-Courmont

Revert "Implement libvlc_video_get_size(), close #3679"

This reverts commit 8cf355785e002ade33af056c68123b395ff4e46f.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=47cf242f9af4a55ba9d1c77325d100d73e30a325
---

 lib/video.c |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/lib/video.c b/lib/video.c
index 7e092bd..163bca3 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -161,22 +161,18 @@ libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,
 int libvlc_video_get_size( libvlc_media_player_t *p_mi, unsigned num,
                            unsigned *restrict px, unsigned *restrict py )
 {
-    libvlc_media_track_info_t *info;
-    int ret = -1;
-    int infos = libvlc_media_get_tracks_info(p_mi->p_md, &info);
-    if (infos <= 0)
-        return ret;
-
-    for (int i = 0; i < infos; i++)
-        if (info[i].i_type == libvlc_track_video && num-- == 0) {
-            *px = info[i].u.video.i_width;
-            *py = info[i].u.video.i_height;
-            ret = 0;
-            break;
-        }
+#if 0
+    vout_thread_t *p_vout = GetVout (p_mi, num);
+    if (p_vout == NULL)
+        return -1;
 
-    free(info);
-    return ret;
+    *px = p_vout->i_window_height;
+    *py = p_vout->i_window_width;
+    vlc_object_release (p_vout);
+    return 0;
+#else
+    return -1;
+#endif
 }
 
 int libvlc_video_get_height( libvlc_media_player_t *p_mi )



More information about the vlc-commits mailing list