-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Fixed the use of the right error constant #2595
Open
ethouris
wants to merge
31
commits into
Haivision:master
Choose a base branch
from
ethouris:dev-fix-implicit-int
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
2424c99
Fixing implicit integer and wrong use of SRT_ERROR and SRT_INVALID_SO…
6ad1041
[MAINT] Fixed example buildbreaks. Added examples for message mode tr…
ethouris 340f0b5
Updated
ethouris 29e8c19
Fixed wrong assertion for drop snd buf sequence check
31b3a78
Updated
ce98b8a
[MAINT] Refax for CSndBuffer::readData to make the call form clearer
333eaf2
[MAINT] Removed reference fields from CPacket pinned to the SRT header
43c0883
Updated and fixed
6e2280d
Updated with the fixes
512e548
Merge branch 'master' into dev-fix-implicit-int
08d1e5c
Minor fixes
4888873
Merge branch 'master' into dev-refax-readdata-rexmit
dba39ef
Merge branch 'master' into dev-refax-readdata-rexmit
addefb3
Merge branch 'master' into dev-fix-implicit-int
03c19ac
Merge branch 'master' into dev-refax-readdata-rexmit
b0e681f
Updated and fixed
3781775
Merge branch 'master' into dev-refax-readdata-rexmit
d126e64
Merge branch 'master' into dev-refax-remove-cpacket-refs
380e12f
Updated to latest upstream through #2594
88b9f33
Fixed build break on Android
084c9c5
Merge branch 'master' into dev-refax-remove-cpacket-refs
185276c
Merged and fixed
200e3c5
Updated and fixed
1ffde27
Merge branch 'master' into dev-refax-readdata-rexmit
58fbf27
Updated and fixed
a0de6ff
Merge branch 'dev-refax-remove-cpacket-refs' into dev-fix-implicit-int
920969b
Synchronized and improved
7a4e00c
Fixed clang warnings (build break on some CI)
8c0102a
Updated and fixed
d28e3b2
Introduced SRTRUNSTATUS to cover all cases of srt_startup(). Fixed do…
be302ca
Removed srt::isgroup. Reused CUDT::isgroup where applicable. Added mi…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
|
||
template<class INT, int ambg> | ||
struct IntWrapper | ||
{ | ||
INT v; | ||
|
||
IntWrapper() {} | ||
explicit IntWrapper(INT val): v(val) {} | ||
|
||
bool operator==(const IntWrapper& x) const | ||
{ | ||
return v == x.v; | ||
} | ||
|
||
bool operator!=(const IntWrapper& x) const | ||
{ | ||
return !(*this == x); | ||
} | ||
|
||
explicit operator INT() const | ||
{ | ||
return v; | ||
} | ||
|
||
template<class I, class T> | ||
friend T& operator<<(T& out, const IntWrapper<I, ambg>& x) | ||
{ | ||
out << x.v; | ||
return out; | ||
} | ||
|
||
bool operator<(const IntWrapper& w) const | ||
{ | ||
return v < w.v; | ||
} | ||
}; | ||
|
||
template<class INT, int ambg> | ||
struct IntWrapperLoose: IntWrapper<INT, ambg> | ||
{ | ||
typedef IntWrapper<INT, ambg> base_t; | ||
explicit IntWrapperLoose(INT val): base_t(val) {} | ||
|
||
bool operator==(const IntWrapper<INT, ambg>& x) const | ||
{ | ||
return this->v == x.v; | ||
} | ||
|
||
friend bool operator==(const IntWrapper<INT, ambg>& x, const IntWrapperLoose& y) | ||
{ | ||
return x.v == y.v; | ||
} | ||
|
||
bool operator==(INT val) const | ||
{ | ||
return this->v == val; | ||
} | ||
|
||
friend bool operator==(INT val, const IntWrapperLoose<INT, ambg>& x) | ||
{ | ||
return val == x.v; | ||
} | ||
|
||
operator INT() const | ||
{ | ||
return this->v; | ||
} | ||
}; | ||
|
||
|
||
typedef IntWrapper<int32_t, 0> SRTSOCKET; | ||
typedef IntWrapper<int, 1> SRTSTATUS; | ||
typedef IntWrapperLoose<int, 1> SRTSTATUS_LOOSE; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference with
utilities.h
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains things that are in any temporary use for development. This is only provided for convenience for the use during development, but the normal code goes with this file ousted, with provided just plain definitions for the specific types as alias to integer.
Directly this file is provided so that by a temporary change in srt.h you can run the compile command and then by the errors you get you can find out where the rules for the right usage of the status types has been violated.