sbGStreamerPlatformOSX.h
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
27 #ifndef _SB_GSTREAMER_PLATFORM_OSX_H_
28 #define _SB_GSTREAMER_PLATFORM_OSX_H_
29 
30 #include <gst/gst.h>
31 
34 
35 #include <nsIBoxObject.h>
36 
38 {
39 public:
41  virtual ~OSXPlatformInterface();
42 
43  // Implementation of the rest of sbIGstPlatformInterface interface
44  GstElement * SetVideoSink (GstElement *aVideoSink);
45  GstElement * SetAudioSink (GstElement *aAudioSink);
46 
47  // Dummy override for ResizeToWindow in base class - NS_NEW_RUNNABLE_METHOD
48  // doesn't like being passed methods not defined on current class (bug 18744)
50  virtual void PrepareVideoWindow(GstMessage *aMessage);
51 
52  // Get the main view view
53  void* GetVideoView();
54 
55  // Event callback member functions
56  void OnMouseMoved(void *aCocoaEvent);
57  void OnWindowResized();
58 
59 protected:
60  // Implement virtual methods in BasePlatformInterface
61  void MoveVideoWindow (int x, int y, int width, int height);
62  void SetXOverlayWindowID (GstXOverlay *aXOverlay) {}
63  void FullScreen() {}
64  void UnFullScreen() {}
65 
66  nsresult SetVideoBox (nsIBoxObject *aBoxObject, nsIWidget *aWidget);
67 
68  void RemoveView();
69 
70  // ObjC member variables stored as void pointers for build simplification:
71  void *mParentView; // weak (NSView *)
72  void *mVideoView; // weak (NSView *)
73  void *mGstGLViewDelegate; // strong (NSObject *)
74 };
75 
76 #endif // _SB_GSTREAMER_PLATFORM_OSX_H_
void OnMouseMoved(void *aCocoaEvent)
void MoveVideoWindow(int x, int y, int width, int height)
function width(ele) rect(ele).width
OSXPlatformInterface(sbGStreamerMediacore *aCore)
virtual void PrepareVideoWindow(GstMessage *aMessage)
GstElement * SetVideoSink(GstElement *aVideoSink)
GstElement * SetAudioSink(GstElement *aAudioSink)
_updateDatepicker height
nsresult SetVideoBox(nsIBoxObject *aBoxObject, nsIWidget *aWidget)
void SetXOverlayWindowID(GstXOverlay *aXOverlay)