Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
b45b8530
Unverified
Commit
b45b8530
authored
Feb 10, 2020
by
Gus Grubba
Committed by
GitHub
Feb 10, 2020
Browse files
Merge pull request #8287 from andrewvoznytsa/PR-automatic-pipelines
Automatic pipelines support
parents
a7774f1b
0a8f58e8
Changes
17
Hide whitespace changes
Inline
Side-by-side
android.pri
View file @
b45b8530
...
...
@@ -16,7 +16,11 @@ OTHER_FILES += \
$$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \
$$PWD/android/src/org/mavlink/qgroundcontrol/QGCActivity.java \
$$PWD/android/src/org/mavlink/qgroundcontrol/UsbIoManager.java \
$$PWD/android/src/org/mavlink/qgroundcontrol/TaiSync.java
$$PWD/android/src/org/mavlink/qgroundcontrol/TaiSync.java \
$$PWD/android/src/org/freedesktop/gstreamer/androidmedia/GstAhcCallback.java \
$$PWD/android/src/org/freedesktop/gstreamer/androidmedia/GstAhsCallback.java \
$$PWD/android/src/org/freedesktop/gstreamer/androidmedia/GstAmcOnFrameAvailableListener.java
DISTFILES += \
$$PWD/android/gradle/wrapper/gradle-wrapper.jar \
...
...
android/src/org/freedesktop/gstreamer/androidmedia/GstAhcCallback.java
0 → 100644
View file @
b45b8530
/*
* Copyright (C) 2012, Collabora Ltd.
* Author: Youness Alaoui
*
* Copyright (C) 2015, Collabora Ltd.
* Author: Justin Kim <justin.kim@collabora.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
package
org.freedesktop.gstreamer.androidmedia
;
import
android.hardware.Camera
;
public
class
GstAhcCallback
implements
Camera
.
PreviewCallback
,
Camera
.
ErrorCallback
,
Camera
.
AutoFocusCallback
{
public
long
mUserData
;
public
long
mCallback
;
public
static
native
void
gst_ah_camera_on_preview_frame
(
byte
[]
data
,
Camera
camera
,
long
callback
,
long
user_data
);
public
static
native
void
gst_ah_camera_on_error
(
int
error
,
Camera
camera
,
long
callback
,
long
user_data
);
public
static
native
void
gst_ah_camera_on_auto_focus
(
boolean
success
,
Camera
camera
,
long
callback
,
long
user_data
);
public
GstAhcCallback
(
long
callback
,
long
user_data
)
{
mCallback
=
callback
;
mUserData
=
user_data
;
}
@Override
public
void
onPreviewFrame
(
byte
[]
data
,
Camera
camera
)
{
gst_ah_camera_on_preview_frame
(
data
,
camera
,
mCallback
,
mUserData
);
}
@Override
public
void
onError
(
int
error
,
Camera
camera
)
{
gst_ah_camera_on_error
(
error
,
camera
,
mCallback
,
mUserData
);
}
@Override
public
void
onAutoFocus
(
boolean
success
,
Camera
camera
)
{
gst_ah_camera_on_auto_focus
(
success
,
camera
,
mCallback
,
mUserData
);
}
}
android/src/org/freedesktop/gstreamer/androidmedia/GstAhsCallback.java
0 → 100644
View file @
b45b8530
/*
* Copyright (C) 2016 SurroundIO
* Author: Martin Kelly <martin@surround.io>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
package
org.freedesktop.gstreamer.androidmedia
;
import
android.hardware.Sensor
;
import
android.hardware.SensorEvent
;
import
android.hardware.SensorEventListener
;
public
class
GstAhsCallback
implements
SensorEventListener
{
public
long
mUserData
;
public
long
mSensorCallback
;
public
long
mAccuracyCallback
;
public
static
native
void
gst_ah_sensor_on_sensor_changed
(
SensorEvent
event
,
long
callback
,
long
user_data
);
public
static
native
void
gst_ah_sensor_on_accuracy_changed
(
Sensor
sensor
,
int
accuracy
,
long
callback
,
long
user_data
);
public
GstAhsCallback
(
long
sensor_callback
,
long
accuracy_callback
,
long
user_data
)
{
mSensorCallback
=
sensor_callback
;
mAccuracyCallback
=
accuracy_callback
;
mUserData
=
user_data
;
}
@Override
public
void
onSensorChanged
(
SensorEvent
event
)
{
gst_ah_sensor_on_sensor_changed
(
event
,
mSensorCallback
,
mUserData
);
}
@Override
public
void
onAccuracyChanged
(
Sensor
sensor
,
int
accuracy
)
{
gst_ah_sensor_on_accuracy_changed
(
sensor
,
accuracy
,
mAccuracyCallback
,
mUserData
);
}
}
android/src/org/freedesktop/gstreamer/androidmedia/GstAmcOnFrameAvailableListener.java
0 → 100644
View file @
b45b8530
/*
* Copyright (C) 2015, Collabora Ltd.
* Author: Matthieu Bouron <matthieu.bouron@collabora.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
package
org.freedesktop.gstreamer.androidmedia
;
import
android.graphics.SurfaceTexture
;
import
android.graphics.SurfaceTexture.OnFrameAvailableListener
;
public
class
GstAmcOnFrameAvailableListener
implements
OnFrameAvailableListener
{
private
long
context
=
0
;
public
synchronized
void
onFrameAvailable
(
SurfaceTexture
surfaceTexture
)
{
native_onFrameAvailable
(
context
,
surfaceTexture
);
}
public
synchronized
long
getContext
()
{
return
context
;
}
public
synchronized
void
setContext
(
long
c
)
{
context
=
c
;
}
private
native
void
native_onFrameAvailable
(
long
context
,
SurfaceTexture
surfaceTexture
);
}
android/src/org/mavlink/qgroundcontrol/QGCActivity.java
View file @
b45b8530
...
...
@@ -183,7 +183,7 @@ public class QGCActivity extends QtActivity
public
static
native
void
qgcLogDebug
(
String
message
);
public
static
native
void
qgcLogWarning
(
String
message
);
p
rivate
stat
ic
native
void
nativeInit
();
p
ubl
ic
native
void
nativeInit
();
// QGCActivity singleton
public
QGCActivity
()
...
...
@@ -198,6 +198,7 @@ public class QGCActivity extends QtActivity
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
nativeInit
();
PowerManager
pm
=
(
PowerManager
)
_instance
.
getSystemService
(
Context
.
POWER_SERVICE
);
_wakeLock
=
pm
.
newWakeLock
(
PowerManager
.
SCREEN_BRIGHT_WAKE_LOCK
,
"QGroundControl"
);
if
(
_wakeLock
!=
null
)
{
...
...
@@ -743,10 +744,5 @@ public class QGCActivity extends QtActivity
}
}).
start
();
}
public
void
jniOnLoad
()
{
nativeInit
();
}
}
custom-example/src/CustomVideoManager.cc
View file @
b45b8530
...
...
@@ -24,16 +24,6 @@ CustomVideoManager::_updateSettings()
{
if
(
!
_videoSettings
||
!
_videoReceiver
)
return
;
//-- Check encoding
if
(
_activeVehicle
&&
_activeVehicle
->
dynamicCameras
())
{
auto
*
pCamera
=
qobject_cast
<
CustomCameraControl
*>
(
_activeVehicle
->
dynamicCameras
()
->
currentCameraInstance
());
if
(
pCamera
)
{
Fact
*
fact
=
pCamera
->
videoEncoding
();
if
(
fact
)
{
_videoReceiver
->
setVideoDecoder
(
static_cast
<
VideoReceiver
::
VideoEncoding
>
(
fact
->
rawValue
().
toInt
()));
}
}
}
VideoManager
::
_updateSettings
();
}
custom-example/src/FirmwarePlugin/CustomCameraControl.cc
View file @
b45b8530
...
...
@@ -19,7 +19,6 @@ QGC_LOGGING_CATEGORY(CustomCameraVerboseLog, "CustomCameraVerboseLog")
static
const
char
*
kCAM_IRPALETTE
=
"CAM_IRPALETTE"
;
static
const
char
*
kCAM_NEXTVISION_IRPALETTE
=
"IR_SENS_POL"
;
static
const
char
*
kCAM_ENC
=
"CAM_ENC"
;
//-----------------------------------------------------------------------------
CustomCameraControl
::
CustomCameraControl
(
const
mavlink_camera_information_t
*
info
,
Vehicle
*
vehicle
,
int
compID
,
QObject
*
parent
)
...
...
@@ -117,13 +116,6 @@ CustomCameraControl::irPalette()
return
nullptr
;
}
//-----------------------------------------------------------------------------
Fact
*
CustomCameraControl
::
videoEncoding
()
{
return
_paramComplete
?
getFact
(
kCAM_ENC
)
:
nullptr
;
}
//-----------------------------------------------------------------------------
void
CustomCameraControl
::
setThermalMode
(
ThermalViewMode
mode
)
...
...
custom-example/src/FirmwarePlugin/CustomCameraControl.h
View file @
b45b8530
...
...
@@ -29,10 +29,8 @@ public:
CustomCameraControl
(
const
mavlink_camera_information_t
*
info
,
Vehicle
*
vehicle
,
int
compID
,
QObject
*
parent
=
nullptr
);
Q_PROPERTY
(
Fact
*
irPalette
READ
irPalette
NOTIFY
parametersReady
)
Q_PROPERTY
(
Fact
*
videoEncoding
READ
videoEncoding
NOTIFY
parametersReady
)
Fact
*
irPalette
();
Fact
*
videoEncoding
();
bool
takePhoto
()
override
;
bool
stopTakePhoto
()
override
;
...
...
src/FlightDisplay/VideoManager.cc
View file @
b45b8530
...
...
@@ -282,8 +282,44 @@ VideoManager::setfullScreen(bool f)
//-----------------------------------------------------------------------------
#if defined(QGC_GST_STREAMING)
gboolean
VideoManager
::
_videoSinkQuery
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
)
{
GstElement
*
element
;
switch
(
GST_QUERY_TYPE
(
query
))
{
case
GST_QUERY_CAPS
:
element
=
gst_bin_get_by_name
(
GST_BIN
(
parent
),
"glupload"
);
break
;
case
GST_QUERY_CONTEXT
:
element
=
gst_bin_get_by_name
(
GST_BIN
(
parent
),
"qmlglsink"
);
break
;
default:
return
gst_pad_query_default
(
pad
,
parent
,
query
);
}
if
(
element
==
nullptr
)
{
qWarning
()
<<
"VideoManager::_videoSinkQuery(): No element found"
;
return
FALSE
;
}
GstPad
*
sinkpad
=
gst_element_get_static_pad
(
element
,
"sink"
);
if
(
sinkpad
==
nullptr
)
{
qWarning
()
<<
"VideoManager::_videoSinkQuery(): No sink pad found"
;
return
FALSE
;
}
const
gboolean
ret
=
gst_pad_query
(
sinkpad
,
query
);
gst_object_unref
(
sinkpad
);
sinkpad
=
nullptr
;
return
ret
;
}
GstElement
*
VideoManager
::
_makeVideoSink
(
const
QString
&
widget
Name
)
VideoManager
::
_makeVideoSink
(
gpointer
widget
)
{
GstElement
*
glupload
=
nullptr
;
GstElement
*
glcolorconvert
=
nullptr
;
...
...
@@ -292,31 +328,17 @@ VideoManager::_makeVideoSink(const QString& widgetName)
GstElement
*
sink
=
nullptr
;
do
{
QQuickItem
*
root
=
qgcApp
()
->
mainRootWindow
();
if
(
root
==
nullptr
)
{
qCDebug
(
VideoManagerLog
)
<<
"VideoManager::_makeVideoSink() failed. No root window"
;
break
;
}
QQuickItem
*
widget
=
root
->
findChild
<
QQuickItem
*>
(
widgetName
);
if
(
widget
==
nullptr
)
{
qCDebug
(
VideoManagerLog
)
<<
"VideoManager::_makeVideoSink() failed. Widget
\'
"
<<
widgetName
<<
"
\'
not found"
;
break
;
}
if
((
glupload
=
gst_element_factory_make
(
"glupload"
,
nullptr
))
==
nullptr
)
{
if
((
glupload
=
gst_element_factory_make
(
"glupload"
,
"glupload"
))
==
nullptr
)
{
qCritical
()
<<
"VideoManager::_makeVideoSink() failed. Error with gst_element_factory_make('glupload')"
;
break
;
}
if
((
glcolorconvert
=
gst_element_factory_make
(
"glcolorconvert"
,
nullptr
))
==
nullptr
)
{
if
((
glcolorconvert
=
gst_element_factory_make
(
"glcolorconvert"
,
"glcolorconvert"
))
==
nullptr
)
{
qCritical
()
<<
"VideoManager::_makeVideoSink() failed. Error with gst_element_factory_make('glcolorconvert')"
;
break
;
}
if
((
qmlglsink
=
gst_element_factory_make
(
"qmlglsink"
,
nullptr
))
==
nullptr
)
{
if
((
qmlglsink
=
gst_element_factory_make
(
"qmlglsink"
,
"qmlglsink"
))
==
nullptr
)
{
qCritical
()
<<
"VideoManager::_makeVideoSink() failed. Error with gst_element_factory_make('qmlglsink')"
;
break
;
}
...
...
@@ -336,6 +358,7 @@ VideoManager::_makeVideoSink(const QString& widgetName)
}
gst_bin_add_many
(
GST_BIN
(
bin
),
glupload
,
glcolorconvert
,
qmlglsink
,
nullptr
);
gboolean
ret
=
gst_element_link_many
(
glupload
,
glcolorconvert
,
qmlglsink
,
nullptr
);
qmlglsink
=
glcolorconvert
=
glupload
=
nullptr
;
...
...
@@ -345,7 +368,12 @@ VideoManager::_makeVideoSink(const QString& widgetName)
break
;
}
gst_element_add_pad
(
bin
,
gst_ghost_pad_new
(
"sink"
,
pad
));
GstPad
*
ghostpad
=
gst_ghost_pad_new
(
"sink"
,
pad
);
gst_pad_set_query_function
(
ghostpad
,
_videoSinkQuery
);
gst_element_add_pad
(
bin
,
ghostpad
);
gst_object_unref
(
pad
);
pad
=
nullptr
;
...
...
@@ -382,8 +410,28 @@ void
VideoManager
::
_initVideo
()
{
#if defined(QGC_GST_STREAMING)
_videoReceiver
->
setVideoSink
(
_makeVideoSink
(
"videoContent"
));
_thermalVideoReceiver
->
setVideoSink
(
_makeVideoSink
(
"thermalVideo"
));
QQuickItem
*
root
=
qgcApp
()
->
mainRootWindow
();
if
(
root
==
nullptr
)
{
qCDebug
(
VideoManagerLog
)
<<
"VideoManager::_makeVideoSink() failed. No root window"
;
return
;
}
QQuickItem
*
widget
=
root
->
findChild
<
QQuickItem
*>
(
"videoContent"
);
if
(
widget
!=
nullptr
)
{
_videoReceiver
->
setVideoSink
(
_makeVideoSink
(
widget
));
}
else
{
qCDebug
(
VideoManagerLog
)
<<
"VideoManager::_makeVideoSink() failed. 'videoContent' widget not found"
;
}
widget
=
root
->
findChild
<
QQuickItem
*>
(
"thermalVideo"
);
if
(
widget
!=
nullptr
)
{
_thermalVideoReceiver
->
setVideoSink
(
_makeVideoSink
(
widget
));
}
else
{
qCDebug
(
VideoManagerLog
)
<<
"VideoManager::_makeVideoSink() failed. 'thermalVideo' widget not found"
;
}
#endif
}
...
...
src/FlightDisplay/VideoManager.h
View file @
b45b8530
...
...
@@ -105,7 +105,8 @@ protected slots:
protected:
friend
class
FinishVideoInitialization
;
#if defined(QGC_GST_STREAMING)
GstElement
*
_makeVideoSink
(
const
QString
&
widgetName
);
static
gboolean
_videoSinkQuery
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
);
GstElement
*
_makeVideoSink
(
gpointer
widget
);
#endif
void
_initVideo
();
void
_updateSettings
();
...
...
src/VideoStreaming/VideoReceiver.cc
View file @
b45b8530
...
...
@@ -75,12 +75,9 @@ VideoReceiver::VideoReceiver(QObject* parent)
,
_videoRunning
(
false
)
,
_showFullScreen
(
false
)
,
_videoSettings
(
nullptr
)
,
_hwDecoderName
(
nullptr
)
,
_swDecoderName
(
"avdec_h264"
)
{
_videoSettings
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
videoSettings
();
#if defined(QGC_GST_STREAMING)
setVideoDecoder
(
H264_SW
);
_restart_timer
.
setSingleShot
(
true
);
connect
(
&
_restart_timer
,
&
QTimer
::
timeout
,
this
,
&
VideoReceiver
::
_restart_timeout
);
_tcp_timer
.
setSingleShot
(
true
);
...
...
@@ -126,6 +123,310 @@ newPadCB(GstElement* element, GstPad* pad, gpointer data)
g_free
(
name
);
}
static
gboolean
autoplugQueryCaps
(
GstElement
*
bin
,
GstPad
*
pad
,
GstElement
*
element
,
GstQuery
*
query
,
gpointer
data
)
{
GstElement
*
glupload
=
(
GstElement
*
)
data
;
GstPad
*
sinkpad
=
gst_element_get_static_pad
(
glupload
,
"sink"
);
if
(
!
sinkpad
)
{
qCritical
()
<<
"autoplugQueryCaps(): No sink pad found"
;
return
FALSE
;
}
GstCaps
*
filter
;
gst_query_parse_caps
(
query
,
&
filter
);
GstCaps
*
sinkcaps
=
gst_pad_query_caps
(
sinkpad
,
filter
);
gst_query_set_caps_result
(
query
,
sinkcaps
);
const
gboolean
ret
=
!
gst_caps_is_empty
(
sinkcaps
);
gst_caps_unref
(
sinkcaps
);
sinkcaps
=
nullptr
;
gst_object_unref
(
sinkpad
);
sinkpad
=
nullptr
;
return
ret
;
}
static
gboolean
autoplugQueryContext
(
GstElement
*
bin
,
GstPad
*
pad
,
GstElement
*
element
,
GstQuery
*
query
,
gpointer
data
)
{
GstElement
*
glsink
=
(
GstElement
*
)
data
;
GstPad
*
sinkpad
=
gst_element_get_static_pad
(
glsink
,
"sink"
);
if
(
!
sinkpad
){
qCritical
()
<<
"autoplugQueryContext(): No sink pad found"
;
return
FALSE
;
}
const
gboolean
ret
=
gst_pad_query
(
sinkpad
,
query
);
gst_object_unref
(
sinkpad
);
sinkpad
=
nullptr
;
return
ret
;
}
static
gboolean
autoplugQueryCB
(
GstElement
*
bin
,
GstPad
*
pad
,
GstElement
*
element
,
GstQuery
*
query
,
gpointer
data
)
{
gboolean
ret
;
switch
(
GST_QUERY_TYPE
(
query
))
{
case
GST_QUERY_CAPS
:
ret
=
autoplugQueryCaps
(
bin
,
pad
,
element
,
query
,
data
);
break
;
case
GST_QUERY_CONTEXT
:
ret
=
autoplugQueryContext
(
bin
,
pad
,
element
,
query
,
data
);
break
;
default:
ret
=
FALSE
;
break
;
}
return
ret
;
}
//-----------------------------------------------------------------------------
static
void
_wrapWithGhostPad
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
)
{
gchar
*
name
=
gst_pad_get_name
(
pad
);
GstPad
*
ghostpad
=
gst_ghost_pad_new
(
name
,
pad
);
g_free
(
name
);
gst_pad_set_active
(
ghostpad
,
TRUE
);
if
(
!
gst_element_add_pad
(
GST_ELEMENT_PARENT
(
element
),
ghostpad
))
{
qCritical
()
<<
"Failed to add ghost pad to source"
;
}
}
static
void
_linkPadWithOptionalBuffer
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
)
{
gboolean
isRtpPad
=
FALSE
;
GstCaps
*
filter
=
gst_caps_from_string
(
"application/x-rtp"
);
if
(
filter
!=
nullptr
)
{
GstCaps
*
caps
;
if
((
caps
=
gst_pad_query_caps
(
pad
,
filter
))
&&
!
gst_caps_is_empty
(
caps
))
{
qDebug
()
<<
gst_caps_to_string
(
caps
);
isRtpPad
=
TRUE
;
gst_caps_unref
(
caps
);
caps
=
nullptr
;
}
gst_caps_unref
(
filter
);
filter
=
nullptr
;
}
if
(
isRtpPad
)
{
GstElement
*
buffer
;
if
((
buffer
=
gst_element_factory_make
(
"rtpjitterbuffer"
,
nullptr
))
!=
nullptr
)
{
gst_bin_add
(
GST_BIN
(
GST_ELEMENT_PARENT
(
element
)),
buffer
);
gst_element_sync_state_with_parent
(
buffer
);
GstPad
*
sinkpad
=
gst_element_get_static_pad
(
buffer
,
"sink"
);
if
(
sinkpad
!=
nullptr
)
{
const
GstPadLinkReturn
ret
=
gst_pad_link
(
pad
,
sinkpad
);
gst_object_unref
(
sinkpad
);
sinkpad
=
nullptr
;
if
(
ret
==
GST_PAD_LINK_OK
)
{
pad
=
gst_element_get_static_pad
(
buffer
,
"src"
);
element
=
buffer
;
}
else
{
qCritical
()
<<
"_wrapWithGhostPad partially failed. Error with gst_pad_link()"
;
}
}
else
{
qCritical
()
<<
"_wrapWithGhostPad partially failed. Error with gst_element_get_static_pad()"
;
}
}
else
{
qCritical
()
<<
"_wrapWithGhostPad partially failed. Error with gst_element_factory_make('rtpjitterbuffer')"
;
}
}
newPadCB
(
element
,
pad
,
data
);
}
static
gboolean
_padProbe
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
user_data
)
{
int
*
probeRes
=
(
int
*
)
user_data
;
*
probeRes
|=
1
;
GstCaps
*
filter
=
gst_caps_from_string
(
"application/x-rtp"
);
if
(
filter
!=
nullptr
)
{
GstCaps
*
caps
;
if
((
caps
=
gst_pad_query_caps
(
pad
,
filter
))
&&
!
gst_caps_is_empty
(
caps
))
{
*
probeRes
|=
2
;
gst_caps_unref
(
caps
);
caps
=
nullptr
;
}
gst_caps_unref
(
filter
);
filter
=
nullptr
;
}
return
TRUE
;
}
GstElement
*
VideoReceiver
::
_makeSource
(
const
QString
&
uri
)
{
if
(
uri
.
isEmpty
())
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed because URI is not specified"
;
return
nullptr
;
}
bool
isTaisync
=
uri
.
contains
(
"tsusb://"
);
bool
isUdp264
=
uri
.
contains
(
"udp://"
);
bool
isRtsp
=
uri
.
contains
(
"rtsp://"
);
bool
isUdp265
=
uri
.
contains
(
"udp265://"
);
bool
isTcpMPEGTS
=
uri
.
contains
(
"tcp://"
);
bool
isUdpMPEGTS
=
uri
.
contains
(
"mpegts://"
);
GstElement
*
source
=
nullptr
;
GstElement
*
buffer
=
nullptr
;
GstElement
*
parser
=
nullptr
;
GstElement
*
bin
=
nullptr
;
GstElement
*
srcbin
=
nullptr
;
do
{
QUrl
url
(
uri
);
if
(
isTcpMPEGTS
)
{
if
((
source
=
gst_element_factory_make
(
"tcpclientsrc"
,
"source"
))
!=
nullptr
)
{
g_object_set
(
static_cast
<
gpointer
>
(
source
),
"host"
,
qPrintable
(
url
.
host
()),
"port"
,
url
.
port
(),
nullptr
);
}
}
else
if
(
isRtsp
)
{
if
((
source
=
gst_element_factory_make
(
"rtspsrc"
,
"source"
))
!=
nullptr
)
{
g_object_set
(
static_cast
<
gpointer
>
(
source
),
"location"
,
qPrintable
(
uri
),
"latency"
,
17
,
"udp-reconnect"
,
1
,
"timeout"
,
_udpReconnect_us
,
NULL
);
}
}
else
if
(
isUdp264
||
isUdp265
||
isUdpMPEGTS
||
isTaisync
)
{
if
((
source
=
gst_element_factory_make
(
"udpsrc"
,
"source"
))
!=
nullptr
)
{
g_object_set
(
static_cast
<
gpointer
>
(
source
),
"uri"
,
QString
(
"udp://%1:%2"
).
arg
(
qPrintable
(
url
.
host
()),
QString
::
number
(
url
.
port
())).
toUtf8
().
data
(),
nullptr
);
GstCaps
*
caps
=
nullptr
;
if
(
isUdp264
)
{
if
((
caps
=
gst_caps_from_string
(
"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_caps_from_string()"
;
break
;
}
}
else
if
(
isUdp264
)
{
if
((
caps
=
gst_caps_from_string
(
"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_caps_from_string()"
;
break
;
}
}
if
(
caps
!=
nullptr
)
{
g_object_set
(
static_cast
<
gpointer
>
(
source
),
"caps"
,
caps
,
nullptr
);
gst_caps_unref
(
caps
);
caps
=
nullptr
;
}
}
}
else
{
qWarning
()
<<
"VideoReceiver::_makeSource(): URI is not recognized"
;
}
if
(
!
source
)
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_element_factory_make() for data source"
;
break
;
}
if
((
parser
=
gst_element_factory_make
(
"parsebin"
,
"parser"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_element_factory_make('parsebin')"
;
break
;
}
if
((
bin
=
gst_bin_new
(
"sourcebin"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_bin_new('sourcebin')"
;
break
;
}
gst_bin_add_many
(
GST_BIN
(
bin
),
source
,
parser
,
nullptr
);
int
probeRes
=
0
;
gst_element_foreach_src_pad
(
source
,
_padProbe
,
&
probeRes
);
if
(
probeRes
&
1
)
{
if
(
probeRes
&
2
)
{
if
((
buffer
=
gst_element_factory_make
(
"rtpjitterbuffer"
,
nullptr
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_element_factory_make('rtpjitterbuffer')"
;
break
;
}
gst_bin_add
(
GST_BIN
(
bin
),
buffer
);
if
(
!
gst_element_link_many
(
source
,
buffer
,
parser
,
nullptr
))
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_element_link()"
;
break
;
}
}
else
{
if
(
!
gst_element_link
(
source
,
parser
))
{
qCritical
()
<<
"VideoReceiver::_makeSource() failed. Error with gst_element_link()"
;
break
;
}
}
}
else
{
g_signal_connect
(
source
,
"pad-added"
,
G_CALLBACK
(
_linkPadWithOptionalBuffer
),
parser
);
}
g_signal_connect
(
parser
,
"pad-added"
,
G_CALLBACK
(
_wrapWithGhostPad
),
nullptr
);
source
=
buffer
=
parser
=
nullptr
;
srcbin
=
bin
;
bin
=
nullptr
;
}
while
(
0
);
if
(
bin
!=
nullptr
)
{
gst_object_unref
(
bin
);
bin
=
nullptr
;
}
if
(
parser
!=
nullptr
)
{
gst_object_unref
(
parser
);
parser
=
nullptr
;
}
if
(
buffer
!=
nullptr
)
{
gst_object_unref
(
buffer
);
buffer
=
nullptr
;
}
if
(
source
!=
nullptr
)
{
gst_object_unref
(
source
);
source
=
nullptr
;
}
return
srcbin
;
}
//-----------------------------------------------------------------------------
void
VideoReceiver
::
_restart_timeout
()
...
...
@@ -208,9 +509,6 @@ VideoReceiver::_socketError(QAbstractSocket::SocketError socketError)
void
VideoReceiver
::
start
()
{
if
(
_uri
.
isEmpty
())
{
return
;
}
qCDebug
(
VideoReceiverLog
)
<<
"start():"
<<
_uri
;
if
(
qgcApp
()
->
runningUnitTests
())
{
return
;
...
...
@@ -224,22 +522,22 @@ VideoReceiver::start()
#if defined(QGC_GST_STREAMING)
_stop
=
false
;
QString
uri
=
_uri
;
#if defined(QGC_GST_TAISYNC_ENABLED) && (defined(__android__) || defined(__ios__))
//-- Taisync on iOS or Android sends a raw h.264 stream
bool
isTaisyncUSB
=
qgcApp
()
->
toolbox
()
->
videoManager
()
->
isTaisync
()
;
#else
bool
isTaisyncUSB
=
false
;
if
(
qgcApp
()
->
toolbox
()
->
videoManager
()
->
isTaisync
()
)
{
uri
=
QString
(
"tsusb://0.0.0.0:%1"
).
arg
(
TAISYNC_VIDEO_UDP_PORT
);
}
#endif
bool
isUdp264
=
_uri
.
contains
(
"udp://"
)
&&
!
isTaisyncUSB
;
bool
isRtsp
=
_uri
.
contains
(
"rtsp://"
)
&&
!
isTaisyncUSB
;
bool
isUdp265
=
_uri
.
contains
(
"udp265://"
)
&&
!
isTaisyncUSB
;
bool
isTCP
=
_uri
.
contains
(
"tcp://"
)
&&
!
isTaisyncUSB
;
bool
isMPEGTS
=
_uri
.
contains
(
"mpegts://"
)
&&
!
isTaisyncUSB
;
if
(
!
isTaisyncUSB
&&
_
uri
.
isEmpty
())
{
if
(
uri
.
isEmpty
())
{
qCritical
()
<<
"VideoReceiver::start() failed because URI is not specified"
;
return
;
}
bool
useTcpConnection
=
uri
.
contains
(
"rtsp://"
)
||
uri
.
contains
(
"tcp://"
);
if
(
_videoSink
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed because video sink is not set"
;
return
;
...
...
@@ -248,16 +546,11 @@ VideoReceiver::start()
qCDebug
(
VideoReceiverLog
)
<<
"Already running!"
;
return
;
}
if
(
isUdp264
)
{
setVideoDecoder
(
H264_HW
);
}
else
if
(
isUdp265
)
{
setVideoDecoder
(
H265_HW
);
}
_starting
=
true
;
//-- For RTSP and TCP, check to see if server is there first
if
(
!
_serverPresent
&&
(
isRtsp
||
isTCP
)
)
{
if
(
!
_serverPresent
&&
useTcpConnection
)
{
_tcp_timer
.
start
(
100
);
return
;
}
...
...
@@ -268,13 +561,9 @@ VideoReceiver::start()
bool
running
=
false
;
bool
pipelineUp
=
false
;
GstElement
*
dataSource
=
nullptr
;
GstCaps
*
caps
=
nullptr
;
GstElement
*
demux
=
nullptr
;
GstElement
*
parser
=
nullptr
;
GstElement
*
queue
=
nullptr
;
GstElement
*
decoder
=
nullptr
;
GstElement
*
queue1
=
nullptr
;
GstElement
*
source
=
nullptr
;
GstElement
*
queue
=
nullptr
;
GstElement
*
decoder
=
nullptr
;
do
{
if
((
_pipeline
=
gst_pipeline_new
(
"receiver"
))
==
nullptr
)
{
...
...
@@ -282,63 +571,8 @@ VideoReceiver::start()
break
;
}
if
(
isUdp264
||
isUdp265
||
isMPEGTS
||
isTaisyncUSB
)
{
dataSource
=
gst_element_factory_make
(
"udpsrc"
,
"udp-source"
);
}
else
if
(
isTCP
)
{
dataSource
=
gst_element_factory_make
(
"tcpclientsrc"
,
"tcpclient-source"
);
}
else
{
dataSource
=
gst_element_factory_make
(
"rtspsrc"
,
"rtsp-source"
);
}
if
(
!
dataSource
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with data source for gst_element_factory_make()"
;
break
;
}
if
(
isUdp264
)
{
if
((
caps
=
gst_caps_from_string
(
"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with gst_caps_from_string()"
;
break
;
}
g_object_set
(
static_cast
<
gpointer
>
(
dataSource
),
"uri"
,
qPrintable
(
_uri
),
"caps"
,
caps
,
nullptr
);
}
else
if
(
isUdp265
)
{
if
((
caps
=
gst_caps_from_string
(
"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with gst_caps_from_string()"
;
break
;
}
g_object_set
(
static_cast
<
gpointer
>
(
dataSource
),
"uri"
,
qPrintable
(
_uri
.
replace
(
"udp265"
,
"udp"
)),
"caps"
,
caps
,
nullptr
);
#if defined(QGC_GST_TAISYNC_ENABLED) && (defined(__android__) || defined(__ios__))
}
else
if
(
isTaisyncUSB
)
{
QString
uri
=
QString
(
"0.0.0.0:%1"
).
arg
(
TAISYNC_VIDEO_UDP_PORT
);
qCDebug
(
VideoReceiverLog
)
<<
"Taisync URI:"
<<
uri
;
g_object_set
(
static_cast
<
gpointer
>
(
dataSource
),
"port"
,
TAISYNC_VIDEO_UDP_PORT
,
nullptr
);
#endif
}
else
if
(
isTCP
)
{
QUrl
url
(
_uri
);
g_object_set
(
static_cast
<
gpointer
>
(
dataSource
),
"host"
,
qPrintable
(
url
.
host
()),
"port"
,
url
.
port
(),
nullptr
);
}
else
if
(
isMPEGTS
)
{
QUrl
url
(
_uri
);
g_object_set
(
static_cast
<
gpointer
>
(
dataSource
),
"port"
,
url
.
port
(),
nullptr
);
}
else
{
g_object_set
(
static_cast
<
gpointer
>
(
dataSource
),
"location"
,
qPrintable
(
_uri
),
"latency"
,
17
,
"udp-reconnect"
,
1
,
"timeout"
,
_udpReconnect_us
,
NULL
);
}
if
(
isTCP
||
isMPEGTS
)
{
if
((
demux
=
gst_element_factory_make
(
"tsdemux"
,
"mpeg-ts-demuxer"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with gst_element_factory_make('tsdemux')"
;
break
;
}
}
else
{
if
(
!
isTaisyncUSB
)
{
if
((
demux
=
gst_element_factory_make
(
_depayName
,
"rtp-depacketizer"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with gst_element_factory_make('"
<<
_depayName
<<
"')"
;
break
;
}
}
}
if
((
parser
=
gst_element_factory_make
(
_parserName
,
"parser"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with gst_element_factory_make('"
<<
_parserName
<<
"')"
;
if
((
source
=
_makeSource
(
uri
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with _makeSource()"
;
break
;
}
...
...
@@ -354,57 +588,26 @@ VideoReceiver::start()
break
;
}
if
(
!
_hwDecoderName
||
(
decoder
=
gst_element_factory_make
(
_hwDecoderName
,
"decoder"
))
==
nullptr
)
{
qWarning
()
<<
"VideoReceiver::start() hardware decoding not available "
<<
((
_hwDecoderName
)
?
_hwDecoderName
:
""
);
if
((
decoder
=
gst_element_factory_make
(
_swDecoderName
,
"decoder"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with gst_element_factory_make('"
<<
_swDecoderName
<<
"')"
;
break
;
}
}
if
((
queue1
=
gst_element_factory_make
(
"queue"
,
nullptr
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with gst_element_factory_make('queue') [1]"
;
if
((
decoder
=
gst_element_factory_make
(
"decodebin"
,
"decoder"
))
==
nullptr
)
{
qCritical
()
<<
"VideoReceiver::start() failed. Error with gst_element_factory_make('decodebin')"
;
break
;
}
if
(
isTaisyncUSB
)
{
gst_bin_add_many
(
GST_BIN
(
_pipeline
),
dataSource
,
parser
,
_tee
,
queue
,
decoder
,
queue1
,
_videoSink
,
nullptr
);
}
else
{
gst_bin_add_many
(
GST_BIN
(
_pipeline
),
dataSource
,
demux
,
parser
,
_tee
,
queue
,
decoder
,
queue1
,
_videoSink
,
nullptr
);
}
gst_bin_add_many
(
GST_BIN
(
_pipeline
),
source
,
_tee
,
queue
,
decoder
,
_videoSink
,
nullptr
);
pipelineUp
=
true
;
if
(
isUdp264
||
isUdp265
)
{
// Link the pipeline in front of the tee
if
(
!
gst_element_link_many
(
dataSource
,
demux
,
parser
,
_tee
,
queue
,
decoder
,
queue1
,
_videoSink
,
nullptr
))
{
qCritical
()
<<
"Unable to link UDP elements."
;
break
;
}
}
else
if
(
isTaisyncUSB
)
{
// Link the pipeline in front of the tee
if
(
!
gst_element_link_many
(
dataSource
,
parser
,
_tee
,
queue
,
decoder
,
queue1
,
_videoSink
,
nullptr
))
{
qCritical
()
<<
"Unable to link Taisync USB elements."
;
break
;
}
}
else
if
(
isTCP
||
isMPEGTS
)
{
if
(
!
gst_element_link
(
dataSource
,
demux
))
{
qCritical
()
<<
"Unable to link TCP/MPEG-TS dataSource to Demux."
;
break
;
}
if
(
!
gst_element_link_many
(
parser
,
_tee
,
queue
,
decoder
,
queue1
,
_videoSink
,
nullptr
))
{
qCritical
()
<<
"Unable to link TCP/MPEG-TS pipline to parser."
;
break
;
}
g_signal_connect
(
demux
,
"pad-added"
,
G_CALLBACK
(
newPadCB
),
parser
);
}
else
{
g_signal_connect
(
dataSource
,
"pad-added"
,
G_CALLBACK
(
newPadCB
),
demux
);
if
(
!
gst_element_link_many
(
demux
,
parser
,
_tee
,
queue
,
decoder
,
_videoSink
,
nullptr
))
{
qCritical
()
<<
"Unable to link RTSP elements."
;
break
;
}
g_signal_connect
(
source
,
"pad-added"
,
G_CALLBACK
(
newPadCB
),
_tee
);
if
(
!
gst_element_link_many
(
_tee
,
queue
,
decoder
,
nullptr
))
{
qCritical
()
<<
"Unable to link UDP elements."
;
break
;
}
dataSource
=
demux
=
parser
=
queue
=
decoder
=
queue1
=
nullptr
;
g_signal_connect
(
decoder
,
"pad-added"
,
G_CALLBACK
(
newPadCB
),
_videoSink
);
g_signal_connect
(
decoder
,
"autoplug-query"
,
G_CALLBACK
(
autoplugQueryCB
),
_videoSink
);
source
=
queue
=
decoder
=
nullptr
;
GstBus
*
bus
=
nullptr
;
...
...
@@ -420,11 +623,6 @@ VideoReceiver::start()
}
while
(
0
);
if
(
caps
!=
nullptr
)
{
gst_caps_unref
(
caps
);
caps
=
nullptr
;
}
if
(
!
running
)
{
qCritical
()
<<
"VideoReceiver::start() failed"
;
...
...
@@ -436,11 +634,6 @@ VideoReceiver::start()
// If we failed before adding items to the pipeline, then clean up
if
(
!
pipelineUp
)
{
if
(
queue1
!=
nullptr
)
{
gst_object_unref
(
queue1
);
queue1
=
nullptr
;
}
if
(
decoder
!=
nullptr
)
{
gst_object_unref
(
decoder
);
decoder
=
nullptr
;
...
...
@@ -451,19 +644,9 @@ VideoReceiver::start()
queue
=
nullptr
;
}
if
(
parser
!=
nullptr
)
{
gst_object_unref
(
parser
);
parser
=
nullptr
;
}
if
(
demux
!=
nullptr
)
{
gst_object_unref
(
demux
);
demux
=
nullptr
;
}
if
(
dataSource
!=
nullptr
)
{
gst_object_unref
(
dataSource
);
dataSource
=
nullptr
;
if
(
source
!=
nullptr
)
{
gst_object_unref
(
source
);
source
=
nullptr
;
}
if
(
_tee
!=
nullptr
)
{
...
...
@@ -554,8 +737,6 @@ VideoReceiver::_shutdownPipeline() {
void
VideoReceiver
::
_handleError
()
{
qCDebug
(
VideoReceiverLog
)
<<
"Gstreamer error!"
;
// If there was an error we switch to software decoding only
_tryWithHardwareDecoding
=
false
;
stop
();
_restart_timer
.
start
(
_restart_time_ms
);
}
...
...
@@ -662,39 +843,6 @@ VideoReceiver::_cleanupOldVideos()
}
#endif
//-----------------------------------------------------------------------------
void
VideoReceiver
::
setVideoDecoder
(
VideoEncoding
encoding
)
{
/*
#if defined(Q_OS_MAC)
_hwDecoderName = "vtdec";
#else
_hwDecoderName = "vaapidecode";
#endif
*/
if
(
encoding
==
H265_HW
||
encoding
==
H265_SW
)
{
_depayName
=
"rtph265depay"
;
_parserName
=
"h265parse"
;
#if defined(__android__)
_hwDecoderName
=
"amcviddec-omxgooglehevcdecoder"
;
#endif
_swDecoderName
=
"avdec_h265"
;
}
else
{
_depayName
=
"rtph264depay"
;
_parserName
=
"h264parse"
;
#if defined(__android__)
_hwDecoderName
=
"amcviddec-omxgoogleh264decoder"
;
#endif
_swDecoderName
=
"avdec_h264"
;
}
if
(
!
_tryWithHardwareDecoding
)
{
_hwDecoderName
=
nullptr
;
}
}
//-----------------------------------------------------------------------------
#if defined(QGC_GST_STREAMING)
void
...
...
@@ -732,7 +880,7 @@ VideoReceiver::setVideoSink(GstElement* videoSink)
//
// +-->queue-->decoder-->_videosink
// |
//
datasource-->demux-->parser
-->tee
//
source
-->tee
// |
// | +--------------_sink-------------------+
// | | |
...
...
@@ -763,12 +911,11 @@ VideoReceiver::startRecording(const QString &videoFile)
_sink
=
new
Sink
();
_sink
->
teepad
=
gst_element_get_request_pad
(
_tee
,
"src_%u"
);
_sink
->
queue
=
gst_element_factory_make
(
"queue"
,
nullptr
);
_sink
->
parse
=
gst_element_factory_make
(
_parserName
,
nullptr
);
_sink
->
mux
=
gst_element_factory_make
(
kVideoMuxes
[
muxIdx
],
nullptr
);
_sink
->
filesink
=
gst_element_factory_make
(
"filesink"
,
nullptr
);
_sink
->
removing
=
false
;
if
(
!
_sink
->
teepad
||
!
_sink
->
queue
||
!
_sink
->
mux
||
!
_sink
->
filesink
||
!
_sink
->
parse
)
{
if
(
!
_sink
->
teepad
||
!
_sink
->
queue
||
!
_sink
->
mux
||
!
_sink
->
filesink
)
{
qCritical
()
<<
"VideoReceiver::startRecording() failed to make _sink elements"
;
return
;
}
...
...
@@ -789,15 +936,13 @@ VideoReceiver::startRecording(const QString &videoFile)
qCDebug
(
VideoReceiverLog
)
<<
"New video file:"
<<
_videoFile
;
gst_object_ref
(
_sink
->
queue
);
gst_object_ref
(
_sink
->
parse
);
gst_object_ref
(
_sink
->
mux
);
gst_object_ref
(
_sink
->
filesink
);
gst_bin_add_many
(
GST_BIN
(
_pipeline
),
_sink
->
queue
,
_sink
->
parse
,
_sink
->
mux
,
nullptr
);
gst_element_link_many
(
_sink
->
queue
,
_sink
->
parse
,
_sink
->
mux
,
nullptr
);
gst_bin_add_many
(
GST_BIN
(
_pipeline
),
_sink
->
queue
,
_sink
->
mux
,
nullptr
);
gst_element_link_many
(
_sink
->
queue
,
_sink
->
mux
,
nullptr
);
gst_element_sync_state_with_parent
(
_sink
->
queue
);
gst_element_sync_state_with_parent
(
_sink
->
parse
);
gst_element_sync_state_with_parent
(
_sink
->
mux
);
// Install a probe on the recording branch to drop buffers until we hit our first keyframe
...
...
@@ -851,7 +996,6 @@ void
VideoReceiver
::
_shutdownRecordingBranch
()
{
gst_bin_remove
(
GST_BIN
(
_pipelineStopRec
),
_sink
->
queue
);
gst_bin_remove
(
GST_BIN
(
_pipelineStopRec
),
_sink
->
parse
);
gst_bin_remove
(
GST_BIN
(
_pipelineStopRec
),
_sink
->
mux
);
gst_bin_remove
(
GST_BIN
(
_pipelineStopRec
),
_sink
->
filesink
);
...
...
@@ -860,12 +1004,10 @@ VideoReceiver::_shutdownRecordingBranch()
_pipelineStopRec
=
nullptr
;
gst_element_set_state
(
_sink
->
filesink
,
GST_STATE_NULL
);
gst_element_set_state
(
_sink
->
parse
,
GST_STATE_NULL
);
gst_element_set_state
(
_sink
->
mux
,
GST_STATE_NULL
);
gst_element_set_state
(
_sink
->
queue
,
GST_STATE_NULL
);
gst_object_unref
(
_sink
->
queue
);
gst_object_unref
(
_sink
->
parse
);
gst_object_unref
(
_sink
->
mux
);
gst_object_unref
(
_sink
->
filesink
);
...
...
@@ -890,7 +1032,7 @@ VideoReceiver::_detachRecordingBranch(GstPadProbeInfo* info)
Q_UNUSED
(
info
)
// Also unlinks and unrefs
gst_bin_remove_many
(
GST_BIN
(
_pipeline
),
_sink
->
queue
,
_sink
->
parse
,
_sink
->
mux
,
_sink
->
filesink
,
nullptr
);
gst_bin_remove_many
(
GST_BIN
(
_pipeline
),
_sink
->
queue
,
_sink
->
mux
,
_sink
->
filesink
,
nullptr
);
// Give tee its pad back
gst_element_release_request_pad
(
_tee
,
_sink
->
teepad
);
...
...
@@ -900,8 +1042,8 @@ VideoReceiver::_detachRecordingBranch(GstPadProbeInfo* info)
_pipelineStopRec
=
gst_pipeline_new
(
"pipeStopRec"
);
// Put our elements from the recording branch into the temporary pipeline
gst_bin_add_many
(
GST_BIN
(
_pipelineStopRec
),
_sink
->
queue
,
_sink
->
parse
,
_sink
->
mux
,
_sink
->
filesink
,
nullptr
);
gst_element_link_many
(
_sink
->
queue
,
_sink
->
parse
,
_sink
->
mux
,
_sink
->
filesink
,
nullptr
);
gst_bin_add_many
(
GST_BIN
(
_pipelineStopRec
),
_sink
->
queue
,
_sink
->
mux
,
_sink
->
filesink
,
nullptr
);
gst_element_link_many
(
_sink
->
queue
,
_sink
->
mux
,
_sink
->
filesink
,
nullptr
);
// Add handler for EOS event
GstBus
*
bus
=
gst_pipeline_get_bus
(
GST_PIPELINE
(
_pipelineStopRec
));
...
...
src/VideoStreaming/VideoReceiver.h
View file @
b45b8530
...
...
@@ -32,12 +32,6 @@ class VideoReceiver : public QObject
{
Q_OBJECT
public:
enum
VideoEncoding
{
H264_SW
=
1
,
H264_HW
=
2
,
H265_SW
=
3
,
H265_HW
=
4
};
#if defined(QGC_GST_STREAMING)
Q_PROPERTY
(
bool
recording
READ
recording
NOTIFY
recordingChanged
)
...
...
@@ -63,7 +57,6 @@ public:
virtual
void
setShowFullScreen
(
bool
show
)
{
_showFullScreen
=
show
;
emit
showFullScreenChanged
();
}
void
setVideoDecoder
(
VideoEncoding
encoding
);
#if defined(QGC_GST_STREAMING)
void
setVideoSink
(
GstElement
*
videoSink
);
#endif
...
...
@@ -91,6 +84,7 @@ public slots:
protected
slots
:
virtual
void
_updateTimer
();
#if defined(QGC_GST_STREAMING)
GstElement
*
_makeSource
(
const
QString
&
uri
);
virtual
void
_restart_timeout
();
virtual
void
_tcp_timeout
();
virtual
void
_connected
();
...
...
@@ -109,7 +103,6 @@ protected:
GstElement
*
queue
;
GstElement
*
mux
;
GstElement
*
filesink
;
GstElement
*
parse
;
gboolean
removing
;
}
Sink
;
...
...
@@ -159,10 +152,5 @@ protected:
bool
_videoRunning
;
bool
_showFullScreen
;
VideoSettings
*
_videoSettings
;
const
char
*
_depayName
;
const
char
*
_parserName
;
bool
_tryWithHardwareDecoding
=
true
;
const
char
*
_hwDecoderName
;
const
char
*
_swDecoderName
;
};
src/VideoStreaming/VideoStreaming.cc
View file @
b45b8530
...
...
@@ -19,10 +19,23 @@
#if defined(QGC_GST_STREAMING)
#include
<gst/gst.h>
#ifdef __android__
//#define ANDDROID_GST_DEBUG
#endif
#if defined(__ios__)
#if defined(__android__)
#include
<android/log.h>
static
void
gst_android_log
(
GstDebugCategory
*
category
,
GstDebugLevel
level
,
const
gchar
*
file
,
const
gchar
*
function
,
gint
line
,
GObject
*
object
,
GstDebugMessage
*
message
,
gpointer
data
)
{
if
(
level
<=
gst_debug_category_get_threshold
(
category
))
{
__android_log_print
(
ANDROID_LOG_ERROR
,
"GST"
,
"%s, %s: %s"
,
file
,
function
,
gst_debug_message_get
(
message
));
}
}
#elif defined(__ios__)
#include
"gst_ios_init.h"
#endif
#else
...
...
@@ -34,8 +47,9 @@
#if defined(QGC_GST_STREAMING)
G_BEGIN_DECLS
// The static plugins we use
#if defined(__
mobile
__)
#if defined(__
android__) || defined(__ios
__)
GST_PLUGIN_STATIC_DECLARE
(
coreelements
);
GST_PLUGIN_STATIC_DECLARE
(
playback
);
GST_PLUGIN_STATIC_DECLARE
(
libav
);
GST_PLUGIN_STATIC_DECLARE
(
rtp
);
GST_PLUGIN_STATIC_DECLARE
(
rtsp
);
...
...
@@ -46,9 +60,11 @@
GST_PLUGIN_STATIC_DECLARE
(
isomp4
);
GST_PLUGIN_STATIC_DECLARE
(
matroska
);
GST_PLUGIN_STATIC_DECLARE
(
opengl
);
#endif
#if defined(__android__)
GST_PLUGIN_STATIC_DECLARE
(
androidmedia
);
#elif defined(__ios__)
GST_PLUGIN_STATIC_DECLARE
(
applemedia
);
#endif
#endif
GST_PLUGIN_STATIC_DECLARE
(
qmlgl
);
G_END_DECLS
...
...
@@ -64,49 +80,6 @@ static void qgcputenv(const QString& key, const QString& root, const QString& pa
#endif
#endif
#ifdef ANDDROID_GST_DEBUG
// Redirects stdio and stderr to logcat
#include
<unistd.h>
#include
<pthread.h>
#include
<android/log.h>
static
int
pfd
[
2
];
static
pthread_t
thr
;
static
const
char
*
tag
=
"myapp"
;
static
void
*
thread_func
(
void
*
)
{
ssize_t
rdsz
;
char
buf
[
128
];
while
((
rdsz
=
read
(
pfd
[
0
],
buf
,
sizeof
buf
-
1
))
>
0
)
{
if
(
buf
[
rdsz
-
1
]
==
'\n'
)
--
rdsz
;
buf
[
rdsz
]
=
0
;
/* add null-terminator */
__android_log_write
(
ANDROID_LOG_DEBUG
,
tag
,
buf
);
}
return
0
;
}
int
start_logger
(
const
char
*
app_name
)
{
tag
=
app_name
;
/* make stdout line-buffered and stderr unbuffered */
setvbuf
(
stdout
,
0
,
_IOLBF
,
0
);
setvbuf
(
stderr
,
0
,
_IONBF
,
0
);
/* create the pipe and redirect stdout and stderr */
pipe
(
pfd
);
dup2
(
pfd
[
1
],
1
);
dup2
(
pfd
[
1
],
2
);
/* spawn the logging thread */
if
(
pthread_create
(
&
thr
,
0
,
thread_func
,
0
)
==
-
1
)
return
-
1
;
pthread_detach
(
thr
);
return
0
;
}
#endif
void
initializeVideoStreaming
(
int
&
argc
,
char
*
argv
[],
char
*
logpath
,
char
*
debuglevel
)
{
#if defined(QGC_GST_STREAMING)
...
...
@@ -126,45 +99,56 @@ void initializeVideoStreaming(int &argc, char* argv[], char* logpath, char* debu
qgcputenv
(
"GST_PLUGIN_PATH"
,
currentDir
,
"/gstreamer-plugins"
);
#endif
// Initialize GStreamer
#if defined(__ios__)
//-- iOS specific initialization
gst_ios_init
();
#else
//-- Generic initialization
if
(
qgetenv
(
"GST_DEBUG"
).
isEmpty
()
&&
logpath
)
{
QString
gstDebugFile
=
QString
(
"%1/%2"
).
arg
(
logpath
).
arg
(
"gstreamer-log.txt"
);
qDebug
()
<<
"GStreamer debug output:"
<<
gstDebugFile
;
if
(
debuglevel
)
{
qputenv
(
"GST_DEBUG"
,
debuglevel
);
}
qputenv
(
"GST_DEBUG_NO_COLOR"
,
"1"
);
qputenv
(
"GST_DEBUG_FILE"
,
gstDebugFile
.
toUtf8
());
qputenv
(
"GST_DEBUG_DUMP_DOT_DIR"
,
logpath
);
}
GError
*
error
=
nullptr
;
if
(
!
gst_init_check
(
&
argc
,
&
argv
,
&
error
))
{
qCritical
()
<<
"gst_init_check() failed: "
<<
error
->
message
;
g_error_free
(
error
);
//-- Generic initialization
if
(
qgetenv
(
"GST_DEBUG"
).
isEmpty
()
&&
logpath
)
{
QString
gstDebugFile
=
QString
(
"%1/%2"
).
arg
(
logpath
).
arg
(
"gstreamer-log.txt"
);
qDebug
()
<<
"GStreamer debug output:"
<<
gstDebugFile
;
if
(
debuglevel
)
{
qputenv
(
"GST_DEBUG"
,
debuglevel
);
}
#endif
// The static plugins we use
#if defined(__android__)
GST_PLUGIN_STATIC_REGISTER
(
coreelements
);
GST_PLUGIN_STATIC_REGISTER
(
libav
);
GST_PLUGIN_STATIC_REGISTER
(
rtp
);
GST_PLUGIN_STATIC_REGISTER
(
rtsp
);
GST_PLUGIN_STATIC_REGISTER
(
udp
);
GST_PLUGIN_STATIC_REGISTER
(
videoparsersbad
);
GST_PLUGIN_STATIC_REGISTER
(
x264
);
GST_PLUGIN_STATIC_REGISTER
(
rtpmanager
);
GST_PLUGIN_STATIC_REGISTER
(
isomp4
);
GST_PLUGIN_STATIC_REGISTER
(
matroska
);
GST_PLUGIN_STATIC_REGISTER
(
androidmedia
);
#endif
qputenv
(
"GST_DEBUG_NO_COLOR"
,
"1"
);
qputenv
(
"GST_DEBUG_FILE"
,
gstDebugFile
.
toUtf8
());
qputenv
(
"GST_DEBUG_DUMP_DOT_DIR"
,
logpath
);
}
// Initialize GStreamer
#if defined(__android__)
gst_debug_add_log_function
(
gst_android_log
,
nullptr
,
nullptr
);
#elif defined(__ios__)
//-- iOS specific initialization
gst_ios_pre_init
();
#endif
#if defined(__mobile__)
GST_PLUGIN_STATIC_REGISTER
(
opengl
);
GError
*
error
=
nullptr
;
if
(
!
gst_init_check
(
&
argc
,
&
argv
,
&
error
))
{
qCritical
()
<<
"gst_init_check() failed: "
<<
error
->
message
;
g_error_free
(
error
);
}
// The static plugins we use
#if defined(__android__) || defined(__ios__)
GST_PLUGIN_STATIC_REGISTER
(
coreelements
);
GST_PLUGIN_STATIC_REGISTER
(
playback
);
GST_PLUGIN_STATIC_REGISTER
(
libav
);
GST_PLUGIN_STATIC_REGISTER
(
rtp
);
GST_PLUGIN_STATIC_REGISTER
(
rtsp
);
GST_PLUGIN_STATIC_REGISTER
(
udp
);
GST_PLUGIN_STATIC_REGISTER
(
videoparsersbad
);
GST_PLUGIN_STATIC_REGISTER
(
x264
);
GST_PLUGIN_STATIC_REGISTER
(
rtpmanager
);
GST_PLUGIN_STATIC_REGISTER
(
isomp4
);
GST_PLUGIN_STATIC_REGISTER
(
matroska
);
GST_PLUGIN_STATIC_REGISTER
(
opengl
);
#if defined(__android__)
GST_PLUGIN_STATIC_REGISTER
(
androidmedia
);
#elif defined(__ios__)
GST_PLUGIN_STATIC_REGISTER
(
applemedia
);
#endif
#endif
#if defined(__ios__)
gst_ios_post_init
();
#endif
/* the plugin must be loaded before loading the qml file to register the
...
...
@@ -185,7 +169,7 @@ void initializeVideoStreaming(int &argc, char* argv[], char* logpath, char* debu
qCritical
()
<<
"unable to find qmlglsink - you need to build it yourself and add to GST_PLUGIN_PATH"
;
}
#else
qmlRegisterType
<
GLVideoItemStub
>
(
"org.freedesktop.gstreamer.GLVideoItem"
,
1
,
0
,
"GstGLVideoItem"
);
qmlRegisterType
<
GLVideoItemStub
>
(
"org.freedesktop.gstreamer.GLVideoItem"
,
1
,
0
,
"GstGLVideoItem"
);
Q_UNUSED
(
argc
)
Q_UNUSED
(
argv
)
Q_UNUSED
(
logpath
)
...
...
src/VideoStreaming/VideoStreaming.pri
View file @
b45b8530
...
...
@@ -32,7 +32,7 @@ LinuxBuild {
exists($$GST_ROOT) {
CONFIG += VideoEnabled
INCLUDEPATH += $$GST_ROOT/Headers
LIBS += -F$$(HOME)/Library/Developer/GStreamer/iPhone.sdk -framework GStreamer -liconv -lresolv
LIBS += -F$$(HOME)/Library/Developer/GStreamer/iPhone.sdk -framework GStreamer
-framework AVFoundation -framework CoreMedia -framework CoreVideo -framework VideoToolbox
-liconv -lresolv
}
} else:WindowsBuild {
#- gstreamer installed by default under c:/gstreamer
...
...
@@ -78,6 +78,7 @@ LinuxBuild {
LIBS += -L$$GST_ROOT/lib/gstreamer-1.0 \
-lgstvideo-1.0 \
-lgstcoreelements \
-lgstplayback \
-lgstudp \
-lgstrtp \
-lgstrtsp \
...
...
src/VideoStreaming/iOS/gst_ios_init.h
View file @
b45b8530
#ifndef __GST_IOS_INIT_H__
#define __GST_IOS_INIT_H__
#pragma once
#include
<gst/gst.h>
G_BEGIN_DECLS
#define GST_G_IO_MODULE_DECLARE(name) \
extern void G_PASTE(g_io_module_, G_PASTE(name, _load_static)) (void)
#define GST_G_IO_MODULE_LOAD(name) \
G_PASTE(g_io_module_, G_PASTE(name, _load_static)) ()
/* Uncomment each line to enable the plugin categories that your application needs.
* You can also enable individual plugins. See gst_ios_init.c to see their names
*/
//#define GST_IOS_PLUGINS_GES
#define GST_IOS_PLUGINS_CORE
//#define GST_IOS_PLUGINS_CAPTURE
//#define GST_IOS_PLUGINS_CODECS_RESTRICTED
//#define GST_IOS_PLUGINS_ENCODING
//#define GST_IOS_PLUGINS_CODECS_GPL
//#define GST_IOS_PLUGINS_NET_RESTRICTED
//#define GST_IOS_PLUGINS_SYS
//#define GST_IOS_PLUGINS_VIS
//#define GST_IOS_PLUGINS_PLAYBACK
//#define GST_IOS_PLUGINS_EFFECTS
//#define GST_IOS_PLUGINS_CODECS
#define GST_IOS_PLUGINS_NET
//-- Specific to QGC
#define GST_IOS_PLUGIN_X264
#define GST_IOS_PLUGIN_LIBAV
#define GST_IOS_PLUGIN_ISOMP4
#define GST_IOS_PLUGIN_VIDEOPARSERSBAD
#define GST_IOS_PLUGIN_MATROSKA
//#define GST_IOS_GIO_MODULE_GNUTLS
void
gst_ios_init
(
void
);
void
gst_ios_pre_init
(
void
);
void
gst_ios_post_init
(
void
);
G_END_DECLS
#endif
src/VideoStreaming/iOS/gst_ios_init.m
View file @
b45b8530
#include
"gst_ios_init.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#if defined(GST_IOS_PLUGIN_NLE) || defined(GST_IOS_PLUGINS_GES)
GST_PLUGIN_STATIC_DECLARE
(
nle
);
#endif
#if defined(GST_IOS_PLUGIN_COREELEMENTS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
coreelements
);
#endif
#if defined(GST_IOS_PLUGIN_CORETRACERS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
coretracers
);
#endif
#if defined(GST_IOS_PLUGIN_ADDER) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
adder
);
#endif
#if defined(GST_IOS_PLUGIN_APP) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
app
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOCONVERT) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
audioconvert
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOMIXER) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
audiomixer
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIORATE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
audiorate
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIORESAMPLE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
audioresample
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOTESTSRC) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
audiotestsrc
);
#endif
#if defined(GST_IOS_PLUGIN_GIO) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
gio
);
#endif
#if defined(GST_IOS_PLUGIN_PANGO) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
pango
);
#endif
#if defined(GST_IOS_PLUGIN_RAWPARSE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
rawparse
);
#endif
#if defined(GST_IOS_PLUGIN_TYPEFINDFUNCTIONS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
typefindfunctions
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOCONVERT) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
videoconvert
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEORATE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
videorate
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOSCALE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
videoscale
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOTESTSRC) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
videotestsrc
);
#endif
#if defined(GST_IOS_PLUGIN_VOLUME) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
volume
);
#endif
#if defined(GST_IOS_PLUGIN_AUTODETECT) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
autodetect
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOFILTER) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_DECLARE
(
videofilter
);
#endif
#if defined(GST_IOS_PLUGIN_CAMERABIN) || defined(GST_IOS_PLUGINS_CAPTURE)
GST_PLUGIN_STATIC_DECLARE
(
camerabin
);
#endif
#if defined(GST_IOS_PLUGIN_ASFMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
asfmux
);
#endif
#if defined(GST_IOS_PLUGIN_DTSDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
dtsdec
);
#endif
#if defined(GST_IOS_PLUGIN_FAAD) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
faad
);
#endif
#if defined(GST_IOS_PLUGIN_MPEGPSDEMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
mpegpsdemux
);
#endif
#if defined(GST_IOS_PLUGIN_MPEGPSMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
mpegpsmux
);
#endif
#if defined(GST_IOS_PLUGIN_MPEGTSDEMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
mpegtsdemux
);
#endif
#if defined(GST_IOS_PLUGIN_MPEGTSMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
mpegtsmux
);
#endif
#if defined(GST_IOS_PLUGIN_VOAACENC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
voaacenc
);
#endif
#if defined(GST_IOS_PLUGIN_A52DEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
a52dec
);
#endif
#if defined(GST_IOS_PLUGIN_AMRNB) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
amrnb
);
#endif
#if defined(GST_IOS_PLUGIN_AMRWBDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
amrwbdec
);
#endif
#if defined(GST_IOS_PLUGIN_ASF) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
asf
);
#endif
#if defined(GST_IOS_PLUGIN_DVDSUB) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
dvdsub
);
#endif
#if defined(GST_IOS_PLUGIN_DVDLPCMDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
dvdlpcmdec
);
#endif
#if defined(GST_IOS_PLUGIN_MPEG2DEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
mpeg2dec
);
#endif
#if defined(GST_IOS_PLUGIN_XINGMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
xingmux
);
#endif
#if defined(GST_IOS_PLUGIN_REALMEDIA) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
realmedia
);
#endif
#if defined(GST_IOS_PLUGIN_X264) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
x264
);
#endif
#if defined(GST_IOS_PLUGIN_LIBAV) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
libav
);
#endif
#if defined(GST_IOS_PLUGIN_ENCODING) || defined(GST_IOS_PLUGINS_ENCODING)
GST_PLUGIN_STATIC_DECLARE
(
encoding
);
#endif
#if defined(GST_IOS_PLUGIN_ASSRENDER) || defined(GST_IOS_PLUGINS_CODECS_GPL)
GST_PLUGIN_STATIC_DECLARE
(
assrender
);
#endif
#if defined(GST_IOS_PLUGIN_MMS) || defined(GST_IOS_PLUGINS_NET_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
mms
);
#endif
#if defined(GST_IOS_PLUGIN_RTMP) || defined(GST_IOS_PLUGINS_NET_RESTRICTED)
GST_PLUGIN_STATIC_DECLARE
(
rtmp
);
#endif
#if defined(GST_IOS_PLUGIN_OPENGL) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_DECLARE
(
opengl
);
#endif
#if defined(GST_IOS_PLUGIN_OSXAUDIO) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_DECLARE
(
osxaudio
);
#endif
#if defined(GST_IOS_PLUGIN_APPLEMEDIA) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_DECLARE
(
applemedia
);
#endif
#if defined(GST_IOS_PLUGIN_SHM) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_DECLARE
(
shm
);
#endif
#if defined(GST_IOS_PLUGIN_OPENGLMIXERS) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_DECLARE
(
openglmixers
);
#endif
#if defined(GST_IOS_PLUGIN_LIBVISUAL) || defined(GST_IOS_PLUGINS_VIS)
GST_PLUGIN_STATIC_DECLARE
(
libvisual
);
#endif
#if defined(GST_IOS_PLUGIN_GOOM) || defined(GST_IOS_PLUGINS_VIS)
GST_PLUGIN_STATIC_DECLARE
(
goom
);
#endif
#if defined(GST_IOS_PLUGIN_GOOM2K1) || defined(GST_IOS_PLUGINS_VIS)
GST_PLUGIN_STATIC_DECLARE
(
goom2k1
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOVISUALIZERS) || defined(GST_IOS_PLUGINS_VIS)
GST_PLUGIN_STATIC_DECLARE
(
audiovisualizers
);
#endif
#if defined(GST_IOS_PLUGIN_PLAYBACK) || defined(GST_IOS_PLUGINS_PLAYBACK)
GST_PLUGIN_STATIC_DECLARE
(
playback
);
#endif
#if defined(GST_IOS_PLUGIN_ALPHA) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
alpha
);
#endif
#if defined(GST_IOS_PLUGIN_ALPHACOLOR) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
alphacolor
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOFX) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
audiofx
);
#endif
#if defined(GST_IOS_PLUGIN_CAIRO) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
cairo
);
#endif
#if defined(GST_IOS_PLUGIN_CUTTER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
cutter
);
#endif
#if defined(GST_IOS_PLUGIN_DEBUG) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
debug
);
#endif
#if defined(GST_IOS_PLUGIN_DEINTERLACE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
deinterlace
);
#endif
#if defined(GST_IOS_PLUGIN_DTMF) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
dtmf
);
#endif
#if defined(GST_IOS_PLUGIN_EFFECTV) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
effectv
);
#endif
#if defined(GST_IOS_PLUGIN_EQUALIZER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
equalizer
);
#endif
#if defined(GST_IOS_PLUGIN_GDKPIXBUF) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
gdkpixbuf
);
#endif
#if defined(GST_IOS_PLUGIN_IMAGEFREEZE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
imagefreeze
);
#endif
#if defined(GST_IOS_PLUGIN_INTERLEAVE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
interleave
);
#endif
#if defined(GST_IOS_PLUGIN_LEVEL) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
level
);
#endif
#if defined(GST_IOS_PLUGIN_MULTIFILE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
multifile
);
#endif
#if defined(GST_IOS_PLUGIN_REPLAYGAIN) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
replaygain
);
#endif
#if defined(GST_IOS_PLUGIN_SHAPEWIPE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
shapewipe
);
#endif
#if defined(GST_IOS_PLUGIN_SMPTE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
smpte
);
#endif
#if defined(GST_IOS_PLUGIN_SPECTRUM) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
spectrum
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOBOX) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
videobox
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOCROP) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
videocrop
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOMIXER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
videomixer
);
#endif
#if defined(GST_IOS_PLUGIN_ACCURIP) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
accurip
);
#endif
#if defined(GST_IOS_PLUGIN_AIFF) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
aiff
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOFXBAD) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
audiofxbad
);
#endif
#if defined(GST_IOS_PLUGIN_AUTOCONVERT) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
autoconvert
);
#endif
#if defined(GST_IOS_PLUGIN_BAYER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
bayer
);
#endif
#if defined(GST_IOS_PLUGIN_COLOREFFECTS) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
coloreffects
);
#endif
#if defined(GST_IOS_PLUGIN_DEBUGUTILSBAD) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
debugutilsbad
);
#endif
#if defined(GST_IOS_PLUGIN_FIELDANALYSIS) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
fieldanalysis
);
#endif
#if defined(GST_IOS_PLUGIN_FREEVERB) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
freeverb
);
#endif
#if defined(GST_IOS_PLUGIN_FREI0R) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
frei0r
);
#endif
#if defined(GST_IOS_PLUGIN_GAUDIEFFECTS) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
gaudieffects
);
#endif
#if defined(GST_IOS_PLUGIN_GEOMETRICTRANSFORM) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
geometrictransform
);
#endif
#if defined(GST_IOS_PLUGIN_INTER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
inter
);
#endif
#if defined(GST_IOS_PLUGIN_INTERLACE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
interlace
);
#endif
#if defined(GST_IOS_PLUGIN_IVTC) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
ivtc
);
#endif
#if defined(GST_IOS_PLUGIN_LEGACYRAWPARSE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
legacyrawparse
);
#endif
#if defined(GST_IOS_PLUGIN_PROXY) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
proxy
);
#endif
#if defined(GST_IOS_PLUGIN_REMOVESILENCE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
removesilence
);
#endif
#if defined(GST_IOS_PLUGIN_SEGMENTCLIP) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
segmentclip
);
#endif
#if defined(GST_IOS_PLUGIN_SMOOTH) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
smooth
);
#endif
#if defined(GST_IOS_PLUGIN_SPEED) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
speed
);
#endif
#if defined(GST_IOS_PLUGIN_SOUNDTOUCH) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
soundtouch
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOFILTERSBAD) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
videofiltersbad
);
#endif
#if defined(GST_IOS_PLUGIN_COMPOSITOR) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
compositor
);
#endif
#if defined(GST_IOS_PLUGIN_WEBRTCDSP) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
webrtcdsp
);
#endif
#if defined(GST_IOS_PLUGIN_LADSPA) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
ladspa
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOBUFFERSPLIT) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_DECLARE
(
audiobuffersplit
);
#endif
#if defined(GST_IOS_PLUGIN_SUBPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
subparse
);
#endif
#if defined(GST_IOS_PLUGIN_OGG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
ogg
);
#endif
#if defined(GST_IOS_PLUGIN_THEORA) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
theora
);
#endif
#if defined(GST_IOS_PLUGIN_VORBIS) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
vorbis
);
#endif
#if defined(GST_IOS_PLUGIN_OPUS) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
opus
);
#endif
#if defined(GST_IOS_PLUGIN_IVORBISDEC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
ivorbisdec
);
#endif
#if defined(GST_IOS_PLUGIN_ALAW) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
alaw
);
#endif
#if defined(GST_IOS_PLUGIN_APETAG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
apetag
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOPARSERS) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
audioparsers
);
#endif
#if defined(GST_IOS_PLUGIN_AUPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
auparse
);
#endif
#if defined(GST_IOS_PLUGIN_AVI) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
avi
);
#endif
#if defined(GST_IOS_PLUGIN_DV) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
dv
);
#endif
#if defined(GST_IOS_PLUGIN_FLAC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
flac
);
#endif
#if defined(GST_IOS_PLUGIN_FLV) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
flv
);
#endif
#if defined(GST_IOS_PLUGIN_FLXDEC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
flxdec
);
#endif
#if defined(GST_IOS_PLUGIN_ICYDEMUX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
icydemux
);
#endif
#if defined(GST_IOS_PLUGIN_ID3DEMUX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
id3demux
);
#endif
#if defined(GST_IOS_PLUGIN_ISOMP4) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
isomp4
);
#endif
#if defined(GST_IOS_PLUGIN_JPEG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
jpeg
);
#endif
#if defined(GST_IOS_PLUGIN_LAME) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
lame
);
#endif
#if defined(GST_IOS_PLUGIN_MATROSKA) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
matroska
);
#endif
#if defined(GST_IOS_PLUGIN_MPG123) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
mpg123
);
#endif
#if defined(GST_IOS_PLUGIN_MULAW) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
mulaw
);
#endif
#if defined(GST_IOS_PLUGIN_MULTIPART) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
multipart
);
#endif
#if defined(GST_IOS_PLUGIN_PNG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
png
);
#endif
#if defined(GST_IOS_PLUGIN_SPEEX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
speex
);
#endif
#if defined(GST_IOS_PLUGIN_TAGLIB) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
taglib
);
#endif
#if defined(GST_IOS_PLUGIN_VPX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
vpx
);
#endif
#if defined(GST_IOS_PLUGIN_WAVENC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
wavenc
);
#endif
#if defined(GST_IOS_PLUGIN_WAVPACK) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
wavpack
);
#endif
#if defined(GST_IOS_PLUGIN_WAVPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
wavparse
);
#endif
#if defined(GST_IOS_PLUGIN_Y4MENC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
y4menc
);
#endif
#if defined(GST_IOS_PLUGIN_ADPCMDEC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
adpcmdec
);
#endif
#if defined(GST_IOS_PLUGIN_ADPCMENC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
adpcmenc
);
#endif
#if defined(GST_IOS_PLUGIN_DASHDEMUX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
dashdemux
);
#endif
#if defined(GST_IOS_PLUGIN_DVBSUBOVERLAY) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
dvbsuboverlay
);
#endif
#if defined(GST_IOS_PLUGIN_DVDSPU) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
dvdspu
);
#endif
#if defined(GST_IOS_PLUGIN_HLS) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
hls
);
#endif
#if defined(GST_IOS_PLUGIN_ID3TAG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
id3tag
);
#endif
#if defined(GST_IOS_PLUGIN_KATE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
kate
);
#endif
#if defined(GST_IOS_PLUGIN_MIDI) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
midi
);
#endif
#if defined(GST_IOS_PLUGIN_MXF) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
mxf
);
#endif
#if defined(GST_IOS_PLUGIN_OPENH264) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
openh264
);
#endif
#if defined(GST_IOS_PLUGIN_OPUSPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
opusparse
);
#endif
#if defined(GST_IOS_PLUGIN_PCAPPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
pcapparse
);
#endif
#if defined(GST_IOS_PLUGIN_PNM) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
pnm
);
#endif
#if defined(GST_IOS_PLUGIN_RFBSRC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
rfbsrc
);
#endif
#if defined(GST_IOS_PLUGIN_SIREN) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
siren
);
#endif
#if defined(GST_IOS_PLUGIN_SMOOTHSTREAMING) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
smoothstreaming
);
#endif
#if defined(GST_IOS_PLUGIN_SUBENC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
subenc
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOPARSERSBAD) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
videoparsersbad
);
#endif
#if defined(GST_IOS_PLUGIN_Y4MDEC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
y4mdec
);
#endif
#if defined(GST_IOS_PLUGIN_JPEGFORMAT) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
jpegformat
);
#endif
#if defined(GST_IOS_PLUGIN_GDP) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
gdp
);
#endif
#if defined(GST_IOS_PLUGIN_RSVG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
rsvg
);
#endif
#if defined(GST_IOS_PLUGIN_OPENJPEG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
openjpeg
);
#endif
#if defined(GST_IOS_PLUGIN_SPANDSP) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
spandsp
);
#endif
#if defined(GST_IOS_PLUGIN_SBC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_DECLARE
(
sbc
);
#endif
#if defined(GST_IOS_PLUGIN_TCP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
tcp
);
#endif
#if defined(GST_IOS_PLUGIN_RTSP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
rtsp
);
#endif
#if defined(GST_IOS_PLUGIN_RTP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
rtp
);
#endif
#if defined(GST_IOS_PLUGIN_RTPMANAGER) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
rtpmanager
);
#endif
#if defined(GST_IOS_PLUGIN_SOUP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
soup
);
#endif
#if defined(GST_IOS_PLUGIN_UDP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
udp
);
#endif
#if defined(GST_IOS_PLUGIN_DTLS) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
dtls
);
#endif
#if defined(GST_IOS_PLUGIN_SDPELEM) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
sdpelem
);
#endif
#if defined(GST_IOS_PLUGIN_SRTP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
srtp
);
#endif
#if defined(GST_IOS_PLUGIN_WEBRTC) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
webrtc
);
#endif
#if defined(GST_IOS_PLUGIN_RTSPCLIENTSINK) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_DECLARE
(
rtspclientsink
);
#endif
#include
"gst_ios_init.h"
G_BEGIN_DECLS
#define GST_G_IO_MODULE_DECLARE(name) \
extern void G_PASTE(g_io_module_, G_PASTE(name, _load_static)) (void)
#define GST_G_IO_MODULE_LOAD(name) \
G_PASTE(g_io_module_, G_PASTE(name, _load_static)) ()
G_END_DECLS
#define GST_IOS_GIO_MODULE_GNUTLS
#if defined(GST_IOS_GIO_MODULE_GNUTLS)
#include
<gio/gio.h>
GST_G_IO_MODULE_DECLARE
(
gnutls
);
#endif
void
gst_ios_init
(
void
)
void
gst_ios_pre_init
(
void
)
{
GstPluginFeature
*
plugin
;
GstRegistry
*
reg
;
NSString
*
resources
=
[[
NSBundle
mainBundle
]
resourcePath
];
NSString
*
tmp
=
NSTemporaryDirectory
();
NSString
*
cache
=
[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Library/Caches"
];
...
...
@@ -559,535 +49,19 @@ gst_ios_init (void)
ca_certificates
=
g_build_filename
(
resources_dir
,
"ssl"
,
"certs"
,
"ca-certificates.crt"
,
NULL
);
g_setenv
(
"CA_CERTIFICATES"
,
ca_certificates
,
TRUE
);
g_free
(
ca_certificates
);
gst_init
(
NULL
,
NULL
);
}
#if defined(GST_IOS_PLUGIN_NLE) || defined(GST_IOS_PLUGINS_GES)
GST_PLUGIN_STATIC_REGISTER
(
nle
);
#endif
#if defined(GST_IOS_PLUGIN_COREELEMENTS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
coreelements
);
#endif
#if defined(GST_IOS_PLUGIN_CORETRACERS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
coretracers
);
#endif
#if defined(GST_IOS_PLUGIN_ADDER) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
adder
);
#endif
#if defined(GST_IOS_PLUGIN_APP) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
app
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOCONVERT) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
audioconvert
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOMIXER) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
audiomixer
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIORATE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
audiorate
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIORESAMPLE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
audioresample
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOTESTSRC) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
audiotestsrc
);
#endif
#if defined(GST_IOS_PLUGIN_GIO) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
gio
);
#endif
#if defined(GST_IOS_PLUGIN_PANGO) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
pango
);
#endif
#if defined(GST_IOS_PLUGIN_RAWPARSE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
rawparse
);
#endif
#if defined(GST_IOS_PLUGIN_TYPEFINDFUNCTIONS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
typefindfunctions
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOCONVERT) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
videoconvert
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEORATE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
videorate
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOSCALE) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
videoscale
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOTESTSRC) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
videotestsrc
);
#endif
#if defined(GST_IOS_PLUGIN_VOLUME) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
volume
);
#endif
#if defined(GST_IOS_PLUGIN_AUTODETECT) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
autodetect
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOFILTER) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER
(
videofilter
);
#endif
#if defined(GST_IOS_PLUGIN_CAMERABIN) || defined(GST_IOS_PLUGINS_CAPTURE)
GST_PLUGIN_STATIC_REGISTER
(
camerabin
);
#endif
#if defined(GST_IOS_PLUGIN_ASFMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
asfmux
);
#endif
#if defined(GST_IOS_PLUGIN_DTSDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
dtsdec
);
#endif
#if defined(GST_IOS_PLUGIN_FAAD) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
faad
);
#endif
#if defined(GST_IOS_PLUGIN_MPEGPSDEMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
mpegpsdemux
);
#endif
#if defined(GST_IOS_PLUGIN_MPEGPSMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
mpegpsmux
);
#endif
#if defined(GST_IOS_PLUGIN_MPEGTSDEMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
mpegtsdemux
);
#endif
#if defined(GST_IOS_PLUGIN_MPEGTSMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
mpegtsmux
);
#endif
#if defined(GST_IOS_PLUGIN_VOAACENC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
voaacenc
);
#endif
#if defined(GST_IOS_PLUGIN_A52DEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
a52dec
);
#endif
#if defined(GST_IOS_PLUGIN_AMRNB) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
amrnb
);
#endif
#if defined(GST_IOS_PLUGIN_AMRWBDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
amrwbdec
);
#endif
#if defined(GST_IOS_PLUGIN_ASF) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
asf
);
#endif
#if defined(GST_IOS_PLUGIN_DVDSUB) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
dvdsub
);
#endif
#if defined(GST_IOS_PLUGIN_DVDLPCMDEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
dvdlpcmdec
);
#endif
#if defined(GST_IOS_PLUGIN_MPEG2DEC) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
mpeg2dec
);
#endif
#if defined(GST_IOS_PLUGIN_XINGMUX) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
xingmux
);
#endif
#if defined(GST_IOS_PLUGIN_REALMEDIA) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
realmedia
);
#endif
#if defined(GST_IOS_PLUGIN_X264) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
x264
);
#endif
#if defined(GST_IOS_PLUGIN_LIBAV) || defined(GST_IOS_PLUGINS_CODECS_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
libav
);
#endif
#if defined(GST_IOS_PLUGIN_ENCODING) || defined(GST_IOS_PLUGINS_ENCODING)
GST_PLUGIN_STATIC_REGISTER
(
encoding
);
#endif
#if defined(GST_IOS_PLUGIN_ASSRENDER) || defined(GST_IOS_PLUGINS_CODECS_GPL)
GST_PLUGIN_STATIC_REGISTER
(
assrender
);
#endif
#if defined(GST_IOS_PLUGIN_MMS) || defined(GST_IOS_PLUGINS_NET_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
mms
);
#endif
#if defined(GST_IOS_PLUGIN_RTMP) || defined(GST_IOS_PLUGINS_NET_RESTRICTED)
GST_PLUGIN_STATIC_REGISTER
(
rtmp
);
#endif
#if defined(GST_IOS_PLUGIN_OPENGL) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_REGISTER
(
opengl
);
#endif
#if defined(GST_IOS_PLUGIN_OSXAUDIO) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_REGISTER
(
osxaudio
);
#endif
#if defined(GST_IOS_PLUGIN_APPLEMEDIA) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_REGISTER
(
applemedia
);
#endif
#if defined(GST_IOS_PLUGIN_SHM) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_REGISTER
(
shm
);
#endif
#if defined(GST_IOS_PLUGIN_OPENGLMIXERS) || defined(GST_IOS_PLUGINS_SYS)
GST_PLUGIN_STATIC_REGISTER
(
openglmixers
);
#endif
#if defined(GST_IOS_PLUGIN_LIBVISUAL) || defined(GST_IOS_PLUGINS_VIS)
GST_PLUGIN_STATIC_REGISTER
(
libvisual
);
#endif
#if defined(GST_IOS_PLUGIN_GOOM) || defined(GST_IOS_PLUGINS_VIS)
GST_PLUGIN_STATIC_REGISTER
(
goom
);
#endif
#if defined(GST_IOS_PLUGIN_GOOM2K1) || defined(GST_IOS_PLUGINS_VIS)
GST_PLUGIN_STATIC_REGISTER
(
goom2k1
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOVISUALIZERS) || defined(GST_IOS_PLUGINS_VIS)
GST_PLUGIN_STATIC_REGISTER
(
audiovisualizers
);
#endif
#if defined(GST_IOS_PLUGIN_PLAYBACK) || defined(GST_IOS_PLUGINS_PLAYBACK)
GST_PLUGIN_STATIC_REGISTER
(
playback
);
#endif
#if defined(GST_IOS_PLUGIN_ALPHA) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
alpha
);
#endif
#if defined(GST_IOS_PLUGIN_ALPHACOLOR) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
alphacolor
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOFX) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
audiofx
);
#endif
#if defined(GST_IOS_PLUGIN_CAIRO) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
cairo
);
#endif
#if defined(GST_IOS_PLUGIN_CUTTER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
cutter
);
#endif
#if defined(GST_IOS_PLUGIN_DEBUG) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
debug
);
#endif
#if defined(GST_IOS_PLUGIN_DEINTERLACE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
deinterlace
);
#endif
#if defined(GST_IOS_PLUGIN_DTMF) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
dtmf
);
#endif
#if defined(GST_IOS_PLUGIN_EFFECTV) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
effectv
);
#endif
#if defined(GST_IOS_PLUGIN_EQUALIZER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
equalizer
);
#endif
#if defined(GST_IOS_PLUGIN_GDKPIXBUF) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
gdkpixbuf
);
#endif
#if defined(GST_IOS_PLUGIN_IMAGEFREEZE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
imagefreeze
);
#endif
#if defined(GST_IOS_PLUGIN_INTERLEAVE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
interleave
);
#endif
#if defined(GST_IOS_PLUGIN_LEVEL) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
level
);
#endif
#if defined(GST_IOS_PLUGIN_MULTIFILE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
multifile
);
#endif
#if defined(GST_IOS_PLUGIN_REPLAYGAIN) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
replaygain
);
#endif
#if defined(GST_IOS_PLUGIN_SHAPEWIPE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
shapewipe
);
#endif
#if defined(GST_IOS_PLUGIN_SMPTE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
smpte
);
#endif
#if defined(GST_IOS_PLUGIN_SPECTRUM) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
spectrum
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOBOX) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
videobox
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOCROP) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
videocrop
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOMIXER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
videomixer
);
#endif
#if defined(GST_IOS_PLUGIN_ACCURIP) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
accurip
);
#endif
#if defined(GST_IOS_PLUGIN_AIFF) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
aiff
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOFXBAD) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
audiofxbad
);
#endif
#if defined(GST_IOS_PLUGIN_AUTOCONVERT) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
autoconvert
);
#endif
#if defined(GST_IOS_PLUGIN_BAYER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
bayer
);
#endif
#if defined(GST_IOS_PLUGIN_COLOREFFECTS) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
coloreffects
);
#endif
#if defined(GST_IOS_PLUGIN_DEBUGUTILSBAD) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
debugutilsbad
);
#endif
#if defined(GST_IOS_PLUGIN_FIELDANALYSIS) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
fieldanalysis
);
#endif
#if defined(GST_IOS_PLUGIN_FREEVERB) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
freeverb
);
#endif
#if defined(GST_IOS_PLUGIN_FREI0R) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
frei0r
);
#endif
#if defined(GST_IOS_PLUGIN_GAUDIEFFECTS) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
gaudieffects
);
#endif
#if defined(GST_IOS_PLUGIN_GEOMETRICTRANSFORM) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
geometrictransform
);
#endif
#if defined(GST_IOS_PLUGIN_INTER) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
inter
);
#endif
#if defined(GST_IOS_PLUGIN_INTERLACE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
interlace
);
#endif
#if defined(GST_IOS_PLUGIN_IVTC) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
ivtc
);
#endif
#if defined(GST_IOS_PLUGIN_LEGACYRAWPARSE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
legacyrawparse
);
#endif
#if defined(GST_IOS_PLUGIN_PROXY) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
proxy
);
#endif
#if defined(GST_IOS_PLUGIN_REMOVESILENCE) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
removesilence
);
#endif
#if defined(GST_IOS_PLUGIN_SEGMENTCLIP) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
segmentclip
);
#endif
#if defined(GST_IOS_PLUGIN_SMOOTH) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
smooth
);
#endif
#if defined(GST_IOS_PLUGIN_SPEED) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
speed
);
#endif
#if defined(GST_IOS_PLUGIN_SOUNDTOUCH) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
soundtouch
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOFILTERSBAD) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
videofiltersbad
);
#endif
#if defined(GST_IOS_PLUGIN_COMPOSITOR) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
compositor
);
#endif
#if defined(GST_IOS_PLUGIN_WEBRTCDSP) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
webrtcdsp
);
#endif
#if defined(GST_IOS_PLUGIN_LADSPA) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
ladspa
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOBUFFERSPLIT) || defined(GST_IOS_PLUGINS_EFFECTS)
GST_PLUGIN_STATIC_REGISTER
(
audiobuffersplit
);
#endif
#if defined(GST_IOS_PLUGIN_SUBPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
subparse
);
#endif
#if defined(GST_IOS_PLUGIN_OGG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
ogg
);
#endif
#if defined(GST_IOS_PLUGIN_THEORA) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
theora
);
#endif
#if defined(GST_IOS_PLUGIN_VORBIS) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
vorbis
);
#endif
#if defined(GST_IOS_PLUGIN_OPUS) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
opus
);
#endif
#if defined(GST_IOS_PLUGIN_IVORBISDEC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
ivorbisdec
);
#endif
#if defined(GST_IOS_PLUGIN_ALAW) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
alaw
);
#endif
#if defined(GST_IOS_PLUGIN_APETAG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
apetag
);
#endif
#if defined(GST_IOS_PLUGIN_AUDIOPARSERS) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
audioparsers
);
#endif
#if defined(GST_IOS_PLUGIN_AUPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
auparse
);
#endif
#if defined(GST_IOS_PLUGIN_AVI) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
avi
);
#endif
#if defined(GST_IOS_PLUGIN_DV) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
dv
);
#endif
#if defined(GST_IOS_PLUGIN_FLAC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
flac
);
#endif
#if defined(GST_IOS_PLUGIN_FLV) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
flv
);
#endif
#if defined(GST_IOS_PLUGIN_FLXDEC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
flxdec
);
#endif
#if defined(GST_IOS_PLUGIN_ICYDEMUX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
icydemux
);
#endif
#if defined(GST_IOS_PLUGIN_ID3DEMUX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
id3demux
);
#endif
#if defined(GST_IOS_PLUGIN_ISOMP4) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
isomp4
);
#endif
#if defined(GST_IOS_PLUGIN_JPEG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
jpeg
);
#endif
#if defined(GST_IOS_PLUGIN_LAME) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
lame
);
#endif
#if defined(GST_IOS_PLUGIN_MATROSKA) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
matroska
);
#endif
#if defined(GST_IOS_PLUGIN_MPG123) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
mpg123
);
#endif
#if defined(GST_IOS_PLUGIN_MULAW) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
mulaw
);
#endif
#if defined(GST_IOS_PLUGIN_MULTIPART) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
multipart
);
#endif
#if defined(GST_IOS_PLUGIN_PNG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
png
);
#endif
#if defined(GST_IOS_PLUGIN_SPEEX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
speex
);
#endif
#if defined(GST_IOS_PLUGIN_TAGLIB) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
taglib
);
#endif
#if defined(GST_IOS_PLUGIN_VPX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
vpx
);
#endif
#if defined(GST_IOS_PLUGIN_WAVENC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
wavenc
);
#endif
#if defined(GST_IOS_PLUGIN_WAVPACK) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
wavpack
);
#endif
#if defined(GST_IOS_PLUGIN_WAVPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
wavparse
);
#endif
#if defined(GST_IOS_PLUGIN_Y4MENC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
y4menc
);
#endif
#if defined(GST_IOS_PLUGIN_ADPCMDEC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
adpcmdec
);
#endif
#if defined(GST_IOS_PLUGIN_ADPCMENC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
adpcmenc
);
#endif
#if defined(GST_IOS_PLUGIN_DASHDEMUX) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
dashdemux
);
#endif
#if defined(GST_IOS_PLUGIN_DVBSUBOVERLAY) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
dvbsuboverlay
);
#endif
#if defined(GST_IOS_PLUGIN_DVDSPU) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
dvdspu
);
#endif
#if defined(GST_IOS_PLUGIN_HLS) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
hls
);
#endif
#if defined(GST_IOS_PLUGIN_ID3TAG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
id3tag
);
#endif
#if defined(GST_IOS_PLUGIN_KATE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
kate
);
#endif
#if defined(GST_IOS_PLUGIN_MIDI) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
midi
);
#endif
#if defined(GST_IOS_PLUGIN_MXF) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
mxf
);
#endif
#if defined(GST_IOS_PLUGIN_OPENH264) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
openh264
);
#endif
#if defined(GST_IOS_PLUGIN_OPUSPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
opusparse
);
#endif
#if defined(GST_IOS_PLUGIN_PCAPPARSE) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
pcapparse
);
#endif
#if defined(GST_IOS_PLUGIN_PNM) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
pnm
);
#endif
#if defined(GST_IOS_PLUGIN_RFBSRC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
rfbsrc
);
#endif
#if defined(GST_IOS_PLUGIN_SIREN) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
siren
);
#endif
#if defined(GST_IOS_PLUGIN_SMOOTHSTREAMING) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
smoothstreaming
);
#endif
#if defined(GST_IOS_PLUGIN_SUBENC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
subenc
);
#endif
#if defined(GST_IOS_PLUGIN_VIDEOPARSERSBAD) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
videoparsersbad
);
#endif
#if defined(GST_IOS_PLUGIN_Y4MDEC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
y4mdec
);
#endif
#if defined(GST_IOS_PLUGIN_JPEGFORMAT) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
jpegformat
);
#endif
#if defined(GST_IOS_PLUGIN_GDP) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
gdp
);
#endif
#if defined(GST_IOS_PLUGIN_RSVG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
rsvg
);
#endif
#if defined(GST_IOS_PLUGIN_OPENJPEG) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
openjpeg
);
#endif
#if defined(GST_IOS_PLUGIN_SPANDSP) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
spandsp
);
#endif
#if defined(GST_IOS_PLUGIN_SBC) || defined(GST_IOS_PLUGINS_CODECS)
GST_PLUGIN_STATIC_REGISTER
(
sbc
);
#endif
#if defined(GST_IOS_PLUGIN_TCP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
tcp
);
#endif
#if defined(GST_IOS_PLUGIN_RTSP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
rtsp
);
#endif
#if defined(GST_IOS_PLUGIN_RTP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
rtp
);
#endif
#if defined(GST_IOS_PLUGIN_RTPMANAGER) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
rtpmanager
);
#endif
#if defined(GST_IOS_PLUGIN_SOUP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
soup
);
#endif
#if defined(GST_IOS_PLUGIN_UDP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
udp
);
#endif
#if defined(GST_IOS_PLUGIN_DTLS) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
dtls
);
#endif
#if defined(GST_IOS_PLUGIN_SDPELEM) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
sdpelem
);
#endif
#if defined(GST_IOS_PLUGIN_SRTP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
srtp
);
#endif
#if defined(GST_IOS_PLUGIN_WEBRTC) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
webrtc
);
#endif
#if defined(GST_IOS_PLUGIN_RTSPCLIENTSINK) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER
(
rtspclientsink
);
#endif
void
gst_ios_post_init
(
void
)
{
GstPluginFeature
*
plugin
;
GstRegistry
*
reg
;
/* Lower the ranks of filesrc and giosrc so iosavassetsrc is
* tried first in gst_element_make_from_uri() for file:// */
#if defined(GST_IOS_GIO_MODULE_GNUTLS)
GST_G_IO_MODULE_LOAD
(
gnutls
);
GST_G_IO_MODULE_LOAD
(
gnutls
);
#endif
/* Lower the ranks of filesrc and giosrc so iosavassetsrc is
* tried first in gst_element_make_from_uri() for file:// */
reg
=
gst_registry_get
();
plugin
=
gst_registry_lookup_feature
(
reg
,
"filesrc"
);
if
(
plugin
)
...
...
@@ -1095,4 +69,12 @@ gst_ios_init (void)
plugin
=
gst_registry_lookup_feature
(
reg
,
"giosrc"
);
if
(
plugin
)
gst_plugin_feature_set_rank
(
plugin
,
GST_RANK_SECONDARY
-
1
);
if
(
!
gst_registry_lookup_feature
(
reg
,
"vtdec_hw"
))
{
/* Usually there is no vtdec_hw plugin on iOS - in that case
* we are increasing vtdec rank since VideoToolbox on iOS
* tries to use hardware implementation first */
plugin
=
gst_registry_lookup_feature
(
reg
,
"vtdec"
);
if
(
plugin
)
gst_plugin_feature_set_rank
(
plugin
,
GST_RANK_PRIMARY
+
1
);
}
}
src/main.cc
View file @
b45b8530
...
...
@@ -138,7 +138,7 @@ static const char kJniClassName[] {"org/mavlink/qgroundcontrol/QGCActivity"};
void
setNativeMethods
(
void
)
{
JNINativeMethod
javaMethods
[]
{
{
"nativeInit"
,
"(
Landroid/content/Context;
)V"
,
reinterpret_cast
<
void
*>
(
gst_android_init
)}
{
"nativeInit"
,
"()V"
,
reinterpret_cast
<
void
*>
(
gst_android_init
)}
};
QAndroidJniEnvironment
jniEnv
;
...
...
@@ -176,12 +176,8 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
if
(
vm
->
GetEnv
(
reinterpret_cast
<
void
**>
(
&
env
),
JNI_VERSION_1_6
)
!=
JNI_OK
)
{
return
-
1
;
}
setNativeMethods
();
QAndroidJniObject
resultL
=
QAndroidJniObject
::
callStaticObjectMethod
(
kJniClassName
,
"jniOnLoad"
,
"();"
);
setNativeMethods
();
#if defined(QGC_GST_STREAMING)
// Tell the androidmedia plugin about the Java VM
...
...
@@ -191,7 +187,9 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
#if !defined(NO_SERIAL_LINK)
QSerialPort
::
setNativeMethods
();
#endif
JoystickAndroid
::
setNativeMethods
();
#if defined(QGC_ENABLE_PAIRING)
PairingManager
::
setNativeMethods
();
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment