use ID3 tags for ADTS files
This commit is contained in:
parent
1f4800c9be
commit
0a2573ffa4
|
@ -414,8 +414,12 @@ bool MediaFileInfo::createAppropriateTags(bool treatUnknownFilesAsMp3Files, TagU
|
||||||
if(m_container) { // container object takes care of tag management
|
if(m_container) { // container object takes care of tag management
|
||||||
m_container->createTag();
|
m_container->createTag();
|
||||||
} else { // no container object present; creation of ID3 tag is possible
|
} else { // no container object present; creation of ID3 tag is possible
|
||||||
if(!hasAnyTag() && containerFormat() != ContainerFormat::MpegAudioFrames) {
|
if(!hasAnyTag() && !treatUnknownFilesAsMp3Files) {
|
||||||
if(!treatUnknownFilesAsMp3Files) {
|
switch(containerFormat()) {
|
||||||
|
case ContainerFormat::MpegAudioFrames:
|
||||||
|
case ContainerFormat::Adts:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -507,21 +511,6 @@ void MediaFileInfo::applyChanges()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Returns the name of the container format as C-style string.
|
|
||||||
*
|
|
||||||
* parseContainerFormat() needs to be called before. Otherwise
|
|
||||||
* always the name "Unknown" will be returned.
|
|
||||||
*
|
|
||||||
* \sa containerFormat()
|
|
||||||
* \sa containerFormatAbbreviation()
|
|
||||||
* \sa parseContainerFormat()
|
|
||||||
*/
|
|
||||||
const char *MediaFileInfo::containerFormatName() const
|
|
||||||
{
|
|
||||||
return Media::containerFormatName(m_containerFormat);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the abbreviation of the container format as C-style string.
|
* \brief Returns the abbreviation of the container format as C-style string.
|
||||||
*
|
*
|
||||||
|
@ -555,21 +544,6 @@ const char *MediaFileInfo::containerFormatAbbreviation() const
|
||||||
return Media::containerFormatAbbreviation(m_containerFormat, mediaType, version);
|
return Media::containerFormatAbbreviation(m_containerFormat, mediaType, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Returns the subversion of the container format as C-style string.
|
|
||||||
*
|
|
||||||
* parseContainerFormat() needs to be called before. Otherwise
|
|
||||||
* always an empty string will be returned.
|
|
||||||
*
|
|
||||||
* \sa containerFormat()
|
|
||||||
* \sa containerFormatName()
|
|
||||||
* \sa parseContainerFormat()
|
|
||||||
*/
|
|
||||||
const char *MediaFileInfo::containerFormatSubversion() const
|
|
||||||
{
|
|
||||||
return Media::containerFormatSubversion(m_containerFormat);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the MIME-type of the container format as C-style string.
|
* \brief Returns the MIME-type of the container format as C-style string.
|
||||||
*
|
*
|
||||||
|
@ -938,6 +912,7 @@ bool MediaFileInfo::areTagsSupported() const
|
||||||
case ContainerFormat::Ogg:
|
case ContainerFormat::Ogg:
|
||||||
case ContainerFormat::Matroska:
|
case ContainerFormat::Matroska:
|
||||||
case ContainerFormat::Webm:
|
case ContainerFormat::Webm:
|
||||||
|
case ContainerFormat::Adts:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef MEDIAINFO_H
|
#ifndef MEDIAINFO_H
|
||||||
#define MEDIAINFO_H
|
#define MEDIAINFO_H
|
||||||
|
|
||||||
|
#include "signature.h"
|
||||||
#include "statusprovider.h"
|
#include "statusprovider.h"
|
||||||
#include "basicfileinfo.h"
|
#include "basicfileinfo.h"
|
||||||
#include "abstractcontainer.h"
|
#include "abstractcontainer.h"
|
||||||
|
@ -28,7 +29,6 @@ class WaveAudioStream;
|
||||||
class MpegAudioFrameStream;
|
class MpegAudioFrameStream;
|
||||||
|
|
||||||
enum class MediaType;
|
enum class MediaType;
|
||||||
enum class ContainerFormat;
|
|
||||||
enum class TagType : unsigned int;
|
enum class TagType : unsigned int;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -170,6 +170,36 @@ inline ContainerFormat MediaFileInfo::containerFormat() const
|
||||||
return m_containerFormat;
|
return m_containerFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Returns the name of the container format as C-style string.
|
||||||
|
*
|
||||||
|
* parseContainerFormat() needs to be called before. Otherwise
|
||||||
|
* always the name "Unknown" will be returned.
|
||||||
|
*
|
||||||
|
* \sa containerFormat()
|
||||||
|
* \sa containerFormatAbbreviation()
|
||||||
|
* \sa parseContainerFormat()
|
||||||
|
*/
|
||||||
|
inline const char *MediaFileInfo::containerFormatName() const
|
||||||
|
{
|
||||||
|
return Media::containerFormatName(m_containerFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Returns the subversion of the container format as C-style string.
|
||||||
|
*
|
||||||
|
* parseContainerFormat() needs to be called before. Otherwise
|
||||||
|
* always an empty string will be returned.
|
||||||
|
*
|
||||||
|
* \sa containerFormat()
|
||||||
|
* \sa containerFormatName()
|
||||||
|
* \sa parseContainerFormat()
|
||||||
|
*/
|
||||||
|
inline const char *MediaFileInfo::containerFormatSubversion() const
|
||||||
|
{
|
||||||
|
return Media::containerFormatSubversion(m_containerFormat);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the actual container start offset.
|
* \brief Returns the actual container start offset.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue