Skip to content

Commit c7287d6

Browse files
authored
fix addressing in grpc (#158)
1 parent 2ce52aa commit c7287d6

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

launcher/internal/container_controller/container_controller.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ func CreateAndRunContainers(ctx context.Context, cli ContainerController, log lo
118118
// Note - When you use the host network mode in Docker, the container shares
119119
// the host machine's network stack.
120120
}
121-
122121
err := createAndRunContainer(ctx, cli, log, &mcmAgentContainer, config)
123122
if err != nil {
124123
log.Error(err, "Failed to create container MCM MediaProxy Agent!")
@@ -185,7 +184,6 @@ func CreateAndRunContainers(ctx context.Context, cli ContainerController, log lo
185184
}
186185
instance.NmosClient.FfmpegConnectionAddress = instance.FfmpegPipeline.Network.IP
187186
instance.NmosClient.FfmpegConnectionPort = strconv.Itoa(instance.FfmpegPipeline.GRPCPort)
188-
189187
err = createAndRunContainer(ctx, cli, log, &bcsNmosContainer, config)
190188
if err != nil {
191189
log.Error(err, "Failed to create container!")

launcher/resources_library/resources/nmos/nmos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ type Config struct {
1818
GpuHwAcceleration string `json:"gpu_hw_acceleration"`
1919
GpuHwAccelerationDevice string `json:"gpu_hw_acceleration_device,omitempty"`
2020
Domain string `json:"domain"`
21-
FfmpegGrpcServerAddress string `json:"ffmpeg_grpc_server_address,omitempty"`
22-
FfmpegGrpcServerPort string `json:"ffmpeg_grpc_server_port,omitempty"`
21+
FfmpegGrpcServerAddress string `json:"ffmpeg_grpc_server_address"`
22+
FfmpegGrpcServerPort string `json:"ffmpeg_grpc_server_port"`
2323
SenderPayloadType int `json:"sender_payload_type"`
2424
Sender []Sender `json:"sender"`
2525
Receiver []Receiver `json:"receiver"`

launcher/resources_library/utils/operations.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func ConstructContainerConfig(containerInfo *general.Containers, config *parser.
150150
hostConfig.NetworkMode = "host"
151151
}
152152
case general.BcsPipelineFfmpeg:
153-
fmt.Printf(">> BcsPipelineFfmpeg: %+v\n", config.WorkloadToBeRun)
153+
fmt.Printf("\n>>> BcsPipelineFfmpeg: %+v\n", config.WorkloadToBeRun[containerInfo.Id])
154154

155155
containerConfig = &container.Config{
156156
User: "root",
@@ -212,8 +212,8 @@ func ConstructContainerConfig(containerInfo *general.Containers, config *parser.
212212
log.Error(errors.New("NMOS json file does not exist"), "NMOS json file does not exist")
213213
}
214214
errUpdateJson := updateNmosJsonFile(nmosFilePathJson,
215-
config.WorkloadToBeRun[containerInfo.Id].NmosClient.FfmpegConnectionAddress,
216-
config.WorkloadToBeRun[containerInfo.Id].NmosClient.FfmpegConnectionPort)
215+
config.WorkloadToBeRun[containerInfo.Id].FfmpegPipeline.Network.IP,
216+
strconv.Itoa(config.WorkloadToBeRun[containerInfo.Id].FfmpegPipeline.GRPCPort))
217217
if errUpdateJson != nil {
218218
log.Error(errUpdateJson, "Error updating NMOS json file")
219219
}

0 commit comments

Comments
 (0)