Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tkanakamalla/gst-plugins-rs
  • gstreamer/gst-plugins-rs
  • slomo/gst-plugins-rs
  • tvermeir/gst-plugin-rs
  • alatiera/gst-plugins-rs
  • redongjun/gst-plugin-rs
  • fengalin/gst-plugins-rs
  • bkchr/gst-plugins-rs
  • LighthouseJ/gst-plugins-rs
  • JimmyOhn/gst-plugins-rs
  • philn/gst-plugins-rs
  • meh/gst-plugins-rs
  • ahamedsajeer.15/gst-plugins-rs
  • kindlychung/gst-plugins-rs
  • gdesmott/gst-plugins-rs
  • arun/gst-plugins-rs
  • loganek/gst-plugins-rs
  • nhunter1093/gst-plugins-rs
  • charles/gst-plugins-rs
  • rubenrua/gst-plugins-rs
  • raytiley/gst-plugins-rs
  • rgonzalez/gst-plugins-rs
  • chturne/gst-plugins-rs
  • heftig/gst-plugins-rs
  • Devdutt/gst-plugins-rs
  • tony-jinwoo-ahn/gst-plugins-rs
  • bilboed/gst-plugins-rs
  • tmorell/gst-plugins-rs
  • xclaesse/gst-plugins-rs
  • hanseac/gst-plugins-rs
  • neithanmo/gst-plugins-rs
  • blaxar.waldarax/gst-plugins-rs
  • ebnerm/gst-plugins-rs
  • dabrain34/gst-plugins-rs
  • paulyc/gst-plugins-rs
  • ndufresne/gst-plugins-rs
  • bgonz/gst-plugins-rs
  • lucab/gst-plugins-rs
  • yan3nian/gst-plugins-rs
  • jessica2020martin/gst-plugins-rs
  • ystreet/gst-plugins-rs
  • vivia/gst-plugins-rs
  • yselkowitz1/gst-plugins-rs
  • elmarco/gst-plugins-rs
  • thaytan/gst-plugins-rs
  • seungha.yang/gst-plugins-rs
  • avantgardnerio/gst-plugins-rs
  • wonchul/gst-plugins-rs
  • abdulrehman/gst-plugins-rs
  • nkyriazis/gst-plugins-rs
  • francisv/gst-plugins-rs
  • MarijnS95/gst-plugins-rs
  • zeenix/gst-plugins-rs
  • SanchayanMaity/gst-plugins-rs
  • gstreamer-backport-bot/gst-plugins-rs
  • cadubentzen/gst-plugins-rs
  • ocrete/gst-plugins-rs
  • bilelmoussaoui/gst-plugins-rs
  • karlri/gst-plugins-rs
  • rafaelcaricio/gst-plugins-rs
  • ferjmoreno/gst-plugins-rs
  • xhaakon/gst-plugins-rs
  • theHamsta/gst-plugins-rs
  • taynantz/gst-plugins-rs
  • chrko/gst-plugins-rs
  • humb3rtoguti3rr3z/gst-plugins-rs
  • micolous/gst-plugins-rs
  • linkmauve/gst-plugins-rs
  • jsparber/gst-plugins-rs
  • tpm/gst-plugins-rs
  • SeaDve/gst-plugins-rs
  • andreiltd/gst-plugins-rs
  • marksweeneyster/gst-plugins-rs
  • thiblahute/gst-plugins-rs
  • jh-hsd/gst-plugins-rs
  • burakyigit442005/gst-plugins-rs
  • kapsa.wojtek/gst-plugins-rs
  • vivienne/gst-plugins-rs
  • aeikum/gst-plugins-rs
  • yatinmaan/gst-plugins-rs
  • ranfdev/gst-plugins-rs
  • 7r3nzy/gst-plugins-rs
  • K.J.Russcher/gst-plugins-rs
  • Be/gst-plugins-rs
  • rajneeshksoni/gst-plugins-rs
  • 0m-ax/gst-plugins-rs
  • VanMacGiGi/gst-plugins-rs
  • nirbheek/gst-plugins-rs
  • leio/gst-plugins-rs
  • mildsunrise/gst-plugins-rs
  • dwlsalmeida/gst-plugins-rs
  • neodesys/gst-plugins-rs
  • MichaelOultram-pexip/gst-plugins-rs
  • zhao-gang/gst-plugins-rs
  • raffael_santi/gst-plugins-rs
  • mkonstapel/gst-plugins-rs
  • johan-bjareholt/gst-plugins-rs
  • cwtchan3388/gst-plugins-rs
  • Skyfarmer/gst-plugins-rs
  • mattfeury/gst-plugins-rs
  • mmenzyns/gst-plugins-rs
  • averred/gst-plugins-rs
  • jobafr/gst-plugins-rs
  • thejoeejoee/gst-plugins-rs
  • lilyinstarlight/gst-plugins-rs
  • MrBlenny/gst-plugins-rs
  • Hejsil/gst-plugins-rs
  • marcbull/gst-plugins-rs
  • kingosticks/gst-plugins-rs
  • beaverking/gst-plugins-rs
  • chhofi/gst-plugins-rs
  • jaysonsantos/gst-plugins-rs
  • ylatuya/gst-plugins-rs
  • ozan/gst-plugins-rs
  • happylinks/gst-plugins-rs
  • vpalmisano/gst-plugins-rs
  • rodrigovb96/gst-plugins-rs
  • JanGernert/gst-plugins-rs
  • amyspark/gst-plugins-rs
  • rayrapetyan/gst-plugins-rs
  • YaLTeR/gst-plugins-rs
  • eva/gst-plugins-rs
  • danburkert/gst-plugins-rs
  • GRVYDEV/gst-plugins-rs
  • Sean-Der/gst-plugins-rs
  • max-khm/gst-plugins-rs
  • thewildtree/gst-plugins-rs
  • lieven.paulissen2/gst-plugins-rs
  • lieven.paulissen/gst-plugins-rs
  • eddo/gst-plugins-rs
  • nagisa/gst-plugins-rs
  • jyelloz/gst-plugins-rs
  • rmader/gst-plugins-rs
  • PLavigne/gst-plugins-rs
  • AntoninRousset/gst-plugins-rs
  • mjimeno/gst-plugins-rs
  • benjamin.gaignard1/gst-plugins-rs
  • m.tretter/gst-plugins-rs
  • diegonieto/gst-plugins-rs
  • zecakeh/gst-plugins-rs
  • jhennebe/gst-plugins-rs
  • gawmanarnar/gst-plugins-rs
  • levaitamas/gst-plugins-rs
  • cdelguercio/gst-plugins-rs
  • btgoodwin/gst-plugins-rs
  • ljwall/gst-plugins-rs
  • vixalien/gst-plugins-rs
  • ekwange/gst-plugins-rs
  • SteveMcFarlin/gst-plugins-rs
  • leonardosalvatore/gst-plugins-rs
  • artemmartus/gst-plugins-rs
  • leo.park/gst-plugins-rs
  • muiznieks.reinis/gst-plugins-rs
  • topmux/gst-plugins-rs
  • davydog187/gst-plugins-rs
  • kevmo314/gst-plugins-rs
  • markandre/gst-plugins-rs
  • jbcolle/gst-plugins-rs
  • me5/gst-plugins-rs
  • ntrrgc/gst-plugins-rs
  • jewe37/gst-plugins-rs
  • emielvanseveren/gst-plugins-rs
  • daniel.pendse/gst-plugins-rs
  • cocoa/gst-plugins-rs
  • oscar/gst-plugins-rs
  • chrisb/gst-plugins-rs
  • Mohan_J/gst-plugins-rs
  • alberts/gst-plugins-rs
  • bradh/gst-plugins-rs
  • eipachte/gst-plugins-rs
  • romain/gst-plugins-rs
  • dyshimizu/gst-plugins-rs
  • antoniok/gst-plugins-rs
  • tomaszmi/gst-plugins-rs
  • jtojnar/gst-plugins-rs
  • dougnazar/gst-plugins-rs
176 results
Show changes
Commits on Source (10)
Showing
with 3781 additions and 69 deletions
......@@ -60,6 +60,18 @@ dependencies = [
"opaque-debug",
]
[[package]]
name = "ahash"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01"
dependencies = [
"cfg-if",
"once_cell",
"version_check",
"zerocopy 0.7.32",
]
[[package]]
name = "aho-corasick"
version = "1.1.2"
......@@ -69,6 +81,12 @@ dependencies = [
"memchr",
]
[[package]]
name = "allocator-api2"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
[[package]]
name = "android-tzdata"
version = "0.1.1"
......@@ -854,6 +872,17 @@ dependencies = [
"generic-array",
]
[[package]]
name = "bstr"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc"
dependencies = [
"memchr",
"regex-automata 0.4.5",
"serde",
]
[[package]]
name = "build_const"
version = "0.2.2"
......@@ -909,7 +938,7 @@ dependencies = [
[[package]]
name = "cairo-rs"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"bitflags 2.4.2",
"cairo-sys-rs",
......@@ -921,7 +950,7 @@ dependencies = [
[[package]]
name = "cairo-sys-rs"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"glib-sys",
"libc",
......@@ -1105,6 +1134,12 @@ dependencies = [
"version_check",
]
[[package]]
name = "cookie-factory"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "396de984970346b0d9e93d1415082923c679e5ae5c3ee3dcbd104f5610af126b"
[[package]]
name = "cookie_store"
version = "0.20.0"
......@@ -1583,6 +1618,12 @@ dependencies = [
"pin-project-lite",
]
[[package]]
name = "fallible-iterator"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
[[package]]
name = "fastrand"
version = "2.0.1"
......@@ -1801,7 +1842,7 @@ dependencies = [
[[package]]
name = "gdk-pixbuf"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"gdk-pixbuf-sys",
"gio",
......@@ -1812,7 +1853,7 @@ dependencies = [
[[package]]
name = "gdk-pixbuf-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"gio-sys",
"glib-sys",
......@@ -1971,7 +2012,7 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "gio"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"futures-channel",
"futures-core",
......@@ -1988,7 +2029,7 @@ dependencies = [
[[package]]
name = "gio-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -2000,7 +2041,7 @@ dependencies = [
[[package]]
name = "glib"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"bitflags 2.4.2",
"futures-channel",
......@@ -2021,7 +2062,7 @@ dependencies = [
[[package]]
name = "glib-macros"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"heck",
"proc-macro-crate",
......@@ -2033,7 +2074,7 @@ dependencies = [
[[package]]
name = "glib-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"libc",
"system-deps",
......@@ -2048,7 +2089,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "gobject-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"glib-sys",
"libc",
......@@ -2058,7 +2099,7 @@ dependencies = [
[[package]]
name = "graphene-rs"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"glib",
"graphene-sys",
......@@ -2068,7 +2109,7 @@ dependencies = [
[[package]]
name = "graphene-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"glib-sys",
"libc",
......@@ -2599,6 +2640,30 @@ dependencies = [
"once_cell",
]
[[package]]
name = "gst-plugin-rtsp"
version = "0.12.0-alpha.1"
dependencies = [
"anyhow",
"atomic_refcell",
"data-encoding",
"futures",
"gst-plugin-version-helper",
"gstreamer",
"gstreamer-app",
"gstreamer-net",
"gstreamer-pbutils",
"lru",
"once_cell",
"rtsp-types",
"sdp-types",
"socket2 0.5.5",
"thiserror",
"tokio",
"tokio-stream",
"url",
]
[[package]]
name = "gst-plugin-sodium"
version = "0.12.0-alpha.1"
......@@ -2890,7 +2955,7 @@ dependencies = [
[[package]]
name = "gstreamer"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"cfg-if",
"futures-channel",
......@@ -2916,7 +2981,7 @@ dependencies = [
[[package]]
name = "gstreamer-app"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"futures-core",
"futures-sink",
......@@ -2930,7 +2995,7 @@ dependencies = [
[[package]]
name = "gstreamer-app-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gstreamer-base-sys",
......@@ -2942,7 +3007,7 @@ dependencies = [
[[package]]
name = "gstreamer-audio"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"cfg-if",
"glib",
......@@ -2957,7 +3022,7 @@ dependencies = [
[[package]]
name = "gstreamer-audio-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -2970,7 +3035,7 @@ dependencies = [
[[package]]
name = "gstreamer-base"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"atomic_refcell",
"cfg-if",
......@@ -2983,7 +3048,7 @@ dependencies = [
[[package]]
name = "gstreamer-base-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -2995,7 +3060,7 @@ dependencies = [
[[package]]
name = "gstreamer-check"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3005,7 +3070,7 @@ dependencies = [
[[package]]
name = "gstreamer-check-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -3017,7 +3082,7 @@ dependencies = [
[[package]]
name = "gstreamer-gl"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3031,7 +3096,7 @@ dependencies = [
[[package]]
name = "gstreamer-gl-egl"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3043,7 +3108,7 @@ dependencies = [
[[package]]
name = "gstreamer-gl-egl-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gstreamer-gl-sys",
......@@ -3054,7 +3119,7 @@ dependencies = [
[[package]]
name = "gstreamer-gl-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -3068,7 +3133,7 @@ dependencies = [
[[package]]
name = "gstreamer-gl-wayland"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3080,7 +3145,7 @@ dependencies = [
[[package]]
name = "gstreamer-gl-wayland-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gstreamer-gl-sys",
......@@ -3091,7 +3156,7 @@ dependencies = [
[[package]]
name = "gstreamer-gl-x11"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3103,7 +3168,7 @@ dependencies = [
[[package]]
name = "gstreamer-gl-x11-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gstreamer-gl-sys",
......@@ -3114,7 +3179,7 @@ dependencies = [
[[package]]
name = "gstreamer-net"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"gio",
"glib",
......@@ -3125,7 +3190,7 @@ dependencies = [
[[package]]
name = "gstreamer-net-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"gio-sys",
"glib-sys",
......@@ -3137,7 +3202,7 @@ dependencies = [
[[package]]
name = "gstreamer-pbutils"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3151,7 +3216,7 @@ dependencies = [
[[package]]
name = "gstreamer-pbutils-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -3165,7 +3230,7 @@ dependencies = [
[[package]]
name = "gstreamer-rtp"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3176,7 +3241,7 @@ dependencies = [
[[package]]
name = "gstreamer-rtp-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gstreamer-base-sys",
......@@ -3188,7 +3253,7 @@ dependencies = [
[[package]]
name = "gstreamer-sdp"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3198,7 +3263,7 @@ dependencies = [
[[package]]
name = "gstreamer-sdp-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gstreamer-sys",
......@@ -3209,7 +3274,7 @@ dependencies = [
[[package]]
name = "gstreamer-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -3220,7 +3285,7 @@ dependencies = [
[[package]]
name = "gstreamer-utils"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"gstreamer",
"gstreamer-app",
......@@ -3232,7 +3297,7 @@ dependencies = [
[[package]]
name = "gstreamer-video"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"cfg-if",
"futures-channel",
......@@ -3249,7 +3314,7 @@ dependencies = [
[[package]]
name = "gstreamer-video-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -3262,7 +3327,7 @@ dependencies = [
[[package]]
name = "gstreamer-webrtc"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib",
"gstreamer",
......@@ -3274,7 +3339,7 @@ dependencies = [
[[package]]
name = "gstreamer-webrtc-sys"
version = "0.22.0"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#230c9066269b74a82cc8b2389d07984d78d97f71"
source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=main#36792404a98de996e2cf6a7485e667fe6f1cee19"
dependencies = [
"glib-sys",
"gstreamer-sdp-sys",
......@@ -3364,6 +3429,10 @@ name = "hashbrown"
version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
dependencies = [
"ahash",
"allocator-api2",
]
[[package]]
name = "headers"
......@@ -3798,9 +3867,9 @@ dependencies = [
[[package]]
name = "js-sys"
version = "0.3.67"
version = "0.3.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1"
checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee"
dependencies = [
"wasm-bindgen",
]
......@@ -4059,7 +4128,7 @@ dependencies = [
"shell-words",
"thiserror",
"tokio",
"zerocopy",
"zerocopy 0.6.6",
]
[[package]]
......@@ -4159,6 +4228,15 @@ version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "lru"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db2c024b41519440580066ba82aab04092b333e09066a5eb86c7c4890df31f22"
dependencies = [
"hashbrown 0.14.3",
]
[[package]]
name = "m3u8-rs"
version = "5.0.5"
......@@ -4591,7 +4669,7 @@ dependencies = [
[[package]]
name = "pango"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"gio",
"glib",
......@@ -4602,7 +4680,7 @@ dependencies = [
[[package]]
name = "pango-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"glib-sys",
"gobject-sys",
......@@ -4613,7 +4691,7 @@ dependencies = [
[[package]]
name = "pangocairo"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"cairo-rs",
"glib",
......@@ -4625,7 +4703,7 @@ dependencies = [
[[package]]
name = "pangocairo-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#4fd5ecf98d4e9f1ec0c42cf0e9bec3db4c39f8d1"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#8e574d3a8e445ff9184b00bd490e6f403cd5aa9c"
dependencies = [
"cairo-sys-rs",
"glib-sys",
......@@ -5314,6 +5392,18 @@ dependencies = [
"winapi",
]
[[package]]
name = "rtsp-types"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "991c14333b8f4fb7459bfaa9e029d0b4b7b1d5a83f56c0d017541e9e1ece21b9"
dependencies = [
"cookie-factory",
"nom",
"tinyvec",
"url",
]
[[package]]
name = "rubato"
version = "0.14.1"
......@@ -5467,6 +5557,16 @@ dependencies = [
"untrusted",
]
[[package]]
name = "sdp-types"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8db497829e222d081f7b50ac81aec4f69750071a0f76b97b950b0b62204da6e"
dependencies = [
"bstr",
"fallible-iterator",
]
[[package]]
name = "sec1"
version = "0.3.0"
......@@ -6538,9 +6638,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.90"
version = "0.2.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406"
checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
......@@ -6548,9 +6648,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.90"
version = "0.2.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd"
checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b"
dependencies = [
"bumpalo",
"log",
......@@ -6563,9 +6663,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.40"
version = "0.4.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461"
checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97"
dependencies = [
"cfg-if",
"js-sys",
......@@ -6575,9 +6675,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.90"
version = "0.2.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999"
checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
......@@ -6585,9 +6685,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.90"
version = "0.2.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66"
dependencies = [
"proc-macro2",
"quote",
......@@ -6598,15 +6698,15 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.90"
version = "0.2.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838"
[[package]]
name = "web-sys"
version = "0.3.67"
version = "0.3.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed"
checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446"
dependencies = [
"js-sys",
"wasm-bindgen",
......@@ -6804,9 +6904,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
[[package]]
name = "winnow"
version = "0.5.37"
version = "0.5.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5"
checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29"
dependencies = [
"memchr",
]
......@@ -6866,7 +6966,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6"
dependencies = [
"byteorder",
"zerocopy-derive",
"zerocopy-derive 0.6.6",
]
[[package]]
name = "zerocopy"
version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
dependencies = [
"zerocopy-derive 0.7.32",
]
[[package]]
......@@ -6880,6 +6989,17 @@ dependencies = [
"syn 2.0.48",
]
[[package]]
name = "zerocopy-derive"
version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
]
[[package]]
name = "zeroize"
version = "1.7.0"
......
......@@ -27,6 +27,7 @@ members = [
"net/raptorq",
"net/reqwest",
"net/rtp",
"net/rtsp",
"net/webrtchttp",
"net/webrtc",
"net/webrtc/protocol",
......@@ -76,6 +77,7 @@ default-members = [
"net/raptorq",
"net/reqwest",
"net/rtp",
"net/rtsp",
"net/webrtchttp",
"net/webrtc",
"net/webrtc/protocol",
......
......@@ -22,6 +22,7 @@ RS_PREFIXED = [
'png',
'tracers',
'rtp',
'rtsp',
'inter',
]
......
......@@ -29,6 +29,7 @@ RENAMES = {
'rsfile': 'file',
'rsflv': 'flavors',
'rsrtp': 'rtp',
'rsrtsp': 'rtsp',
'rswebp': 'webp',
'rsonvif': 'onvif',
'rstracers': 'tracers',
......
......@@ -6321,6 +6321,111 @@
"tracers": {},
"url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
},
"rsrtsp": {
"description": "GStreamer RTSP Client Plugin",
"elements": {
"rtspsrc2": {
"author": "Nirbheek Chauhan <nirbheek centricular com>",
"description": "Receive audio or video from a network device via the Real Time Streaming Protocol (RTSP) (RFC 2326, 7826)",
"hierarchy": [
"GstRtspSrc2",
"GstBin",
"GstElement",
"GstObject",
"GInitiallyUnowned",
"GObject"
],
"interfaces": [
"GstChildProxy",
"GstURIHandler"
],
"klass": "Source/Network",
"pad-templates": {
"stream_%%u": {
"caps": "application/x-rtp:\n",
"direction": "src",
"presence": "sometimes"
}
},
"properties": {
"location": {
"blurb": "RTSP server, credentials and media path, e.g. rtsp://user:p4ssw0rd@camera-5.local:8554/h264_1080p30",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "NULL",
"mutable": "ready",
"readable": true,
"type": "gchararray",
"writable": true
},
"port-start": {
"blurb": "Port number to start allocating client ports for receiving RTP and RTCP data, eg. 3000 (0 = automatic selection)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "0",
"max": "-1",
"min": "0",
"mutable": "ready",
"readable": true,
"type": "guint",
"writable": true
},
"protocols": {
"blurb": "Allowed lower transport protocols, in order of preference",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "udp-mcast,udp,tcp",
"mutable": "ready",
"readable": true,
"type": "gchararray",
"writable": true
},
"receive-mtu": {
"blurb": "Initial size of buffers to allocate in the buffer pool, will be increased if too small",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "1508",
"max": "-1",
"min": "0",
"mutable": "ready",
"readable": true,
"type": "guint",
"writable": true
},
"timeout": {
"blurb": "Timeout for network activity, in nanoseconds",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "5000000000",
"max": "18446744073709551614",
"min": "0",
"mutable": "ready",
"readable": true,
"type": "guint64",
"writable": true
}
},
"rank": "none"
}
},
"filename": "gstrsrtsp",
"license": "MPL",
"other-types": {},
"package": "gst-plugin-rtsp",
"source": "gst-plugin-rtsp",
"tracers": {},
"url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
},
"rstracers": {
"description": "GStreamer Rust tracers plugin",
"elements": {},
......
......@@ -66,7 +66,9 @@ deps = [
]
webrtc_option = get_option('webrtc')
rtp_option = get_option('rtp').enable_if(webrtc_option.enabled(), error_message: 'webrtc option is enabled')
rtp_option = get_option('rtp').enable_if(webrtc_option.enabled(), error_message: 'webrtc option needs rtp')
rtsp_option = get_option('rtsp')
if get_option('threadshare').allowed() \
or get_option('onvif').allowed() \
......@@ -86,7 +88,7 @@ endif
if get_option('gtk4').allowed()
deps += [['gstreamer-gl-1.0', 'gst-plugins-base', 'gst_gl_dep', 'gstgl']]
endif
if get_option('threadshare').allowed()
if get_option('threadshare').allowed() or get_option('rtsp').allowed()
deps += [['gstreamer-net-1.0', 'gstreamer', 'gst_net_dep', 'gst_net']]
endif
......@@ -150,6 +152,7 @@ plugins = {
},
'raptorq': {'library': 'libgstraptorq'},
'reqwest': {'library': 'libgstreqwest'},
'rtsp': {'library': 'libgstrsrtsp'},
'rtp': {'library': 'libgstrsrtp'},
'webrtchttp': {'library': 'libgstwebrtchttp'},
'webrtc': {
......
......@@ -28,6 +28,7 @@ option('ndi', type: 'feature', value: 'auto', description: 'Build ndi plugin')
option('onvif', type: 'feature', value: 'auto', description: 'Build onvif plugin')
option('raptorq', type: 'feature', value: 'auto', description: 'Build raptorq plugin')
option('reqwest', type: 'feature', value: 'auto', description: 'Build reqwest plugin')
option('rtsp', type: 'feature', value: 'auto', description: 'Build rtsp plugin')
option('rtp', type: 'feature', value: 'auto', description: 'Build rtp plugin')
option('webrtc', type: 'feature', value: 'auto', yield: true, description: 'Build webrtc plugin')
option('webrtchttp', type: 'feature', value: 'auto', description: 'Build webrtchttp plugin')
......
[package]
name = "gst-plugin-rtsp"
version.workspace = true
authors = ["Nirbheek Chauhan <nirbheek centricular com>"]
repository.workspace = true
license = "MPL-2.0"
description = "GStreamer RTSP Client Plugin"
edition.workspace = true
rust-version.workspace = true
[dependencies]
anyhow = "1"
atomic_refcell = "0.1"
data-encoding = "2.4"
futures = "0.3"
gst = { workspace = true, features = ["v1_20"] }
gst-app = { workspace = true, features = ["v1_20"] }
gst-net = { workspace = true, features = ["v1_20"] }
gst-pbutils = { workspace = true, features = ["v1_20"] }
once_cell.workspace = true
lru = "0.12"
rtsp-types = "0.1"
sdp-types = "0.1"
socket2 = "0.5"
thiserror = "1"
tokio = { version = "1.0", default-features = false, features = ["io-util", "macros", "net", "time", "rt-multi-thread", "sync"] }
tokio-stream = "0.1"
url = "2"
[lib]
name = "gstrsrtsp"
crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"
[build-dependencies]
gst-plugin-version-helper.workspace = true
[features]
static = []
capi = []
doc = ["gst/v1_18"]
[package.metadata.capi]
min_version = "0.9.21"
[package.metadata.capi.header]
enabled = false
[package.metadata.capi.library]
install_subdir = "gstreamer-1.0"
versioning = false
import_library = false
[package.metadata.capi.pkg_config]
requires_private = "gstreamer-1.0, gstreamer-net-1.0, gobject-2.0, glib-2.0, gmodule-2.0"
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
# rtspsrc2
Rust rewrite of rtspsrc, with the purpose of fixing the fundamentally broken
architecture of rtspsrc. There are some major problems with rtspsrc:
1. Element states are linked to RTSP states, which causes unfixable glitching
and issues, especially in shared RTSP media
2. The command loop is fundamentally broken and buggy, which can cause RTSP
commands such as `SET_PARAMETER` and `GET_PARAMETER` to be lost
3. The combination of the above two causes unfixable deadlocks when doing state
changes due to external factors such as server state, or when seeking
4. Parsing of untrusted RTSP messages from the network was done in C with the
`GstRTSPMessage` API.
5. Parsing of untrusted SDP from the network was done in C with the
`GstSDPMessage` API
## Implemented features
* RTSP 1.0 support
* Lower transports: TCP, UDP, UDP-Multicast
* RTCP SR and RTCP RR
* RTCP-based A/V sync
* Lower transport selection and priority (NEW!)
- Also supports different lower transports for each SETUP
## Missing features
Roughly in order of priority:
* Credentials support
* TLS/TCP support
* NAT hole punching
* Allow ignoring specific streams (SDP medias)
- Currently all available source pads must be linked
* SRTP support
* HTTP tunnelling
* Proxy support
* `GET_PARAMETER` / `SET_PARAMETER`
* Make TCP connection optional when using UDP transport
- Or TCP reconnection if UDP has not timed out
* Parse more SDP attributes
- extmap
- key-mgmt
- rid
- rtcp-fb
- source-filter
- ssrc
* Clock sync support, such as RFC7273
* PAUSE support with VOD
* Seeking support with VOD
* ONVIF backchannel support
* ONVIF trick mode support
* RTSP 2 support (no servers exist at present)
## Missing configuration properties
These are some misc rtspsrc props that haven't been implemented in rtspsrc2
yet:
* latency
* do-rtx
* do-rtcp
* iface
* user-agent
## Maintenance and future cleanup
* Test with market RTSP cameras
- Currently, only live555 and gst-rtsp-server have been tested
* Add tokio-console and tokio tracing support
fn main() {
gst_plugin_version_helper::info()
}
// GStreamer RTSP plugin (in Rust)
//
// Copyright (C) 2023 Tim-Philipp Müller <tim centricular com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at
// <https://mozilla.org/MPL/2.0/>.
//
// SPDX-License-Identifier: MPL-2.0
/**
* plugin-rsrtsp:
*
* Since: plugins-rs-0.12.0
*/
use gst::glib;
mod rtspsrc;
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
rtspsrc::register(plugin)?;
Ok(())
}
gst::plugin_define!(
rsrtsp,
env!("CARGO_PKG_DESCRIPTION"),
plugin_init,
concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
// FIXME: MPL-2.0 is only allowed since 1.18.3 (as unknown) and 1.20 (as known)
"MPL",
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_REPOSITORY"),
env!("BUILD_REL_DATE")
);
// Rust RTSP Server
//
// Copyright (C) 2020-2021 Sebastian Dröge <sebastian@centricular.com>
// Copyright (C) 2024 Nirbheek Chauhan <nirbheek@centricular.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at
// <https://mozilla.org/MPL/2.0/>.
//
// SPDX-License-Identifier: MPL-2.0
use std::cmp;
use std::fmt;
use std::ops;
use gst::buffer::{MappedBuffer, Readable};
/// Body used for RTSP messages in the server.
#[derive(Debug)]
pub struct Body(Inner);
enum Inner {
Vec(Vec<u8>),
Custom(Box<dyn Custom>),
Buffer(MappedBuffer<Readable>),
}
trait Custom: AsRef<[u8]> + Send + Sync + 'static {}
impl<T: AsRef<[u8]> + Send + Sync + 'static> Custom for T {}
impl Default for Body {
fn default() -> Self {
Body(Inner::Vec(Vec::new()))
}
}
impl Body {
/// Create a body from custom memory without copying.
#[allow(dead_code)]
pub fn custom<T: AsRef<[u8]> + Send + Sync + 'static>(custom: T) -> Self {
Body(Inner::Custom(Box::new(custom)))
}
pub fn mapped(mapped: MappedBuffer<Readable>) -> Self {
Body(Inner::Buffer(mapped))
}
}
impl From<Vec<u8>> for Body {
fn from(v: Vec<u8>) -> Self {
Body(Inner::Vec(v))
}
}
impl<'a> From<&'a [u8]> for Body {
fn from(s: &'a [u8]) -> Self {
Body::from(Vec::from(s))
}
}
impl ops::Deref for Body {
type Target = [u8];
fn deref(&self) -> &Self::Target {
self.as_ref()
}
}
impl AsRef<[u8]> for Body {
fn as_ref(&self) -> &[u8] {
match self.0 {
Inner::Vec(ref vec) => vec.as_slice(),
Inner::Custom(ref custom) => (**custom).as_ref(),
Inner::Buffer(ref mapped) => mapped.as_ref(),
}
}
}
impl cmp::PartialEq for Body {
fn eq(&self, other: &Self) -> bool {
self.as_ref().eq(other.as_ref())
}
}
impl cmp::Eq for Body {}
impl Clone for Body {
fn clone(&self) -> Self {
Body::from(Vec::from(self.as_ref()))
}
}
impl fmt::Debug for Inner {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Inner::Vec(ref vec) => f.debug_tuple("Vec").field(&vec).finish(),
Inner::Custom(ref custom) => {
f.debug_tuple("Custom").field(&(**custom).as_ref()).finish()
}
Inner::Buffer(ref mapped) => mapped.fmt(f),
}
}
}
This diff is collapsed.
// GStreamer RTSP Source v2
//
// Copyright (C) 2023 Tim-Philipp Müller <tim centricular com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at
// <https://mozilla.org/MPL/2.0/>.
//
// SPDX-License-Identifier: MPL-2.0
/**
* SECTION:element-rtspsrc2
*
* `rtspsrc2` is a from-scratch rewrite of the `rtspsrc` element to fix some fundamental
* architectural issues, with the aim of making the two functionally equivalent.
*
* Implemented features:
* * RTSP 1.0 support
* * Lower transports: TCP, UDP, UDP-Multicast
* * RTCP SR and RTCP RR
* * RTCP-based A/V sync
* * Lower transport selection and priority (NEW!)
* - Also supports different lower transports for each SETUP
*
* Some missing features:
* * SET_PARAMETER/GET_PARAMETER messages
* * SRTP support
* * VOD support: PAUSE, seeking, etc
* * ONVIF backchannel and trick mode support
* * and more
*
* Please see the [README](https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/blob/main/net/rtsp/README.md)
* for a complete and up-to-date list.
*/
use gst::glib;
use gst::prelude::*;
mod body;
mod imp;
mod sdp;
mod tcp_message;
mod transport;
glib::wrapper! {
pub struct RtspSrc(ObjectSubclass<imp::RtspSrc>) @extends gst::Bin, gst::Element, gst::Object;
}
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
gst::Element::register(
Some(plugin),
"rtspsrc2",
gst::Rank::NONE,
RtspSrc::static_type(),
)
}
// Rust RTSP Server
//
// Copyright (C) 2024 Nirbheek Chauhan <nirbheek@centricular.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at
// <https://mozilla.org/MPL/2.0/>.
//
// SPDX-License-Identifier: MPL-2.0
use super::imp::RtspError;
use super::imp::RtspProtocol;
use super::imp::CAT;
use sdp_types::Attribute;
use sdp_types::Connection;
use std::collections::BTreeSet;
use std::net::IpAddr;
use url::Url;
macro_rules! init_payload_info {
($($t:expr),*,) => {
[
$(
{
let (pt, media, encoding_name, clock_rate, encoding_params) = $t;
PayloadInfo {
pt,
media,
encoding_name,
clock_rate,
encoding_params,
}
}
),*
]
};
}
struct PayloadInfo<'a> {
pt: u8,
media: &'a str,
encoding_name: &'a str,
clock_rate: u32,
encoding_params: Option<&'a str>,
}
// Copied from gst-plugins-base/gst-libs/gst/rtp/gstrtppayloads.h
const STATIC_PAYLOAD_INFO: &[PayloadInfo] = &init_payload_info!(
// static audio
(0, "audio", "PCMU", 8000, Some("1")),
// (1, "audio", "reserved", 0, None),
// (2, "audio", "reserved", 0, None),
(3, "audio", "GSM", 8000, Some("1")),
(4, "audio", "G723", 8000, Some("1")),
(5, "audio", "DVI4", 8000, Some("1")),
(6, "audio", "DVI4", 16000, Some("1")),
(7, "audio", "LPC", 8000, Some("1")),
(8, "audio", "PCMA", 8000, Some("1")),
(9, "audio", "G722", 8000, Some("1")),
(10, "audio", "L16", 44100, Some("2")),
(11, "audio", "L16", 44100, Some("1")),
(12, "audio", "QCELP", 8000, Some("1")),
(13, "audio", "CN", 8000, Some("1")),
(14, "audio", "MPA", 90000, None),
(15, "audio", "G728", 8000, Some("1")),
(16, "audio", "DVI4", 11025, Some("1")),
(17, "audio", "DVI4", 22050, Some("1")),
(18, "audio", "G729", 8000, Some("1")),
// (19, "audio", "reserved", 0, None),
// (20, "audio", "unassigned", 0, None),
// (21, "audio", "unassigned", 0, None),
// (22, "audio", "unassigned", 0, None),
// (23, "audio", "unassigned", 0, None),
// video and video/audio
// (24, "video", "unassigned", 0, None),
(25, "video", "CelB", 90000, None),
(26, "video", "JPEG", 90000, None),
// (27, "video", "unassigned", 0, None),
(28, "video", "nv", 90000, None),
// (29, "video", "unassigned", 0, None),
// (30, "video", "unassigned", 0, None),
(31, "video", "H261", 90000, None),
(32, "video", "MPV", 90000, None),
(33, "video", "MP2T", 90000, None),
(34, "video", "H263", 90000, None),
// (35-71, "unassigned", 0, 0, None),
// (72-76, "reserved", 0, 0, None),
// (77-95, "unassigned", 0, 0, None),
// (96-127, "dynamic", 0, 0, None),
);
// Known media types with dynamic payloads, can only be matched via name
const DYNAMIC_PAYLOAD_INFO: &[PayloadInfo] = &init_payload_info!(
(0, "application", "parityfec", 0, None), // [RFC3009]
(0, "application", "rtx", 0, None), // [RFC4588]
(0, "audio", "AMR", 8000, None), // [RFC4867][RFC3267]
(0, "audio", "AMR-WB", 16000, None), // [RFC4867][RFC3267]
(0, "audio", "DAT12", 0, None), // [RFC3190]
(0, "audio", "dsr-es201108", 0, None), // [RFC3557]
(0, "audio", "EVRC", 8000, Some("1")), // [RFC4788]
(0, "audio", "EVRC0", 8000, Some("1")), // [RFC4788]
(0, "audio", "EVRC1", 8000, Some("1")), // [RFC4788]
(0, "audio", "EVRCB", 8000, Some("1")), // [RFC4788]
(0, "audio", "EVRCB0", 8000, Some("1")), // [RFC4788]
(0, "audio", "EVRCB1", 8000, Some("1")), // [RFC4788]
(0, "audio", "G7221", 16000, Some("1")), // [RFC3047]
(0, "audio", "G726-16", 8000, Some("1")), // [RFC3551][RFC4856]
(0, "audio", "G726-24", 8000, Some("1")), // [RFC3551][RFC4856]
(0, "audio", "G726-32", 8000, Some("1")), // [RFC3551][RFC4856]
(0, "audio", "G726-40", 8000, Some("1")), // [RFC3551][RFC4856]
(0, "audio", "G729D", 8000, Some("1")), // [RFC3551][RFC4856]
(0, "audio", "G729E", 8000, Some("1")), // [RFC3551][RFC4856]
(0, "audio", "GSM-EFR", 8000, Some("1")), // [RFC3551][RFC4856]
(0, "audio", "L8", 0, None), // [RFC3551][RFC4856]
(0, "audio", "RED", 0, None), // [RFC2198][RFC3555]
(0, "audio", "rtx", 0, None), // [RFC4588]
(0, "audio", "VDVI", 0, Some("1")), // [RFC3551][RFC4856]
(0, "audio", "L20", 0, None), // [RFC3190]
(0, "audio", "L24", 0, None), // [RFC3190]
(0, "audio", "MP4A-LATM", 0, None), // [RFC3016]
(0, "audio", "mpa-robust", 90000, None), // [RFC3119]
(0, "audio", "parityfec", 0, None), // [RFC3009]
(0, "audio", "SMV", 8000, Some("1")), // [RFC3558]
(0, "audio", "SMV0", 8000, Some("1")), // [RFC3558]
(0, "audio", "t140c", 0, None), // [RFC4351]
(0, "audio", "t38", 0, None), // [RFC4612]
(0, "audio", "telephone-event", 0, None), // [RFC4733]
(0, "audio", "tone", 0, None), // [RFC4733]
(0, "audio", "DVI4", 0, None), // [RFC4856]
(0, "audio", "G722", 0, None), // [RFC4856]
(0, "audio", "G723", 0, None), // [RFC4856]
(0, "audio", "G728", 0, None), // [RFC4856]
(0, "audio", "G729", 0, None), // [RFC4856]
(0, "audio", "GSM", 0, None), // [RFC4856]
(0, "audio", "L16", 0, None), // [RFC4856]
(0, "audio", "LPC", 0, None), // [RFC4856]
(0, "audio", "PCMA", 0, None), // [RFC4856]
(0, "audio", "PCMU", 0, None), // [RFC4856]
(0, "text", "parityfec", 0, None), // [RFC3009]
(0, "text", "red", 1000, None), // [RFC4102]
(0, "text", "rtx", 0, None), // [RFC4588]
(0, "text", "t140", 1000, None), // [RFC4103]
(0, "video", "BMPEG", 90000, None), // [RFC2343][RFC3555]
(0, "video", "BT656", 90000, None), // [RFC2431][RFC3555]
(0, "video", "DV", 90000, None), // [RFC3189]
(0, "video", "H263-1998", 90000, None), // [RFC2429][RFC3555]
(0, "video", "H263-2000", 90000, None), // [RFC2429][RFC3555]
(0, "video", "MP1S", 90000, None), // [RFC2250][RFC3555]
(0, "video", "MP2P", 90000, None), // [RFC2250][RFC3555]
(0, "video", "MP4V-ES", 90000, None), // [RFC3016]
(0, "video", "parityfec", 0, None), // [RFC3009]
(0, "video", "pointer", 90000, None), // [RFC2862]
(0, "video", "raw", 90000, None), // [RFC4175]
(0, "video", "rtx", 0, None), // [RFC4588]
(0, "video", "SMPTE292M", 0, None), // [RFC3497]
(0, "video", "vc1", 90000, None), // [RFC4425]
// not in http://www.iana.org/assignments/rtp-parameters
(0, "audio", "AC3", 0, None),
(0, "audio", "ILBC", 8000, None),
(0, "audio", "MPEG4-GENERIC", 0, None),
(0, "audio", "SPEEX", 0, None),
(0, "audio", "OPUS", 48000, None),
(0, "application", "MPEG4-GENERIC", 0, None),
(0, "video", "H264", 90000, None),
(0, "video", "H265", 90000, None),
(0, "video", "MPEG4-GENERIC", 90000, None),
(0, "video", "THEORA", 0, None),
(0, "video", "VORBIS", 0, None),
(0, "video", "X-SV3V-ES", 90000, None),
(0, "video", "X-SORENSON-VIDEO", 90000, None),
(0, "video", "VP8", 90000, None),
(0, "video", "VP9", 90000, None),
);
// https://datatracker.ietf.org/doc/html/rfc2326#appendix-C.1.1
pub fn parse_control_path(path: &str, base: &Url) -> Option<Url> {
match Url::parse(path) {
Ok(v) => Some(v),
Err(url::ParseError::RelativeUrlWithoutBase) => {
if path == "*" {
Some(base.clone())
} else {
base.join(path).ok()
}
}
Err(_) => None,
}
}
fn parse_rtpmap(
rtpmap: &str,
pt: u8,
media: &str,
s: &mut gst::structure::Structure,
) -> Result<(), RtspError> {
let Some((_pt, rtpmap)) = rtpmap.split_once(' ') else {
return Err(RtspError::Fatal(format!(
"Could not parse rtpmap: {rtpmap}"
)));
};
let mut iter = rtpmap.split('/');
let Some(encoding_name) = iter.next() else {
return Err(RtspError::Fatal(format!(
"Could not parse encoding-name from rtpmap: {rtpmap}"
)));
};
let encoding_name = encoding_name.to_ascii_uppercase();
s.set("encoding-name", &encoding_name);
let Some(v) = iter.next() else {
if pt >= 96 {
return guess_rtpmap_from_pt(pt, media, s).map_err(|err| {
RtspError::Fatal(format!(
"Could not get clock-rate from rtpmap {rtpmap}: {}",
err
))
});
} else {
return guess_rtpmap_from_encoding_name(&encoding_name, media, s).map_err(|err| {
RtspError::Fatal(format!(
"Could not get clock-rate from rtpmap {rtpmap}: {}",
err
))
});
}
};
let Ok(clock_rate) = v.parse::<i32>() else {
return Err(RtspError::Fatal(format!(
"Could not parse clock-rate from rtpmap: {rtpmap}"
)));
};
s.set("clock-rate", clock_rate);
if let Some(v) = iter.next() {
s.set("encoding-params", v);
}
debug_assert!(iter.next().is_none());
Ok(())
}
fn guess_rtpmap_from_encoding_name(
encoding_name: &str,
media: &str,
s: &mut gst::structure::Structure,
) -> Result<(), RtspError> {
for info in STATIC_PAYLOAD_INFO
.iter()
.chain(DYNAMIC_PAYLOAD_INFO.iter())
{
if media == info.media && encoding_name == info.encoding_name {
s.set("encoding-name", info.encoding_name);
if info.clock_rate > 0 {
s.set("clock-rate", info.clock_rate);
}
if let Some(v) = info.encoding_params {
s.set("encoding-params", v);
};
return Ok(());
}
}
Err(RtspError::Fatal(format!(
"Cannot guess rtpmap: unknown encoding name {encoding_name}"
)))
}
fn guess_rtpmap_from_pt(
pt: u8,
media: &str,
s: &mut gst::structure::Structure,
) -> Result<(), RtspError> {
if pt >= 96 {
return Err(RtspError::Fatal(format!(
"Unknown dynamic payload type {pt}",
)));
}
for info in STATIC_PAYLOAD_INFO {
if pt == info.pt && media == info.media {
s.set("encoding-name", info.encoding_name);
if info.clock_rate > 0 {
s.set("clock-rate", info.clock_rate);
}
if let Some(v) = info.encoding_params {
s.set("encoding-params", v);
};
return Ok(());
}
}
Err(RtspError::Fatal(format!(
"Cannot guess rtpmap: unknown static payload type {pt}"
)))
}
fn parse_fmtp(fmtp: &str, s: &mut gst::structure::Structure) {
// Non-compliant RTSP servers will incorrectly set these here, ignore them
let ignore_fields = [
"media",
"payload",
"clock-rate",
"encoding-name",
"encoding-params",
];
let encoding_name = s.get::<String>("encoding-name").unwrap();
let Some((_pt, fmtp)) = fmtp.split_once(' ') else {
gst::warning!(CAT, "Could not parse fmtp: {fmtp}");
return;
};
let iter = fmtp.split(';').map_while(|x| x.split_once('='));
for (k, v) in iter {
let k = k.trim().to_ascii_lowercase();
if ignore_fields.contains(&k.as_str()) {
continue;
}
if encoding_name == "H264" && k == "profile-level-id" {
let profile_idc = u8::from_str_radix(&v[0..2], 16);
let csf_idc = u8::from_str_radix(&v[2..4], 16);
let level_idc = u8::from_str_radix(&v[4..6], 16);
if let (Ok(p), Ok(c), Ok(l)) = (profile_idc, csf_idc, level_idc) {
let sps = &[p, c, l];
let profile = gst_pbutils::codec_utils_h264_get_profile(sps);
let level = gst_pbutils::codec_utils_h264_get_level(sps);
if let (Ok(profile), Ok(level)) = (profile, level) {
s.set("profile", profile);
s.set("level", level);
continue;
}
}
gst::warning!(CAT, "Failed to parse profile-level-id {v}, ignoring...");
continue;
}
s.set(k, v);
}
// Adjust H264 caps for level asymmetry
if encoding_name == "H264" {
if s.get_optional("level-asymmetry-allowed") != Ok(Some("0")) && s.has_field("level") {
s.remove_field("level");
}
if s.has_field("level-asymmetry-allowed") {
s.remove_field("level-asymmetry-allowed");
};
}
}
fn parse_framesize(framesize: &str, s: &mut gst::structure::Structure) {
let Some((_pt, dim)) = framesize.split_once(' ') else {
gst::warning!(CAT, "Could not parse framesize {framesize}, ignoring");
return;
};
s.set("a-framesize", dim);
}
pub fn parse_media_attributes(
attrs: &Vec<Attribute>,
pt: u8,
media: &str,
s: &mut gst::structure::Structure,
) -> Result<(), RtspError> {
let mut skip_attrs = vec!["control", "range", "ssrc"];
for Attribute { attribute, value } in attrs {
let attr = attribute.as_str();
if skip_attrs.contains(&attr) {
continue;
}
let Some(value) = value else {
continue;
};
if attr.starts_with("x-") {
s.set(attr, value);
continue;
}
match attr {
"rtpmap" => parse_rtpmap(value, pt, media, s)?,
"fmtp" => parse_fmtp(value, s),
"framesize" => parse_framesize(value, s),
// TODO: extmap, key-mgmt, rid, rtcp-fb, source-filter, ssrc
_ => s.set(format!("a-{attribute}"), value),
};
skip_attrs.push(attr);
}
if !skip_attrs.contains(&"rtpmap") {
guess_rtpmap_from_pt(pt, media, s)?;
}
Ok(())
}
pub fn parse_connections(conns: &Vec<Connection>) -> (BTreeSet<RtspProtocol>, bool) {
let mut is_ipv4 = true;
let mut conn_protocols = BTreeSet::new();
for conn in conns {
if conn.nettype != "IN" {
continue;
}
// XXX: For now, assume that all connections use the same addrtype
match conn.addrtype.as_str() {
"IP4" => is_ipv4 = true,
"IP6" => is_ipv4 = false,
_ => continue,
};
// Strip subnet mask, if any
let addr = if let Some((first, _)) = conn.connection_address.split_once('/') {
first
} else {
conn.connection_address.as_str()
};
let Ok(addr) = addr.parse::<IpAddr>() else {
continue;
};
// If this is an instance of gst-rtsp-server that only supports
// udp-multicast, it will put the multicast address in the media
// connections field.
if addr.is_multicast() {
conn_protocols.insert(RtspProtocol::UdpMulticast);
} else {
conn_protocols.insert(RtspProtocol::Tcp);
conn_protocols.insert(RtspProtocol::Udp);
}
}
(conn_protocols, is_ipv4)
}
// GStreamer RTSP Source 2
//
// Copyright (C) 2023 Sebastian Dröge <sebastian@centricular.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at
// <https://mozilla.org/MPL/2.0/>.
//
// SPDX-License-Identifier: MPL-2.0
use std::fmt;
use std::marker::Unpin;
use futures::{Sink, Stream};
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt};
use super::body::Body;
use rtsp_types::Message;
#[derive(Debug)]
pub enum ReadError {
Io(std::io::Error),
TooBig,
ParseError,
}
impl std::error::Error for ReadError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
ReadError::Io(ref io) => Some(io),
_ => None,
}
}
}
impl From<std::io::Error> for ReadError {
fn from(err: std::io::Error) -> Self {
ReadError::Io(err)
}
}
impl fmt::Display for ReadError {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
ReadError::Io(ref io) => fmt::Display::fmt(io, fmt),
ReadError::TooBig => write!(fmt, "Too big message"),
ReadError::ParseError => write!(fmt, "Parse error"),
}
}
}
pub(crate) fn async_read<R: AsyncRead + Unpin + Send>(
read: R,
max_size: usize,
) -> impl Stream<Item = Result<Message<Body>, ReadError>> + Send {
const INITIAL_BUF_SIZE: usize = 8192;
const MAX_EMPTY_BUF_SIZE: usize = 8 * INITIAL_BUF_SIZE;
struct State<R> {
read: R,
buf: Vec<u8>,
write_pos: usize,
// If > 0 then we first need to try parsing as there might be more messages
read_pos: usize,
}
let state = State {
read,
buf: vec![0; INITIAL_BUF_SIZE],
write_pos: 0,
read_pos: 0,
};
futures::stream::unfold(Some(state), move |mut state| async move {
let State {
mut read,
mut buf,
mut write_pos,
mut read_pos,
} = state.take()?;
let read_one = async {
loop {
assert!(read_pos <= write_pos);
// First check if there are more messages left in the buffer
if read_pos != write_pos {
assert_ne!(read_pos, write_pos);
match Message::<Body>::parse(&buf[read_pos..write_pos]) {
Ok((msg, consumed)) => {
read_pos += consumed;
// Need to first read more data on the next call
if read_pos == write_pos {
read_pos = 0;
write_pos = 0;
}
gst::trace!(super::imp::CAT, "Read message {:?}", msg);
return Ok((Some(msg), write_pos, read_pos));
}
Err(rtsp_types::ParseError::Error) => return Err(ReadError::ParseError),
Err(rtsp_types::ParseError::Incomplete(_)) => {
if read_pos > 0 {
// Not a complete message left, copy to the beginning and read more
// data
buf.copy_within(read_pos..write_pos, 0);
write_pos -= read_pos;
read_pos = 0;
// Shrink the buffer again if possible and needed
if buf.len() > MAX_EMPTY_BUF_SIZE && write_pos < MAX_EMPTY_BUF_SIZE
{
buf.resize(MAX_EMPTY_BUF_SIZE, 0);
}
}
}
}
}
assert_eq!(read_pos, 0);
if write_pos == max_size {
gst::error!(super::imp::CAT, "Message bigger than maximum {}", max_size);
return Err(ReadError::TooBig);
}
// Grow the buffer if needed up to the maximum
let new_size = std::cmp::min(
max_size,
buf.len().checked_next_power_of_two().unwrap_or(usize::MAX),
);
if buf.len() < new_size {
buf.resize(new_size, 0);
}
let b = read.read(&mut buf[write_pos..]).await?;
if b == 0 {
gst::debug!(super::imp::CAT, "Connection closed");
return Ok((None, write_pos, read_pos));
}
write_pos += b;
// Try parsing on the next iteration
}
};
match read_one.await {
Ok((Some(msg), write_pos, read_pos)) => Some((
Ok(msg),
Some(State {
read,
buf,
write_pos,
read_pos,
}),
)),
Ok((None, _, _)) => None,
Err(err) => {
gst::error!(super::imp::CAT, "Read error {}", err);
Some((Err(err), None))
}
}
})
}
pub(crate) fn async_write<W: AsyncWrite + Unpin + Send>(
write: W,
) -> impl Sink<Message<Body>, Error = std::io::Error> + Send {
struct State<W> {
write: W,
buffer: Vec<u8>,
}
let state = State {
write,
buffer: Vec::with_capacity(8192),
};
futures::sink::unfold(state, |mut state, item: Message<Body>| {
async move {
gst::trace!(super::imp::CAT, "Writing message {:?}", item);
// TODO: Write data messages more efficiently by writing header / body separately
state.buffer.clear();
item.write(&mut state.buffer).expect("can't fail");
match state.write.write_all(&state.buffer).await {
Ok(_) => {
gst::trace!(super::imp::CAT, "Finished writing queued message");
Ok(state)
}
Err(err) => {
gst::error!(super::imp::CAT, "Write error {}", err);
Err(err)
}
}
}
})
}
// GStreamer RTSP Source 2
//
// Copyright (C) 2023-2024 Nirbheek Chauhan <nirbheek centricular com>
//
// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at
// <https://mozilla.org/MPL/2.0/>.
//
// SPDX-License-Identifier: MPL-2.0
//
// https://www.rfc-editor.org/rfc/rfc2326.html
use super::imp::{RtspError, RtspProtocol};
use rtsp_types::headers::{transport::RtpTransport, RtpLowerTransport};
use std::{convert::TryFrom, net::IpAddr};
use tokio::net::UdpSocket;
#[derive(Debug)]
pub enum RtspTransportInfo {
Tcp {
channels: (u8, Option<u8>),
},
Udp {
source: Option<String>,
server_port: Option<(u16, Option<u16>)>,
client_port: Option<(u16, Option<u16>)>,
sockets: Option<(UdpSocket, Option<UdpSocket>)>,
},
UdpMulticast {
dest: IpAddr,
port: (u16, Option<u16>),
ttl: Option<u8>,
},
}
impl TryFrom<&RtpTransport> for RtspTransportInfo {
type Error = RtspError;
fn try_from(t: &RtpTransport) -> Result<Self, Self::Error> {
match &t.lower_transport {
Some(RtpLowerTransport::Tcp) => match t.params.interleaved {
Some(v) => Ok(RtspTransportInfo::Tcp { channels: v }),
None => Err(RtspError::Fatal(format!(
"Expected interleaved channels: {t:#?}",
))),
},
Some(RtpLowerTransport::Udp) | None => {
if t.params.multicast {
let dest = if let Some(d) = t.params.destination.as_ref() {
match d.parse::<IpAddr>() {
Ok(d) => d,
Err(err) => {
return Err(RtspError::Fatal(format!(
"Failed to parse multicast dest addr: {err:?}"
)));
}
}
} else {
return Err(RtspError::Fatal(format!(
"Need multicast dest addr: {:#?}",
t.params,
)));
};
let Some(port) = t.params.port else {
return Err(RtspError::Fatal(format!(
"Need multicast UDP port(s): {:#?}",
t.params,
)));
};
Ok(RtspTransportInfo::UdpMulticast {
dest,
port,
ttl: t.params.ttl,
})
} else {
Ok(RtspTransportInfo::Udp {
source: t.params.source.clone(),
server_port: t.params.server_port,
client_port: t.params.client_port,
sockets: None,
})
}
}
Some(RtpLowerTransport::Other(token)) => Err(RtspError::Fatal(format!(
"Unsupported RTP lower transport {token:?}"
))),
}
}
}
impl RtspTransportInfo {
pub fn to_protocol(&self) -> RtspProtocol {
match &self {
Self::Tcp { .. } => RtspProtocol::Tcp,
Self::Udp { .. } => RtspProtocol::Udp,
Self::UdpMulticast { .. } => RtspProtocol::UdpMulticast,
}
}
}
......@@ -99,6 +99,14 @@ impl ObjectImpl for PaintableSink {
fn property(&self, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"paintable" => {
// Fix segfault when GTK3 and GTK4 are loaded (e.g. `gst-inspect-1.0 -a`)
// checking if GtkBin is registered to know if libgtk3.so is already present
// GtkBin was dropped for GTK4 https://gitlab.gnome.org/GNOME/gtk/-/commit/3c165b3b77
if glib::types::Type::from_name("GtkBin").is_some() {
gst::error!(CAT, imp: self, "Skipping the creation of paintable to avoid segfault between GTK3 and GTK4");
return None::<&gdk::Paintable>.to_value();
}
let mut paintable = self.paintable.lock().unwrap();
if paintable.is_none() {
self.create_paintable(&mut paintable);
......