summaryrefslogtreecommitdiffstats
path: root/media/player/movie.h
diff options
context:
space:
mode:
authorfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 21:12:08 +0000
committerfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 21:12:08 +0000
commitfee00934a491edf64b615cc5d34a01de17736fec (patch)
treefcbf3eb74162a4117ad34ef9f72b7ea0a4f82f0e /media/player/movie.h
parentbfe979e1cc07e94096dd4a63f013c907d1d986a6 (diff)
downloadchromium_src-fee00934a491edf64b615cc5d34a01de17736fec.zip
chromium_src-fee00934a491edf64b615cc5d34a01de17736fec.tar.gz
chromium_src-fee00934a491edf64b615cc5d34a01de17736fec.tar.bz2
media player movie functions to bind WTL menu events to pipeline.
Review URL: http://codereview.chromium.org/102002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15240 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/player/movie.h')
-rw-r--r--media/player/movie.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/media/player/movie.h b/media/player/movie.h
new file mode 100644
index 0000000..f6d79be
--- /dev/null
+++ b/media/player/movie.h
@@ -0,0 +1,62 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Movie class for WTL forms to call to control the media pipeline.
+
+#ifndef MEDIA_PLAYER_MOVIE_H_
+#define MEDIA_PLAYER_MOVIE_H_
+
+#include <tchar.h>
+
+#include "base/scoped_ptr.h"
+#include "base/singleton.h"
+
+class WtlVideoRenderer;
+
+namespace media {
+
+class PipelineImpl;
+
+class Movie : public Singleton<Movie> {
+ public:
+ // Open a movie.
+ bool Open(const wchar_t* url, WtlVideoRenderer* video_renderer);
+
+ // Set playback rate.
+ void Play(float rate);
+
+ // Enable/Disable audio.
+ void SetAudioEnable(bool enable_audio);
+
+ // Get Enable/Disable audio state.
+ bool GetAudioEnable();
+
+ // Set buffer to render into.
+ void SetFrameBuffer(HBITMAP hbmp, HWND hwnd);
+
+ // Close movie.
+ void Close();
+
+ // Query if movie is currently open.
+ bool IsOpen();
+
+ private:
+ // Only allow Singleton to create and delete Movie.
+ friend struct DefaultSingletonTraits<Movie>;
+ Movie();
+ virtual ~Movie();
+
+ scoped_ptr<PipelineImpl> pipeline_;
+ HBITMAP movie_dib_;
+ HWND movie_hwnd_;
+ bool enable_audio_;
+ float play_rate_;
+
+ DISALLOW_COPY_AND_ASSIGN(Movie);
+};
+
+} // namespace media
+
+#endif // MEDIA_PLAYER_MOVIE_H_
+