[wx-dev] RE: wxMSW: wxMediaCtrl best size broken
Robin Dunn
robin at alldunn.com
Mon Oct 2 09:20:25 PDT 2006
Ryan Norton wrote:
> wxSize wxAMMediaBackend::GetVideoSize() const
> {
> if(m_bestSize == wxDefaultSize)
> {
> // Get the original video size
> GetAM()->get_ImageSourceWidth((long*)&m_bestSize.x);
> GetAM()->get_ImageSourceHeight((long*)&m_bestSize.y);
>
> if(m_bestSize == wxDefaultSize)
> {
> return wxSize(0,0); }
> }
>
> return m_bestSize;
> }
> ---------
> Ideally, one would want to throw in an optimization or two for the case
> where there is no actual video :), but hopefully
> the general idea is there.
Thanks, this pointed me in the right direction. the get_ImageSource*
methods will set the value to zero if it still doesn't have the actual
size yet, so I had to skip setting m_bestSize until a non-zero value was
returned.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wx-dev
mailing list