#include "sbGStreamerMediacoreUtils.h"
#include <nsIRunnable.h>
#include <nsINetUtil.h>
#include <nsIWritablePropertyBag.h>
#include <nsAutoPtr.h>
#include <nsThreadUtils.h>
#include <nsTArray.h>
#include <nsMemory.h>
#include <sbStandardProperties.h>
#include <sbStringBundle.h>
#include <prlog.h>
#include <gst/gst.h>
Go to the source code of this file.
Classes | |
class | sbGstMessageEvent |
struct | errMap |
struct | TypeMatchingInfo |
struct | sb_gst_caps_map_entry |
Macros | |
#define | LOG(args) /* nothing */ |
#define | TRACE(args) /* nothing */ |
#define | SB_GN_PROP_EXTENDEDDATA "http://gracenote.com/pos/1.0#extendedData" |
#define | SB_GN_PROP_TAGID "http://gracenote.com/pos/1.0#tagId" |
#define | TAG_CONVERT_STRING(sbname, gstname) |
#define | TAG_CONVERT_UINT(sbname, gstname) |
#define | PROPERTY_CONVERT_STRING(propname, tagname) |
#define | PROPERTY_CONVERT_UINT(propname, tagname, scale) |
Functions | |
PRBool | ConvertSinglePropertyToTag (sbIProperty *property, GstTagList *taglist) |
GstTagList * | ConvertPropertyArrayToTagList (sbIPropertyArray *properties) |
static void | ConvertSingleTag (const GstTagList *taglist, const gchar *tag, gpointer user_data) |
nsresult | ConvertTagListToPropertyArray (GstTagList *taglist, sbIPropertyArray **aPropertyArray) |
NS_IMPL_THREADSAFE_ISUPPORTS1 (sbGstMessageEvent, nsIRunnable) GstBusSyncReply SyncToAsyncDispatcher(GstBus *bus | |
if (!handled) | |
gst_message_unref (message) | |
nsresult | GetMediacoreErrorFromGstError (GError *gerror, nsString aResource, GStreamer::pipelineOp_t aPipelineOp, sbIMediacoreError **_retval) |
static gboolean | match_element_filter (GstPluginFeature *feature, TypeMatchingInfo *data) |
const char * | FindMatchingElementName (const char *srcCapsString, const char *typeName) |
const char * | FindMatchingElementName (GstCaps *srcCaps, const char *typeName) |
void | RegisterCustomTags () |
nsresult | ApplyPropertyBagToElement (GstElement *element, nsIPropertyBag *props) |
static nsCString | GetGstCapsName (const nsACString &aMimeType, enum sbGstCapsMapType aType) |
GstCaps * | GetCapsForMimeType (const nsACString &aMimeType, enum sbGstCapsMapType aType) |
nsresult | GetMimeTypeForCaps (GstCaps *aCaps, nsACString &aMimeType) |
static gboolean | _OnEachGValue (GQuark aFieldId, const GValue *aValue, gpointer aUserData) |
nsresult | SetPropertiesFromGstStructure (nsIWritablePropertyBag2 *aPropertyBag, const GstStructure *aStructure, const gchar *const aDesiredFieldList[], PRUint32 aFieldCount) |
nsresult | SetPropertyFromGValue (nsIWritablePropertyBag2 *aPropertyBag, const nsAString &aProperty, const GValue *aValue) |
GstPad * | GetRealPad (GstPad *pad) |
Variables | |
GstMessage * | message |
GstMessage gpointer data sbGStreamerMessageHandler * | handler |
PRBool | handled = handler->HandleSynchronousMessage(message) |
return | GST_BUS_DROP |
static const struct errMap | ResourceErrorMap [] |
static const struct errMap | StreamErrorMap [] |
static const struct sb_gst_caps_map_entry | sb_gst_caps_map [] |
#define LOG | ( | args | ) | /* nothing */ |
To log this class, set the following environment variable in a debug build:
NSPR_LOG_MODULES=sbGStreamerMediacoreUtils:5 (or :3 for LOG messages only)
Definition at line 65 of file sbGStreamerMediacoreUtils.cpp.
#define PROPERTY_CONVERT_STRING | ( | propname, | |
tagname | |||
) |
#define PROPERTY_CONVERT_UINT | ( | propname, | |
tagname, | |||
scale | |||
) |
#define SB_GN_PROP_EXTENDEDDATA "http://gracenote.com/pos/1.0#extendedData" |
Definition at line 107 of file sbGStreamerMediacoreUtils.cpp.
#define SB_GN_PROP_TAGID "http://gracenote.com/pos/1.0#tagId" |
Definition at line 108 of file sbGStreamerMediacoreUtils.cpp.
#define TAG_CONVERT_STRING | ( | sbname, | |
gstname | |||
) |
#define TAG_CONVERT_UINT | ( | sbname, | |
gstname | |||
) |
#define TRACE | ( | args | ) | /* nothing */ |
Definition at line 66 of file sbGStreamerMediacoreUtils.cpp.
|
static |
Definition at line 881 of file sbGStreamerMediacoreUtils.cpp.
nsresult ApplyPropertyBagToElement | ( | GstElement * | element, |
nsIPropertyBag * | props | ||
) |
Definition at line 629 of file sbGStreamerMediacoreUtils.cpp.
GstTagList* ConvertPropertyArrayToTagList | ( | sbIPropertyArray * | properties | ) |
Definition at line 192 of file sbGStreamerMediacoreUtils.cpp.
PRBool ConvertSinglePropertyToTag | ( | sbIProperty * | property, |
GstTagList * | taglist | ||
) |
Definition at line 111 of file sbGStreamerMediacoreUtils.cpp.
|
static |
Definition at line 223 of file sbGStreamerMediacoreUtils.cpp.
nsresult ConvertTagListToPropertyArray | ( | GstTagList * | taglist, |
sbIPropertyArray ** | aPropertyArray | ||
) |
Definition at line 266 of file sbGStreamerMediacoreUtils.cpp.
const char* FindMatchingElementName | ( | const char * | srcCapsString, |
const char * | typeName | ||
) |
Find an element name for an element that can produce caps compatible with 'srcCapsString' on its source pad, and has a klass name include 'typeName'. Returns NULL if none is found.
e.g. Call FindMatchingElementName("application/ogg", "Muxer") to get an ogg muxer element name ("oggmux" will be returned).
Definition at line 572 of file sbGStreamerMediacoreUtils.cpp.
const char* FindMatchingElementName | ( | GstCaps * | srcCaps, |
const char * | typeName | ||
) |
Overload of the above, but accepting a GstCaps instead of a string
Definition at line 586 of file sbGStreamerMediacoreUtils.cpp.
GstCaps* GetCapsForMimeType | ( | const nsACString & | aMimeType, |
enum sbGstCapsMapType | aType | ||
) |
Definition at line 813 of file sbGStreamerMediacoreUtils.cpp.
|
static |
Definition at line 796 of file sbGStreamerMediacoreUtils.cpp.
nsresult GetMediacoreErrorFromGstError | ( | GError * | gerror, |
nsString | aResource, | ||
GStreamer::pipelineOp_t | aPipelineOp, | ||
sbIMediacoreError ** | _retval | ||
) |
Definition at line 410 of file sbGStreamerMediacoreUtils.cpp.
nsresult GetMimeTypeForCaps | ( | GstCaps * | aCaps, |
nsACString & | aMimeType | ||
) |
Definition at line 824 of file sbGStreamerMediacoreUtils.cpp.
GstPad* GetRealPad | ( | GstPad * | pad | ) |
Definition at line 1016 of file sbGStreamerMediacoreUtils.cpp.
gst_message_unref | ( | message | ) |
if | ( | ! | handled | ) |
Definition at line 323 of file sbGStreamerMediacoreUtils.cpp.
|
static |
Definition at line 518 of file sbGStreamerMediacoreUtils.cpp.
NS_IMPL_THREADSAFE_ISUPPORTS1 | ( | sbGstMessageEvent | , |
nsIRunnable | |||
) |
void RegisterCustomTags | ( | ) |
Definition at line 620 of file sbGStreamerMediacoreUtils.cpp.
nsresult SetPropertiesFromGstStructure | ( | nsIWritablePropertyBag2 * | aPropertyBag, |
const GstStructure * | aStructure, | ||
const gchar *const | aDesiredFieldList[], | ||
PRUint32 | aFieldCount | ||
) |
Definition at line 897 of file sbGStreamerMediacoreUtils.cpp.
nsresult SetPropertyFromGValue | ( | nsIWritablePropertyBag2 * | aPropertyBag, |
const nsAString & | aProperty, | ||
const GValue * | aValue | ||
) |
Definition at line 933 of file sbGStreamerMediacoreUtils.cpp.
return GST_BUS_DROP |
Definition at line 330 of file sbGStreamerMediacoreUtils.cpp.
Definition at line 321 of file sbGStreamerMediacoreUtils.cpp.
GstMessage gpointer data sbGStreamerMessageHandler* handler |
Definition at line 316 of file sbGStreamerMediacoreUtils.cpp.
GstMessage* message |
Definition at line 314 of file sbGStreamerMediacoreUtils.cpp.
|
static |
Definition at line 340 of file sbGStreamerMediacoreUtils.cpp.
|
static |
Definition at line 760 of file sbGStreamerMediacoreUtils.cpp.
|
static |
Definition at line 379 of file sbGStreamerMediacoreUtils.cpp.