aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-05 02:22:49 -0500
committerJacek Antonelli2009-04-05 23:34:31 -0500
commit428b32da98c9343b3f02d7da66c4af232b1c4376 (patch)
tree54b24d9a16178d890d98e90c1d9b44423a7f1a8d
parentRefactored the heart of the GST play code to startPlay(). (diff)
downloadmeta-impy-428b32da98c9343b3f02d7da66c4af232b1c4376.zip
meta-impy-428b32da98c9343b3f02d7da66c4af232b1c4376.tar.gz
meta-impy-428b32da98c9343b3f02d7da66c4af232b1c4376.tar.bz2
meta-impy-428b32da98c9343b3f02d7da66c4af232b1c4376.tar.xz
Added LLGstPlayThread class.
-rw-r--r--ChangeLog.txt10
-rw-r--r--linden/indra/llmedia/CMakeLists.txt2
-rw-r--r--linden/indra/llmedia/llgstplaythread.cpp54
-rw-r--r--linden/indra/llmedia/llgstplaythread.h62
4 files changed, 128 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 6e89a48..d7c4a43 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,13 @@
12009-04-05 Jacek Antonelli <jacek.antonelli@gmail.com>
2
3 * linden/indra/llmedia/llgstplaythread.cpp:
4 Added LLGstPlayThread class.
5 * linden/indra/llmedia/llgstplaythread.h:
6 Ditto.
7 * linden/indra/llmedia/CMakeLists.txt:
8 Ditto.
9
10
12009-04-04 Jacek Antonelli <jacek.antonelli@gmail.com> 112009-04-04 Jacek Antonelli <jacek.antonelli@gmail.com>
2 12
3 * linden/indra/llmedia/llmediaimplgstreamer.cpp: 13 * linden/indra/llmedia/llmediaimplgstreamer.cpp:
diff --git a/linden/indra/llmedia/CMakeLists.txt b/linden/indra/llmedia/CMakeLists.txt
index 0440153..0e5b261 100644
--- a/linden/indra/llmedia/CMakeLists.txt
+++ b/linden/indra/llmedia/CMakeLists.txt
@@ -31,6 +31,7 @@ set(llmedia_SOURCE_FILES
31 llmediamanager.cpp 31 llmediamanager.cpp
32 llmediaimplgstreamer.cpp 32 llmediaimplgstreamer.cpp
33 llmediaimplgstreamervidplug.cpp 33 llmediaimplgstreamervidplug.cpp
34 llgstplaythread.cpp
34 ) 35 )
35 36
36set(llmedia_HEADER_FILES 37set(llmedia_HEADER_FILES
@@ -47,6 +48,7 @@ set(llmedia_HEADER_FILES
47 llmediaobserver.h 48 llmediaobserver.h
48 llmediaimplgstreamer.h 49 llmediaimplgstreamer.h
49 llmediaimplgstreamervidplug.h 50 llmediaimplgstreamervidplug.h
51 llgstplaythread.h
50 ) 52 )
51 53
52 # Work around a bad interaction between broken gstreamer headers and 54 # Work around a bad interaction between broken gstreamer headers and
diff --git a/linden/indra/llmedia/llgstplaythread.cpp b/linden/indra/llmedia/llgstplaythread.cpp
new file mode 100644
index 0000000..152f9d9
--- /dev/null
+++ b/linden/indra/llmedia/llgstplaythread.cpp
@@ -0,0 +1,54 @@
1/**
2 * @file llgstplaythread.cpp
3 * @author Jacek Antonelli
4 * @brief GStreamer playback management thread class
5 *
6 * $LicenseInfo:firstyear=2009&license=viewergpl$
7 *
8 * Copyright (c) 2009, Jacek Antonelli
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation. Terms of
13 * the GPL can be found in doc/GPL-license.txt in this distribution, or
14 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
15 *
16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 *
30 * $/LicenseInfo$
31 */
32
33#include "llgstplaythread.h"
34#include "llmediaimplgstreamer.h"
35
36LLGstPlayThread::
37LLGstPlayThread( LLMediaImplCommon *impl,
38 const std::string& name, apr_pool_t *poolp ):
39 LLThread( name, poolp ),
40 mMediaImpl( impl )
41{
42}
43
44
45LLGstPlayThread::~LLGstPlayThread()
46{
47}
48
49
50// virtual
51void LLGstPlayThread::run()
52{
53 ((LLMediaImplGStreamer *)mMediaImpl)->startPlay();
54}
diff --git a/linden/indra/llmedia/llgstplaythread.h b/linden/indra/llmedia/llgstplaythread.h
new file mode 100644
index 0000000..c3c36a7
--- /dev/null
+++ b/linden/indra/llmedia/llgstplaythread.h
@@ -0,0 +1,62 @@
1/**
2 * @file llgstplaythread.h
3 * @author Jacek Antonelli
4 * @brief GStreamer playback management thread class
5 *
6 * $LicenseInfo:firstyear=2009&license=viewergpl$
7 *
8 * Copyright (c) 2009, Jacek Antonelli
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation. Terms of
13 * the GPL can be found in doc/GPL-license.txt in this distribution, or
14 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
15 *
16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 *
30 * $/LicenseInfo$
31 */
32
33
34#ifndef LL_LLGSTPLAYTHREAD_H
35#define LL_LLGSTPLAYTHREAD_H
36
37#include "linden_common.h"
38
39#include "llthread.h"
40#include "llmediaimplcommon.h"
41
42class LLGstPlayThread: public LLThread
43{
44 public:
45
46 LLGstPlayThread( LLMediaImplCommon *impl,
47 const std::string& name, apr_pool_t *poolp );
48
49 ~LLGstPlayThread();
50
51 virtual void run();
52
53 private:
54
55 // Actually, this will really only be an LLMediaImplGStreamer.
56 // But we have to jump through some hoops to mutual pointer-holding.
57 // There may be a better way, but I don't have the motivation to find it.
58 LLMediaImplCommon *mMediaImpl;
59};
60
61
62#endif // LL_LLGSTPLAYTHREAD_H