aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmedia/llmediabase.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llmedia/llmediabase.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llmedia/llmediabase.cpp')
-rw-r--r--linden/indra/llmedia/llmediabase.cpp210
1 files changed, 0 insertions, 210 deletions
diff --git a/linden/indra/llmedia/llmediabase.cpp b/linden/indra/llmedia/llmediabase.cpp
deleted file mode 100644
index 40acc5c..0000000
--- a/linden/indra/llmedia/llmediabase.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
1/**
2 * @file llmediabase.cpp
3 * @brief LLMedia support - base class
4 *
5 * $LicenseInfo:firstyear=2005&license=viewergpl$
6 *
7 * Copyright (c) 2005-2008, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
30 */
31
32#include "linden_common.h"
33
34#include "llmediabase.h"
35#include "llmediaimplquicktime.h"
36#include "llmediaimplgstreamer.h"
37
38LLMediaBase::LLMediaBase() :
39 mBufferChangeCount ( 1 ),
40 mLastBufferChangeCount ( 0 ),
41 mMediaWidth ( 0 ),
42 mMediaHeight ( 0 ),
43 mMediaDepthBytes ( 0 ),
44 mMediaRowbytes( 0 ),
45 mTextureWidth ( 0 ),
46 mTextureHeight ( 0 ),
47 mTextureDepth ( 0 ),
48 mTextureFormatInternal ( 0 ),
49 mTextureFormatPrimary ( 0 ),
50 mTextureFormatType ( 0 ),
51 mTextureFormatSwapBytes ( 0 )
52{
53
54}
55
56///////////////////////////////////////////////////////////////////////////////
57// factory method based on explicit media type
58LLMediaBase* LLMediaBase::make( const MediaType mediaTypeIn, S32 width_pixels, S32 height_pixels )
59{
60#if LL_QUICKTIME_ENABLED
61 if ( mediaTypeIn == QuickTime )
62 {
63 return new LLMediaImplQuickTime ();
64 }
65 else
66#endif
67#if LL_GSTREAMER_ENABLED
68 if ( mediaTypeIn == QuickTime )
69 {
70 return new LLMediaImplGStreamer ();
71 }
72 else
73#endif
74
75 return 0;
76}
77
78///////////////////////////////////////////////////////////////////////////////
79//
80BOOL
81LLMediaBase::
82init ()
83{
84 // build event and emit it
85 LLMediaEvent event ( 0, "" );
86 mMediaEventEmitter.update ( &LLMediaObserver::onInit, event );
87
88 return TRUE;
89}
90
91///////////////////////////////////////////////////////////////////////////////
92//
93BOOL
94LLMediaBase::
95load ( const LLString& urlIn )
96{
97 // build event and emit it
98 LLMediaEvent event ( 0, urlIn );
99 mMediaEventEmitter.update ( &LLMediaObserver::onLoad, event );
100
101 return TRUE;
102}
103
104///////////////////////////////////////////////////////////////////////////////
105//
106BOOL
107LLMediaBase::
108unload ()
109{
110 LLMediaEvent event ( 0, "" );
111 mMediaEventEmitter.update ( &LLMediaObserver::onUnload, event );
112
113 return TRUE;
114}
115
116///////////////////////////////////////////////////////////////////////////////
117//
118S32 LLMediaBase::getTextureWidth() const
119{
120 return mTextureWidth;
121}
122
123///////////////////////////////////////////////////////////////////////////////
124//
125S32 LLMediaBase::getTextureHeight() const
126{
127 return mTextureHeight;
128}
129
130///////////////////////////////////////////////////////////////////////////////
131//
132S32 LLMediaBase::getTextureDepth() const
133{
134 return mTextureDepth;
135}
136
137///////////////////////////////////////////////////////////////////////////////
138//
139S32 LLMediaBase::getTextureFormatInternal() const
140{
141 return mTextureFormatInternal;
142}
143
144///////////////////////////////////////////////////////////////////////////////
145//
146S32 LLMediaBase::getTextureFormatPrimary() const
147{
148 return mTextureFormatPrimary;
149}
150
151///////////////////////////////////////////////////////////////////////////////
152//
153S32 LLMediaBase::getTextureFormatType() const
154{
155 return mTextureFormatType;
156}
157
158///////////////////////////////////////////////////////////////////////////////
159//
160S32 LLMediaBase::getTextureFormatSwapBytes() const
161{
162 return mTextureFormatSwapBytes;
163}
164
165///////////////////////////////////////////////////////////////////////////////
166//
167S32 LLMediaBase::getMediaWidth() const
168{
169 return mMediaWidth;
170}
171
172///////////////////////////////////////////////////////////////////////////////
173//
174S32 LLMediaBase::getMediaHeight() const
175{
176 return mMediaHeight;
177}
178
179///////////////////////////////////////////////////////////////////////////////
180//
181S32 LLMediaBase::getMediaDepthBytes() const
182{
183 return mMediaDepthBytes;
184}
185
186///////////////////////////////////////////////////////////////////////////////
187//
188S32 LLMediaBase::getMediaBufferSize() const
189{
190 if(mMediaRowbytes != 0)
191 {
192 return mMediaHeight * mMediaRowbytes;
193 }
194
195 return mMediaWidth * mMediaHeight * mMediaDepthBytes;
196};
197
198///////////////////////////////////////////////////////////////////////////////
199//
200BOOL LLMediaBase::addMediaObserver( LLMediaObserver* observerIn )
201{
202 return mMediaEventEmitter.addObserver( observerIn );
203}
204
205///////////////////////////////////////////////////////////////////////////////
206//
207BOOL LLMediaBase::remMediaObserver( LLMediaObserver* observerIn )
208{
209 return mMediaEventEmitter.remObserver( observerIn );
210}