![]() |
Audacity 3.2.0
|
! Does actual import, returned by GStreamerImportPlugin::Open More...
Public Member Functions | |
GStreamerImportFileHandle (const wxString &name) | |
virtual | ~GStreamerImportFileHandle () |
bool | Init () |
TranslatableString | GetFileDescription () override |
ByteCount | GetFileUncompressedBytes () override |
wxInt32 | GetStreamCount () override |
const TranslatableStrings & | GetStreamInfo () override |
void | SetStreamUsage (wxInt32 index, bool use) override |
int | Import (TrackFactory *trackFactory, TrackHolders &outTracks, Tags *tags) override |
void | OnPadAdded (GstPad *pad) |
void | OnPadRemoved (GstPad *pad) |
bool | ProcessBusMessage (bool &success) |
void | OnTag (GstAppSink *appsink, GstTagList *tags) |
void | OnNewSample (GStreamContext *c, GstSample *sample) |
![]() | |
ImportFileHandle (const FilePath &filename) | |
virtual | ~ImportFileHandle () |
void | CreateProgress () |
virtual TranslatableString | GetFileDescription ()=0 |
virtual ByteCount | GetFileUncompressedBytes ()=0 |
virtual wxInt32 | GetStreamCount ()=0 |
virtual const TranslatableStrings & | GetStreamInfo ()=0 |
virtual void | SetStreamUsage (wxInt32 StreamID, bool Use)=0 |
virtual ProgressResult | Import (WaveTrackFactory *trackFactory, TrackHolders &outTracks, Tags *tags)=0 |
Private Attributes | |
TranslatableStrings | mStreamInfo |
Array of stream descriptions. Length is the same as mStreams. More... | |
Tags | mTags |
Tags to be passed back to Audacity. More... | |
TrackFactory * | mTrackFactory |
Factory to create tracks when samples arrive. More... | |
GstString | mUri |
URI of file. More... | |
GstObjHandle< GstElement > | mPipeline |
GStreamer pipeline. More... | |
GstObjHandle< GstBus > | mBus |
Message bus. More... | |
GstElement * | mDec |
uridecodebin element More... | |
bool | mAsyncDone |
true = 1st async-done message received More... | |
GMutex | mStreamsLock |
Mutex protecting the mStreams array. More... | |
std::vector< std::unique_ptr< GStreamContext > > | mStreams |
Array of pointers to stream contexts. More... | |
Additional Inherited Members | |
![]() | |
using | ProgressResult = BasicUI::ProgressResult |
using | ByteCount = unsigned long long |
![]() | |
static sampleFormat | ChooseFormat (sampleFormat effectiveFormat) |
Choose appropriate format, which will not be narrower than the specified one. More... | |
![]() | |
std::shared_ptr< WaveTrack > | NewWaveTrack (WaveTrackFactory &trackFactory, sampleFormat effectiveFormat, double rate) |
Build a wave track with appropriate format, which will not be narrower than the specified one. More... | |
![]() | |
FilePath | mFilename |
std::unique_ptr< ProgressDialog > | mProgress |
! Does actual import, returned by GStreamerImportPlugin::Open
An ImportFileHandle for GStreamer data.
Definition at line 158 of file ImportGStreamer.cpp.
GStreamerImportFileHandle::GStreamerImportFileHandle | ( | const wxString & | name | ) |
Definition at line 839 of file ImportGStreamer.cpp.
References mAsyncDone, mDec, mStreamsLock, and mTrackFactory.
|
virtual |
Definition at line 851 of file ImportGStreamer.cpp.
References mDec, mPipeline, mStreams, and mStreamsLock.
|
overridevirtual |
|
overridevirtual |
Implements ImportFileHandle.
Definition at line 1009 of file ImportGStreamer.cpp.
|
overridevirtual |
! Called by Import.cpp
Implements ImportFileHandle.
Definition at line 889 of file ImportGStreamer.cpp.
References mStreamInfo.
|
overridevirtual |
! Called by Import.cpp
Implements ImportFileHandle.
Definition at line 897 of file ImportGStreamer.cpp.
References mStreamInfo.
|
override |
! Imports audio
Definition at line 1017 of file ImportGStreamer.cpp.
References AppSinkBitBucket, AudacityMessageBox(), RefreshCode::Cancelled, ImportFileHandle::CreateProgress(), GStreamContext::mChannels, GStreamContext::mConv, GStreamContext::mNumChannels, mPipeline, ImportFileHandle::mProgress, GStreamContext::mSink, mStreams, mStreamsLock, mTags, mTrackFactory, GStreamContext::mUse, ProcessBusMessage(), BasicUI::Success, and XO().
bool GStreamerImportFileHandle::Init | ( | ) |
! Format initialization
Definition at line 918 of file ImportGStreamer.cpp.
References AudacityMessageBox(), GStreamerAutoplugSelectCallback(), GStreamerPadAddedCallback(), GStreamerPadRemovedCallback(), mBus, mDec, ImportFileHandle::mFilename, GStreamContext::mNumChannels, mPipeline, GStreamContext::mSampleRate, mStreamInfo, mStreams, mStreamsLock, GStreamContext::mType, mUri, ProcessBusMessage(), wxT(), and XO().
void GStreamerImportFileHandle::OnNewSample | ( | GStreamContext * | c, |
GstSample * | sample | ||
) |
! Called when a NEW samples are queued
c | - stream context |
sample | - gstreamer sample |
Definition at line 730 of file ImportGStreamer.cpp.
References floatSample, int16Sample, int24Sample, GStreamContext::mChannels, GStreamContext::mFmt, GStreamContext::mNumChannels, mPipeline, GStreamContext::mSampleRate, mTrackFactory, SAMPLE_SIZE, str, and WARN.
Referenced by GStreamerNewSample().
void GStreamerImportFileHandle::OnPadAdded | ( | GstPad * | pad | ) |
! Called when a pad-added signal comes in from UriDecodeBin
pad | - source pad of uridecodebin that will not be serving any data |
Definition at line 535 of file ImportGStreamer.cpp.
References AppSinkCallbacks, mPipeline, mStreams, mStreamsLock, name, SETCTX, str, supportedCaps, and WARN.
void GStreamerImportFileHandle::OnPadRemoved | ( | GstPad * | pad | ) |
! Called when a pad-removed signal comes in from UriDecodeBin
pad | - source pad of uridecodebin that will not be serving any data |
Definition at line 706 of file ImportGStreamer.cpp.
References GETCTX, GStreamContext::mConv, mPipeline, and GStreamContext::mSink.
void GStreamerImportFileHandle::OnTag | ( | GstAppSink * | appsink, |
GstTagList * | tags | ||
) |
! Called when a tag message comes in from the appsink
appsink | - Specific sink that received the message |
tags | - List of tags |
Definition at line 1314 of file ImportGStreamer.cpp.
References mTags, name, Tags::SetTag(), str, TAG_ALBUM, TAG_ARTIST, TAG_COMMENTS, TAG_GENRE, TAG_TITLE, TAG_TRACK, TAG_YEAR, and wxT().
Referenced by ProcessBusMessage().
bool GStreamerImportFileHandle::ProcessBusMessage | ( | bool & | success | ) |
! Called when a message comes through GStreamer message bus
success | - will be set to true if successful |
Definition at line 1163 of file ImportGStreamer.cpp.
References AudacityMessageBox(), GstMessageParse(), mAsyncDone, mBus, OnTag(), wxT(), and XO().
Referenced by Import(), and Init().
|
overridevirtual |
! Called by Import.cpp
index | - index of the stream in mStreamInfo and mStreams arrays |
use | - true if this stream should be imported, false otherwise |
Implements ImportFileHandle.
Definition at line 905 of file ImportGStreamer.cpp.
References mStreams, mStreamsLock, and GStreamContext::mUse.
|
private |
true = 1st async-done message received
Definition at line 226 of file ImportGStreamer.cpp.
Referenced by GStreamerImportFileHandle(), and ProcessBusMessage().
|
private |
Message bus.
Definition at line 224 of file ImportGStreamer.cpp.
Referenced by Init(), and ProcessBusMessage().
|
private |
uridecodebin element
Definition at line 225 of file ImportGStreamer.cpp.
Referenced by GStreamerImportFileHandle(), Init(), and ~GStreamerImportFileHandle().
|
private |
GStreamer pipeline.
Definition at line 223 of file ImportGStreamer.cpp.
Referenced by Import(), Init(), OnNewSample(), OnPadAdded(), OnPadRemoved(), and ~GStreamerImportFileHandle().
|
private |
Array of stream descriptions. Length is the same as mStreams.
Definition at line 218 of file ImportGStreamer.cpp.
Referenced by GetStreamCount(), GetStreamInfo(), and Init().
|
private |
Array of pointers to stream contexts.
Definition at line 229 of file ImportGStreamer.cpp.
Referenced by Import(), Init(), OnPadAdded(), SetStreamUsage(), and ~GStreamerImportFileHandle().
|
private |
Mutex protecting the mStreams array.
Definition at line 228 of file ImportGStreamer.cpp.
Referenced by GStreamerImportFileHandle(), Import(), Init(), OnPadAdded(), SetStreamUsage(), and ~GStreamerImportFileHandle().
|
private |
Tags to be passed back to Audacity.
Definition at line 219 of file ImportGStreamer.cpp.
|
private |
Factory to create tracks when samples arrive.
Definition at line 220 of file ImportGStreamer.cpp.
Referenced by GStreamerImportFileHandle(), Import(), and OnNewSample().
|
private |