]> git.sesse.net Git - kdenlive/blobdiff - src/lib/audio/audioStreamInfo.cpp
Use QLatin1String
[kdenlive] / src / lib / audio / audioStreamInfo.cpp
index c4706527bd4778c788e968f63d21ac71d2cd2583..1a172277ff675b51c2ea7db34cc262b67397836d 100644 (file)
@@ -1,12 +1,12 @@
-/***************************************************************************
- *   Copyright (C) 2012 by Simon Andreas Eugster (simon.eu@gmail.com)      *
- *   This file is part of kdenlive. See www.kdenlive.org.                  *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
+/*
+Copyright (C) 2012  Simon A. Eugster (Granjow)  <simon.eu@gmail.com>
+This file is part of kdenlive. See www.kdenlive.org.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+*/
 
 #include "audioStreamInfo.h"
 
 AudioStreamInfo::AudioStreamInfo(Mlt::Producer *producer, int audioStreamIndex) :
     m_audioStreamIndex(audioStreamIndex)
 {
-
     QByteArray key;
 
-    key = QString("meta.media.%1.codec.sample_fmt").arg(audioStreamIndex).toLocal8Bit();
-    m_samplingFormat = QString(producer->get(key.data()));
+    key = QString::fromLatin1("meta.media.%1.codec.sample_fmt").arg(audioStreamIndex).toLocal8Bit();
+    m_samplingFormat = QString::fromLatin1(producer->get(key.data()));
 
-    key = QString("meta.media.%1.codec.sample_rate").arg(audioStreamIndex).toLocal8Bit();
+    key = QString::fromLatin1("meta.media.%1.codec.sample_rate").arg(audioStreamIndex).toLocal8Bit();
     m_samplingRate = atoi(producer->get(key.data()));
 
-    key = QString("meta.media.%1.codec.bit_rate").arg(audioStreamIndex).toLocal8Bit();
+    key = QString::fromLatin1("meta.media.%1.codec.bit_rate").arg(audioStreamIndex).toLocal8Bit();
     m_bitRate = atoi(producer->get(key.data()));
 
-    key = QString("meta.media.%1.codec.channels").arg(audioStreamIndex).toLocal8Bit();
+    key = QString::fromLatin1("meta.media.%1.codec.channels").arg(audioStreamIndex).toLocal8Bit();
     m_channels = atoi(producer->get(key.data()));
 
-    key = QString("meta.media.%1.codec.name").arg(audioStreamIndex).toLocal8Bit();
-    m_codecName = QString(producer->get(key.data()));
+    key = QString::fromLatin1("meta.media.%1.codec.name").arg(audioStreamIndex).toLocal8Bit();
+    m_codecName = QString::fromLatin1(producer->get(key.data()));
 
-    key = QString("meta.media.%1.codec.long_name").arg(audioStreamIndex).toLocal8Bit();
-    m_codecLongName = QString(producer->get(key.data()));
+    key = QString::fromLatin1("meta.media.%1.codec.long_name").arg(audioStreamIndex).toLocal8Bit();
+    m_codecLongName = QString::fromLatin1(producer->get(key.data()));
 }
+
 AudioStreamInfo::~AudioStreamInfo()
 {
 }
 
-int AudioStreamInfo::streamIndex() const { return m_audioStreamIndex; }
-int AudioStreamInfo::samplingRate() const { return m_samplingRate; }
-int AudioStreamInfo::channels() const { return m_channels; }
-int AudioStreamInfo::bitrate() const { return m_bitRate; }
+int AudioStreamInfo::streamIndex() const
+{
+    return m_audioStreamIndex;
+}
+
+int AudioStreamInfo::samplingRate() const
+{
+    return m_samplingRate;
+}
+
+int AudioStreamInfo::channels() const
+{
+    return m_channels;
+}
+
+int AudioStreamInfo::bitrate() const
+{
+    return m_bitRate;
+}
+
 const QString& AudioStreamInfo::codecName(bool longName) const
 {
     if (longName) {