implemented a footage viewer

Essentially a minor derivation of a viewer type that can automatically view
footage from the project (i.e. not in a sequence).
This commit is contained in:
itsmattkc
2019-12-30 20:17:48 +11:00
parent 55ea4a8177
commit 0db13a96ab
34 changed files with 439 additions and 152 deletions
+6 -1
View File
@@ -499,7 +499,12 @@ bool FFmpegDecoder::Probe(Footage *f)
// Create an audio stream object
AudioStreamPtr audio_stream = std::make_shared<AudioStream>();
audio_stream->set_layout(avstream_->codecpar->channel_layout);
uint64_t channel_layout = avstream_->codecpar->channel_layout;
if (!channel_layout) {
channel_layout = static_cast<uint64_t>(av_get_default_channel_layout(avstream_->codecpar->channels));
}
audio_stream->set_channel_layout(channel_layout);
audio_stream->set_channels(avstream_->codecpar->channels);
audio_stream->set_sample_rate(avstream_->codecpar->sample_rate);