X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Flib%2Faudio%2FaudioStreamInfo.cpp;h=1a172277ff675b51c2ea7db34cc262b67397836d;hb=ac8c99168f151e2f351043d13500741ce1ca8966;hp=c4706527bd4778c788e968f63d21ac71d2cd2583;hpb=05f4fad9a19434399f43ff76e06d1e1a5f74c0f6;p=kdenlive diff --git a/src/lib/audio/audioStreamInfo.cpp b/src/lib/audio/audioStreamInfo.cpp index c4706527..1a172277 100644 --- a/src/lib/audio/audioStreamInfo.cpp +++ b/src/lib/audio/audioStreamInfo.cpp @@ -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) +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" @@ -17,35 +17,51 @@ 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) {