Go to advanced search

by terraspace
Thu Aug 08, 2019 5:01 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

So will the V4L2 interface inter-op with DISPMANX ? IE: Video Render to a particular Dispmanx layer ?
Or would the idea be that v4l2 would have no ability to render, simply decode the frame and which point you could render it with MMAL or another API?
by terraspace
Wed Aug 07, 2019 10:15 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

Useful to know the structure of the stack there, thanks 6by9! One thing that is very useful with IL H264 implementation is the ability to configure it with Dispmanx, so for example a UI on layer 1 and the video render running on layer 2. Would that still be possible with MMAL? (Assuming H265 is at s...
by terraspace
Wed Aug 07, 2019 6:50 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

I read in another thread that V4L2 was going to be built ontop of MMAL. Looking at the MMAL Encode/Decode examples they seem very similar to the lower IL interface, surely then MMAL would have access to the H265 encoder ?
by terraspace
Mon Aug 05, 2019 8:54 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

I think most of the issue comes down to good documentation. If things are well documented and thus enough people can use the API effectively, improvements and issues can be worked out and the API improved over time from it's initial design. I find the issue with a lot of this stuff is that it become...
by terraspace
Mon Aug 05, 2019 7:25 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

Oh dear.. I thought that code looked quite simple.. guess that explains why :) Well hopefully we land up with a simple / clean API for this.. it would be nice if there were some proper standards in the Linux world that were actually well thought out and fully supported.. I don't need H.265 yet anywa...
by terraspace
Mon Aug 05, 2019 6:20 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

Agreed, The state management and knowing exactly how to use the Request API is the "fun" part. As usual the documentation is found sorely wanting too (something I find a common annoyance about Linux and derivatives).

IL deceased or on it's way definitely has simplicity as a merit.
by terraspace
Mon Aug 05, 2019 5:11 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

The V4L2 interface doesn't look "too" complicated. I guess with at least one comprehensive example built against it, it should be fairly easy to make use of.
by terraspace
Mon Aug 05, 2019 5:07 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

I will have a look at that, It just seems to me that at the level of gstreamer/ffmpeg we're talking about a product and putting the ability to use h/w there makes it considerably less appealing or more difficult for someone who wanted to write an alternative to their existing product. It's a bit lik...
by terraspace
Mon Aug 05, 2019 4:42 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

Re: HEVC/H265 Decoding

So I assume then once that is available I would be able to do something like:

IF (SourceStream IS H264) {
... USE IL Client
}
ELSE IF (SourceStream IS H265) {
... USE V4L2 Client
}

?

I specifically do not want to rely on FFMPEG and would rather be able to go directly to the OS/Driver/API level.
by terraspace
Mon Aug 05, 2019 2:40 pm
Forum: Graphics programming
Topic: HEVC/H265 Decoding
Replies: 23
Views: 627

HEVC/H265 Decoding

What are the timelines or proposed approach for h/w accelerated H.265 decoding on the PI, will this still be possible via IL or would I need two use two different decoder APIs ?
by terraspace
Sat Jul 27, 2019 11:11 am
Forum: C/C++
Topic: Audio glitches and pops
Replies: 6
Views: 270

Re: Audio glitches and pops

Ok, I've tried a number of different configurations and approaches now all with the same result.. It definitely seems to me like when the Pi is "busy", and it seems to be I/O, network.. anything triggering interrupts the audio system glitches.. mostly without any error, or at least nothing that is r...
by terraspace
Fri Jul 26, 2019 11:28 am
Forum: C/C++
Topic: Startup program as admin
Replies: 1
Views: 151

Re: Startup program as admin

I've done a similar thing from VS2019.. I connect, build, deploy and run as root: Login, and edit this file: sudo nano /etc/ssh/sshd_config Find this line: PermitRootLogin without-password Edit: PermitRootLogin yes Close and save file reboot or restart sshd service using: /etc/init.d/ssh restart Set...
by terraspace
Wed Jul 24, 2019 10:02 pm
Forum: C/C++
Topic: Audio glitches and pops
Replies: 6
Views: 270

Re: Audio glitches and pops

It seems with a period size of 8960 (+- 200ms) everything is perfectly smooth under all modes and on the good lan and rubbish power line adapter with 20ms latency jitter.. I would expect 20ms to work fine on the good lan and possibly somewhere between 50-100 at most on the powerline.. it seems as if...
by terraspace
Wed Jul 24, 2019 9:07 pm
Forum: C/C++
Topic: Audio glitches and pops
Replies: 6
Views: 270

Re: Audio glitches and pops

So out of interest, I am using 2 periods, buffersize = periodsize(frames) * periods .. The clicking/popping takes longer and longer to start occurring the greater the periodsize.. at 1024/2048 it's almost immediate. At 4096 it takes about 20-30 seconds before it starts, at 8192 it runs for a few min...
by terraspace
Wed Jul 24, 2019 4:10 pm
Forum: C/C++
Topic: Audio glitches and pops
Replies: 6
Views: 270

Re: Audio glitches and pops

The playback is running in it's own thread, to sync up the timing I'm using: audioDelay.tv_sec = 0; audioDelay.tv_nsec = (uint64_t)((1000.0f / ((44100.0f * 4.0f) / ((float)thisPtr->periodSize * 4.0f))) * 1000000.0f); while (thisPtr->audioStreaming) { int timeRet = clock_nanosleep(CLOCK_MONOTONIC, 0,...
by terraspace
Wed Jul 24, 2019 4:07 pm
Forum: C/C++
Topic: Audio glitches and pops
Replies: 6
Views: 270

Re: Audio glitches and pops

FYI, On my Pi 4 I'm seeing about 10% CPU load at most during my app with everything happening (including this audio playback). Network is <1ms latency, no dropped packets and I'm using about 3Mbps bandwidth in total. By buffers do you mean periods ? I've set ALSA up to run as non blocking, 16bit LE,...
by terraspace
Wed Jul 24, 2019 3:43 pm
Forum: C/C++
Topic: Audio glitches and pops
Replies: 6
Views: 270

Audio glitches and pops

So from my last thread, I moved my code across to using ALSA instead of IL, which in principle is working fine. The API isn't particularly well documented but I've gotten all the functions I require working as expected (or at least so I think). My audio streaming is still glitching quite terribly, b...
by terraspace
Wed Jul 17, 2019 9:03 am
Forum: Raspbian
Topic: gksudo deprecated
Replies: 10
Views: 912

Re: gksudo deprecated

I had seen that link and tried those options, but neither pkexec or admin: style ports seems viable.

pkexec pcmanfm gives cannot open display and there isn't a valid admin: URI to just open the app without a file ref ?
by terraspace
Tue Jul 16, 2019 2:51 pm
Forum: Raspbian
Topic: gksudo deprecated
Replies: 10
Views: 912

gksudo deprecated

gksudo has been deprecated in Debian and thus in Buster.. what is the proposed alternative for example to run pcmanfm ?
by terraspace
Fri Jul 12, 2019 9:42 pm
Forum: Graphics programming
Topic: H264 Decode Problem
Replies: 1
Views: 210

Re: H264 Decode Problem

It seems like this Pi needed more gpu mem allocated than the other ones, which is odd.. but it fixes the issue!
set it to 256mb instead of 128mb.
by terraspace
Fri Jul 12, 2019 5:48 pm
Forum: Graphics programming
Topic: H264 Decode Problem
Replies: 1
Views: 210

H264 Decode Problem

In follow up to my previous post about the decoder errors I was experiencing, having setup a bunch of totally new SD cards using Stretch and Buster I've been able to narrow down the issue. I have created a test file from my H264 encoder which on my one PI 3B+ plays perfectly with my code and with he...
by terraspace
Fri Jul 12, 2019 5:18 pm
Forum: C/C++
Topic: Audio playback with OpenMAX / IL Client
Replies: 10
Views: 483

Re: Audio playback with OpenMAX / IL Client

In case this is helpful to others.. after digging through amixer.c .. void AlsaAudioPlayer::SetOutput(PTCore::AUDIO_OUT output) { snd_ctl_t* handle = NULL; snd_ctl_elem_info_t* info; snd_ctl_elem_id_t* id; snd_ctl_elem_value_t* control; snd_ctl_elem_type_t type; int err = 0; char* ptr; unsigned int ...
by terraspace
Fri Jul 12, 2019 10:16 am
Forum: C/C++
Topic: Audio playback with OpenMAX / IL Client
Replies: 10
Views: 483

Re: Audio playback with OpenMAX / IL Client

The latency and digital distortion issues I was having under IL have definitely resolved moving to ALSA!

Thanks for the suggestion :)

All I need now is to be able to switch outputs and the migration is done.
by terraspace
Thu Jul 11, 2019 6:18 pm
Forum: C/C++
Topic: Audio playback with OpenMAX / IL Client
Replies: 10
Views: 483

Re: Audio playback with OpenMAX / IL Client

I've abstracted my audio code out a bit from a base type so I can use IL or ALSA. The basic ALSA stuff is in and working so-far. I've not been able to find a way to switch the output between hdmi and jack yet on the PI, does anyone have any idea? I thought perhaps re initialising the library with "h...

Go to advanced search