ownzones / mpegts Goto Github PK
View Code? Open in Web Editor NEWA C++ library for multiplexing and de-multiplexing MPEG-TS
License: MIT License
A C++ library for multiplexing and de-multiplexing MPEG-TS
License: MIT License
i.e. I guess usually one will read chunks from a file in some arbtrary size (4k page size for example) and feed that to the demuxer. but the demuxer rarely checks wether the buffer is exhausted and thus depends on either some magic block size or the whole file being fed at once. this can be easily verified by replacing UnitTest1::muxOutput
with
void UnitTest1::muxOutput(SimpleBuffer &rTsOutBuffer) {
//Double to fail at non integer data
double packets = (double) rTsOutBuffer.size() / 188.0;
if (packets != (int) packets) {
std::cout << "Payload not X * 188 " << std::endl;
mUnitTestStatus = false;
}
uint8_t* lpData = rTsOutBuffer.data();
for (int lI = 0 ; lI < packets ; lI++) {
auto p = lpData+(lI*188);
SimpleBuffer lIn;
lIn.append(p, 100);
mDemuxer.decode(lIn);
lIn.clear();
lIn.append(p + 100, 88);
mDemuxer.decode(lIn);
}
}
which feeds the demuxer the same data, but in smaller chunks, which makes the test fail miserably.
While Windows may not be a target, during my attempt to build I've run into two issues:
a
variable doing nothing seems to be disliked by msvc here https://github.com/Unit-X/mpegts/blob/master/mpegts/mpegts_muxer.cpp#L237any
when using MpegTsDemuxer
as a shared pointer (this could be my issue, not sure)[ERROR] OUTPUT>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\any(429): error C2338: any_cast<T>(any&&) requires T to be constructible from remove_cv_t<remove_reference_t<T>>
[INFO] OUTPUT>c++/TSHandler.cpp(384): note: see reference to function template instantiation '_Ty &std::any_cast<std::shared_ptr<MpegTsDemuxer>&>(std::any &&)' being compiled
[INFO] OUTPUT> with
[INFO] OUTPUT> [
[INFO] OUTPUT> _Ty=std::shared_ptr<MpegTsDemuxer> &
[INFO] OUTPUT> ]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.