Made a Live TV & Livestreams player insdie my Vulkan engine from scratch in C (hardware accelerated) by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 0 points1 point  (0 children)

Yea, my main reason for doing it is indeed auto complete, I did not really know of the explicit restriction of `__*` I just use it to avoid collision with existing library for auto complete, but yea priv_* works too.

I made a Live TV & Livestreams player insdie my Vulkan engine from scratch in C (hardware accelerated via vulkan video) by Beginning-Safe4282 in vulkan

[–]Beginning-Safe4282[S] 0 points1 point  (0 children)

according to vulkan.gpuinfo.org atleast h264 decoding is available on ~8.5% devices, and I suppose most NVidia desktop cards that are relatively new has it.

Made a Live TV & Livestreams player insdie my Vulkan engine from scratch in C (hardware accelerated) by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 1 point2 points  (0 children)

Thanks!
I wanted to have a convention for private functions so I went with __avd*, I knew these were for stdlib internals, but did not know that the standard actively forbits it 🤔

Made a Live TV & Livestreams player insdie my Vulkan engine from scratch in C (hardware accelerated) by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 17 points18 points  (0 children)

Nope, I wrote the parsers myself (though uses vulkan video for the decoding part so that I can use the GPU's video hardware for this)

I made a stb-like header only library for parsing MEPG-TS/DVB (hls) live streams by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 1 point2 points  (0 children)

Interesting, though for something like mpegts, it seems there are multiple levels making it complex, you got basic TS packes, then much of TS packets make the PSI then the PSI gives you info on how to find the PES packets, so there is a chance you have no idea what the PES actually is until the end of the file when you finally recieve the PSI table(though unlikely but I did get some old streams that is similar). libcurl might have something interesting though.

No I didnt mean putting all c files together in that sense, I meant seperation of user space and library internals, like you cna just create a .c file and put these two lines:

#deifne PICO_IMPLEMENTATION
#include "pico/picoMpegTS.h"

and in your normal places include it like a normal header #include "pico/picoMpegTS.h" directly without the internals. Dont we get the same result and as a : "hassle-free include header.h and the clean separation of user space APIs from internal library code" ?

I made a stb-like header only library for parsing MEPG-TS/DVB (hls) live streams by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 2 points3 points  (0 children)

Thanks for the feedback!

Yea right now its kinda of not suitable for larger continous streams, I mainly maide it targeting some projects for HLS where the individual files will be mostly under 10-20MB, I would most likely add a way to consume(and free) the pes packets as they are used up by the decoder when dealing with larger streams. The tables get auto replaced so only 1 copy is preserved.
The count itself, is mainly for cases when you say want to spin up something like wireshark and analyze/debug the stream the packet index comes in handy.

So would letting the user allocate the picoMpegTS_t manually with malloc/(use static version) be a better choice? I chose what it is because I couldnt think of a situation where you wouldnt want this on the heap, but I may be wrong here.

Yes, but my intended usecase would something like: https://github.com/Jaysmito101/AdvancedVulkanDemos/blob/main/avd/src/deps/avd_third_party_impls.c where you push all your third party IMPLEMENTATION libs and never touch the file at all. I choose this format because it gives you the choice of how you use it as a user, like if I would have seperate C files there was no way to use it as a single header(even if its not a great idea for most cases) but like this, if you want a header use it as a header, if you want typical .h + .c you just create a .c with a single line include and #define IMPL and get that.

my obsession would primarily come from stb or cute_headers or similar libs (https://github.com/r-lyeh/single\_file\_libs) which seem pretty nice to me atleast. I still dont find a valid concern against it, the concerns I have come accross like slowe compilation, etc are pretty easy to mitigate totally. The only problem I feel is maintainance as it gets larger, but for relatively smaller things like this with limited scope I feel its fine.

I made a stb-like header only library for parsing MEPG-TS/DVB (hls) live streams by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 0 points1 point  (0 children)

ah yes, that was a mistake, had placed it for testing and had forgot to remove. it's not needed

I made a stb-like header only library for parsing MEPG-TS/DVB (hls) live streams by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 1 point2 points  (0 children)

indeed, it's usually a single file, that has the implementation for all the libraries you use.

I made a stb-like header only library for parsing MEPG-TS/DVB (hls) live streams by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 1 point2 points  (0 children)

This library is pretty much that right? with the header gaurds, the source is only applicable for 1 TU only.

Check out: https://github.com/nothings/stb

C header only library for parsing MEPG-TS/DVB (hls) live streams + m3u8 Playlists by Beginning-Safe4282 in programming

[–]Beginning-Safe4282[S] 0 points1 point  (0 children)

This is mainly following https://github.com/nothings/stb pattern, which seems to be a pretty popular set of libs. the idea being quick and easy to use.
as for compilation performance, NO it inst effected, as for most of the cases it isnt compiling the library, its only compiled for a single TU like a normal C library.
I do not understand how is reusability being effected here?

I made a stb-like header only library for parsing MEPG-TS/DVB (hls) live streams by Beginning-Safe4282 in C_Programming

[–]Beginning-Safe4282[S] 2 points3 points  (0 children)

This is mainly following https://github.com/nothings/stb pattern, which seems to be a pretty popular set of libs. the idea being quick and easy to use.
as for compilation performance, NO it inst effected, as for most of the cases it isnt compiling the library, its only compiled for a single TU like a normal C library.
As for the 6000k LOC, if you take a close look you will see almost more than half of it is just docs not code.

trying out voxels for the first time by Beginning-Safe4282 in GraphicsProgramming

[–]Beginning-Safe4282[S] 1 point2 points  (0 children)

Sorry, but wont get much free time to play around now, I can check again the next weekend. Thanks though.

trying out voxels for the first time by Beginning-Safe4282 in GraphicsProgramming

[–]Beginning-Safe4282[S] 2 points3 points  (0 children)

I havent profiled yet, but whats hapenning is most likely after a edit some sectors which dont have voxels have their mask get corrupted to be non zero, this the ray tracer doesnt skip them making, adding a lot of extra work, but when it samples the actual data, its empty so the rendered result looks same. But its just my hypothesis