Skip to content

Commit cbc478a

Browse files
committed
mp4demux count function ref fixed
Signed-off-by: ryadav698 <[email protected]>
1 parent 39afc46 commit cbc478a

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

test/gstTestHarness/rialto-api-test.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,13 @@ void ConfigureAudio()
8686
// const char *codec_ptr = trackAudio.codec_data.c_str();
8787
// codecData.data = std::vector<uint8_t>( codec_ptr, &codec_ptr[trackAudio.codec_data.size()] );
8888

89-
std::unique_ptr<IMediaPipeline::MediaSourceAudio> sourceAudio =
90-
std::make_unique<IMediaPipeline::MediaSourceAudio>(
91-
mimeType,
92-
hasDrm,
93-
alignment,
94-
streamFormat,
95-
trackAudio.audio.rate,
96-
trackAudio.audio.channels,
97-
std::make_shared<CodecData>(codecData) );
89+
std::unique_ptr<IMediaPipeline::MediaSourceAudio> sourceAudio = std::make_unique<IMediaPipeline::MediaSourceAudio>(
90+
mimeType,
91+
hasDrm,
92+
audioConfig,
93+
SegmentAlignment::UNDEFINED,
94+
streamFormat,
95+
nullptr /* codecData*/ );
9896

9997
gstMediaPipeline->attachSource( std::move(sourceAudio), sourceIdAudio );
10098
}
@@ -151,7 +149,8 @@ void InjectAudio()
151149
LoadAndDemuxSegment(trackAudio, "audio/chunk-stream0-00001.m4s");
152150
std::cout << "loading rialtotest /tmp/data/bipbop-gen/audio/chunk-stream0-00001.m4s" << std::endl;
153151

154-
size_t segmentCount = trackAudio.getNbSegments(); // Corrected function name
152+
// size_t segmentCount = trackAudio.getNbSegments();
153+
size_t segmentCount = trackAudio.count();
155154
printf("adding %zu audio frames\n", segmentCount);
156155

157156
for (size_t i = 0; i < segmentCount; ++i)
@@ -180,7 +179,8 @@ void InjectVideo()
180179
LoadAndDemuxSegment(trackVideo, "video/chunk-stream0-00001.m4s");
181180
std::cout << "loading rialtotest /tmp/data/bipbop-gen/video/chunk-stream0-00001.m4s" << std::endl;
182181

183-
size_t segmentCount = trackVideo.getNbSegments(); // Corrected function name
182+
// size_t segmentCount = trackVideo.getNbSegments();
183+
size_t segmentCount = trackVideo.count();
184184
printf("adding %zu video frames\n", segmentCount);
185185

186186
for (size_t i = 0; i < segmentCount; ++i)
@@ -222,10 +222,10 @@ int my_main(int argc, char **argv)
222222
return -1;
223223
}
224224

225-
if (!gstMediaPipeline->setVideoWindow(0, 0, 1920, 1080))
226-
{
227-
fprintf(stderr, "Warning: Failed to set video window. Video may not appear.\n");
228-
}
225+
// if (!gstMediaPipeline->setVideoWindow(0, 0, 1920, 1080))
226+
// {
227+
// fprintf(stderr, "Warning: Failed to set video window. Video may not appear.\n");
228+
// }
229229

230230
gstMediaPipeline->play();
231231

@@ -236,7 +236,7 @@ int my_main(int argc, char **argv)
236236
InjectAudio();
237237
InjectVideo();
238238

239-
std::this_thread::sleep_for(std::chrono::seconds(5));
239+
// std::this_thread::sleep_for(std::chrono::seconds(5));
240240

241241
gstMediaPipeline->stop();
242242

0 commit comments

Comments
 (0)