Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

only one thread decode 16 h264 streams,but deak lock sometimes #564

Closed
waiter89 opened this issue Sep 8, 2016 · 5 comments
Closed

only one thread decode 16 h264 streams,but deak lock sometimes #564

waiter89 opened this issue Sep 8, 2016 · 5 comments
Assignees
Milestone

Comments

@waiter89
Copy link

waiter89 commented Sep 8, 2016

//here is my code,only in one thread
SharedPtr vb = yami->decoder_->getOutput(); //invoke getOutput before decode
status = yami->decoder_->decode(&inputBuffer);

//here deak lock
#0 0x00007ffff568d09f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007fffd932ce51 in YamiMediaCodec::Condition::wait (this=0x7fffb85bf058) at ../common/condition.h:41
#2 YamiMediaCodec::VaapiDecSurfacePool::acquireWithWait (this=0x7fffb85beeb0) at vaapidecsurfacepool.cpp:114
#3 0x00007fffd9316c40 in YamiMediaCodec::VaapiDecoderBase::createSurface (this=this@entry=0x2d7f260) at vaapidecoder_base.cpp:319
#4 0x00007fffd931f696 in YamiMediaCodec::VaapiDecoderH264::createPicture (this=this@entry=0x2d7f260, slice=slice@entry=0x7fffb8849870, nalu=nalu@entry=0x7fffc2ffc850) at vaapidecoder_h264.cpp:1672
#5 0x00007fffd9322796 in YamiMediaCodec::VaapiDecoderH264::decodeSlice (this=this@entry=0x2d7f260, nalu=0x7fffc2ffc850) at vaapidecoder_h264.cpp:1725
#6 0x00007fffd932289b in YamiMediaCodec::VaapiDecoderH264::decodeNalu (this=0x2d7f260, nalu=) at vaapidecoder_h264.cpp:1754
#7 0x00007fffd93229f3 in YamiMediaCodec::VaapiDecoderH264::decode (this=0x2d7f260, buffer=) at vaapidecoder_h264.cpp:1806
#8 0x00007fffd92f2e22 in sw_decodec (Acodec=0x2d80550, Ainput=0x7fffbc1eec50, AiLen=4100) at ../shanwei_yami/shanwei_yami.cpp:800

another question =》should I use more than one thread to decode? because only one gpu.

@xuguangxin
Copy link
Contributor

Put decode in diffrent thread maybe helpful,becuase you need get things from network or render. you can refer to our video wall application, it will decoder in diffrent thread, https://github.com/01org/libyami-utils/blob/master/examples/grid.cpp

@xuguangxin
Copy link
Contributor

xuguangxin commented Sep 8, 2016

You need make vb out of scope when you used it, did you push vb to some queue?

@xuguangxin
Copy link
Contributor

this mentioned in #493 too.

xuguangxin added a commit to xuguangxin/libyami that referenced this issue Nov 17, 2016
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
xuguangxin added a commit to xuguangxin/libyami that referenced this issue Nov 28, 2016
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
xuguangxin added a commit to xuguangxin/libyami that referenced this issue Nov 29, 2016
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
xuguangxin added a commit to xuguangxin/libyami that referenced this issue Nov 29, 2016
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
xuguangxin added a commit to xuguangxin/libyami that referenced this issue Dec 2, 2016
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
xuguangxin added a commit to xuguangxin/libyami that referenced this issue Dec 15, 2016
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
xuguangxin added a commit to xuguangxin/libyami that referenced this issue Feb 7, 2017
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
xuguangxin added a commit to xuguangxin/libyami that referenced this issue Feb 9, 2017
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
@xuguangxin
Copy link
Contributor

Hi @waiter89 , #704 will not block the decoder, please have a try.
thanks

@xuguangxin xuguangxin added this to the 2017Q1 milestone Feb 21, 2017
@xuguangxin xuguangxin self-assigned this Feb 21, 2017
wudping pushed a commit to wudping/libyami that referenced this issue Feb 22, 2017
block decode thread will make user's life complicate.
many issues related to this
intel#493
intel#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
xuguangxin added a commit that referenced this issue Feb 22, 2017
block decode thread will make user's life complicate.
many issues related to this
#493
#564
remove it will make our code clear too.
This commit break v4l2 decoder, we will fix it later
@xuguangxin
Copy link
Contributor

fixed by fbbafc8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants