Skip to content
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

Various fixes #4

Merged
merged 3 commits into from
Jan 29, 2021
Merged

Various fixes #4

merged 3 commits into from
Jan 29, 2021

Conversation

sdroege
Copy link
Contributor

@sdroege sdroege commented Jul 10, 2019

See the individual commits for details

sdroege added 2 commits July 10, 2019 12:50
…utput buffer after usage

Reference count handling is done by the base class, but we need to
unmap buffers after we're done with using them if we mapped them
ourselves. Fixes memory leaks.
Otherwise we'll get a NULL buffer at EOS, which we can't handle and do
not have to handle anyway as we don't queue up any input data between
handle_frame() calls.
@sdroege
Copy link
Contributor Author

sdroege commented Jul 10, 2019

This fixes #3 and #2 as a side-effect.

This happens regularly via RTP and as such should be supported here.
@lemenkov
Copy link

Still cannot decode raw g729 with these patches.
This works (I guess any mono 8khz wav-filess will work):

gst-launch-1.0 filesrc location=./eng_f7.wav ! wavparse ! g729enc ! g729dec ! audioresample ! pulsesink

This also works (the resulting ./test.g729 file is playable with mpv):

gst-launch-1.0 filesrc location=./eng_f7.wav ! wavparse  ! g729enc ! filesink location=./test.g729

But this one doesn't work for me:

gst-launch-1.0 filesrc location=./test.g729 ! "audio/G729,rate=(int)8000,channels=(int)1" ! g729dec ! filesink location=./test.raw

Maybe I'm missing something?

@sdroege
Copy link
Contributor Author

sdroege commented Aug 19, 2019

You can't decode raw g729, that's correct. It needs to be properly packetized, e.g. from RTP or some other container format (not WAV). A parser would be needed otherwise first, but that doesn't exist currently.

@lemenkov
Copy link

lemenkov commented Sep 2, 2019

You can't decode raw g729, that's correct. It needs to be properly packetized, e.g. from RTP or some other container format (not WAV). A parser would be needed otherwise first, but that doesn't exist currently.

Ah got that.
For raw G729a stream it should be as simple as slicing incoming stream by 10 bytes. Is it possible with currently existing Gstreamer filters? I mean maybe there is some kind of setting for filesrc which lets it to write data only by packets of a given size.

@sdroege
Copy link
Contributor Author

sdroege commented Sep 3, 2019

Not without writing code for that, and as you can see from the code here the G729 packets can be different sizes than 10 so you'd need to write a proper parser instead of just chunking into 10 byte packets.

Where did you get unframed G729 packets from?

@drizzt drizzt merged commit e0b4df5 into drizzt:master Jan 29, 2021
@sdroege sdroege deleted the various-fixes branch January 29, 2021 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants