Menu
Home
Blog
Add-ons
Forum
Wiki
Developers
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
components
mediacore
gstreamer
src
sbGStreamerMediaContainer.h
Go to the documentation of this file.
1
/*
2
*=BEGIN SONGBIRD GPL
3
*
4
* This file is part of the Songbird web player.
5
*
6
* Copyright(c) 2005-2012 POTI, Inc.
7
* http://www.songbirdnest.com
8
*
9
* This file may be licensed under the terms of of the
10
* GNU General Public License Version 2 (the ``GPL'').
11
*
12
* Software distributed under the License is distributed
13
* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14
* express or implied. See the GPL for the specific language
15
* governing rights and limitations.
16
*
17
* You should have received a copy of the GPL along with this
18
* program. If not, go to http://www.gnu.org/licenses/gpl.html
19
* or write to the Free Software Foundation, Inc.,
20
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
*
22
*=END SONGBIRD GPL
23
*/
24
25
#pragma once
26
27
28
29
#include "nsStringAPI.h"
30
#include "sbIMediaContainer.h"
31
#include "gst/gst.h"
32
33
34
35
class
sbGStreamerMediaContainer
:
public
sbIMediaContainer
36
{
37
public
:
38
NS_DECL_ISUPPORTS
39
NS_DECL_SBIMEDIACONTAINER
40
41
~sbGStreamerMediaContainer
();
42
43
sbGStreamerMediaContainer
();
44
45
nsresult
Init
();
46
47
private
:
48
nsresult
49
AcquireMimeType_Priv();
50
51
static
52
void
53
OnHaveType_Priv (
54
GstElement * typefind,
55
guint probability,
56
GstCaps * caps,
57
gpointer user_data);
58
59
static
60
gboolean
61
OnBusMessage_Priv (
62
GstBus * bus,
63
GstMessage *
message
,
64
gpointer
data
);
65
66
static
67
gboolean
68
OnMainLoopDone_Priv (
69
gpointer user_data);
70
71
static
72
void
73
OnPrerollDone_Priv (
74
gpointer user_data);
75
76
private
:
77
GMainLoop * mLoop;
80
81
//
82
// The typefind pipeline topology is:
83
//
84
// ...[ GstPipeline ]....................................
85
// . .
86
// . +----------+ +----------+ +----------+ .
87
// . | filesrc | --> | typefind | --> | fakesink | .
88
// . +----------+ +----------+ +----------+ .
89
// . .
90
// ......................................................
91
//
92
// The following variables hold the elements:
93
//
94
GstPipeline * mPipeline;
95
GstElement * mFilesrc;
96
GstElement * mTypefind;
97
GstElement * mSink;
98
99
nsCString mPath;
105
106
GstCaps * mCaps;
110
111
nsCString mMimeType;
116
};
117
118
#define SB_GSTREAMER_MEDIACONTAINER_CLASSNAME \
119
"sbGStreamerMediaContainer"
120
#define SB_GSTREAMER_MEDIACONTAINER_CID \
121
{0x4da451c0, 0xa11a, 0x42bc, {0x85, 0xed, 0xa2, 0x4c, 0x4, 0xbd, 0xdd, 0xa5}}
122
// {4DA451C0-A11A-42bc-85ED-A24C04BDDDA5}
123
// SB_MEDIACONTAINER_CONTRACTID is defined in sbIMediaInspector.idl/.h
124
#define SB_GSTREAMER_MEDIACONTAINER_CONTRACTID \
125
SB_MEDIACONTAINER_CONTRACTID
126
#define SB_GSTREAMER_MEDIACONTAINER_DESCRIPTION \
127
"Songbird GStreamer Media Container"
sbGStreamerMediaContainer::Init
nsresult Init()
Definition:
sbGStreamerMediaContainer.cpp:121
sbGStreamerMediaContainer::~sbGStreamerMediaContainer
NS_DECL_ISUPPORTS NS_DECL_SBIMEDIACONTAINER ~sbGStreamerMediaContainer()
Definition:
sbGStreamerMediaContainer.cpp:81
sbGStreamerMediaContainer
Definition:
sbGStreamerMediaContainer.h:35
message
GstMessage * message
Definition:
sbGStreamerMediacoreUtils.cpp:314
NS_DECL_ISUPPORTS
NS_DECL_ISUPPORTS
Definition:
sbPlaylistCommandsHelper.cpp:49
sbGStreamerMediaContainer::sbGStreamerMediaContainer
sbGStreamerMediaContainer()
Definition:
sbGStreamerMediaContainer.cpp:108
sbIMediaContainer
Definition:
sbIMediaContainer.idl:40
data
observe data
Definition:
FeedWriter.js:1329