Implement decoding=Keyframes + OnDemand
parent
3bcd0447a7
commit
997c1197cf
|
@ -461,7 +461,7 @@ CREATE TABLE `Monitors` (
|
|||
`Recording` enum('None', 'OnMotion', 'Always') NOT NULL default 'Always',
|
||||
`Enabled` tinyint(3) unsigned NOT NULL default '1',
|
||||
`DecodingEnabled` tinyint(3) unsigned NOT NULL default '1',
|
||||
`Decoding` enum('None','Ondemand','KeyFrames','Always') NOT NULL default 'Always',
|
||||
`Decoding` enum('None','Ondemand','KeyFrames','KeyFrames+Ondemand', 'Always') NOT NULL default 'Always',
|
||||
`JanusEnabled` BOOLEAN NOT NULL default false,
|
||||
`JanusAudioEnabled` BOOLEAN NOT NULL default false,
|
||||
`LinkedMonitors` varchar(255),
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/*ALTER TABLE `Monitors` MODIFY `Decoding` enum('None','Ondemand','KeyFrames','Always') NOT NULL default 'Always';*/
|
||||
ALTER TABLE `Monitors` MODIFY `Decoding` enum('None','Ondemand','KeyFrames','KeyFrames+Ondemand', 'Always') NOT NULL default 'Always';
|
|
@ -144,6 +144,7 @@ std::string Decoding_Strings[] = {
|
|||
"None",
|
||||
"On demand",
|
||||
"Keyframes",
|
||||
"Keyframes + Ondemand",
|
||||
"Always"
|
||||
};
|
||||
|
||||
|
@ -2600,6 +2601,8 @@ bool Monitor::Decode() {
|
|||
((decoding == DECODING_ONDEMAND) and this->hasViewers() )
|
||||
or
|
||||
((decoding == DECODING_KEYFRAMES) and packet->keyframe)
|
||||
or
|
||||
((decoding == DECODING_KEYFRAMESONDEMAND) and (this->hasViewers() or packet->keyframe))
|
||||
) {
|
||||
|
||||
// Allocate the image first so that it can be used by hwaccel
|
||||
|
|
|
@ -95,6 +95,7 @@ public:
|
|||
DECODING_NONE=1,
|
||||
DECODING_ONDEMAND,
|
||||
DECODING_KEYFRAMES,
|
||||
DECODING_KEYFRAMESONDEMAND,
|
||||
DECODING_ALWAYS
|
||||
} DecodingOption;
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ public static function getDecodingOptions() {
|
|||
'None' => translate('None'),
|
||||
'Ondemand' => translate('On Demand'),
|
||||
'KeyFrames' => translate('KeyFrames Only'),
|
||||
'KeyFrames+Ondemand' => translate('Keyframes + Ondemand'),
|
||||
'Always' => translate('Always'),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue