在openhamony中使用dash插件
1 将dash加入编译
1 bad插件的BUILD.gn中添加编译信息
ohos_source_set("dash_source") {
sources = [
"ext/dash/gstdashdemux.c",
"ext/dash/gstmpdnode.c",
"ext/dash/gstmpdrootnode.c",
"ext/dash/gstmpdbaseurlnode.c",
"ext/dash/gstmpdutctimingnode.c",
"ext/dash/gstmpdmetricsnode.c",
"ext/dash/gstmpdmetricsrangenode.c",
"ext/dash/gstmpdsnode.c",
"ext/dash/gstmpdsegmenttimelinenode.c",
"ext/dash/gstmpdsegmenttemplatenode.c",
"ext/dash/gstmpdsegmenturlnode.c",
"ext/dash/gstmpdsegmentlistnode.c",
"ext/dash/gstmpdsegmentbasenode.c",
"ext/dash/gstmpdperiodnode.c",
"ext/dash/gstmpdrepresentationbasenode.c",
"ext/dash/gstmpdmultsegmentbasenode.c",
"ext/dash/gstmpdrepresentationnode.c",
"ext/dash/gstmpdsubrepresentationnode.c",
"ext/dash/gstmpdadaptationsetnode.c",
"ext/dash/gstmpdsubsetnode.c",
"ext/dash/gstmpdprograminformationnode.c",
"ext/dash/gstmpdlocationnode.c",
"ext/dash/gstmpdreportingnode.c",
"ext/dash/gstmpdurltypenode.c",
"ext/dash/gstmpddescriptortypenode.c",
"ext/dash/gstxmlhelper.c",
"ext/dash/gstmpdhelper.c",
"ext/dash/gstmpdparser.c",
"ext/dash/gstmpdclient.c",
"ext/dash/gstplugin.c",
"ext/dash/gstdashsink.c",
]
include_dirs = [
".",
"./gst-libs",
"//third_party/gstreamer/gstreamer",
"//third_party/gstreamer/gstreamer/libs",
"//third_party/gstreamer/gstplugins_base",
"//third_party/gstreamer/gstplugins_base/gst-libs",
"//third_party/glib/glib",
"//third_party/glib",
"//third_party/glib/gmodule",
"//third_party/gstreamer/gstplugins_base/gst-libs/gst/pbutils",
"//third_party/gstreamer/gstplugins_bad/gst-libs/gst/adaptivedemux",
"//third_party/gstreamer/gstplugins_bad/gst-libs/gst/uridownloader",
"//third_party/gstreamer/gstplugins_bad/gst-libs/gst/tag",
"//third_party/gstreamer/gstplugins_bad/gst-libs/gst/isoff",
"//third_party/gstreamer/gstplugins_base/gst/gst/gio",
"//third_party/gstreamer/gstreamer/libs/gst/net",
"//third_party/libxml2/include"
]
configs = [
":gst_plugins_config",
":dash_source_config",
]
}
ohos_shared_library("gstdash") {
deps = [
":dash_source",
"//third_party/glib:glib",
"//third_party/glib:gio",
"//third_party/glib:gobject",
"//third_party/gstreamer/gstreamer:gstbase",
"//third_party/gstreamer/gstreamer:gstreamer",
"//third_party/libxml2:xml2",
"//third_party/gstreamer/gstplugins_bad:gstadaptivedemux",
"//third_party/gstreamer/gstplugins_bad:gsturidownloader",
"//third_party/gstreamer/gstplugins_base:gsttag",
"//third_party/gstreamer/gstplugins_base:gstpbutils",
"//third_party/gstreamer/gstplugins_bad:gstisoff",
"//third_party/gstreamer/gstplugins_base:gstgio",
"//third_party/gstreamer/gstreamer:gstnet",
]
relative_install_dir = "media/plugins"
part_name = "gstreamer"
subsystem_name = "thirdparty"
}
2解决依赖中缺少的库
[OHOS INFO] ERROR Unresolved dependencies.
[OHOS INFO] //third_party/gstreamer/gstplugins_bad:gstdash(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] needs //third_party/glib:gio(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] //third_party/gstreamer/gstplugins_bad:gstdash(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] needs //third_party/gstreamer/gstplugins_bad:gstisoff(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] //third_party/gstreamer/gstplugins_bad:gstdash(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] needs //third_party/gstreamer/gstplugins_base:gstgio(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] //third_party/gstreamer/gstplugins_bad:gstdash(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] needs //third_party/gstreamer/gstreamer:gstnet(//build/toolchain/ohos:ohos_clang_arm)
gstisoff
ohos_source_set("isoff_source") {
sources = [
"gst-libs/gst/isoff/gstisoff.c",
]
configs = [
":gst_plugins_config",
]
}
ohos_shared_library("gstisoff") {
deps = [
":isoff_source",
"//third_party/glib:glib",
"//third_party/glib:gobject",
"//third_party/gstreamer/gstreamer:gstbase",
"//third_party/gstreamer/gstreamer:gstreamer",
]
relative_install_dir = "media/plugins"
part_name = "multimedia_player_framework"
subsystem_name = "multimedia"
}
group("gstplugins_bad_packages") {
deps = [
":gstcurl",
":gsthls",
":gstmpegtsdemux",
":gstvideoparsersbad",
":gsturidownloader",
":gstisoff",
":gstdash",
]
}
gstgio
\third_party\gstreamer\gstplugins_base\BUILD.gn
config("gstgio_config") {
include_dirs = [
"//third_party/glib/glib",
"//third_party/glib/gio",
]
cflags = [
"-DGST_STATIC_COMPILATION",
]
}
ohos_source_set("gstgio_source") {
sources = [
"gst/gio/gstgioelement.c",
"gst/gio/gstgiobasesink.c",
"gst/gio/gstgiobasesrc.c",
"gst/gio/gstgiosink.c",
"gst/gio/gstgiosrc.c",
"gst/gio/gstgiostreamsink.c",
"gst/gio/gstgiostreamsrc.c",
]
configs = [
":gst_plugins_config",
]
}
ohos_shared_library("gstgio") {
deps = [
":gstgio_source",
"//third_party/glib:glib",
"//third_party/glib:gio",
"//third_party/glib:gmodule",
"//third_party/glib:gobject",
"//third_party/gstreamer/gstreamer:gstbase",
"//third_party/gstreamer/gstreamer:gstreamer",
]
part_name = "multimedia_player_framework"
subsystem_name = "multimedia"
}
group("gstplugins_base_packages") {
deps = [
":gstapp",
":gstaudioconvert",
":gstaudioresample",
":gstplayback",
":gstriff",
":gsttypefindfunctions",
":gstvideoconvert",
":gstvideoscale",
":gstgio",
":gsttag",
":gstpbutils",
]
}
config("gst_plugins_config") {
visibility = [ ":*" ]
include_dirs = [
".",
"./gst-libs",
"../gst_dfx/",
"//third_party/gstreamer/gstreamer",
"//third_party/gstreamer/gstreamer/gst",
"//third_party/gstreamer/gstreamer/libs",
"//third_party/glib/glib",
"//third_party/glib",
"//third_party/glib/gmodule",
"//third_party/zlib/",
]
gstnet
third_party\gstreamer\gstreamer\BUILD.gn
group("gstreamer_packages") {
deps = [
":gst-inspect",
":gst-launch",
":gstbase",
":gstcoreelements",
":gstreamer",
":gstnet",
]
}
config("gstnet_config") {
include_dirs = [
".",
"./libs",
"./libs/gst/net"