* Copyright 2009-2010 Stephan Aßmus <superstippi@gmx.de>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "DemuxerTable.h"
#include "MuxerTable.h"
extern "C" {
#include "avformat.h"
}
const media_file_format*
demuxer_format_for(const AVInputFormat* format)
{
for (uint32 i = 0; i < gMuxerCount; i++) {
const media_file_format* demuxerFormat = &gMuxerTable[i];
if (!(demuxerFormat->capabilities & media_file_format::B_READABLE))
continue;
if (strstr(format->name, demuxerFormat->short_name) != NULL)
return demuxerFormat;
}
return NULL;
}