sbDeviceCapsCompatibility.h
Go to the documentation of this file.
1 /* vim: set sw=2 :miv */
2 /*
3  *=BEGIN SONGBIRD GPL
4  *
5  * This file is part of the Songbird web player.
6  *
7  * Copyright(c) 2005-2009 POTI, Inc.
8  * http://www.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 #ifndef SBDEVICECAPSCOMPATIBILITY_H_
27 #define SBDEVICECAPSCOMPATIBILITY_H_
28 
29 #include <nsCOMPtr.h>
30 #include <nsStringAPI.h>
31 
32 #include <sbIDeviceCapsCompatibility.h>
33 
39 
45 {
46 public:
48  NS_DECL_SBIDEVICECAPSCOMPATIBILITY
49 
51 
52 private:
56  virtual ~sbDeviceCapsCompatibility();
57 
62  nsresult CompareAudioFormat(PRBool* aCompatible);
63 
68  nsresult CompareVideoFormat(PRBool* aCompatible);
69 
74  nsresult CompareImageFormat(PRBool* aCompatible);
75 
81  nsresult CompareVideoStream(sbIDevCapVideoStream* aVideoStream,
82  PRBool* aCompatible);
83 
89  nsresult CompareAudioStream(sbIDevCapAudioStream* aAudioStream,
90  PRBool* aCompatible);
91 
98  nsresult CompareVideoWidthAndHeight(sbIDevCapVideoStream* aVideoStream,
99  PRBool* aCompatible);
100 
107  nsresult CompareVideoBitRate(sbIDevCapVideoStream* aVideoStream,
108  PRBool* aCompatible);
109 
116  nsresult CompareVideoPAR(sbIDevCapVideoStream* aVideoStream,
117  PRBool* aCompatible);
118 
125  nsresult CompareVideoFrameRate(sbIDevCapVideoStream* aVideoStream,
126  PRBool* aCompatible);
127 
134  nsresult CompareAudioBitRate(sbIDevCapAudioStream* aAudioStream,
135  PRBool* aCompatible);
136 
143  nsresult CompareAudioSampleRate(sbIDevCapAudioStream* aAudioStream,
144  PRBool* aCompatible);
145 
152  nsresult CompareAudioChannels(sbIDevCapAudioStream* aAudioStream,
153  PRBool* aCompatible);
154 
155  // Device capabilities
156  nsCOMPtr<sbIDeviceCapabilities> mDeviceCapabilities;
157 
158  // Media format from media inspector
159  nsCOMPtr<sbIMediaFormat> mMediaFormat;
160  nsCOMPtr<sbIMediaFormatVideo> mMediaVideoStream;
161  nsCOMPtr<sbIMediaFormatAudio> mMediaAudioStream;
162 
163  // container type
164  nsString mMediaContainerType;
165 
166  // Video properties from video media stream
167  nsString mMediaVideoType;
168  PRInt32 mMediaVideoWidth;
169  PRInt32 mMediaVideoHeight;
170  PRInt32 mMediaVideoBitRate;
171  PRInt32 mMediaVideoSampleRate;
172  PRUint32 mMediaVideoPARNumerator;
173  PRUint32 mMediaVideoPARDenominator;
174  PRUint32 mMediaVideoFRNumerator;
175  PRUint32 mMediaVideoFRDenominator;
176 
177  // Audio properties from audio media stream
178  nsString mMediaAudioType;
179  PRInt32 mMediaAudioBitRate;
180  PRInt32 mMediaAudioSampleRate;
181  PRInt32 mMediaAudioChannels;
182 
183  // Content type in the form of sbIDeviceCapabilities::CONTENT_* for the
184  // media item to transfer
185  PRUint32 mContentType;
186 };
187 
188 #endif /* SBDEVICECAPSCOMPATIBILITY_H_ */
189 
[UNIMPLEMENTED UNTIL AFTER 0.3]
NS_DECL_ISUPPORTS NS_DECL_SBIDEVICECAPSCOMPATIBILITY sbDeviceCapsCompatibility()
This service determines if a media file is compatible with a particular device.