You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/cudacodec/include/opencv2/cudacodec.hpp
+38-3Lines changed: 38 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -352,7 +352,6 @@ enum class VideoReaderProps {
352
352
PROP_RAW_PACKAGES_BASE_INDEX = 2, //!< Base index for retrieving raw encoded data using retrieve().
353
353
PROP_NUMBER_OF_RAW_PACKAGES_SINCE_LAST_GRAB = 3, //!< Number of raw packages recieved since the last call to grab().
354
354
PROP_RAW_MODE = 4, //!< Status of raw mode.
355
-
PROP_LRF_HAS_KEY_FRAME = 5, //!< FFmpeg source only - Indicates whether the Last Raw Frame (LRF), output from VideoReader::retrieve() when VideoReader is initialized in raw mode, contains encoded data for a key frame.
356
355
PROP_COLOR_FORMAT = 6, //!< Set the ColorFormat of the decoded frame. This can be changed before every call to nextFrame() and retrieve().
357
356
PROP_UDP_SOURCE = 7, //!< Status of VideoReaderInitParams::udpSource initialization.
358
357
PROP_ALLOW_FRAME_DROP = 8, //!< Status of VideoReaderInitParams::allowFrameDrop initialization.
@@ -487,8 +486,7 @@ class CV_EXPORTS_W VideoReader
487
486
- Out: Value of the property.
488
487
@return `true` unless the property is not supported.
/** @brief Determine whether the raw package at \a idx contains encoded data for a key frame.
502
+
503
+
@param idx Index of the encoded package to check.
504
+
505
+
@returns `true` if the raw package at \a idx contains encoded data for a key frame and `false` otherwise.
506
+
507
+
@note A typical use case is deciding to archive live video after streaming has been initialized. In this scenario you would not want to write any encoded frames before a key frame. This is simulated in the example below where VideoReader is initialized without enabling raw mode
Because raw mode has been enabled mid stream the first raw package retrieved now is not guaranteed to contain a key frame. To locate the next raw package containing a key frame rawPackageHasKeyFrame() can then be used as shown below.
0 commit comments