Skip to content

Commit

Permalink
feat: port 2.1 image scroll producer (#1372)
Browse files Browse the repository at this point in the history
* feat: port 2.1 image scroll producer

* fixup

* Update src/modules/image/producer/image_scroll_producer.cpp

* WIP
  • Loading branch information
ronag authored Mar 15, 2021
1 parent bf510d4 commit 4de6d18
Show file tree
Hide file tree
Showing 6 changed files with 540 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
cmake_minimum_required(VERSION 2.6)
project("modules")

add_subdirectory(ffmpeg)
add_subdirectory(oal)
add_subdirectory(decklink)
add_subdirectory(screen)
add_subdirectory(newtek)
if (ENABLE_HTML)
add_subdirectory(html)
endif ()

if (MSVC)
add_subdirectory(flash)
add_subdirectory(bluefish)
endif()

add_subdirectory(image)
cmake_minimum_required(VERSION 2.6)
project("modules")

add_subdirectory(image)
add_subdirectory(ffmpeg)
add_subdirectory(oal)
add_subdirectory(decklink)
add_subdirectory(screen)
add_subdirectory(newtek)
if (ENABLE_HTML)
add_subdirectory(html)
endif ()

if (MSVC)
add_subdirectory(flash)
add_subdirectory(bluefish)
endif()

4 changes: 4 additions & 0 deletions src/modules/image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set(SOURCES

producer/image_producer.cpp

producer/image_scroll_producer.cpp

util/image_algorithms.cpp
util/image_loader.cpp

Expand All @@ -16,6 +18,8 @@ set(HEADERS

producer/image_producer.h

producer/image_scroll_producer.h

util/image_algorithms.h
util/image_loader.h
util/image_view.h
Expand Down
2 changes: 2 additions & 0 deletions src/modules/image/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "consumer/image_consumer.h"
#include "producer/image_producer.h"
#include "producer/image_scroll_producer.h"

#include <core/consumer/frame_consumer.h>
#include <core/producer/frame_producer.h>
Expand All @@ -42,6 +43,7 @@ std::wstring version() { return u16(FreeImage_GetVersion()); }
void init(core::module_dependencies dependencies)
{
FreeImage_Initialise();
dependencies.producer_registry->register_producer_factory(L"Image Scroll Producer", create_scroll_producer);
dependencies.producer_registry->register_producer_factory(L"Image Producer", create_producer);
dependencies.consumer_registry->register_consumer_factory(L"Image Consumer", create_consumer);
}
Expand Down
4 changes: 4 additions & 0 deletions src/modules/image/producer/image_producer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ class ieq
spl::shared_ptr<core::frame_producer> create_producer(const core::frame_producer_dependencies& dependencies,
const std::vector<std::wstring>& params)
{
if (boost::contains(params.at(0), L"://")) {
return core::frame_producer::empty();
}

auto length = get_param(L"LENGTH", params, std::numeric_limits<uint32_t>::max());

// if (boost::iequals(params.at(0), L"[IMG_SEQUENCE]"))
Expand Down
Loading

0 comments on commit 4de6d18

Please sign in to comment.