Skip to content

Commit 00e132c

Browse files
committed
Some hacks removed
Signed-off-by: ryadav698 <[email protected]>
1 parent 2662710 commit 00e132c

File tree

2 files changed

+12
-35
lines changed

2 files changed

+12
-35
lines changed

CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -465,27 +465,11 @@ set(GSTTESTHARNESS_SOURCES
465465

466466
find_path( RIALTO_INCLUDE_DIR NAMES IMediaPipeline.h PATH_SUFFIXES rialto)
467467

468-
# find_path(RIALTO_GSTREAMER_INCLUDE_DIR
469-
# NAMES client/GStreamerMSEMediaPlayerClient.h
470-
# PATH_SUFFIXES rialto-gstreamer
471-
# )
472-
473468

474469
find_library( RIALTO_LIBRARY NAMES libRialtoClient.so RialtoClient )
475470

476-
# find_library(RIALTO_SERVER_MANAGER
477-
# NAMES RialtoServerManager libRialtoServerManager.so
478-
# )
479-
480-
# find_library(RIALTO_OCDM
481-
# NAMES ocdmRialto libocdmRialto.so
482-
# )
483-
484471
include( FindPackageHandleStandardArgs )
485472

486-
# find_package_handle_standard_args( RIALTO DEFAULT_MSG
487-
# RIALTO_LIBRARY RIALTO_INCLUDE_DIR RIALTO_SERVER_MANAGER RIALTO_OCDM )
488-
489473
find_package_handle_standard_args( RIALTO DEFAULT_MSG
490474
RIALTO_LIBRARY RIALTO_INCLUDE_DIR )
491475

test/gstTestHarness/rialto-api-test.cpp

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ uint32_t WaitForNeedDataRequest(int32_t sourceId, int timeoutMs = 5000)
6161
return requestId;
6262
}
6363

64-
65-
6664
void LoadAndDemuxSegment(Mp4Demux &mp4Demux, const char *path)
6765
{
6866
char fullpath[512];
@@ -147,8 +145,8 @@ void ConfigureVideo()
147145
bool hasDrm = false;
148146
std::string mimeType;
149147
StreamFormat streamFormat;
150-
// int32_t width = trackVideo.video.width;
151-
// int32_t height = trackVideo.video.height;
148+
int32_t width = trackVideo.video.width;
149+
int32_t height = trackVideo.video.height;
152150
SegmentAlignment alignment = SegmentAlignment::AU;
153151

154152
switch( trackVideo.codec_type )
@@ -168,10 +166,6 @@ void ConfigureVideo()
168166
CodecData codecData;
169167
const char *codec_ptr = trackVideo.codec_data.c_str();
170168
codecData.data = std::vector<uint8_t>( codec_ptr, codec_ptr + trackVideo.codec_data.size() );
171-
172-
//Temp hack
173-
int32_t width = 1920;
174-
int32_t height = 1080;
175169

176170
std::unique_ptr<IMediaPipeline::MediaSourceVideo> sourceVideo =
177171
std::make_unique<IMediaPipeline::MediaSourceVideo>(
@@ -196,7 +190,6 @@ void InjectAudio(int32_t needDataId)
196190
LoadAndDemuxSegment(trackAudio, "audio/chunk-stream0-00001.m4s");
197191
std::cout << "loading rialtotest /tmp/data/bipbop-gen/audio/chunk-stream0-00001.m4s" << std::endl;
198192

199-
// size_t segmentCount = trackAudio.getNbSegments();
200193
size_t segmentCount = trackAudio.count();
201194
printf("adding %zu audio frames\n", segmentCount);
202195

@@ -271,27 +264,27 @@ int my_main(int argc, char **argv)
271264

272265

273266
// MUST happen before any attachSource() to create a Rialto Gstreamer player
274-
gstMediaPipeline->load(MediaType::MSE, "", "file:///tmp/data/bipbop-gen/main.mpd"); // Temp
267+
gstMediaPipeline->load(MediaType::MSE, "video/mp4", "file:///tmp/data/bipbop-gen/chunk-stream0-00001.m4s"); // Temp
275268

276269
if (!gstMediaPipeline->setVideoWindow(0, 0, 1920, 1080))
277270
{
278271
fprintf(stderr, "Warning: Failed to set video window. Video may not appear.\n");
279272
}
280273

281-
// ConfigureAudio();
282-
// ConfigureVideo();
283-
// ConfigureComplete();
274+
ConfigureAudio();
275+
ConfigureVideo();
276+
ConfigureComplete();
284277

285278
gstMediaPipeline->play();
286279

287-
// uint32_t audioReqId = WaitForNeedDataRequest(sourceIdAudio);
288-
// uint32_t videoReqId = WaitForNeedDataRequest(sourceIdVideo);
280+
uint32_t audioReqId = WaitForNeedDataRequest(sourceIdAudio);
281+
uint32_t videoReqId = WaitForNeedDataRequest(sourceIdVideo);
289282

290-
// if (audioReqId != UINT32_MAX)
291-
// InjectAudio(audioReqId);
283+
if (audioReqId != UINT32_MAX)
284+
InjectAudio(audioReqId);
292285

293-
// if (videoReqId != UINT32_MAX)
294-
// InjectVideo(videoReqId);
286+
if (videoReqId != UINT32_MAX)
287+
InjectVideo(videoReqId);
295288

296289

297290
std::this_thread::sleep_for(std::chrono::seconds(7));

0 commit comments

Comments
 (0)