[vlc-commits] windowless-base: cache and expose original video dimensions
Felix Paul Kühne
git at videolan.org
Sun Apr 17 10:58:52 CEST 2016
npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Apr 17 11:58:04 2016 +0300| [bcb1b37d93bbfe0765b4c2ddc81c84cae79fd72a] | committer: Felix Paul Kühne
windowless-base: cache and expose original video dimensions
> https://code.videolan.org/videolan/npapi-vlc/commit/bcb1b37d93bbfe0765b4c2ddc81c84cae79fd72a
---
npapi/vlcwindowless_base.cpp | 2 ++
npapi/vlcwindowless_base.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/npapi/vlcwindowless_base.cpp b/npapi/vlcwindowless_base.cpp
index 6bd6af8..5f976a5 100644
--- a/npapi/vlcwindowless_base.cpp
+++ b/npapi/vlcwindowless_base.cpp
@@ -35,6 +35,8 @@ unsigned VlcWindowlessBase::video_format_cb(char *chroma,
unsigned *pitches, unsigned *lines)
{
if ( p_browser ) {
+ m_media_source_width = *width;
+ m_media_source_height = *height;
float src_aspect = (float)(*width) / (*height);
float dst_aspect = (float)npwindow.width/npwindow.height;
if ( src_aspect > dst_aspect ) {
diff --git a/npapi/vlcwindowless_base.h b/npapi/vlcwindowless_base.h
index f783cf6..3988faf 100644
--- a/npapi/vlcwindowless_base.h
+++ b/npapi/vlcwindowless_base.h
@@ -80,6 +80,8 @@ public:
protected:
std::vector<char> m_frame_buf;
unsigned int m_media_width;
+ unsigned int m_media_source_width;
unsigned int m_media_height;
+ unsigned int m_media_source_height;
};
#endif
More information about the vlc-commits
mailing list