Comments (7)
I have a bad feeling about this :). The trick here is that the file:
scheme is standardized, whereas pipe:
isn't. I know, srt:
isn't standardized either, but in this case it's our specific protocol, only to be widespread, whereas pipes are used everywhere in the world. Not sure how others are using pipes if this needs to be specified in the URI, but I haven't found anyone using pipe:
scheme and all searches redirect me to file://
.
One extra problem with pipe:5
is that UriParser
will parse it as scheme="" host="pipe" port="5"
. The application still can distinguish it as a special case, but it's kinda clumsy.
In stransmit
I simply used the standard file
scheme with con
as a special-case host specification, in which the path part isn't used. If this is about providing ability to use other descriptors than default 0 and 1, I think it should be possible to simply add support for this within the current specification, where the descriptor would be extracted from the path part in the URI - for example: file://con/5
.
(Note that may be nonportable - in stransmit
there's currently used cin
and cout
directly - see ConsoleSource
and ConsoleTarget
classes. There's no portable way to use any "numeric file descriptor" in standard C++, so this would have to be probably a POSIX-only feature.)
Note that I haven't tested using file:///dev/stdin
as source, nor did I experiment with file:///proc/self/fd/...
:)
from srt.
The only use of a pipe: URI being used that I'm familiar with is within ffmpeg. But that project has quite a few custom URIs for all the protocols and IO devices it supports.
from srt.
Well, would be nice to have some standard for pipes, however it better be portable and coexist with some other standards - and just using 0 1 and 2 is already POSIX-specific.
from srt.
How would UriParser parse
pipe://./#5
If I understand the URI spec correctly it should be
scheme="pipe" host="localhost" path="/" fragment="5"
Where you could then use the fragment to specify the fd on a POSIX system and win32 could just ignore the fragment
from srt.
Though I'm not sure authority is really needed. It might work just as well with pipe:/#5
from srt.
from srt.
Need some clear statement as to whether "pipe://5" or "pipe://#5" form is worth adding.
from srt.
Related Issues (20)
- RCV Loss List and concurrency in groups HOT 5
- [BUG] Group socket without members always return default value of options
- Building srt for android on Apple Silicon
- [MAINT] Make the SRT header file and all interface features independent on compile options
- `srt_recv()` always blocking. HOT 3
- Compatibility with CMake < 3.5 will be removed from a future version of CMake.
- [FR]: Support for merging MPEGTS multiple PMTs into one PMT. HOT 2
- [MAINT] Create CI builds involving building a shared library and an application trying to use it
- Possible explanation for difference in regularity of packets received from a small latency vs large latency buffer? HOT 38
- [FR] CMake: add prefix "SRT" to all srt cmake options
- [FR] CMake: make output directory configurable HOT 7
- Having massive grey artefacts with SRT livestreams / any tuning possible? HOT 1
- Question: Using SRT to stream real time CCSDS frames (no MPEG TS) ? HOT 1
- [BUG] Getting some socket options on a group fails (SRTO_PBKEYLEN, SRTO_KMSTATE, SRTO_CRYPTOMODE) HOT 1
- How to build Universal binaries on MacOS?
- how to exit quickly from srt_epoll_wait
- [BUG] SRT_REJ_BADSECRET vs. listen_callback reason
- mbpsBandwidth becomes unreliable when not much data transferred (such as when a video shows a static image) HOT 1
- [BUG] SRTO_VERSION must be READ ONLY.
- Incoming data packets dropped if SRT_CRYPTOMODE set (AES-GCM) and no passphrase set on a caller/receiver. HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srt.