Add stream information into application title
This commit is contained in:
1 parent
57f5231e7b
commit
ebecb1e3f5
9 files changed
+86
-32
No files matched your search
@@ -150,6 +150,11 @@ Bool LibAvContextHandle::initAvFormat( char* filename, UInt& width, UInt& height
|
||||
video_dst_bufsize = ret;
|
||||
}
|
||||
|
||||
|
||||
const char *codec_name = avcodec_get_name(video_dec_ctx->codec_id);
|
||||
|
||||
sprintf(m_acStreamInformationString, "%s ", codec_name);
|
||||
|
||||
Double fr = 30;
|
||||
if( video_stream->avg_frame_rate.den && video_stream->avg_frame_rate.num )
|
||||
fr = av_q2d( video_stream->avg_frame_rate );
|
||||
|
||||
@@ -63,6 +63,10 @@ public:
|
||||
{
|
||||
return m_bHasStream;
|
||||
}
|
||||
Char* getStreamInformation()
|
||||
{
|
||||
return m_acStreamInformationString;
|
||||
}
|
||||
|
||||
uint8_t *video_dst_data[4];
|
||||
int video_dst_linesize[4];
|
||||
@@ -77,6 +81,8 @@ private:
|
||||
AVPacket pkt;
|
||||
|
||||
Bool m_bHasStream;
|
||||
|
||||
Char m_acStreamInformationString[20];
|
||||
};
|
||||
|
||||
} // NAMESPACE
|
||||
|
||||
Reference in new issue
Block a user