Skip to content

Commit

Permalink
Fix decklink element name and add connection property
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Nov 3, 2024
1 parent 05330c7 commit ddba6cb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions Daemons/vmpserverd/config.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
- The type specifies the type of the channel.
- The properties are specific to the channel type:
- "v4l2": device (required)
- "decklink": deviceNumber (required), connection (required)
- "pulse": device (required)
- "videoTest": width (required), height (required)
- "audioTest": channels (required)
Expand Down
2 changes: 1 addition & 1 deletion Daemons/vmpserverd/profiles/com.hugomelder.software.plist
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<key>v4l2</key>
<string>v4l2src device={V4L2DEV} ! videoconvertscale add-borders=1 ! video/x-raw, width=1920, height=1080 ! queue ! intervideosink channel={VIDEOCHANNEL.0}</string>
<key>decklink</key>
<string>decklinksrc device-number={DEV} ! videoconvert ! videoscale ! videorate ! video/x-raw, width=1920, height=1080 ! intervideosink channel={VIDEOCHANNEL.0}</string>
<string>decklinkvideosrc device-number={DEV} connection={CON} ! videoconvert ! videoscale ! videorate ! video/x-raw, width=1920, height=1080 ! intervideosink channel={VIDEOCHANNEL.0}</string>
<key>videoTest</key>
<string>videotestsrc is-live=1 ! video/x-raw,width={WIDTH},height={HEIGHT},format=NV12 !
intervideosink channel={VIDEOCHANNEL.0}</string>
Expand Down
2 changes: 1 addition & 1 deletion Daemons/vmpserverd/profiles/com.hugomelder.vaapi.plist
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
-->
<string>v4l2src device={V4L2DEV} ! videoconvertscale add-borders=1 ! video/x-raw, width=1920, height=1080 ! intervideosink channel={VIDEOCHANNEL.0}</string>
<key>decklink</key>
<string>decklinksrc device-number={DEV} ! videoconvert ! videoscale ! videorate ! video/x-raw, width=1920, height=1080 ! intervideosink channel={VIDEOCHANNEL.0}</string>
<string>decklinkvideosrc device-number={DEV} connection={CON} ! videoconvert ! videoscale ! videorate ! video/x-raw, width=1920, height=1080 ! intervideosink channel={VIDEOCHANNEL.0}</string>
<key>videoTest</key>
<string>videotestsrc is-live=1 ! video/x-raw,width={WIDTH},height={HEIGHT},format=NV12 ! intervideosink channel={VIDEOCHANNEL.0}</string>
</dict>
Expand Down
10 changes: 6 additions & 4 deletions Daemons/vmpserverd/src/VMPRTSPServer.m
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,14 @@ - (BOOL)_startChannelPipelinesWithError:(NSError **)error {
CONFIG_ERROR(error, @"decklink channel is missing 'deviceNumber' property")
return NO;
}
NSString *connection = properties[@"connection"];
if (!connection) {
CONFIG_ERROR(error, @"decklink channel is missing 'connection' property");
return NO;
}

// Substitution dictionary for pipeline template
vars = @{
@"VIDEOCHANNEL.0" : name,
@"DEV" : [device stringValue],
};
vars = @{@"VIDEOCHANNEL.0" : name, @"DEV" : [device stringValue], @"CON" : connection};
}

// Skip pipeline creation if type is unknown
Expand Down

0 comments on commit ddba6cb

Please sign in to comment.