|
MythTV master
|
#include <libmythtv/recorders/v4l2encstreamhandler.h>
Public Member Functions | |
| V4L2encStreamHandler (const QString &device, int audio_input, int inputid) | |
| ~V4L2encStreamHandler (void) override | |
| void | run (void) override |
| Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead. More... | |
| bool | Configure (void) |
| QString | Driver (void) const |
| int | GetStreamType (void) |
| bool | IsOpen (void) const |
| bool | HasTuner (void) const |
| bool | HasAudio (void) const |
| bool | HasSlicedVBI (void) const |
| bool | HasPictureAttributes (void) const |
| int | AvailCount (void) const |
| bool | StartEncoding (void) |
| bool | StopEncoding (void) |
| void | RestartEncoding (void) |
| QString | ErrorString (void) const |
Public Member Functions inherited from StreamHandler | |
| virtual void | AddListener (MPEGStreamData *data, bool allow_section_reader=false, bool needs_buffering=false, const QString &output_file=QString()) |
| virtual void | RemoveListener (MPEGStreamData *data) |
| bool | IsRunning (void) const |
| bool | HasError (void) const |
| virtual bool | AddNamedOutputFile (const QString &filename) |
| Called with _listener_lock locked just after adding new output file. More... | |
| virtual void | RemoveNamedOutputFile (const QString &filename) |
| Called with _listener_lock locked just before removing old output file. More... | |
| virtual void | ReaderPaused (int fd)=0 |
| virtual void | PriorityEvent (int fd)=0 |
Static Public Member Functions | |
| static V4L2encStreamHandler * | Get (const QString &devname, int audioinput, int inputid) |
| static void | Return (V4L2encStreamHandler *&ref, int inputid) |
Protected Member Functions | |
| bool | Status (bool &failed, bool &failing) |
| bool | SetOption (const QString &opt, int value) |
| bool | SetOption (const QString &opt, const QString &value) |
| bool | SetControl (int request, int value) |
| bool | SetVideoCaptureFormat (void) |
| bool | SetLanguageMode (void) |
| Set audio language mode. More... | |
| bool | SetRecordingVolume (void) |
| bool | HasLock (void) |
| int | GetSignalStrength (void) |
| bool | GetResolution (int &width, int &height) const |
| void | SetBitrate (int bitrate, int maxbitrate, int bitratemode, const QString &reason) |
| bool | SetBitrateForResolution (void) |
Protected Member Functions inherited from StreamHandler | |
| StreamHandler (QString device, int inputid) | |
| ~StreamHandler () override | |
| void | Start (void) |
| void | Stop (void) |
| void | SetRunning (bool running, bool using_buffering, bool using_section_reader) |
| bool | AddPIDFilter (PIDInfo *info) |
| bool | RemovePIDFilter (uint pid) |
| bool | RemoveAllPIDFilters (void) |
| void | UpdateListeningForEIT (void) |
| bool | UpdateFiltersFromStreamData (void) |
| virtual bool | UpdateFilters (void) |
| virtual void | CycleFiltersByPriority () |
| PIDPriority | GetPIDPriority (uint pid) const |
| void | ReaderPaused (int fd) override |
| void | PriorityEvent (int fd) override |
| virtual PIDInfo * | CreatePIDInfo (uint pid, uint stream_type, int pes_type) |
| void | WriteMPTS (const unsigned char *buffer, uint len) |
| Write out a copy of the raw MPTS. More... | |
| virtual void | SetRunningDesired (bool desired) |
| At minimum this sets _running_desired, this may also send signals to anything that might be blocking the run() loop. More... | |
Protected Member Functions inherited from MThread | |
| virtual void | run (void) |
| Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead. More... | |
| int | exec (void) |
| Enters the qt event loop. call exit or quit to exit thread. More... | |
| MThread (const QString &objectName) | |
| Standard constructor. More... | |
| MThread (const QString &objectName, QRunnable *runnable) | |
| Use this constructor if you want the default run() method to run the QRunnable's run() method instead of entering the Qt event loop. More... | |
| virtual | ~MThread () |
| MThread (const MThread &)=delete | |
| MThread & | operator= (const MThread &)=delete |
| void | RunProlog (void) |
| Sets up a thread, call this if you reimplement run(). More... | |
| void | RunEpilog (void) |
| Cleans up a thread's resources, call this if you reimplement run(). More... | |
| QThread * | qthread (void) |
| Returns the thread, this will always return the same pointer no matter how often you restart the thread. More... | |
| void | setObjectName (const QString &name) |
| QString | objectName (void) const |
| void | setPriority (QThread::Priority priority) |
| QThread::Priority | priority (void) const |
| bool | isFinished (void) const |
| bool | isRunning (void) const |
| void | setStackSize (uint stackSize) |
| uint | stackSize (void) const |
| void | exit (int retcode=0) |
| Use this to exit from the thread if you are using a Qt event loop. More... | |
| void | start (QThread::Priority p=QThread::InheritPriority) |
| Tell MThread to start running the thread in the near future. More... | |
| void | terminate (void) |
| Kill a thread unsafely. More... | |
| void | quit (void) |
| calls exit(0) More... | |
| bool | wait (std::chrono::milliseconds time=std::chrono::milliseconds::max()) |
| Wait for the MThread to exit, with a maximum timeout. More... | |
Protected Member Functions inherited from DeviceReaderCB | |
| virtual | ~DeviceReaderCB ()=default |
| virtual void | ReaderPaused (int fd)=0 |
| virtual void | PriorityEvent (int fd)=0 |
Static Protected Member Functions | |
| static QString | RequestDescription (int request) |
Static Protected Member Functions inherited from MThread | |
| static void | setTerminationEnabled (bool enabled=true) |
| static void | ThreadSetup (const QString &name) |
| This is to be called on startup in those few threads that haven't been ported to MThread. More... | |
| static void | ThreadCleanup (void) |
| This is to be called on exit in those few threads that haven't been ported to MThread. More... | |
| static void | Cleanup (void) |
| This will print out all the running threads, call exit(1) on each and then wait up to 5 seconds total for all the threads to exit. More... | |
| static void | GetAllThreadNames (QStringList &list) |
| static void | GetAllRunningThreadNames (QStringList &list) |
Private Types | |
| enum | constants { PACKET_SIZE = 188 * 32768 } |
Private Member Functions | |
| bool | Open (void) |
| void | Close (void) |
| bool | ConfigureVBI (void) |
Static Private Attributes | |
| static QMutex | s_handlers_lock |
| static QMap< QString, V4L2encStreamHandler * > | s_handlers |
| static QMap< QString, uint > | s_handlers_refcnt |
| static const std::array< const int, 14 > | kAudioRateL1 |
| static const std::array< const int, 14 > | kAudioRateL2 |
| static const std::array< const int, 14 > | kAudioRateL3 |
| static const std::array< const std::string, 15 > | kStreamTypes |
Friends | |
| class | V4L2encRecorder |
| class | V4L2encSignalMonitor |
Definition at line 21 of file v4l2encstreamhandler.h.
|
private |
| Enumerator | |
|---|---|
| PACKET_SIZE | |
Definition at line 26 of file v4l2encstreamhandler.h.
| V4L2encStreamHandler::V4L2encStreamHandler | ( | const QString & | device, |
| int | audio_input, | ||
| int | inputid | ||
| ) |
Definition at line 137 of file v4l2encstreamhandler.cpp.
Referenced by Get().
|
override |
Definition at line 154 of file v4l2encstreamhandler.cpp.
|
inline |
Definition at line 55 of file v4l2encstreamhandler.h.
|
private |
Definition at line 462 of file v4l2encstreamhandler.cpp.
Referenced by Open(), and ~V4L2encStreamHandler().
| bool V4L2encStreamHandler::Configure | ( | void | ) |
Definition at line 395 of file v4l2encstreamhandler.cpp.
Referenced by V4L2encRecorder::run().
|
private |
Definition at line 1041 of file v4l2encstreamhandler.cpp.
Referenced by Configure().
|
inline |
Definition at line 44 of file v4l2encstreamhandler.h.
|
inline |
Definition at line 60 of file v4l2encstreamhandler.h.
Referenced by V4L2encRecorder::Open().
|
static |
Definition at line 55 of file v4l2encstreamhandler.cpp.
Referenced by V4L2encRecorder::Open(), and V4L2encSignalMonitor::UpdateValues().
|
inlineprotected |
Definition at line 77 of file v4l2encstreamhandler.h.
|
protected |
Definition at line 929 of file v4l2encstreamhandler.cpp.
| int V4L2encStreamHandler::GetStreamType | ( | void | ) |
Definition at line 823 of file v4l2encstreamhandler.cpp.
Referenced by Configure(), and V4L2encRecorder::run().
|
inline |
Definition at line 49 of file v4l2encstreamhandler.h.
|
protected |
Definition at line 921 of file v4l2encstreamhandler.cpp.
|
inline |
Definition at line 52 of file v4l2encstreamhandler.h.
|
inline |
Definition at line 50 of file v4l2encstreamhandler.h.
|
inline |
Definition at line 48 of file v4l2encstreamhandler.h.
|
inline |
Definition at line 46 of file v4l2encstreamhandler.h.
Referenced by V4L2encRecorder::Open(), Open(), run(), StartEncoding(), and StopEncoding().
|
private |
Definition at line 334 of file v4l2encstreamhandler.cpp.
Referenced by run(), and V4L2encStreamHandler().
|
staticprotected |
| void V4L2encStreamHandler::RestartEncoding | ( | void | ) |
Definition at line 658 of file v4l2encstreamhandler.cpp.
Referenced by run().
|
static |
Definition at line 87 of file v4l2encstreamhandler.cpp.
Referenced by V4L2encRecorder::Close(), V4L2encRecorder::Open(), and V4L2encSignalMonitor::~V4L2encSignalMonitor().
|
overridevirtual |
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Reimplemented from MThread.
Definition at line 160 of file v4l2encstreamhandler.cpp.
|
protected |
Definition at line 943 of file v4l2encstreamhandler.cpp.
Referenced by SetBitrateForResolution().
|
protected |
Definition at line 972 of file v4l2encstreamhandler.cpp.
Referenced by StartEncoding().
|
protected |
|
protected |
Set audio language mode.
Definition at line 674 of file v4l2encstreamhandler.cpp.
Referenced by Configure().
|
protected |
Definition at line 830 of file v4l2encstreamhandler.cpp.
|
protected |
Definition at line 702 of file v4l2encstreamhandler.cpp.
Referenced by V4L2encRecorder::SetIntOption(), and V4L2encRecorder::SetStrOption().
|
protected |
|
protected |
| bool V4L2encStreamHandler::StartEncoding | ( | void | ) |
Definition at line 495 of file v4l2encstreamhandler.cpp.
Referenced by RestartEncoding(), V4L2encRecorder::StartEncoding(), and V4L2encSignalMonitor::UpdateValues().
|
protected |
Definition at line 130 of file v4l2encstreamhandler.cpp.
Referenced by V4L2encRecorder::run().
| bool V4L2encStreamHandler::StopEncoding | ( | void | ) |
Definition at line 607 of file v4l2encstreamhandler.cpp.
Referenced by RestartEncoding(), run(), V4L2encRecorder::StopEncoding(), and ~V4L2encStreamHandler().
|
friend |
Definition at line 23 of file v4l2encstreamhandler.h.
|
friend |
Definition at line 24 of file v4l2encstreamhandler.h.
|
staticprivate |
Definition at line 128 of file v4l2encstreamhandler.h.
Referenced by SetOption().
|
staticprivate |
Definition at line 129 of file v4l2encstreamhandler.h.
Referenced by SetOption().
|
staticprivate |
Definition at line 130 of file v4l2encstreamhandler.h.
Referenced by SetOption().
|
staticprivate |
Definition at line 131 of file v4l2encstreamhandler.h.
Referenced by SetOption().
|
private |
Definition at line 106 of file v4l2encstreamhandler.h.
Referenced by Configure(), and SetOption().
|
private |
Definition at line 113 of file v4l2encstreamhandler.h.
Referenced by SetOption().
|
private |
Definition at line 114 of file v4l2encstreamhandler.h.
Referenced by Configure(), and SetOption().
|
private |
Definition at line 115 of file v4l2encstreamhandler.h.
Referenced by SetOption().
|
private |
Definition at line 110 of file v4l2encstreamhandler.h.
Referenced by Configure(), and SetOption().
|
private |
Definition at line 134 of file v4l2encstreamhandler.h.
Referenced by Configure().
|
private |
Definition at line 111 of file v4l2encstreamhandler.h.
Referenced by SetLanguageMode(), and SetOption().
|
private |
Definition at line 112 of file v4l2encstreamhandler.h.
Referenced by Configure(), and SetOption().
|
private |
Definition at line 116 of file v4l2encstreamhandler.h.
Referenced by Configure(), and SetOption().
|
private |
Definition at line 108 of file v4l2encstreamhandler.h.
Referenced by Configure(), SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 107 of file v4l2encstreamhandler.h.
Referenced by Configure(), SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 101 of file v4l2encstreamhandler.h.
|
private |
Definition at line 104 of file v4l2encstreamhandler.h.
Referenced by Configure(), and SetOption().
|
private |
Definition at line 141 of file v4l2encstreamhandler.h.
Referenced by AvailCount(), Close(), Open(), run(), StartEncoding(), and StopEncoding().
|
private |
Definition at line 91 of file v4l2encstreamhandler.h.
Referenced by ErrorString(), Open(), run(), and StartEncoding().
|
private |
Definition at line 90 of file v4l2encstreamhandler.h.
|
private |
Definition at line 133 of file v4l2encstreamhandler.h.
Referenced by Close(), IsOpen(), Open(), StartEncoding(), and StopEncoding().
|
private |
Definition at line 94 of file v4l2encstreamhandler.h.
Referenced by HasPictureAttributes().
|
private |
Definition at line 93 of file v4l2encstreamhandler.h.
|
private |
Definition at line 137 of file v4l2encstreamhandler.h.
Referenced by Configure(), SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 125 of file v4l2encstreamhandler.h.
Referenced by Configure(), SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 124 of file v4l2encstreamhandler.h.
Referenced by Configure(), SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 126 of file v4l2encstreamhandler.h.
Referenced by Configure(), SetBitrateForResolution(), and SetOption().
|
private |
0 is Main Lang; 1 is SAP Lang; 2 is Dual
Definition at line 117 of file v4l2encstreamhandler.h.
Referenced by SetLanguageMode(), and SetOption().
|
private |
Definition at line 119 of file v4l2encstreamhandler.h.
Referenced by SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 118 of file v4l2encstreamhandler.h.
Referenced by SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 120 of file v4l2encstreamhandler.h.
Referenced by SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 109 of file v4l2encstreamhandler.h.
Referenced by Configure(), SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 122 of file v4l2encstreamhandler.h.
Referenced by SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 121 of file v4l2encstreamhandler.h.
Referenced by SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 123 of file v4l2encstreamhandler.h.
Referenced by SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 149 of file v4l2encstreamhandler.h.
Referenced by StartEncoding(), and StopEncoding().
|
private |
Definition at line 138 of file v4l2encstreamhandler.h.
Referenced by GetSignalStrength().
|
private |
Definition at line 146 of file v4l2encstreamhandler.h.
Referenced by Close(), Configure(), GetSignalStrength(), HasLock(), run(), SetOption(), StartEncoding(), and StopEncoding().
|
private |
Definition at line 147 of file v4l2encstreamhandler.h.
Referenced by Open(), StartEncoding(), and StopEncoding().
|
private |
Definition at line 105 of file v4l2encstreamhandler.h.
Referenced by GetStreamType().
|
private |
Definition at line 140 of file v4l2encstreamhandler.h.
Referenced by Close(), Configure(), Driver(), GetResolution(), GetSignalStrength(), GetStreamType(), HasAudio(), HasSlicedVBI(), HasTuner(), IsOpen(), Open(), SetBitrate(), SetBitrateForResolution(), SetLanguageMode(), SetOption(), StartEncoding(), and StopEncoding().
|
private |
Definition at line 144 of file v4l2encstreamhandler.h.
Referenced by Open(), SetBitrateForResolution(), and SetOption().
|
private |
Definition at line 136 of file v4l2encstreamhandler.h.
Referenced by Configure(), SetBitrateForResolution(), and SetOption().
|
staticprivate |
Definition at line 98 of file v4l2encstreamhandler.h.
|
staticprivate |
Definition at line 97 of file v4l2encstreamhandler.h.
|
staticprivate |
Definition at line 99 of file v4l2encstreamhandler.h.