OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Movie class for WTL forms to call to control the media pipeline. | 5 // Movie class for WTL forms to call to control the media pipeline. |
6 | 6 |
7 #ifndef MEDIA_TOOLS_PLAYER_WTL_MOVIE_H_ | 7 #ifndef MEDIA_TOOLS_PLAYER_WTL_MOVIE_H_ |
8 #define MEDIA_TOOLS_PLAYER_WTL_MOVIE_H_ | 8 #define MEDIA_TOOLS_PLAYER_WTL_MOVIE_H_ |
9 | 9 |
10 #include "media/tools/player_wtl/player_wtl.h" | 10 #include "media/tools/player_wtl/player_wtl.h" |
11 | 11 |
12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 #include "base/singleton.h" | |
15 #include "base/thread.h" | 14 #include "base/thread.h" |
16 | 15 |
| 16 template <typename T> struct DefaultSingletonTraits; |
17 class WtlVideoRenderer; | 17 class WtlVideoRenderer; |
18 | 18 |
19 namespace media { | 19 namespace media { |
20 | 20 |
21 class PipelineImpl; | 21 class PipelineImpl; |
22 | 22 |
23 class Movie : public Singleton<Movie> { | 23 class Movie { |
24 public: | 24 public: |
| 25 // Returns the singleton instance. |
| 26 static Movie* GetInstance(); |
| 27 |
25 // Open a movie. | 28 // Open a movie. |
26 bool Open(const wchar_t* url, WtlVideoRenderer* video_renderer); | 29 bool Open(const wchar_t* url, WtlVideoRenderer* video_renderer); |
27 | 30 |
28 // Set playback rate. | 31 // Set playback rate. |
29 void Play(float rate); | 32 void Play(float rate); |
30 | 33 |
31 // Set playback rate. | 34 // Set playback rate. |
32 float GetPlayRate(); | 35 float GetPlayRate(); |
33 | 36 |
34 // Get movie duration in seconds. | 37 // Get movie duration in seconds. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 float play_rate_; | 93 float play_rate_; |
91 HBITMAP movie_dib_; | 94 HBITMAP movie_dib_; |
92 HWND movie_hwnd_; | 95 HWND movie_hwnd_; |
93 | 96 |
94 DISALLOW_COPY_AND_ASSIGN(Movie); | 97 DISALLOW_COPY_AND_ASSIGN(Movie); |
95 }; | 98 }; |
96 | 99 |
97 } // namespace media | 100 } // namespace media |
98 | 101 |
99 #endif // MEDIA_TOOLS_PLAYER_WTL_MOVIE_H_ | 102 #endif // MEDIA_TOOLS_PLAYER_WTL_MOVIE_H_ |
OLD | NEW |