Skip to content

Commit 1ee342a

Browse files
committed
Bump to ffmepg 2.8.6, fixed volume range, added duration changed signal.
1 parent 6320659 commit 1ee342a

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

piomxtextures_qt_driver/mediaplayer/openmaxilplayercontrol.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ OpenMAXILPlayerControl::OpenMAXILPlayerControl(QObject *parent)
8989
this, SLOT(onMediaStatusChanged(OMX_MediaProcessor::OMX_MediaStatus)));
9090
connect(m_mediaProcessor, SIGNAL(metadataChanged(QVariantMap)),
9191
this, SIGNAL(metaDataChanged(QVariantMap)));
92+
connect(m_mediaProcessor, SIGNAL(streamLengthChanged(qint64)),
93+
this, SIGNAL(durationChanged(qint64)));
9294
}
9395

9496
/*------------------------------------------------------------------------------

piomxtextures_samples/video_simple.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Rectangle {
4545
Qt.quit();
4646
}
4747

48-
uri = arguments[2];
48+
uri = arguments[1];
4949
}
5050

5151
Video {

piomxtextures_src/omx_mediaprocessor.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ OMX_MediaProcessor::OMX_MediaProcessor(OMX_EGLBufferProviderSh provider) :
179179
m_pendingPause(false),
180180
m_subtitle_index(0),
181181
m_audio_index(0),
182+
m_streamLength(0),
182183
m_incrMs(0),
183184
m_audioConfig(new OMXAudioConfig()),
184185
m_videoConfig(new OMXVideoConfig()),
@@ -449,6 +450,15 @@ bool OMX_MediaProcessor::setFilenameInt(const QString& filename)
449450
}
450451

451452
setState(STATE_STOPPED);
453+
454+
const qint64 streamLength = this->streamLength();
455+
log_debug("New stream length: %lld.", streamLength);
456+
457+
if (m_streamLength != streamLength) {
458+
m_streamLength = streamLength;
459+
emit streamLengthChanged(streamLength);
460+
}
461+
452462
return true;
453463
}
454464

@@ -654,7 +664,7 @@ void OMX_MediaProcessor::setVolume(long volume, bool linear)
654664
{
655665
QMutexLocker locker(&m_sendCmd);
656666

657-
#define VOL_MAX 2
667+
#define VOL_MAX 1
658668
#define VOL_MIN 0
659669

660670
m_volume = volume/100.0*(VOL_MAX - VOL_MIN);

piomxtextures_src/omx_mediaprocessor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public slots:
173173
void errorOccurred(OMX_MediaProcessor::OMX_MediaProcessorError error);
174174
void stateChanged(OMX_MediaProcessor::OMX_MediaProcessorState state);
175175
void mediaStatusChanged(OMX_MediaProcessor::OMX_MediaStatus status);
176+
void streamLengthChanged(qint64 length);
176177

177178
private slots:
178179
void init();
@@ -227,6 +228,7 @@ private slots:
227228

228229
int m_subtitle_index;
229230
int m_audio_index;
231+
int m_streamLength;
230232

231233
QMutex m_mutexPending;
232234
QWaitCondition m_waitPendingCommand;

piomxtextures_tools/compile_ffmpeg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fi
6161

6262
cd 3rdparty/ffmpeg
6363
rm -rf ffmpeg_src
64-
git clone git://source.ffmpeg.org/ffmpeg ffmpeg_src -bn2.8.5 --depth=1
64+
git clone git://source.ffmpeg.org/ffmpeg ffmpeg_src -bn2.8.6 --depth=1
6565
cd ffmpeg_src;
6666

6767
export PATH="$COMPILER_PATH":$PATH

0 commit comments

Comments
 (0)