@@ -56,121 +56,121 @@ OpenMAXILPlayerService::OpenMAXILPlayerService(QObject *parent):
56
56
, m_videoRenderer(0 )
57
57
, m_videoReferenceCount(0 )
58
58
{
59
- log_verbose (" Instantiating QMediaService..." );
59
+ log_verbose (" Instantiating QMediaService..." );
60
60
61
- m_control = new OpenMAXILPlayerControl (this );
62
- m_metaData = new OpenMAXILMetaDataProvider (m_control, this );
63
- m_streamsControl = new OpenMAXILStreamsControl (this );
64
- m_availabilityControl = new OpenMAXILAvailabilityControl (this );
65
- m_videoRenderer = new OpenMAXILVideoRendererControl (m_control, this );
66
- m_videoProbe = new OpenMAXILVideoProbe (this );
61
+ m_control = new OpenMAXILPlayerControl (this );
62
+ m_metaData = new OpenMAXILMetaDataProvider (m_control, this );
63
+ m_streamsControl = new OpenMAXILStreamsControl (this );
64
+ m_availabilityControl = new OpenMAXILAvailabilityControl (this );
65
+ m_videoRenderer = new OpenMAXILVideoRendererControl (m_control, this );
66
+ m_videoProbe = new OpenMAXILVideoProbe (this );
67
67
68
- m_control->setVideoRenderer (m_videoRenderer);
68
+ m_control->setVideoRenderer (m_videoRenderer);
69
69
70
- connect (m_videoRenderer, SIGNAL (frameReady (QVideoFrame)),
71
- m_videoProbe, SIGNAL (videoFrameProbed (QVideoFrame)));
70
+ connect (m_videoRenderer, SIGNAL (frameReady (QVideoFrame)),
71
+ m_videoProbe, SIGNAL (videoFrameProbed (QVideoFrame)));
72
72
}
73
73
74
74
/* ------------------------------------------------------------------------------
75
75
| OpenMAXILPlayerControl::~OpenMAXILPlayerControl
76
76
+-----------------------------------------------------------------------------*/
77
77
OpenMAXILPlayerService::~OpenMAXILPlayerService ()
78
78
{
79
- log_dtor_func;
79
+ log_dtor_func;
80
80
}
81
81
82
82
QMediaControl *OpenMAXILPlayerService::requestControl (const char *name)
83
83
{
84
- qDebug (" Requesting control for %s..." , name);
84
+ qDebug (" Requesting control for %s..." , name);
85
85
86
- if (qstrcmp (name, QMediaPlayerControl_iid) == 0 )
87
- return m_control;
86
+ if (qstrcmp (name, QMediaPlayerControl_iid) == 0 )
87
+ return m_control;
88
88
89
- if (qstrcmp (name, QMetaDataReaderControl_iid) == 0 )
90
- return m_metaData;
89
+ if (qstrcmp (name, QMetaDataReaderControl_iid) == 0 )
90
+ return m_metaData;
91
91
92
- if (qstrcmp (name, QMediaVideoProbeControl_iid) == 0 )
93
- return m_videoProbe;
92
+ if (qstrcmp (name, QMediaVideoProbeControl_iid) == 0 )
93
+ return m_videoProbe;
94
94
95
95
#if 0
96
- if (qstrcmp(name, QMediaStreamsControl_iid) == 0)
97
- return 0;
98
-
99
- if (qstrcmp(name, QMediaAvailabilityControl_iid) == 0)
100
- return 0;
101
-
102
- if (qstrcmp(name, QMediaVideoProbeControl_iid) == 0) {
103
- return 0;
104
- //if (m_session) {
105
- // QGstreamerVideoProbeControl *probe = new QGstreamerVideoProbeControl(this);
106
- // increaseVideoRef();
107
- // m_session->addProbe(probe);
108
- // return probe;
109
- //}
110
- //return 0;
111
- }
112
-
113
- if (qstrcmp(name, QMediaAudioProbeControl_iid) == 0) {
114
- //if (m_session) {
115
- // QGstreamerAudioProbeControl *probe = new QGstreamerAudioProbeControl(this);
116
- // m_session->addProbe(probe);
117
- // return probe;
118
- //}
119
- return 0;
120
- }
96
+ if (qstrcmp(name, QMediaStreamsControl_iid) == 0)
97
+ return 0;
98
+
99
+ if (qstrcmp(name, QMediaAvailabilityControl_iid) == 0)
100
+ return 0;
101
+
102
+ if (qstrcmp(name, QMediaVideoProbeControl_iid) == 0) {
103
+ return 0;
104
+ //if (m_session) {
105
+ // QGstreamerVideoProbeControl *probe = new QGstreamerVideoProbeControl(this);
106
+ // increaseVideoRef();
107
+ // m_session->addProbe(probe);
108
+ // return probe;
109
+ //}
110
+ //return 0;
111
+ }
112
+
113
+ if (qstrcmp(name, QMediaAudioProbeControl_iid) == 0) {
114
+ //if (m_session) {
115
+ // QGstreamerAudioProbeControl *probe = new QGstreamerAudioProbeControl(this);
116
+ // m_session->addProbe(probe);
117
+ // return probe;
118
+ //}
119
+ return 0;
120
+ }
121
121
#endif
122
122
123
- if (qstrcmp (name, QVideoRendererControl_iid) == 0 )
124
- return m_videoRenderer;
123
+ if (qstrcmp (name, QVideoRendererControl_iid) == 0 )
124
+ return m_videoRenderer;
125
125
126
126
#if 0
127
- if (!m_videoOutput) {
128
- if (qstrcmp(name, QVideoRendererControl_iid) == 0)
129
- m_videoOutput = m_videoRenderer;
127
+ if (!m_videoOutput) {
128
+ if (qstrcmp(name, QVideoRendererControl_iid) == 0)
129
+ m_videoOutput = m_videoRenderer;
130
130
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
131
- else if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
132
- m_videoOutput = m_videoWidget;
133
- else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
134
- m_videoOutput = m_videoWindow;
131
+ else if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
132
+ m_videoOutput = m_videoWidget;
133
+ else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
134
+ m_videoOutput = m_videoWindow;
135
135
#endif
136
136
137
- if (m_videoOutput) {
138
- increaseVideoRef();
139
- m_control->setVideoOutput(m_videoOutput);
140
- return m_videoOutput;
141
- }
142
- }
137
+ if (m_videoOutput) {
138
+ increaseVideoRef();
139
+ m_control->setVideoOutput(m_videoOutput);
140
+ return m_videoOutput;
141
+ }
142
+ }
143
143
#endif
144
144
145
- return 0 ;
145
+ return 0 ;
146
146
}
147
147
148
148
void OpenMAXILPlayerService::releaseControl (QMediaControl *control)
149
149
{
150
150
#if 0
151
- if (control == m_videoOutput) {
152
- m_videoOutput = 0;
153
- m_control->setVideoOutput(0);
154
- decreaseVideoRef();
155
- }
156
-
157
- QGstreamerVideoProbeControl* videoProbe = qobject_cast<QGstreamerVideoProbeControl*>(control);
158
- if (videoProbe) {
159
- if (m_session) {
160
- m_session->removeProbe(videoProbe);
161
- decreaseVideoRef();
162
- }
163
- delete videoProbe;
164
- return;
165
- }
166
-
167
- QGstreamerAudioProbeControl* audioProbe = qobject_cast<QGstreamerAudioProbeControl*>(control);
168
- if (audioProbe) {
169
- if (m_session)
170
- m_session->removeProbe(audioProbe);
171
- delete audioProbe;
172
- return;
173
- }
151
+ if (control == m_videoOutput) {
152
+ m_videoOutput = 0;
153
+ m_control->setVideoOutput(0);
154
+ decreaseVideoRef();
155
+ }
156
+
157
+ QGstreamerVideoProbeControl* videoProbe = qobject_cast<QGstreamerVideoProbeControl*>(control);
158
+ if (videoProbe) {
159
+ if (m_session) {
160
+ m_session->removeProbe(videoProbe);
161
+ decreaseVideoRef();
162
+ }
163
+ delete videoProbe;
164
+ return;
165
+ }
166
+
167
+ QGstreamerAudioProbeControl* audioProbe = qobject_cast<QGstreamerAudioProbeControl*>(control);
168
+ if (audioProbe) {
169
+ if (m_session)
170
+ m_session->removeProbe(audioProbe);
171
+ delete audioProbe;
172
+ return;
173
+ }
174
174
#endif
175
175
}
176
176
0 commit comments