From 0981a9c38b390b9a75424a0f05450d4d94588c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 1 Aug 2017 13:28:40 +0100 Subject: [PATCH] Add gstreamer-player-1.0 sys bindings --- Cargo.lock | 146 ++ Cargo.toml | 1 + Gir_GstPlayer.toml | 14 + gir-files/GstPlayer-1.0.gir | 2305 +++++++++++++++++++++++++++++++ gstreamer-player-sys/Cargo.toml | 42 + gstreamer-player-sys/LICENSE | 23 + gstreamer-player-sys/build.rs | 63 + gstreamer-player-sys/src/lib.rs | 326 +++++ 8 files changed, 2920 insertions(+) create mode 100644 Cargo.lock create mode 100644 Gir_GstPlayer.toml create mode 100644 gir-files/GstPlayer-1.0.gir create mode 100644 gstreamer-player-sys/Cargo.toml create mode 100644 gstreamer-player-sys/LICENSE create mode 100644 gstreamer-player-sys/build.rs create mode 100644 gstreamer-player-sys/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000..1b39f5389 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,146 @@ +[root] +name = "gstreamer-video-sys" +version = "0.1.1" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gstreamer-base-sys 0.1.1", + "gstreamer-sys 0.1.1", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bitflags" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "glib-sys" +version = "0.3.4" +source = "git+https://github.com/gtk-rs/sys#af83826e0a31f68bcddee17d3791fb01453dc632" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gobject-sys" +version = "0.3.4" +source = "git+https://github.com/gtk-rs/sys#af83826e0a31f68bcddee17d3791fb01453dc632" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gstreamer-app-sys" +version = "0.1.1" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gstreamer-base-sys 0.1.1", + "gstreamer-sys 0.1.1", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gstreamer-audio-sys" +version = "0.1.1" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gstreamer-base-sys 0.1.1", + "gstreamer-sys 0.1.1", + "gstreamer-tag-sys 0.1.1", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gstreamer-base-sys" +version = "0.1.1" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gstreamer-sys 0.1.1", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gstreamer-pbutils-sys" +version = "0.1.1" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gstreamer-audio-sys 0.1.1", + "gstreamer-sys 0.1.1", + "gstreamer-tag-sys 0.1.1", + "gstreamer-video-sys 0.1.1", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gstreamer-player-sys" +version = "0.1.1" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gstreamer-sys 0.1.1", + "gstreamer-video-sys 0.1.1", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gstreamer-sys" +version = "0.1.1" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gstreamer-tag-sys" +version = "0.1.1" +dependencies = [ + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)", + "gstreamer-base-sys 0.1.1", + "gstreamer-sys 0.1.1", + "libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "libc" +version = "0.2.28" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pkg-config" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[metadata] +"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" +"checksum glib-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "" +"checksum gobject-sys 0.3.4 (git+https://github.com/gtk-rs/sys)" = "" +"checksum libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb7b49972ee23d8aa1026c365a5b440ba08e35075f18c459980c7395c221ec48" +"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" diff --git a/Cargo.toml b/Cargo.toml index 5622edfcc..d556695cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,4 +8,5 @@ members = [ "gstreamer-video-sys", "gstreamer-pbutils-sys", "gstreamer-app-sys", + "gstreamer-player-sys", ] diff --git a/Gir_GstPlayer.toml b/Gir_GstPlayer.toml new file mode 100644 index 000000000..0d912b738 --- /dev/null +++ b/Gir_GstPlayer.toml @@ -0,0 +1,14 @@ +[options] +girs_dir = "gir-files" +library = "GstPlayer" +version = "1.0" +min_cfg_version = "1.0" +target_path = "gstreamer-player-sys" +work_mode = "sys" + +external_libraries = [ + "GLib", + "GObject", + "Gst", + "GstVideo", +] diff --git a/gir-files/GstPlayer-1.0.gir b/gir-files/GstPlayer-1.0.gir new file mode 100644 index 000000000..6d70e0fff --- /dev/null +++ b/gir-files/GstPlayer-1.0.gir @@ -0,0 +1,2305 @@ + + + + + + + + + + + Creates a new #GstPlayer instance that uses @signal_dispatcher to dispatch +signals to some event loop system, or emits signals directly if NULL is +passed. See gst_player_g_main_context_signal_dispatcher_new(). + +Video is going to be rendered by @video_renderer, or if %NULL is provided +no special video set up will be done and some default handling will be +performed. + + a new #GstPlayer instance + + + + + GstPlayerVideoRenderer to use + + + + GstPlayerSignalDispatcher to use + + + + + + + current position update interval in milliseconds + +Since 1.10 + + + + + a #GstPlayer configuration + + + + + + + %TRUE if accurate seeking is enabled + +Since 1.12 + + + + + a #GstPlayer configuration + + + + + + Return the user agent which has been configured using +gst_player_config_set_user_agent() if any. + + the configured agent, or %NULL +Since 1.10 + + + + + a #GstPlayer configuration + + + + + + set interval in milliseconds between two position-updated signals. +pass 0 to stop updating the position. +Since 1.10 + + + + + + a #GstPlayer configuration + + + + interval in ms + + + + + + Set the user agent to pass to the server if @player needs to connect +to a server during playback. This is typically used when playing HTTP +or RTSP streams. + +Since 1.10 + + + + + + a #GstPlayer configuration + + + + the string to use as user agent + + + + + + + A #GList of +matching #GstPlayerAudioInfo. + + + + + + + a #GstPlayerMediaInfo + + + + + + + A #GList of +matching #GstPlayerSubtitleInfo. + + + + + + + a #GstPlayerMediaInfo + + + + + + + A #GList of +matching #GstPlayerVideoInfo. + + + + + + + a #GstPlayerMediaInfo + + + + + + Frees a %NULL terminated array of #GstPlayerVisualization. + + + + + + a %NULL terminated array of #GstPlayerVisualization to free + + + + + + + + a %NULL terminated array containing all available + visualizations. Use gst_player_visualizations_free() after + usage. + + + + + + + Enable or disable accurate seeking. When enabled, elements will try harder +to seek as accurately as possible to the requested seek position. Generally +it will be slower especially for formats that don't have any indexes or +timestamp markers in the stream. + +If accurate seeking is disabled, elements will seek as close as the request +position without slowing down seeking too much. + +Accurate seeking is disabled by default. + + + + + + #GstPlayer instance + + + + accurate seek or not + + + + + + Retrieve the current value of audio-video-offset property + + The current value of audio-video-offset in nanoseconds + +Since 1.10 + + + + + #GstPlayer instance + + + + + + Retrieve the current value of the indicated @type. + + The current value of @type, between [0,1]. In case of + error -1 is returned. + + + + + #GstPlayer instance + + + + #GstPlayerColorBalanceType + + + + + + Get a copy of the current configuration of the player. This configuration +can either be modified and used for the gst_player_set_config() call +or it must be freed after usage. + + a copy of the current configuration of @player. Use +gst_structure_free() after usage or gst_player_set_config(). + +Since 1.10 + + + + + #GstPlayer instance + + + + + + A Function to get current audio #GstPlayerAudioInfo instance. + + current audio track. + +The caller should free it with g_object_unref() + + + + + #GstPlayer instance + + + + + + A Function to get current subtitle #GstPlayerSubtitleInfo instance. + + current subtitle track. + +The caller should free it with g_object_unref() + + + + + #GstPlayer instance + + + + + + A Function to get current video #GstPlayerVideoInfo instance. + + current video track. + +The caller should free it with g_object_unref() + + + + + #GstPlayer instance + + + + + + + Name of the currently enabled visualization. + g_free() after usage. + + + + + #GstPlayer instance + + + + + + Retrieves the duration of the media stream that self represents. + + the duration of the currently-playing media stream, in +nanoseconds. + + + + + #GstPlayer instance + + + + + + A Function to get the current media info #GstPlayerMediaInfo instance. + + media info instance. + +The caller should free it with g_object_unref() + + + + + #GstPlayer instance + + + + + + Retrieve the current value of the indicated @type. + + The current value of @type, Default: 0x00000000 "none + + + + + #GstPlayer instance + + + + + + Retrieve the current value of the indicated @type. + + The current value of @type, Default: -1 "none" + + + + + #GstPlayer instance + + + + + + + %TRUE if the currently-playing stream is muted. + + + + + #GstPlayer instance + + + + + + + The internal playbin instance + + + + + #GstPlayer instance + + + + + + + the absolute position time, in nanoseconds, of the +currently-playing stream. + + + + + #GstPlayer instance + + + + + + + current playback rate + + + + + #GstPlayer instance + + + + + + current subtitle URI + + URI of the current external subtitle. + g_free() after usage. + + + + + #GstPlayer instance + + + + + + Gets the URI of the currently-playing stream. + + a string containing the URI of the +currently-playing stream. g_free() after usage. + + + + + #GstPlayer instance + + + + + + Get a snapshot of the currently selected video stream, if any. The format can be +selected with @format and optional configuration is possible with @config +Currently supported settings are: +- width, height of type G_TYPE_INT +- pixel-aspect-ratio of type GST_TYPE_FRACTION + Except for GST_PLAYER_THUMBNAIL_RAW_NATIVE format, if no config is set, pixel-aspect-ratio would be 1/1 + + Current video snapshot sample or %NULL on failure + +Since 1.12 + + + + + #GstPlayer instance + + + + output format of the video snapshot + + + + Additional configuration + + + + + + Returns the current volume level, as a percentage between 0 and 1. + + the volume as percentage between 0 and 1. + + + + + #GstPlayer instance + + + + + + Checks whether the @player has color balance support available. + + %TRUE if @player has color balance support. Otherwise, + %FALSE. + + + + + #GstPlayer instance + + + + + + Pauses the current stream. + + + + + + #GstPlayer instance + + + + + + Request to play the loaded stream. + + + + + + #GstPlayer instance + + + + + + Seeks the currently-playing stream to the absolute @position time +in nanoseconds. + + + + + + #GstPlayer instance + + + + position to seek in nanoseconds + + + + + + + %TRUE or %FALSE + +Sets the audio track @stream_idex. + + + + + #GstPlayer instance + + + + stream index + + + + + + Enable or disable the current audio track. + + + + + + #GstPlayer instance + + + + TRUE or FALSE + + + + + + Sets audio-video-offset property by value of @offset + +Since 1.10 + + + + + + #GstPlayer instance + + + + #gint64 in nanoseconds + + + + + + Sets the current value of the indicated channel @type to the passed +value. + + + + + + #GstPlayer instance + + + + #GstPlayerColorBalanceType + + + + The new value for the @type, ranged [0,1] + + + + + + Set the configuration of the player. If the player is already configured, and +the configuration haven't change, this function will return %TRUE. If the +player is not in the GST_PLAYER_STATE_STOPPED, this method will return %FALSE +and active configuration will remain. + +@config is a #GstStructure that contains the configuration parameters for +the player. + +This function takes ownership of @config. + + %TRUE when the configuration could be set. +Since 1.10 + + + + + #GstPlayer instance + + + + a #GstStructure + + + + + + Sets the current value of the indicated mode @type to the passed +value. + + + + + + #GstPlayer instance + + + + The new value for the @type + + + + + + Sets the current value of the indicated mode @type to the passed +value. + + + + + + #GstPlayer instance + + + + The new value for the @type + + + + + + %TRUE if the currently-playing stream should be muted. + + + + + + #GstPlayer instance + + + + Mute state the should be set + + + + + + Playback at specified rate + + + + + + #GstPlayer instance + + + + playback rate + + + + + + + %TRUE or %FALSE + +Sets the subtitle strack @stream_index. + + + + + #GstPlayer instance + + + + stream index + + + + + + Enable or disable the current subtitle track. + + + + + + #GstPlayer instance + + + + TRUE or FALSE + + + + + + Sets the external subtitle URI. + + + + + + #GstPlayer instance + + + + subtitle URI + + + + + + Sets the next URI to play. + + + + + + #GstPlayer instance + + + + next URI to play. + + + + + + + %TRUE or %FALSE + +Sets the video track @stream_index. + + + + + #GstPlayer instance + + + + stream index + + + + + + Enable or disable the current video track. + + + + + + #GstPlayer instance + + + + TRUE or FALSE + + + + + + + %TRUE if the visualizations was set correctly. Otherwise, +%FALSE. + + + + + #GstPlayer instance + + + + visualization element obtained from +#gst_player_visualizations_get() + + + + + + Enable or disable the visualization. + + + + + + #GstPlayer instance + + + + TRUE or FALSE + + + + + + Sets the volume level of the stream as a percentage between 0 and 1. + + + + + + #GstPlayer instance + + + + the new volume level, as a percentage between 0 and 1 + + + + + + Stops playing the current stream and resets to the first position +in the stream. + + + + + + #GstPlayer instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GstPlayerStreamInfo specific to audio streams. + + + the audio bitrate in #GstPlayerAudioInfo. + + + + + a #GstPlayerAudioInfo + + + + + + + the number of audio channels in #GstPlayerAudioInfo. + + + + + a #GstPlayerAudioInfo + + + + + + + the language of the stream, or NULL if unknown. + + + + + a #GstPlayerAudioInfo + + + + + + + the audio maximum bitrate in #GstPlayerAudioInfo. + + + + + a #GstPlayerAudioInfo + + + + + + + the audio sample rate in #GstPlayerAudioInfo. + + + + + a #GstPlayerAudioInfo + + + + + + + + + + + + hue or color balance. + + + brightness or black level. + + + color saturation or chroma +gain. + + + contrast or luma gain. + + + Gets a string representing the given color balance type. + + a string with the name of the color + balance type. + + + + + a #GstPlayerColorBalanceType + + + + + + + + generic error. + + + Gets a string representing the given error. + + a string with the given error. + + + + + a #GstPlayerError + + + + + + + + + + + + + + Creates a new GstPlayerSignalDispatcher that uses @application_context, +or the thread default one if %NULL is used. See gst_player_new_full(). + + the new GstPlayerSignalDispatcher + + + + + GMainContext to use or %NULL + + + + + + + + + + + + Structure containing the media information of a URI. + + + A #GList of +matching #GstPlayerAudioInfo. + + + + + + + a #GstPlayerMediaInfo + + + + + + + the container format. + + + + + a #GstPlayerMediaInfo + + + + + + + duration of the media. + + + + + a #GstPlayerMediaInfo + + + + + + Function to get the image (or preview-image) stored in taglist. +Application can use gst_sample_*_() API's to get caps, buffer etc. + + GstSample or NULL. + + + + + a #GstPlayerMediaInfo + + + + + + + number of audio streams. + + + + + a #GstPlayerMediaInfo + + + + + + + number of total streams. + + + + + a #GstPlayerMediaInfo + + + + + + + number of subtitle streams. + + + + + a #GstPlayerMediaInfo + + + + + + + number of video streams. + + + + + a #GstPlayerMediaInfo + + + + + + + A #GList of +matching #GstPlayerStreamInfo. + + + + + + + a #GstPlayerMediaInfo + + + + + + + A #GList of +matching #GstPlayerSubtitleInfo. + + + + + + + a #GstPlayerMediaInfo + + + + + + + the tags contained in media info. + + + + + a #GstPlayerMediaInfo + + + + + + + the media title. + + + + + a #GstPlayerMediaInfo + + + + + + + the URI associated with #GstPlayerMediaInfo. + + + + + a #GstPlayerMediaInfo + + + + + + + A #GList of +matching #GstPlayerVideoInfo. + + + + + + + a #GstPlayerMediaInfo + + + + + + + %TRUE if the media is live. + + + + + a #GstPlayerMediaInfo + + + + + + + %TRUE if the media is seekable. + + + + + a #GstPlayerMediaInfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the player is stopped. + + + the player is buffering. + + + the player is paused. + + + the player is currently playing a +stream. + + + Gets a string representing the given state. + + a string with the name of the state. + + + + + a #GstPlayerState + + + + + + + Base structure for information concering a media stream. Depending on +the stream type, one can find more media-specific information in +#GstPlayerVideoInfo, #GstPlayerAudioInfo, #GstPlayerSubtitleInfo. + + + the #GstCaps of the stream. + + + + + a #GstPlayerStreamInfo + + + + + + A string describing codec used in #GstPlayerStreamInfo. + + codec string or NULL on unknown. + + + + + a #GstPlayerStreamInfo + + + + + + Function to get stream index from #GstPlayerStreamInfo instance. + + the stream index of this stream. + + + + + a #GstPlayerStreamInfo + + + + + + Function to return human readable name for the stream type +of the given @info (ex: "audio", "video", "subtitle") + + a human readable name + + + + + a #GstPlayerStreamInfo + + + + + + + the tags contained in this stream. + + + + + a #GstPlayerStreamInfo + + + + + + + + + #GstPlayerStreamInfo specific to subtitle streams. + + + the language of the stream, or NULL if unknown. + + + + + a #GstPlayerSubtitleInfo + + + + + + + + + #GstPlayerStreamInfo specific to video streams. + + + the current bitrate of video in #GstPlayerVideoInfo. + + + + + a #GstPlayerVideoInfo + + + + + + + + + + + a #GstPlayerVideoInfo + + + + Numerator of frame rate + + + + Denominator of frame rate + + + + + + + the height of video in #GstPlayerVideoInfo. + + + + + a #GstPlayerVideoInfo + + + + + + + the maximum bitrate of video in #GstPlayerVideoInfo. + + + + + a #GstPlayerVideoInfo + + + + + + Returns the pixel aspect ratio in @par_n and @par_d + + + + + + a #GstPlayerVideoInfo + + + + numerator + + + + denominator + + + + + + + the width of video in #GstPlayerVideoInfo. + + + + + a #GstPlayerVideoInfo + + + + + + + + + + + + + + + + Window handle to use or %NULL + + + + + + + + +Since 1.12 + + + + + Window handle to use or %NULL + + + + the custom video_sink element to be set for the video renderer + + + + + + Tell an overlay that it has been exposed. This will redraw the current frame +in the drawable even if the pipeline is PAUSED. + + + + + + a #GstPlayerVideoOverlayVideoRenderer instance. + + + + + + Return the currently configured render rectangle. See gst_player_video_overlay_video_renderer_set_render_rectangle() +for details. + + + + + + a #GstPlayerVideoOverlayVideoRenderer instance + + + + the horizontal offset of the render area inside the window + + + + the vertical offset of the render area inside the window + + + + the width of the render area inside the window + + + + the height of the render area inside the window + + + + + + + The currently set, platform specific window +handle + + + + + #GstPlayerVideoRenderer instance + + + + + + Configure a subregion as a video target within the window set by +gst_player_video_overlay_video_renderer_set_window_handle(). If this is not +used or not supported the video will fill the area of the window set as the +overlay to 100%. By specifying the rectangle, the video can be overlaid to +a specific region of that window only. After setting the new rectangle one +should call gst_player_video_overlay_video_renderer_expose() to force a +redraw. To unset the region pass -1 for the @width and @height parameters. + +This method is needed for non fullscreen video overlay in UI toolkits that +do not support subwindows. + + + + + + a #GstPlayerVideoOverlayVideoRenderer instance + + + + the horizontal offset of the render area inside the window + + + + the vertical offset of the render area inside the window + + + + the width of the render area inside the window + + + + the height of the render area inside the window + + + + + + Sets the platform specific window handle into which the video +should be rendered + + + + + + #GstPlayerVideoRenderer instance + + + + handle referencing to the platform specific window + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GstPlayerVisualization descriptor. + + name of the visualization. + + + + description of the visualization. + + + + Makes a copy of the #GstPlayerVisualization. The result must be +freed using gst_player_visualization_free(). + + an allocated copy of @vis. + + + + + #GstPlayerVisualization instance + + + + + + Frees a #GstPlayerVisualization. + + + + + + #GstPlayerVisualization instance + + + + + + + Gets a string representing the given color balance type. + + a string with the name of the color + balance type. + + + + + a #GstPlayerColorBalanceType + + + + + + Gets a string representing the given error. + + a string with the given error. + + + + + a #GstPlayerError + + + + + + + + + + + Gets a string representing the given state. + + a string with the name of the state. + + + + + a #GstPlayerState + + + + + + diff --git a/gstreamer-player-sys/Cargo.toml b/gstreamer-player-sys/Cargo.toml new file mode 100644 index 000000000..5c35b6344 --- /dev/null +++ b/gstreamer-player-sys/Cargo.toml @@ -0,0 +1,42 @@ +[build-dependencies] +pkg-config = "0.3.7" + +[dependencies] +bitflags = "0.9" +libc = "0.2" +glib-sys = { version = "0.3.4", git = "https://github.com/gtk-rs/sys" } +gobject-sys = { version = "0.3.4", git = "https://github.com/gtk-rs/sys" } + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" +version = "0.1.1" + +[dependencies.gstreamer-video-sys] +path = "../gstreamer-video-sys" +version = "0.1.1" + +[features] +v1_10 = [] +v1_12 = ["v1_10"] + +[lib] +name = "gstreamer_player_sys" + +[package] +build = "build.rs" +links = "gstplayer-1.0" +name = "gstreamer-player-sys" +version = "0.1.1" +authors = ["Sebastian Dröge "] +description = "FFI bindings to libgstplayer-1.0" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +repository = "https://github.com/sdroege/gstreamer-sys" +license = "MIT" + +include = [ + "src/*.rs", + "Cargo.toml", + "build.rs", + "LICENSE", +] diff --git a/gstreamer-player-sys/LICENSE b/gstreamer-player-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/gstreamer-player-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/gstreamer-player-sys/build.rs b/gstreamer-player-sys/build.rs new file mode 100644 index 000000000..86b99081d --- /dev/null +++ b/gstreamer-player-sys/build.rs @@ -0,0 +1,63 @@ +extern crate pkg_config; + +use pkg_config::{Config, Error}; +use std::env; +use std::io::prelude::*; +use std::io; +use std::process; + +fn main() { + if let Err(s) = find() { + let _ = writeln!(io::stderr(), "{}", s); + process::exit(1); + } +} + +fn find() -> Result<(), Error> { + let package_name = "gstreamer-player-1.0"; + let shared_libs = ["gstplayer-1.0"]; + let version = if cfg!(feature = "v1_12") { + "1.12" + } else { + "1.0" + }; + + if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + println!("cargo:rustc-link-search=native={}", lib_dir); + return Ok(()) + } + + let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); + let hardcode_shared_libs = target.contains("windows"); + + let mut config = Config::new(); + config.atleast_version(version); + if hardcode_shared_libs { + config.cargo_metadata(false); + } + match config.probe(package_name) { + Ok(library) => { + if hardcode_shared_libs { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + for path in library.link_paths.iter() { + println!("cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist")); + } + } + Ok(()) + } + Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + Ok(()) + } + Err(err) => Err(err), + } +} + diff --git a/gstreamer-player-sys/src/lib.rs b/gstreamer-player-sys/src/lib.rs new file mode 100644 index 000000000..7da129915 --- /dev/null +++ b/gstreamer-player-sys/src/lib.rs @@ -0,0 +1,326 @@ +// This file was generated by gir (f00d658) from gir-files (???) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals)] + +extern crate libc; +#[macro_use] extern crate bitflags; +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sys as gst; +extern crate gstreamer_video_sys as gst_video; + +#[allow(unused_imports)] +use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, + c_short, c_ushort, c_long, c_ulong, + c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType, Volatile}; + +// Enums +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[repr(C)] +pub enum GstPlayerColorBalanceType { + Hue = 3, + Brightness = 0, + Saturation = 2, + Contrast = 1, +} +pub const GST_PLAYER_COLOR_BALANCE_HUE: GstPlayerColorBalanceType = GstPlayerColorBalanceType::Hue; +pub const GST_PLAYER_COLOR_BALANCE_BRIGHTNESS: GstPlayerColorBalanceType = GstPlayerColorBalanceType::Brightness; +pub const GST_PLAYER_COLOR_BALANCE_SATURATION: GstPlayerColorBalanceType = GstPlayerColorBalanceType::Saturation; +pub const GST_PLAYER_COLOR_BALANCE_CONTRAST: GstPlayerColorBalanceType = GstPlayerColorBalanceType::Contrast; + +pub type PlayerError = c_int; +pub const GST_PLAYER_ERROR_FAILED: PlayerError = 0; +pub type GstPlayerError = PlayerError; + +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[repr(C)] +pub enum GstPlayerSnapshotFormat { + RawNative = 0, + RawXrgb = 1, + RawBgrx = 2, + Jpg = 3, + Png = 4, +} +pub const GST_PLAYER_THUMBNAIL_RAW_NATIVE: GstPlayerSnapshotFormat = GstPlayerSnapshotFormat::RawNative; +pub const GST_PLAYER_THUMBNAIL_RAW_xRGB: GstPlayerSnapshotFormat = GstPlayerSnapshotFormat::RawXrgb; +pub const GST_PLAYER_THUMBNAIL_RAW_BGRx: GstPlayerSnapshotFormat = GstPlayerSnapshotFormat::RawBgrx; +pub const GST_PLAYER_THUMBNAIL_JPG: GstPlayerSnapshotFormat = GstPlayerSnapshotFormat::Jpg; +pub const GST_PLAYER_THUMBNAIL_PNG: GstPlayerSnapshotFormat = GstPlayerSnapshotFormat::Png; + +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[repr(C)] +pub enum GstPlayerState { + Stopped = 0, + Buffering = 1, + Paused = 2, + Playing = 3, +} +pub const GST_PLAYER_STATE_STOPPED: GstPlayerState = GstPlayerState::Stopped; +pub const GST_PLAYER_STATE_BUFFERING: GstPlayerState = GstPlayerState::Buffering; +pub const GST_PLAYER_STATE_PAUSED: GstPlayerState = GstPlayerState::Paused; +pub const GST_PLAYER_STATE_PLAYING: GstPlayerState = GstPlayerState::Playing; + +// Callbacks +pub type GstPlayerSignalDispatcherFunc = Option; + +// Records +#[repr(C)] +pub struct GstPlayerAudioInfoClass(c_void); + +#[repr(C)] +pub struct GstPlayerClass(c_void); + +#[repr(C)] +pub struct GstPlayerGMainContextSignalDispatcherClass(c_void); + +#[repr(C)] +pub struct GstPlayerMediaInfoClass(c_void); + +#[repr(C)] +pub struct GstPlayerSignalDispatcherInterface { + pub parent_iface: gobject::GTypeInterface, + pub dispatch: Option, +} + +#[repr(C)] +pub struct GstPlayerStreamInfoClass(c_void); + +#[repr(C)] +pub struct GstPlayerSubtitleInfoClass(c_void); + +#[repr(C)] +pub struct GstPlayerVideoInfoClass(c_void); + +#[repr(C)] +pub struct GstPlayerVideoOverlayVideoRendererClass(c_void); + +#[repr(C)] +pub struct GstPlayerVideoRendererInterface { + pub parent_iface: gobject::GTypeInterface, + pub create_video_sink: Option *mut gst::GstElement>, +} + +#[repr(C)] +pub struct GstPlayerVisualization { + pub name: *mut c_char, + pub description: *mut c_char, +} + +// Classes +#[repr(C)] +pub struct GstPlayer(c_void); + +#[repr(C)] +pub struct GstPlayerAudioInfo(c_void); + +#[repr(C)] +pub struct GstPlayerGMainContextSignalDispatcher(c_void); + +#[repr(C)] +pub struct GstPlayerMediaInfo(c_void); + +#[repr(C)] +pub struct GstPlayerStreamInfo(c_void); + +#[repr(C)] +pub struct GstPlayerSubtitleInfo(c_void); + +#[repr(C)] +pub struct GstPlayerVideoInfo(c_void); + +#[repr(C)] +pub struct GstPlayerVideoOverlayVideoRenderer(c_void); + +// Interfaces +#[repr(C)] +pub struct GstPlayerSignalDispatcher(c_void); +#[repr(C)] +pub struct GstPlayerVideoRenderer(c_void); + +extern "C" { + + //========================================================================= + // GstPlayerColorBalanceType + //========================================================================= + pub fn gst_player_color_balance_type_get_type() -> GType; + pub fn gst_player_color_balance_type_get_name(type_: GstPlayerColorBalanceType) -> *const c_char; + + //========================================================================= + // GstPlayerError + //========================================================================= + pub fn gst_player_error_get_type() -> GType; + pub fn gst_player_error_get_name(error: GstPlayerError) -> *const c_char; + pub fn gst_player_error_quark() -> glib::GQuark; + + //========================================================================= + // GstPlayerState + //========================================================================= + pub fn gst_player_state_get_type() -> GType; + pub fn gst_player_state_get_name(state: GstPlayerState) -> *const c_char; + + //========================================================================= + // GstPlayerVisualization + //========================================================================= + pub fn gst_player_visualization_get_type() -> GType; + pub fn gst_player_visualization_copy(vis: *const GstPlayerVisualization) -> *mut GstPlayerVisualization; + pub fn gst_player_visualization_free(vis: *mut GstPlayerVisualization); + + //========================================================================= + // GstPlayer + //========================================================================= + pub fn gst_player_get_type() -> GType; + pub fn gst_player_new(video_renderer: *mut GstPlayerVideoRenderer, signal_dispatcher: *mut GstPlayerSignalDispatcher) -> *mut GstPlayer; + pub fn gst_player_config_get_position_update_interval(config: *const gst::GstStructure) -> c_uint; + pub fn gst_player_config_get_seek_accurate(config: *const gst::GstStructure) -> gboolean; + pub fn gst_player_config_get_user_agent(config: *const gst::GstStructure) -> *mut c_char; + pub fn gst_player_config_set_position_update_interval(config: *mut gst::GstStructure, interval: c_uint); + pub fn gst_player_config_set_user_agent(config: *mut gst::GstStructure, agent: *const c_char); + pub fn gst_player_get_audio_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_get_subtitle_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_get_video_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_visualizations_free(viss: *mut *mut GstPlayerVisualization); + pub fn gst_player_visualizations_get() -> *mut *mut GstPlayerVisualization; + #[cfg(feature = "v1_12")] + pub fn gst_player_config_set_seek_accurate(player: *mut GstPlayer, accurate: gboolean); + pub fn gst_player_get_audio_video_offset(player: *mut GstPlayer) -> i64; + pub fn gst_player_get_color_balance(player: *mut GstPlayer, type_: GstPlayerColorBalanceType) -> c_double; + pub fn gst_player_get_config(player: *mut GstPlayer) -> *mut gst::GstStructure; + pub fn gst_player_get_current_audio_track(player: *mut GstPlayer) -> *mut GstPlayerAudioInfo; + pub fn gst_player_get_current_subtitle_track(player: *mut GstPlayer) -> *mut GstPlayerSubtitleInfo; + pub fn gst_player_get_current_video_track(player: *mut GstPlayer) -> *mut GstPlayerVideoInfo; + pub fn gst_player_get_current_visualization(player: *mut GstPlayer) -> *mut c_char; + pub fn gst_player_get_duration(player: *mut GstPlayer) -> gst::GstClockTime; + pub fn gst_player_get_media_info(player: *mut GstPlayer) -> *mut GstPlayerMediaInfo; + #[cfg(feature = "v1_10")] + pub fn gst_player_get_multiview_flags(player: *mut GstPlayer) -> gst_video::GstVideoMultiviewFlags; + #[cfg(feature = "v1_10")] + pub fn gst_player_get_multiview_mode(player: *mut GstPlayer) -> gst_video::GstVideoMultiviewMode; + pub fn gst_player_get_mute(player: *mut GstPlayer) -> gboolean; + pub fn gst_player_get_pipeline(player: *mut GstPlayer) -> *mut gst::GstElement; + pub fn gst_player_get_position(player: *mut GstPlayer) -> gst::GstClockTime; + pub fn gst_player_get_rate(player: *mut GstPlayer) -> c_double; + pub fn gst_player_get_subtitle_uri(player: *mut GstPlayer) -> *mut c_char; + pub fn gst_player_get_uri(player: *mut GstPlayer) -> *mut c_char; + pub fn gst_player_get_video_snapshot(player: *mut GstPlayer, format: GstPlayerSnapshotFormat, config: *mut gst::GstStructure) -> *mut gst::GstSample; + pub fn gst_player_get_volume(player: *mut GstPlayer) -> c_double; + pub fn gst_player_has_color_balance(player: *mut GstPlayer) -> gboolean; + pub fn gst_player_pause(player: *mut GstPlayer); + pub fn gst_player_play(player: *mut GstPlayer); + pub fn gst_player_seek(player: *mut GstPlayer, position: gst::GstClockTime); + pub fn gst_player_set_audio_track(player: *mut GstPlayer, stream_index: c_int) -> gboolean; + pub fn gst_player_set_audio_track_enabled(player: *mut GstPlayer, enabled: gboolean); + pub fn gst_player_set_audio_video_offset(player: *mut GstPlayer, offset: i64); + pub fn gst_player_set_color_balance(player: *mut GstPlayer, type_: GstPlayerColorBalanceType, value: c_double); + pub fn gst_player_set_config(player: *mut GstPlayer, config: *mut gst::GstStructure) -> gboolean; + #[cfg(feature = "v1_10")] + pub fn gst_player_set_multiview_flags(player: *mut GstPlayer, flags: gst_video::GstVideoMultiviewFlags); + #[cfg(feature = "v1_10")] + pub fn gst_player_set_multiview_mode(player: *mut GstPlayer, mode: gst_video::GstVideoMultiviewMode); + pub fn gst_player_set_mute(player: *mut GstPlayer, val: gboolean); + pub fn gst_player_set_rate(player: *mut GstPlayer, rate: c_double); + pub fn gst_player_set_subtitle_track(player: *mut GstPlayer, stream_index: c_int) -> gboolean; + pub fn gst_player_set_subtitle_track_enabled(player: *mut GstPlayer, enabled: gboolean); + pub fn gst_player_set_subtitle_uri(player: *mut GstPlayer, uri: *const c_char); + pub fn gst_player_set_uri(player: *mut GstPlayer, uri: *const c_char); + pub fn gst_player_set_video_track(player: *mut GstPlayer, stream_index: c_int) -> gboolean; + pub fn gst_player_set_video_track_enabled(player: *mut GstPlayer, enabled: gboolean); + pub fn gst_player_set_visualization(player: *mut GstPlayer, name: *const c_char) -> gboolean; + pub fn gst_player_set_visualization_enabled(player: *mut GstPlayer, enabled: gboolean); + pub fn gst_player_set_volume(player: *mut GstPlayer, val: c_double); + pub fn gst_player_stop(player: *mut GstPlayer); + + //========================================================================= + // GstPlayerAudioInfo + //========================================================================= + pub fn gst_player_audio_info_get_type() -> GType; + pub fn gst_player_audio_info_get_bitrate(info: *const GstPlayerAudioInfo) -> c_int; + pub fn gst_player_audio_info_get_channels(info: *const GstPlayerAudioInfo) -> c_int; + pub fn gst_player_audio_info_get_language(info: *const GstPlayerAudioInfo) -> *const c_char; + pub fn gst_player_audio_info_get_max_bitrate(info: *const GstPlayerAudioInfo) -> c_int; + pub fn gst_player_audio_info_get_sample_rate(info: *const GstPlayerAudioInfo) -> c_int; + + //========================================================================= + // GstPlayerGMainContextSignalDispatcher + //========================================================================= + pub fn gst_player_g_main_context_signal_dispatcher_get_type() -> GType; + pub fn gst_player_g_main_context_signal_dispatcher_new(application_context: *mut glib::GMainContext) -> *mut GstPlayerSignalDispatcher; + + //========================================================================= + // GstPlayerMediaInfo + //========================================================================= + pub fn gst_player_media_info_get_type() -> GType; + pub fn gst_player_media_info_get_audio_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_media_info_get_container_format(info: *const GstPlayerMediaInfo) -> *const c_char; + pub fn gst_player_media_info_get_duration(info: *const GstPlayerMediaInfo) -> gst::GstClockTime; + pub fn gst_player_media_info_get_image_sample(info: *const GstPlayerMediaInfo) -> *mut gst::GstSample; + #[cfg(feature = "v1_12")] + pub fn gst_player_media_info_get_number_of_audio_streams(info: *const GstPlayerMediaInfo) -> c_uint; + #[cfg(feature = "v1_12")] + pub fn gst_player_media_info_get_number_of_streams(info: *const GstPlayerMediaInfo) -> c_uint; + #[cfg(feature = "v1_12")] + pub fn gst_player_media_info_get_number_of_subtitle_streams(info: *const GstPlayerMediaInfo) -> c_uint; + #[cfg(feature = "v1_12")] + pub fn gst_player_media_info_get_number_of_video_streams(info: *const GstPlayerMediaInfo) -> c_uint; + pub fn gst_player_media_info_get_stream_list(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_media_info_get_subtitle_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_media_info_get_tags(info: *const GstPlayerMediaInfo) -> *mut gst::GstTagList; + pub fn gst_player_media_info_get_title(info: *const GstPlayerMediaInfo) -> *const c_char; + pub fn gst_player_media_info_get_uri(info: *const GstPlayerMediaInfo) -> *const c_char; + pub fn gst_player_media_info_get_video_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_media_info_is_live(info: *const GstPlayerMediaInfo) -> gboolean; + pub fn gst_player_media_info_is_seekable(info: *const GstPlayerMediaInfo) -> gboolean; + + //========================================================================= + // GstPlayerStreamInfo + //========================================================================= + pub fn gst_player_stream_info_get_type() -> GType; + pub fn gst_player_stream_info_get_caps(info: *const GstPlayerStreamInfo) -> *mut gst::GstCaps; + pub fn gst_player_stream_info_get_codec(info: *const GstPlayerStreamInfo) -> *const c_char; + pub fn gst_player_stream_info_get_index(info: *const GstPlayerStreamInfo) -> c_int; + pub fn gst_player_stream_info_get_stream_type(info: *const GstPlayerStreamInfo) -> *const c_char; + pub fn gst_player_stream_info_get_tags(info: *const GstPlayerStreamInfo) -> *mut gst::GstTagList; + + //========================================================================= + // GstPlayerSubtitleInfo + //========================================================================= + pub fn gst_player_subtitle_info_get_type() -> GType; + pub fn gst_player_subtitle_info_get_language(info: *const GstPlayerSubtitleInfo) -> *const c_char; + + //========================================================================= + // GstPlayerVideoInfo + //========================================================================= + pub fn gst_player_video_info_get_type() -> GType; + pub fn gst_player_video_info_get_bitrate(info: *const GstPlayerVideoInfo) -> c_int; + pub fn gst_player_video_info_get_framerate(info: *const GstPlayerVideoInfo, fps_n: *mut c_int, fps_d: *mut c_int); + pub fn gst_player_video_info_get_height(info: *const GstPlayerVideoInfo) -> c_int; + pub fn gst_player_video_info_get_max_bitrate(info: *const GstPlayerVideoInfo) -> c_int; + pub fn gst_player_video_info_get_pixel_aspect_ratio(info: *const GstPlayerVideoInfo, par_n: *mut c_uint, par_d: *mut c_uint); + pub fn gst_player_video_info_get_width(info: *const GstPlayerVideoInfo) -> c_int; + + //========================================================================= + // GstPlayerVideoOverlayVideoRenderer + //========================================================================= + pub fn gst_player_video_overlay_video_renderer_get_type() -> GType; + pub fn gst_player_video_overlay_video_renderer_new(window_handle: gpointer) -> *mut GstPlayerVideoRenderer; + pub fn gst_player_video_overlay_video_renderer_new_with_sink(window_handle: gpointer, video_sink: *mut gst::GstElement) -> *mut GstPlayerVideoRenderer; + pub fn gst_player_video_overlay_video_renderer_expose(self_: *mut GstPlayerVideoOverlayVideoRenderer); + pub fn gst_player_video_overlay_video_renderer_get_render_rectangle(self_: *mut GstPlayerVideoOverlayVideoRenderer, x: *mut c_int, y: *mut c_int, width: *mut c_int, height: *mut c_int); + pub fn gst_player_video_overlay_video_renderer_get_window_handle(self_: *mut GstPlayerVideoOverlayVideoRenderer) -> gpointer; + pub fn gst_player_video_overlay_video_renderer_set_render_rectangle(self_: *mut GstPlayerVideoOverlayVideoRenderer, x: c_int, y: c_int, width: c_int, height: c_int); + pub fn gst_player_video_overlay_video_renderer_set_window_handle(self_: *mut GstPlayerVideoOverlayVideoRenderer, window_handle: gpointer); + + //========================================================================= + // GstPlayerSignalDispatcher + //========================================================================= + pub fn gst_player_signal_dispatcher_get_type() -> GType; + + //========================================================================= + // GstPlayerVideoRenderer + //========================================================================= + pub fn gst_player_video_renderer_get_type() -> GType; + +}