Gnash  0.8.11dev
GstUtil.h
Go to the documentation of this file.
1 // GstUtil.h: Generalized Gstreamer utilities for pipeline configuration.
2 //
3 // Copyright (C) 2008, 2009, 2010, 2011, 2012
4 // Free Software Foundation, Inc.
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 
20 #ifndef _GSTUTIL_H
21 #define _GSTUTIL_H
22 
23 #include <gst/gst.h>
24 #include "dsodefs.h" // DSOEXPORT
25 
26 // GST_TIME_AS_MSECONDS not defined as of gst 0.10.9
27 // is defined as of gst 0.10.19
28 #ifndef GST_TIME_AS_MSECONDS
29 # define GST_TIME_AS_MSECONDS(time) ((time) / G_GINT64_CONSTANT (1000000))
30 #endif
31 
32 namespace gnash {
33 namespace media {
34 namespace gst {
35 
37 //
41 
42 public:
43 
65  static GstElement* get_audiosink_element();
66 
67 
69  //
76  static bool check_missing_plugins(GstCaps* caps);
77 
78 private:
79 
80  GstUtil();
81  ~GstUtil();
82 };
83 
84 } // gnash.media.gst namespace
85 } // media namespace
86 } // gnash namespace
87 
88 
89 #endif /* _GSTUTIL_H */
90 
gnash::RcInitFile::getGstAudioSink
const std::string & getGstAudioSink() const
Definition: rc.h:220
NPN_HasProperty
bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName)
Definition: gshell.cpp:281
NS_DestroyPluginInstance
void NS_DestroyPluginInstance(nsPluginInstanceBase *aPlugin)
Definition: gshell.cpp:396
NPN_RequestRead
NPError NPN_RequestRead(NPStream *stream, NPByteRange *rangeList)
Definition: gshell.cpp:343
NPN_UTF8FromIdentifier
NPUTF8 * NPN_UTF8FromIdentifier(NPIdentifier identifier)
Definition: gshell.cpp:209
NPN_PostURLNotify
NPError NPN_PostURLNotify(NPP instance, const char *url, const char *target, uint32_t len, const char *buf, NPBool file, void *notifyData)
Definition: gshell.cpp:244
main
int main(int argc, char *argv[])
Definition: gshell.cpp:113
NPN_HasMethod
bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName)
Definition: gshell.cpp:287
NS_PluginGetValue
NPError NS_PluginGetValue(NPPVariable aVariable, void *aValue)
Retrieve values from the plugin for the Browser.
Definition: npapi/plugin.cpp:340
name
std::string name
Definition: LocalConnection_as.cpp:149
NPN_NewStream
NPError NPN_NewStream(NPP instance, NPMIMEType type, const char *target, NPStream **stream)
Definition: gshell.cpp:349
NPN_SetProperty
bool NPN_SetProperty(NPP npp, NPObject *obj, NPIdentifier name, const NPVariant *value)
Definition: gshell.cpp:406
NPN_MemAlloc
void * NPN_MemAlloc(uint32_t size)
Definition: gshell.cpp:188
NPN_Write
int32_t NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buffer)
Definition: gshell.cpp:368
external.h
dsodefs.h
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
populateNPFuncs
NPNetscapeFuncs * populateNPFuncs(NPNetscapeFuncs *aNPNFuncs)
Definition: gshell.cpp:56
_
#define _(String)
Definition: log.h:44
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
NPN_ReleaseObject
void NPN_ReleaseObject(NPObject *npobj)
Definition: gshell.cpp:519
NPN_MemFree
void NPN_MemFree(void *ptr)
Definition: gshell.cpp:196
NPN_GetValue
NPError NPN_GetValue(NPP instance, NPNVariable aVariable, void *aValue)
Definition: gshell.cpp:293
NPN_Enumerate
bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count)
Definition: gshell.cpp:450
NPN_GetStringIdentifiers
void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers)
Definition: gshell.cpp:494
NPN_UserAgent
const char * NPN_UserAgent(NPP instance)
Definition: gshell.cpp:362
swfdec_gst_get_element_factory
GstElementFactory * swfdec_gst_get_element_factory(GstCaps *caps)
Definition: swfdec_codec_gst.c:151
gnash::log_error
void log_error(StringType msg, Args... args)
Definition: log.h:283
NPN_GetIntIdentifier
NPIdentifier NPN_GetIntIdentifier(int32_t intid)
Definition: gshell.cpp:501
NPN_Invoke
bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result)
Definition: gshell.cpp:253
NPN_Status
void NPN_Status(NPP instance, const char *message)
Definition: gshell.cpp:356
gnash::key::type
type
Definition: GnashKey.h:330
NPN_GetStringIdentifier
NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
Definition: gshell.cpp:222
gnash::media::gst::GstUtil::get_audiosink_element
static GstElement * get_audiosink_element()
Returns a pointer to GstElement representing a user-configurable audio sink, or NULL if such a sink c...
Definition: GstUtil.cpp:44
NPNFuncs
NPNetscapeFuncs NPNFuncs
_properties
std::map< NPIdentifier, NPVariant * > _properties
Definition: gshell.cpp:401
NPN_SetException
void NPN_SetException(NPObject *npobj, const NPUTF8 *message)
Definition: gshell.cpp:438
NPN_InvalidateRegion
void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
Definition: gshell.cpp:317
NPN_GetProperty
bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result)
Definition: gshell.cpp:274
NPN_Construct
bool NPN_Construct(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)
Definition: gshell.cpp:457
names
char ** names[EV_MAX+1]
Definition: evtest.c:357
NPN_IntFromIdentifier
int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
Definition: gshell.cpp:215
__PRETTY_FUNCTION__
#define __PRETTY_FUNCTION__
Definition: log.h:444
plugin.h
NPN_PluginThreadAsyncCall
void NPN_PluginThreadAsyncCall(NPP plugin, void(*func)(void *), void *userData)
Definition: gshell.cpp:444
gst
log.h
NS_PluginShutdown
void NS_PluginShutdown()
Definition: gshell.cpp:380
url
std::string url
Definition: gnash.cpp:59
NPN_InvokeDefault
bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)
Definition: gshell.cpp:260
NPP_GetValue
NPError NPP_GetValue(NPP instance, NPPVariable aVariable, void *aValue)
Definition: gshell.cpp:228
NPP_GetMIMEDescription
char * NPP_GetMIMEDescription(void)
Definition: gshell.cpp:389
NPN_GetURL
NPError NPN_GetURL(NPP instance, const char *url, const char *target)
Definition: gshell.cpp:329
gnashconfig.h
gnash::RcInitFile::getDefaultInstance
static RcInitFile & getDefaultInstance()
Return the default instance of RC file.
Definition: rc.cpp:61
NP_InitializePtr
NPError NP_InitializePtr(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *aNPPFuncs)
Definition: gshell.cpp:47
DSOEXPORT
#define DSOEXPORT
Definition: dsodefs.h:55
gnash::media::gst::GstUtil
Generalized Gstreamer utilities for pipeline configuration.
Definition: GstUtil.h:40
NPN_InvalidateRect
void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
Definition: gshell.cpp:311
swfdec_codec_gst.h
NPN_DestroyStream
NPError NPN_DestroyStream(NPP instance, NPStream *stream, NPReason reason)
Definition: gshell.cpp:374
GstUtil.h
NPN_MemFlush
uint32_t NPN_MemFlush(uint32_t size)
Definition: gshell.cpp:203
NPN_RetainObject
NPObject * NPN_RetainObject(NPObject *obj)
Definition: gshell.cpp:513
gnash::key::o
@ o
Definition: GnashKey.h:161
NPN_ReloadPlugins
void NPN_ReloadPlugins(NPBool reloadPages)
Definition: gshell.cpp:323
_methods
std::map< NPIdentifier, NPInvokeFunctionPtr > _methods
Definition: gshell.cpp:402
x
std::int32_t x
Definition: BitmapData_as.cpp:434
NPPFuncs
NPPluginFuncs NPPFuncs
NPN_IdentifierIsString
bool NPN_IdentifierIsString(NPIdentifier identifier)
Definition: gshell.cpp:507
NPN_RemoveProperty
bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName)
Definition: gshell.cpp:420
NPN_PostURL
NPError NP_LOADDS NPN_PostURL(NPP instance, const char *url, const char *target, uint32_t len, const char *buf, NPBool file)
Definition: gshell.cpp:335
NPN_CreateObject
NPObject * NPN_CreateObject(NPP npp, NPClass *aClass)
Definition: gshell.cpp:488
NPN_ReleaseVariantValue
void NPN_ReleaseVariantValue(NPVariant *variant)
Definition: gshell.cpp:464
NPN_Evaluate
bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, NPVariant *result)
Definition: gshell.cpp:267
NPN_SetValue
NPError NPN_SetValue(NPP instance, NPPVariable aVariable, void *aValue)
Definition: gshell.cpp:302
gnash::media::gst::GstUtil::check_missing_plugins
static bool check_missing_plugins(GstCaps *caps)
Check for missing plugins and try to install them if necessary.
Definition: GstUtil.cpp:102
NPN_GetURLNotify
NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void *notifyData)
Definition: gshell.cpp:237