Skip to content

Commit cc17315

Browse files
authored
Merge branch 'develop' into release
2 parents 9972600 + 2f45a4e commit cc17315

File tree

4 files changed

+50
-51
lines changed

4 files changed

+50
-51
lines changed

include/Version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
#endif
3636

3737
#define OPENSHOT_VERSION_MAJOR 0; /// Major version number is incremented when huge features are added or improved.
38-
#define OPENSHOT_VERSION_MINOR 2; /// Minor version is incremented when smaller (but still very important) improvements are added.
39-
#define OPENSHOT_VERSION_BUILD 0; /// Build number is incremented when minor bug fixes and less important improvements are added.
40-
#define OPENSHOT_VERSION_SO 15; /// Shared object version number. This increments any time the API and ABI changes (so old apps will no longer link)
38+
#define OPENSHOT_VERSION_MINOR 1; /// Minor version is incremented when smaller (but still very important) improvements are added.
39+
#define OPENSHOT_VERSION_BUILD 9; /// Build number is incremented when minor bug fixes and less important improvements are added.
40+
#define OPENSHOT_VERSION_SO 14; /// Shared object version number. This increments any time the API and ABI changes (so old apps will no longer link)
4141
#define OPENSHOT_VERSION_MAJOR_MINOR STRINGIZE(OPENSHOT_VERSION_MAJOR) "." STRINGIZE(OPENSHOT_VERSION_MINOR); /// A string of the "Major.Minor" version
4242
#define OPENSHOT_VERSION_ALL STRINGIZE(OPENSHOT_VERSION_MAJOR) "." STRINGIZE(OPENSHOT_VERSION_MINOR) "." STRINGIZE(OPENSHOT_VERSION_BUILD); /// A string of the entire version "Major.Minor.Build"
4343

src/FFmpegReader.cpp

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -466,55 +466,55 @@ std::shared_ptr<Frame> FFmpegReader::GetFrame(int64_t requested_frame)
466466
}
467467
else
468468
{
469-
// Create a scoped lock, allowing only a single thread to run the following code at one time
470-
const GenericScopedLock<CriticalSection> lock(getFrameCriticalSection);
471-
472-
// Check the cache a 2nd time (due to a potential previous lock)
473-
if (has_missing_frames)
474-
CheckMissingFrame(requested_frame);
475-
frame = final_cache.GetFrame(requested_frame);
476-
if (frame) {
477-
// Debug output
478-
ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::GetFrame", "returned cached frame on 2nd look", requested_frame, "", -1, "", -1, "", -1, "", -1, "", -1);
479-
480-
// Return the cached frame
481-
return frame;
482-
}
483-
484-
// Frame is not in cache
485-
// Reset seek count
486-
seek_count = 0;
487-
488-
// Check for first frame (always need to get frame 1 before other frames, to correctly calculate offsets)
489-
if (last_frame == 0 && requested_frame != 1)
490-
// Get first frame
491-
ReadStream(1);
492-
493-
// Are we within X frames of the requested frame?
494-
int64_t diff = requested_frame - last_frame;
495-
if (diff >= 1 && diff <= 20)
496-
{
497-
// Continue walking the stream
498-
return ReadStream(requested_frame);
499-
}
500-
else
501-
{
502-
// Greater than 30 frames away, or backwards, we need to seek to the nearest key frame
503-
if (enable_seek)
504-
// Only seek if enabled
505-
Seek(requested_frame);
469+
#pragma omp critical (ReadStream)
470+
{
471+
// Check the cache a 2nd time (due to a potential previous lock)
472+
if (has_missing_frames)
473+
CheckMissingFrame(requested_frame);
474+
frame = final_cache.GetFrame(requested_frame);
475+
if (frame) {
476+
// Debug output
477+
ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::GetFrame", "returned cached frame on 2nd look", requested_frame, "", -1, "", -1, "", -1, "", -1, "", -1);
506478

507-
else if (!enable_seek && diff < 0)
508-
{
509-
// Start over, since we can't seek, and the requested frame is smaller than our position
510-
Close();
511-
Open();
479+
// Return the cached frame
512480
}
481+
else {
482+
// Frame is not in cache
483+
// Reset seek count
484+
seek_count = 0;
485+
486+
// Check for first frame (always need to get frame 1 before other frames, to correctly calculate offsets)
487+
if (last_frame == 0 && requested_frame != 1)
488+
// Get first frame
489+
ReadStream(1);
490+
491+
// Are we within X frames of the requested frame?
492+
int64_t diff = requested_frame - last_frame;
493+
if (diff >= 1 && diff <= 20)
494+
{
495+
// Continue walking the stream
496+
frame = ReadStream(requested_frame);
497+
}
498+
else
499+
{
500+
// Greater than 30 frames away, or backwards, we need to seek to the nearest key frame
501+
if (enable_seek)
502+
// Only seek if enabled
503+
Seek(requested_frame);
513504

514-
// Then continue walking the stream
515-
return ReadStream(requested_frame);
516-
}
505+
else if (!enable_seek && diff < 0)
506+
{
507+
// Start over, since we can't seek, and the requested frame is smaller than our position
508+
Close();
509+
Open();
510+
}
517511

512+
// Then continue walking the stream
513+
frame = ReadStream(requested_frame);
514+
}
515+
}
516+
} //omp critical
517+
return frame;
518518
}
519519
}
520520

src/Timeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ std::shared_ptr<Frame> Timeline::GetFrame(int64_t requested_frame)
808808
ZmqLogger::Instance()->AppendDebugMethod("Timeline::GetFrame (Add frame to cache)", "frame_number", frame_number, "info.width", info.width, "info.height", info.height, "", -1, "", -1, "", -1);
809809

810810
// Set frame # on mapped frame
811-
#pragma omp critical (T_GetFrame)
811+
#pragma omp ordered
812812
{
813813
new_frame->SetFrameNumber(frame_number);
814814

src/bindings/python/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ IF (PYTHONLIBS_FOUND)
5555
GET_FILENAME_COMPONENT(_ABS_PYTHON_MODULE_PATH "${_ABS_PYTHON_MODULE_PATH}" ABSOLUTE)
5656
FILE(RELATIVE_PATH _REL_PYTHON_MODULE_PATH ${CMAKE_INSTALL_PREFIX} ${_ABS_PYTHON_MODULE_PATH})
5757
SET(PYTHON_MODULE_PATH ${_REL_PYTHON_MODULE_PATH})
58-
59-
58+
6059
############### INSTALL HEADERS & LIBRARY ################
6160
### Install Python bindings
6261
INSTALL(TARGETS _openshot DESTINATION ${PYTHON_MODULE_PATH} )

0 commit comments

Comments
 (0)