@@ -20,7 +20,13 @@ LOGGER_TAG("com.amazonaws.kinesis.video.gstreamer");
2020#define CAMERA_EVENT_COOLDOWN_SECONDS 90 // How long for the event scheduler to wait between triggering events.
2121#define STREAM_BUFFER_DURATION_SECONDS 30 // How long to store buffered GoPs for. It is guaranteed that the buffer will be at least this long,
2222 // but the buffer may be longer to contain the I-frame associated with buffered P-frames.
23-
23+
24+
25+ #define DEFAULT_KVS_PRODUCER_STORAGE_SIZE (128 * 1024 * 1024 ) // Size of the allocated KVS Producer content store buffer. You may have to increase this
26+ // if STREAM_BUFFER_DURATION_SECONDS is long, or if network conditions are poor because
27+ // the fragment acks will be able to keep up with the frequent putFrame calls when
28+ // streaming from the buffer upon an event.
29+
2430// Stream definition parameters.
2531#define DEFAULT_RETENTION_PERIOD_HOURS 2
2632#define DEFAULT_KMS_KEY_ID " "
@@ -405,7 +411,7 @@ static gboolean bus_call(GstBus *bus, GstMessage *msg, gpointer data)
405411 return TRUE ;
406412}
407413
408- // KVS Producer callbacks
414+ // KVS Producer providers and callbacks
409415namespace com { namespace amazonaws { namespace kinesis { namespace video {
410416 class SampleClientCallbackProvider ;
411417 class SampleStreamCallbackProvider ;
@@ -708,7 +714,7 @@ int main(int argc, char* argv[]) {
708714/* Additional Definitions */
709715/* ********************** */
710716
711- /* KVS Producer callbacks */
717+ /* KVS Producer providers and callbacks */
712718namespace com { namespace amazonaws { namespace kinesis { namespace video {
713719
714720 class SampleClientCallbackProvider : public ClientCallbackProvider {
@@ -793,7 +799,7 @@ namespace com { namespace amazonaws { namespace kinesis { namespace video {
793799 device_info_t getDeviceInfo () override {
794800 auto device_info = DefaultDeviceInfoProvider::getDeviceInfo ();
795801 // Set the storage size to 128mb
796- device_info.storageInfo .storageSize = 128 * 1024 * 1024 ;
802+ device_info.storageInfo .storageSize = DEFAULT_KVS_PRODUCER_STORAGE_SIZE ;
797803 return device_info;
798804 }
799805 };
0 commit comments