6 #include <libavcodec/avcodec.h>
19 bool detection =
false;
21 while(!av_read_frame(const_cast<AVFormatContext*>(
_formatContext), &pkt))
25 LOG_DEBUG(
"DataProperties - start detect packet");
28 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
30 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
32 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
34 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
36 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
38 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
40 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
42 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
44 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
46 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
48 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
50 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
52 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
54 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
56 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
58 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
60 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
62 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
64 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
66 LOG_DEBUG(offset <<
" - " << (
int)pkt.data[offset] <<
" | " << std::bitset<8>(pkt.data[offset]))
69 unsigned short numberOfLines = (
unsigned int)(pkt.data[0] << 8) + pkt.data[1];
71 LOG_DEBUG(
"DataProperties - number of lines " << numberOfLines)
88 for(PropertyVector::iterator it = properties.begin(); it != properties.end(); ++it)
90 flux << std::setw(
detail::keyWidth) << it->first <<
": " << it->second << std::endl;
std::vector< std::pair< std::string, std::string > > PropertyVector
PropertyVector is a vector of pair, because the order of properties matters to us.
const AVFormatContext * _formatContext
Has link (no ownership)
const std::string separator
void detectAncillaryData()
std::ostream & operator<<(std::ostream &flux, const InputFile &input)
PropertyVector asVector() const
Same data with a specific order.