many improvements/bug fixes to media control: new wxEVT_MEDIA_LOADED event, new methods taking URIs, new DirectShow implementation, significant sample improvements (patch 1233613)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-07-28 23:56:57 +00:00
parent dca92ddfbf
commit c5191fbd2b
10 changed files with 4061 additions and 1222 deletions

View File

@@ -9,6 +9,8 @@ All:
- Fixed wxScopeGuard to work with VC++, documented it.
- Fixed proxy handling in wxURL.
- Added wxEVT_MEDIA_LOADED event for wxMediaCtrl
- Added new methods to wxMediaCtrl (wxURI version of Load, ShowPlayerControls)
- Added wxZipFSHandler::Cleanup() (Stas Sergeev)
- Added wxImage::RotateHue() and RGB <-> HSV conversions (John Anderson)

View File

@@ -39,8 +39,9 @@ realm of licensing restrictions).
For general operation, all you need to do is call
\helpref{wxMediaCtrl::Load}{wxmediactrlload} to load the file
you want to render, then call \helpref{wxMediaCtrl::Play}{wxmediactrlplay}
to show the video/audio of the media.
you want to render, catch the EVT\_MEDIA\_LOADED event,
and then call \helpref{wxMediaCtrl::Play}{wxmediactrlplay}
to show the video/audio of the media in that event.
More complex operations are generally more heavily dependant on the
capabilities of the backend. For example, QuickTime cannot set
@@ -102,7 +103,7 @@ Use ActiveMovie/DirectShow. Requires wxUSE\_DIRECTSHOW to be
enabled, requires linkage with the static library strmiids.lib,
and is available on Windows Only.}
\twocolitem{{\bf wxMEDIABACKEND\_QUICKTIME}}{
Use QuickTime. Windows and Mac Only. WARNING: On Mac Systems lower than OSX 10.2 this defaults to emulating window positioning and suffers from several bugs, including not working correctly embedded in a wxNotebook. }
Use QuickTime. Windows and Mac Only. NOTE: On Mac Systems lower than OSX 10.2 this defaults to emulating window positioning and suffers from several bugs, including not working correctly embedded in a wxNotebook. }
\twocolitem{{\bf wxMEDIABACKEND\_MCI}}{
Use Media Command Interface. Windows Only. }
\twocolitem{{\bf wxMEDIABACKEND\_GSTREAMER}}{
@@ -206,6 +207,13 @@ Obtains the state the playback of the movie is in -
Loads the file that \tt{fileName} refers to. Returns false if loading fails.
\membersection{wxMediaCtrl::Load}\label{wxmediactrlloaduri}
\func{bool}{Load}{\param{const wxURI\& }{location}}
Loads the url that \tt{location} refers to. Returns false if loading fails.
\membersection{wxMediaCtrl::Pause}\label{wxmediactrlpause}
\func{bool}{Pause}{\void}
@@ -222,7 +230,7 @@ Resumes playback of the movie.
\membersection{wxMediaCtrl::Seek}\label{wxmediactrlsetposition}
\func{wxFileOffset}{SetPosition}{\param{wxFileOffset }{where}, \param{wxSeekMode }{mode}}
\func{wxFileOffset}{Seek}{\param{wxFileOffset }{where}, \param{wxSeekMode }{mode}}
Seeks to a position within the movie.
@@ -235,3 +243,45 @@ Stops the media.
See \helpref{Operation}{operationwxmediactrl} for an overview of how stopping works.
\membersection{wxMediaCtrl::SetVolume}\label{wxmediactrlsetvolume}
\func{bool}{SetVolume}{\param{double }{dVolume}}
Sets the volume of the media from a 0.0 to 1.0 range.
\membersection{wxMediaCtrl::GetVolume}\label{wxmediactrlgetvolume}
\func{double}{GetVolume}{\void}
Gets the volume of the media from a 0.0 to 1.0 range.
\membersection{wxMediaCtrl::GetPlaybackRate}\label{wxmediactrlgetplaybackrate}
\func{double}{GetPlaybackrate}{\void}
Gets the playback rate of the media; for example 2.0 is double speed.
Not implemented on MCI or GStreamer.
\membersection{wxMediaCtrl::SetPlaybackRate}\label{wxmediactrlsetplaybackrate}
\func{bool}{SetPlaybackrate}{\param{double }{dVolume}}
Sets the rate that the media plays; for example 0.5 is half speed.
\membersection{wxMediaCtrl::ShowPlayerControls}\label{wxmediactrlshowplayercontrols}
\func{bool}{ShowPlayerControls}{\param{wxMediaCtrlPlayerControls }{flags}}
Normally, when you use wxMediaCtrl it is just a window for the video to
play in. However, platforms generally have their own media player interface,
like quicktime has a bar below the video with a slider etc.. If you want that native
interface instead of making your own use this function. There are several options
for the flags parameter, however you can look at the mediactrl header for these.
The two general flags are wxMEDIACTRLPLAYERCONTROLS\_NONE which turns off the
native interface, and wxMEDIACTRLPLAYERCONTROLS\_DEFAULT which lets wxMediaCtrl
decide what native controls on the interface.

View File

@@ -25,6 +25,7 @@ Event \helpref{wxMediaCtrl}{wxmediactrl} uses.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_MEDIA\_LOADED(func)}}{Sent when a media has loaded enough data that it can start playing.}
\twocolitem{{\bf EVT\_MEDIA\_STOP(func)}}{
Triggerred right before the media stops. You can Veto this event to prevent it from stopping, causing it to continue playing - even if it has reached that end of the media. }
\twocolitem{{\bf EVT\_MEDIA\_FINISHED(func)}}{Sent when a media has finished playing in a \helpref{wxMediaCtrl}{wxmediactrl}. Note that if you connect to this event and don't skip it, it will override the looping behaviour of the media control.}