media

Get images thumbnail file paths

南楼画角 提交于 2019-12-01 06:31:08
I'm trying to get the thumnail paths , not the bitmaps objects. When I query for these, some of the thumbnail paths are null for some reason. (I have 1028 thumbnail images in my device, the cursor length is indeed 1028, but still returning nulls) I know there are 1028 thumbnail images because I checked. Here's my code: String[] projection = {MediaStore.Images.Thumbnails._ID}; // Create the cursor pointing to the SDCard cursor = this.getContentResolver().query( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, MediaStore

how to adjust master volume in vista/xp

让人想犯罪 __ 提交于 2019-12-01 05:58:59
i want to adjust the volume programatically like Get/SetMasterVolume in vista and xp? using mmsystem unit? Sebastian Oliva Here's the implementation of a general purpose api for audio: MMDevApi http://social.msdn.microsoft.com/Forums/en/windowspro-audiodevelopment/thread/5ce74d5d-2b1e-4ca9-a8c9-2e27eb9ec058 and an example with a button unit Unit33; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, MMDevApi, ActiveX, StdCtrls; type TForm33 = class(TForm) Button1: TButton; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender:

Error '!dat' trying to set the (null) audio devices' sample rate

守給你的承諾、 提交于 2019-12-01 05:42:38
I am trying to play an audio clip (using AVAudioPlayer) and a video clip (using MPMoviePlayerController), both of which were working. I then checked the files into SVN and pulled them down on another Mac. Now when I run the app (iPad app) when it tries to play either the audio or video, both give the error: Error '!dat' trying to set the (null) audio devices' sample rate Figuring that SVN corrupted the files, (even though the Mac's QuickLook will play them fine), I replaced them with the versions on the Mac where they still work. However I am still getting the error. All code is exactly the

CSS3 Media Queries 实现响应式设计

无人久伴 提交于 2019-12-01 05:28:34
在 CSS2 中,你可以为不同的媒介设备(如屏幕、打印机)指定专用的样式表,而现在借助 CSS3 的 Media Queries 特性,可以更为有效的实现这个功能。你可以为媒介类型添加某些条件,检测设备并采用不同的样式表。   例如,你可以把用于大屏幕上显示的样式和用于移动设备的专用样式放在一个样式文档中,这样,在不改变文档内容的情况下,不同的设备可以呈现不同的界面外观。阅读这篇文章学习 CSS3 Media Queries 的基本功能和国外使用 CSS3 的 Media Queries 特性的优秀网站案例。 CSS3 Media Queries 看下这个 在线演示 ,调整你的浏览器窗口尺寸,看看它的变化。 Max Width 下面的样式会在可视区域的宽度小于 600px 的时候被应用。 1 2 3 4 5 @media screen and ( max-width : 600px ) { .class { background : #ccc ; } } 如果你想链接到一个单独的样式表,把下面的代码放在<head>标签里。 1 <link rel= "stylesheet" media= "screen and (max-width: 600px)" href= "small.css" /> Min Width 下面的样式会在可视区域的宽度大于 900px 的时候被应用。 1 2

with just a plain html and js file, how can i force a link to an mp3 to download instead of just play?

女生的网名这么多〃 提交于 2019-12-01 05:24:50
i have a link to a media file such as an mp3, and i want it to get downloaded when the user clicks on it, instead of just having the file get played. the page i have in mind is just a plain static html page. any ideas? In order to make that happen you need to send a header with Content-disposition: attachment; filename=fname.ext header in your favorite language before sending the file. Without knowing the specifics such as what language and what control you have over your server configuration I cannot give you more detailed instructions. You cannot do it with just html and javascript however.

with just a plain html and js file, how can i force a link to an mp3 to download instead of just play?

人盡茶涼 提交于 2019-12-01 04:08:24
问题 i have a link to a media file such as an mp3, and i want it to get downloaded when the user clicks on it, instead of just having the file get played. the page i have in mind is just a plain static html page. any ideas? 回答1: In order to make that happen you need to send a header with Content-disposition: attachment; filename=fname.ext header in your favorite language before sending the file. Without knowing the specifics such as what language and what control you have over your server

how to adjust master volume in vista/xp

▼魔方 西西 提交于 2019-12-01 03:33:37
问题 i want to adjust the volume programatically like Get/SetMasterVolume in vista and xp? using mmsystem unit? 回答1: Here's the implementation of a general purpose api for audio: MMDevApi http://social.msdn.microsoft.com/Forums/en/windowspro-audiodevelopment/thread/5ce74d5d-2b1e-4ca9-a8c9-2e27eb9ec058 and an example with a button unit Unit33; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, MMDevApi, ActiveX, StdCtrls; type TForm33 = class(TForm)

Error '!dat' trying to set the (null) audio devices' sample rate

狂风中的少年 提交于 2019-12-01 03:24:34
问题 I am trying to play an audio clip (using AVAudioPlayer) and a video clip (using MPMoviePlayerController), both of which were working. I then checked the files into SVN and pulled them down on another Mac. Now when I run the app (iPad app) when it tries to play either the audio or video, both give the error: Error '!dat' trying to set the (null) audio devices' sample rate Figuring that SVN corrupted the files, (even though the Mac's QuickLook will play them fine), I replaced them with the

Orientation media query not working on iPad mini

夙愿已清 提交于 2019-12-01 00:29:59
This small HTML code represents my HTML5 page very clearly. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Pebble Go</title> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" /> </head> <body> <style> @media only screen and (orientation: portrait) { html, body { background: #222; } } @media only screen and (orientation: landscape) { html, body { background: #000; } } </style> </body> </html> And so, on desktop browsers, Android tables and

How to create a IDirect3DSurface from an IBuffer or byte array in UWP

梦想与她 提交于 2019-12-01 00:02:36
I want to create a video from a few RenderTargetBitmap s in UWP. I am doing that by using MediaClips . From RenderTargetBitmap i can get an IBuffer or byte array of pixels. To create a MediaClip I need either an image file or an IDirect3DSurface . Creating an image just to create a clip is very expensive, so I thought of using IDirect3DSurface . How can I do this? I have tried this: RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap(); await renderTargetBitmap.RenderAsync(RenderedGrid, 100, 100); IBuffer pixels = await renderTargetBitmap.GetPixelsAsync(); var values = Enum