1

편집 : 아래의 내 의견에 따라 다른 Honeycomb 3.2 및 ICS 장치로 테스트를 연장 할 수있었습니다. 모든 경우에 URL이 실제로 나타나기 때문에 적응 형 스트리밍의 유효성을 검사 할 수 있습니다. 그러므로 이것은 Sony Blueray만의 문제입니다 (당시로서는 유일한 적응 형 스트리밍 지원 장치였습니다). 이것은 3.2+ OS에서 문제가 아니기 때문에 하나의 제조업체 장치 만 있으면 적응 형 스트리밍 테스트에서 문제가되지 않으며 지원 요청을 철회 할 수 있습니다.Google - TV 소니 3.2 안드로이드 프로그램 내에서 HLS 스트림을 실행하는 경우 (억제) URL 억제를 중지하는 방법

URL이 차단되어 locat/DDMS에 표시되지 않는 문제가 있습니다. 내가하려고하는 것은 HLS 적응 형 스트리밍이 실제로 적응하고 있는지 확인하는 것입니다. 내가 어떻게 할 것인가는 logcat을 모니터하고 세그먼트를 주시하는 것입니다. 문제는 URL이 표시되지 않도록 할 수 없다는 것입니다. 무슨 일이 일어나고 있는지보고 여기에 내가 로그 캣에서 보는 것과 스 니펫의

05-15 14 :.. 05 : 03.499 : D는/AVAPIMediaPlayer는 (247) : 05 : 03.503 : AVAPIMediaPlayer이
05-15 (14)를 구성 D/AVAPIMediaPlayer (247) : 05 : 03.503 : D/AVAPIMediaPlayer (247) surfaceChangedCallback D/AVAPIMediaPlayer이 (247) : >
05-15 14 BLOCKED SetDataSource < : 05 : 03.503 initCheck는
05-15 14이라고 :이 0x669017 setVideoRectangle를 호출하십시오. 14/05 : 03.507 : D/AVAPIMediaPlayer (247) : MIME 형식 비디오/mp2t 용 플레이어 코어
05-15 14 : 05 : 03.507 : D/AVSettingsBridge (247) : 처리 준비 : c560b6c8f9 입력 0
05-15 14 : 05 : 03.507 : I/AVSettingsBridge (247) IAVSettingsBridgeImpl :: registerCb,지도 크기 : 0-> 1
05-15 14 : 05 : 03.511 : I/LiveSession (247)의 I/NuHTTPDataSource이 (247) : < URL 억제 > @ 0 접속 05 : 03.511 < URL이 >

05-15 14 억제으로 onConnect

이제 크롬 프레임 워크와 시크릿 모드로 빠르게 되돌아갔습니다. 일부 프레임 워크 소스 : http://androidxref.com/source/s?defs=kFlagIncognito&project=frameworks.

81  if (!(mFlags & kFlagIncognito)) { 
82   LOG_PRI(ANDROID_LOG_INFO, LOG_TAG, "connect to %s @%lld", uri, offset); 
83  } else { 
84   LOG_PRI(ANDROID_LOG_INFO, LOG_TAG, 
85     "connect to <URL suppressed> @%lld", offset); 

가 나는 또한 안드로이드 3.0에 대한 참조를 집어 "브라우저는 사용자가 이동하고보다 효율적으로 구성 할 수 있도록 새로운 기능이 포함되어 있습니다. 여러 탭이 브라우저 창을 교체하고 새로운"시크릿 "모드는 익명 검색을 할 수 있습니다."

기본적으로 필자는 시크릿 모드로 전환 할 것입니다.

지금, 저는 무릎에 떨어 뜨린 코드로 고생하고있는 코더가 아니지만 어쨌든 setDataSource (컨텍스트 컨텍스트, URI uri) 또는 관련 HTTP 헤더 어딘가에 태그/플래그가 있습니다. 시크릿 모드를 사용 또는 사용 중지하도록 설정할 수 있습니다. 그리고 그 노련한 안드로이드 프로그래머는 아마 그것을 빨리 알아낼 수있을 것입니다.

아무도 도와 줄 수 있습니까?

도움이된다면 아래에 추가 참조 사항이 있습니다.우리의 코드에서


참조 : 프레임 워크에서

public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 

    Intent receivedIntent = this.getIntent(); 
    receivedIntent = this.getIntent(); 
    String title = receivedIntent.getExtras().getString("label"); 
    String subtitle = receivedIntent.getExtras().getString("subtitle"); 
    String description = receivedIntent.getExtras().getString("description"); 
    String URI = receivedIntent.getExtras().getString("URI"); 
    String imagePrefix = receivedIntent.getExtras().getString("imagePrefix"); 
    setContentView(R.layout.video_page); 

    String fileName = Environment.getExternalStorageDirectory().toString() + "/CamaroPit/" + imagePrefix + ".mp4"; 
    File file = new File(fileName); 
    if (!file.exists()) { 
     fileName = Environment.getExternalStorageDirectory().toString() + "/CamaroPit/alschevrolet.mp4"; 
    } 

    Log.d("GTV", "Video to play: " + fileName); 
    TextView textTitle = (TextView) findViewById(R.id.video_page_title); 
    textTitle.setText(title); 
    TextView textSubtitle = (TextView) findViewById(R.id.video_page_subtitle); 
    if (subtitle.equals("subtitle")) { 
     subtitle = "Check out \""+ title + "\" and really get a feel for your Camaro."; 
    } 
    textSubtitle.setText(subtitle); 
    TextView textDescription = (TextView) findViewById(R.id.video_page_description); 
    textDescription.setText(description); 
    this.getWindow().setFormat(PixelFormat.TRANSPARENT); 
    final VideoView vView = (VideoView) findViewById(R.id.page_view); 
    vView.setMediaController(new MediaController(this)); 
    vView.setVideoURI(Uri.parse(URI)); 
    vView.requestFocus();  
} 

item.setOnClickListener(new OnClickListener() { 
@Override 
public void onClick(View view) { 
    final VideoView vView = (VideoView) GTVHomeScreenSetup.this.homeScreen.findViewById(R.id.gtv_video_view); 
    MediaController mC = new MediaController(GTVHomeScreenSetup.this.homeScreen); 
    vView.setMediaController(mC); 
    mC.setAnchorView(vView); 

    VideoData clickedVideo = currentVideoList.get(item.position); 

    vView.setVideoURI(Uri.parse(homeScreen.getVideoURI(clickedVideo, cPath))); 
    vView.start(); 

    item.requestFocus(); 
    for (ImageItemView item : GTVHomeScreenSetup.this.imageItems) { 
     item.unSelect(); 
    } 
    item.select(); 

추가 참조 :

PS : 그것은 나를 하이퍼 링크로 하이퍼 링크를 게시 할 수 없습니다.

// HTTPBase.h (http://androidxref.com/source/xref/frameworks/base/media/libstagefright/include/HTTPBase.h)

28 struct HTTPBase : public DataSource { 
29  enum Flags { 
30   // Don't log any URLs. 
31   kFlagIncognito = 1 
32  }; 

// HTTPLiveSource.h (HTTP : //androidxref.com/source/xref/frameworks/base/media/libmediaplayerservice/nuplayer/HTTPLiveSource.h)

 struct NuPlayer::HTTPLiveSource : public NuPlayer::Source { 
30  HTTPLiveSource(
31    const char *url, 
32    const KeyedVector<String8, String8> *headers, 
33    bool uidValid = false, 
34    uid_t uid = 0); 
35 
36  virtual void start(); 
37 
38  virtual status_t feedMoreTSData(); 
39 
40  virtual sp<MetaData> getFormat(bool audio); 
41  virtual status_t dequeueAccessUnit(bool audio, sp<ABuffer> *accessUnit); 
42 
43  virtual status_t getDuration(int64_t *durationUs); 
44  virtual status_t seekTo(int64_t seekTimeUs); 
45  virtual bool isSeekable(); 
46 
47 protected: 
48  virtual ~HTTPLiveSource(); 
    51  enum Flags { 
52   // Don't log any URLs. 
53   kFlagIncognito = 1, 
54  }; 
55 
56  AString mURL; 
57  KeyedVector<String8, String8> mExtraHeaders; 
58  bool mUIDValid; 
59  uid_t mUID; 
60  uint32_t mFlags; 

//HTTPLiveSession.h (http://androidxref.com/source/xref/ frameworks/base/media/libstagefright/include/LiveSession.h # 36)

= 0x8000을

AwesomePlayer 140 시크릿

PreviewPlayerBase.h INCOGNITO 132 = 32768,

//PreviewPlayerBase.cpp (http://androidxref.com/source/xref/frameworks/media/ libvideoeditor/lvpp/PreviewPlayerBase.cpp)

247 status_t PreviewPlayerBase::setDataSource_l(
248   const char *uri, const KeyedVector<String8, String8> *headers) { 
249  reset_l(); 
250 
251  mUri = uri; 
252 
253  if (headers) { 
254   mUriHeaders = *headers; 
255 
256   ssize_t index = mUriHeaders.indexOfKey(String8("x-hide-urls-from-log")); 
257   if (index >= 0) { 
258    // Browser is in "incognito" mode, suppress logging URLs. 
259 
260    // This isn't something that should be passed to the server. 
261    mUriHeaders.removeItemsAt(index); 
262 
263    mFlags |= INCOGNITO; 
264   } 
265  } 
266 
267  if (!(mFlags & INCOGNITO)) { 
268   LOGI("setDataSource_l('%s')", mUri.string()); 
269  } else { 
270   LOGI("setDataSource_l(URL suppressed)"); 
271  } 
272 
273  // The actual work will be done during preparation in the call to 
274  // ::finishSetDataSource_l to avoid blocking the calling thread in 
275  // setDataSource for any significant time. 
276 
277  return OK; 
278 } 
279 




30 struct ChromiumHTTPDataSource : public HTTPBase { 
31  ChromiumHTTPDataSource(uint32_t flags = 0); 
32 
33  virtual status_t connect(
34    const char *uri, 
35    const KeyedVector<String8, String8> *headers = NULL, 
36    off64_t offset = 0); 
37 
38  virtual void disconnect(); 
39 
40  virtual status_t initCheck() const; 
41 
42  virtual ssize_t readAt(off64_t offset, void *data, size_t size); 
43  virtual status_t getSize(off64_t *size); 
44  virtual uint32_t flags(); 

답변

1

우리는 일반적으로 M0n0wall를 사용합니다. 다운로드, DVD 굽기, 2 포트 PC에서 부팅. 하나는 인터넷에 연결하고 다른 하나는 Google TV에 ​​연결합니다. 그런 다음 원하는대로 네트워크를 조절할 수 있습니다.

+0

안녕하세요, 귀하의 안드로이드 미디어 튜토리얼 btw을 읽고 있습니다. 좋은 물건. M0n0wall 참조에 감사드립니다. 아마도 대역폭 조절 스위치를 확인하기 위해 트래픽 셰이퍼를 사용할 수 있습니까? 내 문제는 훨씬 더 기본적인 것이다. Logcat/DDMS 출력에서 ​​URL이 표시되지 않기 때문에 스위치를 볼 수 없습니다. 기본 시크릿 모드로 변경되며 어떤 플래그, 옵션, 매개 변수를 설정할 수 있는지, 어디에서 시크릿 모드를 사용하지 못하게할지 알 수 없습니다. 참고로, 내가 Honeycomb 장치가 아닌 다른 Honeycomb 장치에서 테스트 할 때 발생하는 것은 아닙니다. 그러나 HLS를 지원하지는 않습니다. – MikeInDetroit

+0

나에게 이메일을 보내거나 G +를 사용하면 몇 가지 추가 힌트를 나누 겠지만, 나는이 시간에 공개하도록하고 싶지 않습니다. –

+0

스위치를 보려면 서버의 http 액세스 로그를보고 싶을 수도 있습니다. 왜 HLS와 시크릿 모드를 사용하지 않는지 모르겠지만 Android 나 문서의 버그처럼 보입니다. – vipw

0

문제가 단일 제조업체 장치로 분리되어 더 이상 적응 형 스트리밍을 방지하지 않습니다. 실제로 Sony BLueray가 비디오 스트리밍을 조정하지 못하면 여전히 문제가 될 수 있지만 Sony에 전달되어야 할 것입니다. 그들의 시간 동안 모두에게 감사하십시오.