media

MediaCapture StartPreviewAsync fails

霸气de小男生 提交于 2019-12-06 10:32:26
I am trying to start video preview capture from the camera in my UWP app but StartPreviewAsync throws an exception Sample Code: MediaCapture mc = new MediaCapture(); await mc.InitializeAsync(); await mc.StartPreviewAsync(); This error occurs because currently StartPreviewAsync requires a sink to output frames to. This can be fixed by creating a capture element in xaml to display the frames. <CaptureElement Name="captureElement"/> now code can be updated to display the preview to the screen MediaCapture mc = new MediaCapture(); await mc.InitializeAsync(); captureElement.Source = mc; await mc

android mediacodec: real time decoding h264 nals

给你一囗甜甜゛ 提交于 2019-12-06 08:31:34
问题 I'm trying to decode h264 nals in real time with android low level media api. Each nal contains one full frame, so i expect that after feeding input with my nal and calling dequeueOutputBuffer it would "immediatly" (with the litle delay of course) display my frame but it doesn't. I see the first frame and the dequeue returns the first buffer only afer feeding the decoder with the second one which at this time should render the second frame. Frames are encoded with zerolatency preset of x264

Media.release() in cordova's Media plugin

点点圈 提交于 2019-12-06 05:44:21
How does Media.release() work. Looking at the docs it feels that you have to use it like this: MediaService.loadMedia('sounds/connection-error.wav').then(function(media){ media.play(); media.release(); }); But I googled enough to know that is wrong. We have to explicitly release the core instances on Android. But how to do that? If I have 8 views in my app and if I play a sound file on each of those views does that count as 8 core instances being used? And can I go back to say view number 1 and again play the sound associated with that view? If so, would that count as a 9th instances ?

how to make style sheet for tablet and iphone

懵懂的女人 提交于 2019-12-06 04:04:26
I was thinking the link target on the stylesheet would make my css file only load when it loads on a tablet or iphone. But the elements I'm trying to hide are still there. Im currently using (media="handheld") <link rel="stylesheet" type="text/css" hrf="css/media.css" media="handheld" /> There are too many mobile device models out there to write stylesheets for; you'd be better off adjusting your CSS based on Screen Size . This is especially helpful for targeting Android Tablets which comes in different sizes. See this useful tutorial for further explanation: http://css-tricks.com/resolution

Read ID3 tags without downloading the whole file

妖精的绣舞 提交于 2019-12-06 03:58:18
问题 Is it possible to read ID3 tags (Duration, Artist, title...) of an MP3 file without having to download the whole file? I did a few tests and I was able to get the Artist and title tags with only downloading a few bytes of the MP3 file.. but I'm not sure if it's possible for Duration and other tags.. Thanks. 回答1: I just find out that ffmpeg can read ID3 tags of a remote file without having to download the whole file: root@local1:/# ffmpeg -i http://physics.ujep.cz/~mmaly/mp3/Mozart/Mass_in_C

Uploading files doesn't work with TransferUtility Amazon S3 in Android

倾然丶 夕夏残阳落幕 提交于 2019-12-06 03:31:12
问题 Hi I have tried to upload a dummy textfile to Amazon S3. however it doesn't work but the log generated an id. When I refresh the Amazon S3 bucket dashboard. the file hasn't been transferred. public class AmazonService extends AsyncTask<String, Boolean, Boolean> { Context mContext; public AmazonService(Context context) { mContext = context; } @Override protected Boolean doInBackground(String... params) { CognitoCachingCredentialsProvider credentialsProvider = new

Android: Simultaneous video playback and recording

*爱你&永不变心* 提交于 2019-12-06 03:29:17
问题 I'm developing a video chat like application for Android. Can I record and play video on the screen at the same time? Can I compose the videos over one another (FaceTime style) or do the y have to be side by side? Can I use the MediaPlayer and MediaRecorder classes or do I have to use lower level APIs? 回答1: Avner, To answer to your question bit wise 1> Can I record and play video on the screen at the same time? Ans : yes you can. 2> Can I compose the videos over one another (FaceTime style)

Android: Pause voice Recorder and Resume

我的未来我决定 提交于 2019-12-06 03:24:27
I've used following code as base to create a recorder. I can start and stop audio recording and it gets saved properly in the location. But now I have a requirments to pause the voice recorder How to pause the audio recorder? And resume voice recording? I've seen a voice recording appliation in my samsung galaxy Ace, it has a pause button. Can someone enlighten me. public class audio { final MediaRecorder recorder = new MediaRecorder(); final String path; /** * Creates a new audio recording at the given path (relative to root of SD card). */ public audio(String path) { this.path = sanitizePath

jPlayer songs not loading correctly using MVC method

自古美人都是妖i 提交于 2019-12-06 01:21:11
问题 If I use mp3: "/Music/StreamUploadedSongs/1" in the following code: var player = new $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { mp3: "/Music/StreamUploadedSongs/1", }); }, cssSelectorAncestor: "#jp_container_1", swfPath: "~Scripts/Jplayer/jquery.jplayer.swf", useStateClassSkin: true, autoBlur: false, keyEnabled: true } }); Here is what it looks like, you can see jplayer isn't moving the times correctly (they are overlapping) and also the seek/play bar

Best Way to combine Audio files in Android

人走茶凉 提交于 2019-12-06 01:07:28
问题 I am developing Recording App that includes Pause/Play option. I tried with both Media Recorder and AudioRecord In case of AudioRecord , the recorded audio consumes larger size, so if the recording size increases say for eg: if i record 1 min audio it consumes 40 to 50MB an it really paining to combine by converting it to . raw file and send to php server . So i tried with Media Recorder , it consumes less size ,but not able to combine using the previous way handled in Audio Record. Next step