From 47eafdad43dbca11094e12c0db02604e080c116e Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Tue, 11 Sep 2012 22:34:07 +0200 Subject: [PATCH] Changes in buffer handling and also use arrow keys for play pause etc --- player.cc | 4 ++-- videoomx.cc | 7 ++++--- vvideorec.cc | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/player.cc b/player.cc index 0c032bc..a16f63e 100644 --- a/player.cc +++ b/player.cc @@ -93,8 +93,8 @@ int Player::init(bool p_isPesRecording,double framespersecond) unsigned int demux_video_size=2097152; unsigned int demux_audio_size=524288; if (video->supportsh264()) { - demux_video_size*=5*2;//5; - demux_audio_size*=2; + demux_video_size*=5*1;//5; + demux_audio_size*=1; } if (!demuxer->init(this, audio, video,teletext, demux_video_size,demux_audio_size,65536, framespersecond, subtitles)) diff --git a/videoomx.cc b/videoomx.cc index 55ee466..50c0538 100644 --- a/videoomx.cc +++ b/videoomx.cc @@ -2300,20 +2300,21 @@ OMX_ERRORTYPE VideoOMX::ProtOMXEmptyThisBuffer(OMX_HANDLETYPE handle, OMX_BUFFER void VideoOMX::PrepareMediaSample(const MediaPacketList& mplist,UINT samplepos) { + mediapackets.clear(); list::const_iterator begin=mplist.begin(); list::const_iterator itty=mplist.begin(); advance(itty,min(mplist.size(),10)); mediapackets.insert(mediapackets.begin(),begin,itty);//front + } UINT VideoOMX::DeliverMediaSample(UCHAR* buffer, UINT *samplepos) { int consumed=0; while (consumedplay(); @@ -252,6 +253,7 @@ int VVideoRec::handleCommand(int command) return 4; } + case Remote::DOWN: case Remote::PAUSE: { player->pause(); @@ -270,12 +272,14 @@ int VVideoRec::handleCommand(int command) player->skipBackward(60); return 2; } + case Remote::RIGHT: case Remote::FORWARD: { player->fastForward(); doBar(0); return 2; } + case Remote::LEFT: case Remote::REVERSE: { player->fastBackward(); -- 2.39.5