0003-libvlc-add-language-and-frame-rate-to-libvlc_media_t.patch 1.76 KB
Newer Older
1
From 52e0e35615298f7589f116c3835f6a67fafe0de1 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?S=C3=A9bastien=20Toque?= <xilasz@gmail.com>
3
Date: Thu, 12 Apr 2012 19:22:43 +0200
4 5 6 7 8 9 10 11 12
Subject: [PATCH 3/3] libvlc: add language and frame rate to
 libvlc_media_track_info_t

---
 include/vlc/libvlc_media.h |    3 +++
 lib/media.c                |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
13
index 279a29c..577e363 100644
14 15
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
16
@@ -164,9 +164,12 @@ typedef struct libvlc_media_track_info_t
17 18 19 20 21 22 23
             /* Video specific */
             unsigned    i_height;
             unsigned    i_width;
+            float       f_frame_rate;
         } video;
     } u;
 
24 25 26 27 28
+    char *psz_language;
+
 } libvlc_media_track_info_t;
 
 
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/lib/media.c b/lib/media.c
index 2c01c80..4bc832b 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -707,6 +707,8 @@ libvlc_media_get_tracks_info( libvlc_media_t *p_md, libvlc_media_track_info_t **
         p_mes->i_codec = p_es->i_codec;
         p_mes->i_id = p_es->i_id;
 
+        p_mes->psz_language = p_es->psz_language != NULL ? strdup(p_es->psz_language) : NULL;
+
         p_mes->i_profile = p_es->i_profile;
         p_mes->i_level = p_es->i_level;
 
@@ -720,6 +722,7 @@ libvlc_media_get_tracks_info( libvlc_media_t *p_md, libvlc_media_track_info_t **
             p_mes->i_type = libvlc_track_video;
             p_mes->u.video.i_height = p_es->video.i_height;
             p_mes->u.video.i_width = p_es->video.i_width;
+            p_mes->u.video.f_frame_rate = p_es->video.i_frame_rate / (float) p_es->video.i_frame_rate_base;
             break;
         case AUDIO_ES:
             p_mes->i_type = libvlc_track_audio;
-- 
1.7.5.4