diff options
author | Armin Weatherwax | 2010-06-14 12:04:49 +0200 |
---|---|---|
committer | Armin Weatherwax | 2010-09-23 15:38:25 +0200 |
commit | 35df5441d3e2789663532c948731aff3a1e04728 (patch) | |
tree | ac7674289784a5f96106ea507637055a8dada78a /linden/indra/llmedia/llmediaimplgstreamervidplug.h | |
parent | Changed version to Experimental 2010.09.18 (diff) | |
download | meta-impy-35df5441d3e2789663532c948731aff3a1e04728.zip meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.gz meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.bz2 meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.xz |
llmediaplugins first step
Diffstat (limited to 'linden/indra/llmedia/llmediaimplgstreamervidplug.h')
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamervidplug.h | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.h b/linden/indra/llmedia/llmediaimplgstreamervidplug.h deleted file mode 100644 index 3a984a9..0000000 --- a/linden/indra/llmedia/llmediaimplgstreamervidplug.h +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | /** | ||
2 | * @file llmediaimplgstreamervidplug.h | ||
3 | * @brief Video-consuming static GStreamer plugin for gst-to-LLMediaImpl | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2007-2009, 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 | ||
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
22 | * | ||
23 | * By copying, modifying or distributing this software, you acknowledge | ||
24 | * that you have read and understood your obligations described above, | ||
25 | * and agree to abide by those obligations. | ||
26 | * | ||
27 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
28 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
29 | * COMPLETENESS OR PERFORMANCE. | ||
30 | * $/LicenseInfo$ | ||
31 | */ | ||
32 | |||
33 | #ifndef __GST_SLVIDEO_H__ | ||
34 | #define __GST_SLVIDEO_H__ | ||
35 | |||
36 | ///#if LL_GSTREAMER_ENABLED | ||
37 | |||
38 | extern "C" { | ||
39 | #include <gst/gst.h> | ||
40 | #include <gst/video/video.h> | ||
41 | #include <gst/video/gstvideosink.h> | ||
42 | #include <glib/gthread.h> | ||
43 | } | ||
44 | |||
45 | G_BEGIN_DECLS | ||
46 | |||
47 | /* #defines don't like whitespacey bits */ | ||
48 | #define GST_TYPE_SLVIDEO \ | ||
49 | (gst_slvideo_get_type()) | ||
50 | #define GST_SLVIDEO(obj) \ | ||
51 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SLVIDEO,GstSLVideo)) | ||
52 | #define GST_SLVIDEO_CLASS(klass) \ | ||
53 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SLVIDEO,GstSLVideoClass)) | ||
54 | #define GST_IS_SLVIDEO(obj) \ | ||
55 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SLVIDEO)) | ||
56 | #define GST_IS_SLVIDEO_CLASS(klass) \ | ||
57 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SLVIDEO)) | ||
58 | |||
59 | typedef struct _GstSLVideo GstSLVideo; | ||
60 | typedef struct _GstSLVideoClass GstSLVideoClass; | ||
61 | |||
62 | typedef enum { | ||
63 | SLV_PF_UNKNOWN = 0, | ||
64 | SLV_PF_RGBX = 1, | ||
65 | SLV_PF_BGRX = 2, | ||
66 | SLV__END = 3 | ||
67 | } SLVPixelFormat; | ||
68 | const int SLVPixelFormatBytes[SLV__END] = {1, 4, 4}; | ||
69 | |||
70 | struct _GstSLVideo | ||
71 | { | ||
72 | GstVideoSink video_sink; | ||
73 | |||
74 | GstCaps *caps; | ||
75 | |||
76 | int fps_n, fps_d; | ||
77 | int par_n, par_d; | ||
78 | int height, width; | ||
79 | SLVPixelFormat format; | ||
80 | |||
81 | // SHARED WITH APPLICATION: | ||
82 | // Access to the following should be protected by GST_OBJECT_LOCK() on | ||
83 | // the GstSLVideo object, and should be totally consistent upon UNLOCK | ||
84 | // (i.e. all written at once to reflect the current retained frame info | ||
85 | // when the retained frame is updated.) | ||
86 | bool retained_frame_ready; // new frame ready since flag last reset. (*TODO: could get the writer to wait on a semaphore instead of having the reader poll, potentially making dropped frames somewhat cheaper.) | ||
87 | unsigned char* retained_frame_data; | ||
88 | int retained_frame_allocbytes; | ||
89 | int retained_frame_width, retained_frame_height; | ||
90 | SLVPixelFormat retained_frame_format; | ||
91 | }; | ||
92 | |||
93 | struct _GstSLVideoClass | ||
94 | { | ||
95 | GstVideoSinkClass parent_class; | ||
96 | }; | ||
97 | |||
98 | GType gst_slvideo_get_type (void); | ||
99 | |||
100 | void gst_slvideo_init_class (void); | ||
101 | |||
102 | G_END_DECLS | ||
103 | |||
104 | ///#endif // LL_GSTREAMER_ENABLED | ||
105 | |||
106 | #endif /* __GST_SLVIDEO_H__ */ | ||