Commit graph

42 commits

Author SHA1 Message Date
Daniel Vilar 07a8b8a274 Refactor logic to use multiple streams in the same pipeline
Now it's possible to connect to N streams in the same pipeline. Each new connection will create a new NDI receiver except if it's a empty slot in the receiver.

Each receiver has two slots one to connect to audio and other to connect to video to the same stream.
2018-08-20 11:09:43 +02:00
Daniel Vilar ba45931830 Add audio to the pipeline even if the stream source it's already in use for video
FIXME: Whith this commit it's possible to add more streams for the same source if the pipeline has an audio source for that source.
2018-08-14 16:47:58 +02:00
Daniel Vilar 8bf4f8f935 Fix to use multiple NDI streams in the same pipeline
It's not possible to connect to the same stream twice. For example to audio and video from the same stream.
2018-08-14 15:45:13 +02:00
Daniel Vilar 0baf7ee839 Calculate buffer duration from frame info 2018-07-03 10:02:15 +02:00
Daniel Vilar 98cd1bbc8a Added pipelines to README 2018-07-02 14:08:15 +02:00
Daniel Vilar 7cbf8e57a8 Added query function to return latency 2018-07-02 14:07:51 +02:00
Daniel Vilar 6ba47cc085 Use common start timestamp 2018-07-02 14:06:44 +02:00
Daniel Vilar 8399da4f7c Refactor timestamps and timecode logic 2018-06-27 13:53:09 +02:00
Daniel Vilar 570abeff49 Clean code 2018-06-27 11:56:11 +02:00
Daniel Vilar 43db3e4477 Clean code 2018-06-26 14:07:43 +02:00
Daniel Vilar 893c217212 Refactor get frame logic 2018-06-26 13:06:55 +02:00
Daniel Vilar e5405a6657 Moved connection to ndi logic from sources to a common function 2018-06-25 10:38:45 +02:00
Daniel Vilar 2e9a0242af Working audio src 2018-06-20 10:23:19 +02:00
Daniel Vilar e0a3fb393e Work in progress 2018-06-15 15:16:25 +02:00
Daniel Vilar 5302c67f97 First step to implement audiosrc 2018-06-12 14:40:17 +02:00
Daniel Vilar 1ea558641e Get video caps from NDI stream 2018-06-12 13:41:48 +02:00
Daniel Vilar 24f2cd57ad Refactor NDI receiver logic 2018-06-12 13:39:49 +02:00
Daniel Vilar 3e9b1a85ca Use timestamp instead of timecode, some videos timecode is 0 2018-06-04 13:45:29 +02:00
Daniel Vilar e8ee6fd806 Close NDI stream when closing gstreamer 2018-06-04 13:44:27 +02:00
Daniel Vilar a89334a500 Updated README 2018-05-31 11:19:01 +02:00
Daniel Vilar a1fc0efe3d Indent code correctly 2018-05-31 11:16:29 +02:00
Daniel Vilar c744353583 Added ip parameter to connect to the stream 2018-05-31 11:14:11 +02:00
Daniel Vilar 385351e5ad Refactor start_pts 2018-05-30 12:55:54 +02:00
Daniel Vilar d667536ec6 Added pts, and offsets to gstreamer buffer 2018-04-30 10:18:17 +02:00
Daniel Vilar bc8950303c Added field pts to buffer 2018-04-26 13:53:50 +02:00
Daniel Vilar 53c692fac5 Connect to the stream inidicated in pipeline stream-name property 2018-04-26 12:30:13 +02:00
Daniel Vilar bf25388216 Improved logs 2018-04-25 12:42:41 +02:00
galicaster 45fcccbd31 Eurekagit statusgit status
First iteration copying memory.
2018-04-25 10:32:47 +02:00
galicaster db5493d110 Clean code 2018-04-24 19:41:27 +02:00
Daniel Vilar 2d9feaa462 Martes 2018-04-24 14:08:06 +02:00
Daniel Vilar d813fa5681 Try to add video data to a buffer 2018-04-23 14:12:41 +02:00
Daniel Vilar ca4e498a0b Added NDI code 2018-04-23 13:42:38 +02:00
rubenrua 1377916b3b Add NdiInstance struct that implement Send
https://doc.rust-lang.org/book/second-edition/ch19-03-advanced-traits.html#the-newtype-pattern-to-implement-external-traits-on-external-types

error[E0277]: the trait bound `*mut std::os::raw::c_void: std::marker::Send` is not satisfied in `ndisrc::State`
   --> src/ndisrc.rs:276:6
       |
       276 | impl ObjectImpl<BaseSrc> for NdiSrc {
           |      ^^^^^^^^^^^^^^^^^^^ `*mut std::os::raw::c_void` cannot be sent between threads safely
               |
                   = help: within `ndisrc::State`, the trait `std::marker::Send` is not implemented for `*mut std::os::raw::c_void`
                       = note: required because it appears within the type `std::option::Option<*mut std::os::raw::c_void>`
                           = note: required because it appears within the type `ndisrc::State`
                               = note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::Mutex<ndisrc::State>`
                                   = note: required because it appears within the type `ndisrc::NdiSrc`

error[E0277]: the trait bound `*mut std::os::raw::c_void: std::marker::Send` is not satisfied in `ndisrc::State`
   --> src/ndisrc.rs:405:6
       |
       405 | impl ElementImpl<BaseSrc> for NdiSrc {
           |      ^^^^^^^^^^^^^^^^^^^^ `*mut std::os::raw::c_void` cannot be sent between threads safely
               |
                   = help: within `ndisrc::State`, the trait `std::marker::Send` is not implemented for `*mut std::os::raw::c_void`
                       = note: required because it appears within the type `std::option::Option<*mut std::os::raw::c_void>`
                           = note: required because it appears within the type `ndisrc::State`
                               = note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::Mutex<ndisrc::State>`
                                   = note: required because it appears within the type `ndisrc::NdiSrc`

error[E0277]: the trait bound `*mut std::os::raw::c_void: std::marker::Send` is not satisfied in `ndisrc::State`
   --> src/ndisrc.rs:424:6
       |
       424 | impl BaseSrcImpl<BaseSrc> for NdiSrc {
           |      ^^^^^^^^^^^^^^^^^^^^ `*mut std::os::raw::c_void` cannot be sent between threads safely
               |
                   = help: within `ndisrc::State`, the trait `std::marker::Send` is not implemented for `*mut std::os::raw::c_void`
                       = note: required because it appears within the type `std::option::Option<*mut std::os::raw::c_void>`
                           = note: required because it appears within the type `ndisrc::State`
                               = note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::Mutex<ndisrc::State>`
                                   = note: required because it appears within the type `ndisrc::NdiSrc`

error: aborting due to 3 previous errors
2018-04-16 16:53:22 +00:00
rubenrua 892eb29c3b Add ndilib.rs 2018-04-16 16:42:33 +00:00
Daniel Vilar c25ad01561 First try to insert NDI libraries 2018-04-13 12:06:15 +02:00
Daniel Vilar 2b09a48a5c Added videocaps and commented almost audiosrc related code 2018-04-12 17:52:21 +02:00
Daniel Vilar 227d750305 Added property stream-name 2018-04-12 17:17:59 +02:00
Daniel Vilar b0f9b7fae9 Commented unused seek 2018-04-12 16:54:36 +02:00
rubenrua 2aed66ba0f Using deps cte version 2018-04-12 15:17:02 +02:00
rubenrua a3067f0dd5 Add prerequisites.
See https://github.com/sdroege/gstreamer-rs#installation-linux
2018-04-12 15:14:59 +02:00
rubenrua 6239c2b6b9 Add links to tutorial based in 2018-04-09 05:56:38 +00:00
rubenrua 337337854b Add gst-plugin-ndi 2018-04-09 05:53:04 +00:00